forked from enlightenment/enlightenment
e/connman: move types to header to easy of use
SVN revision: 76029
This commit is contained in:
parent
580020bf71
commit
f29da01183
|
@ -1,6 +1,7 @@
|
||||||
#ifndef E_CONNMAN_H
|
#ifndef E_CONNMAN_H
|
||||||
#define E_CONNMAN_H
|
#define E_CONNMAN_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -10,6 +11,57 @@
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
enum Connman_State
|
||||||
|
{
|
||||||
|
CONNMAN_STATE_NONE = -1, /* All unknown states */
|
||||||
|
CONNMAN_STATE_OFFLINE,
|
||||||
|
CONNMAN_STATE_IDLE,
|
||||||
|
CONNMAN_STATE_READY,
|
||||||
|
CONNMAN_STATE_ONLINE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Connman_Service_Type
|
||||||
|
{
|
||||||
|
CONNMAN_SERVICE_TYPE_NONE = -1, /* All non-supported types */
|
||||||
|
CONNMAN_SERVICE_TYPE_ETHERNET,
|
||||||
|
CONNMAN_SERVICE_TYPE_WIFI,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Connman_Object
|
||||||
|
{
|
||||||
|
const char *path;
|
||||||
|
Eina_List *handlers; /* E_DBus_Signal_Handler */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Connman_Manager
|
||||||
|
{
|
||||||
|
struct Connman_Object obj;
|
||||||
|
|
||||||
|
Eina_Inlist *services; /* The prioritized list of services */
|
||||||
|
|
||||||
|
/* Properties */
|
||||||
|
enum Connman_State state;
|
||||||
|
bool offline_mode;
|
||||||
|
|
||||||
|
/* Private */
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
DBusPendingCall *get_services;
|
||||||
|
DBusPendingCall *get_properties;
|
||||||
|
} pending;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Connman_Service
|
||||||
|
{
|
||||||
|
struct Connman_Object obj;
|
||||||
|
EINA_INLIST;
|
||||||
|
|
||||||
|
/* Properties */
|
||||||
|
char *name;
|
||||||
|
enum Connman_State state;
|
||||||
|
enum Connman_Service_Type type;
|
||||||
|
};
|
||||||
|
|
||||||
/* Ecore Events */
|
/* Ecore Events */
|
||||||
extern int E_CONNMAN_EVENT_MANAGER_IN;
|
extern int E_CONNMAN_EVENT_MANAGER_IN;
|
||||||
extern int E_CONNMAN_EVENT_MANAGER_OUT;
|
extern int E_CONNMAN_EVENT_MANAGER_OUT;
|
||||||
|
|
|
@ -12,57 +12,6 @@
|
||||||
#define CONNMAN_MANAGER_IFACE CONNMAN_BUS_NAME ".Manager"
|
#define CONNMAN_MANAGER_IFACE CONNMAN_BUS_NAME ".Manager"
|
||||||
#define CONNMAN_SERVICE_IFACE CONNMAN_BUS_NAME ".Service"
|
#define CONNMAN_SERVICE_IFACE CONNMAN_BUS_NAME ".Service"
|
||||||
|
|
||||||
enum Connman_State
|
|
||||||
{
|
|
||||||
CONNMAN_STATE_NONE = -1, /* All unknown states */
|
|
||||||
CONNMAN_STATE_OFFLINE,
|
|
||||||
CONNMAN_STATE_IDLE,
|
|
||||||
CONNMAN_STATE_READY,
|
|
||||||
CONNMAN_STATE_ONLINE,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Connman_Service_Type
|
|
||||||
{
|
|
||||||
CONNMAN_SERVICE_TYPE_NONE = -1, /* All non-supported types */
|
|
||||||
CONNMAN_SERVICE_TYPE_ETHERNET,
|
|
||||||
CONNMAN_SERVICE_TYPE_WIFI,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Connman_Object
|
|
||||||
{
|
|
||||||
const char *path;
|
|
||||||
Eina_List *handlers; /* E_DBus_Signal_Handler */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Connman_Manager
|
|
||||||
{
|
|
||||||
struct Connman_Object obj;
|
|
||||||
|
|
||||||
Eina_Inlist *services; /* The prioritized list of services */
|
|
||||||
|
|
||||||
/* Properties */
|
|
||||||
enum Connman_State state;
|
|
||||||
bool offline_mode;
|
|
||||||
|
|
||||||
/* Private */
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
DBusPendingCall *get_services;
|
|
||||||
DBusPendingCall *get_properties;
|
|
||||||
} pending;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Connman_Service
|
|
||||||
{
|
|
||||||
struct Connman_Object obj;
|
|
||||||
EINA_INLIST;
|
|
||||||
|
|
||||||
/* Properties */
|
|
||||||
char *name;
|
|
||||||
enum Connman_State state;
|
|
||||||
enum Connman_Service_Type type;
|
|
||||||
};
|
|
||||||
|
|
||||||
static unsigned int init_count;
|
static unsigned int init_count;
|
||||||
static E_DBus_Connection *conn;
|
static E_DBus_Connection *conn;
|
||||||
static char *bus_owner;
|
static char *bus_owner;
|
||||||
|
|
Loading…
Reference in New Issue