typedef enum
{
- EDBUS_CONNECTION_EVENT_OBJECT_ADDED = 0,
- EDBUS_CONNECTION_EVENT_OBJECT_REMOVED,
- //EDBUS_CONNECTION_EVENT_NAME_OWNER_CHANGED,
EDBUS_CONNECTION_EVENT_DEL,
EDBUS_CONNECTION_EVENT_LAST /**< sentinel, not a real event type */
} EDBus_Connection_Event_Type;
-typedef struct _EDBus_Connection_Event_Object_Added
-{
- const char *path;
- EDBus_Object *object;
-} EDBus_Connection_Event_Object_Added;
-
-typedef struct _EDBus_Connection_Event_Object_Removed
-{
- const char *path;
-} EDBus_Connection_Event_Object_Removed;
-
-typedef struct _EDBus_Connection_Event_Name_Owner_Changed
-{
- const char *name;
- const char *old_id;
- const char *new_id;
-} EDBus_Connection_Event_Name_Owner_Changed;
-
typedef void (*EDBus_Connection_Event_Cb)(void *data, EDBus_Connection *conn, void *event_info);
/**
edbus_connection_name_object_del(EDBus_Connection *conn, const EDBus_Object *obj)
{
EDBus_Connection_Name *cn = eina_hash_find(conn->names, obj->name);
- const EDBus_Connection_Event_Object_Removed ev = {
- obj->path
- };
if (!cn) return;
if (!cn->objects) return;
eina_hash_del(cn->objects, obj->path, obj);
- _edbus_connection_event_callback_call
- (conn, EDBUS_CONNECTION_EVENT_OBJECT_REMOVED, &ev);
-
edbus_connection_name_gc(conn, cn);
}
edbus_connection_name_object_set(EDBus_Connection *conn, EDBus_Object *obj)
{
EDBus_Connection_Name *cn;
- const EDBus_Connection_Event_Object_Added ev = {
- obj->path,
- obj
- };
cn = edbus_connection_name_get(conn, obj->name);
eina_hash_add(cn->objects, obj->path, obj);
- _edbus_connection_event_callback_call
- (conn, EDBUS_CONNECTION_EVENT_OBJECT_ADDED, &ev);
-
return;
}