aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-dbus.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-22 17:04:22 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-09 14:08:33 +0200
commit7682c2aacb3efd6abed3dee43f8a03d7646d8153 (patch)
tree0adab0a26b1041b23d4486b26d85165e90fecc16 /src/afb-api-dbus.c
parent7f4444176bd6efaa5e189a148351bab5a72c2853 (diff)
Improve naming of evt_eventids
Change-Id: I1fa3cf776110f67ad1b18c4c83f3a1707692ae8b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-dbus.c')
-rw-r--r--src/afb-api-dbus.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c
index 806d7435..cace4d2b 100644
--- a/src/afb-api-dbus.c
+++ b/src/afb-api-dbus.c
@@ -382,7 +382,7 @@ static struct dbus_event *api_dbus_client_event_search(struct api_dbus *api, int
struct dbus_event *ev;
ev = api->client.events;
- while (ev != NULL && (ev->id != id || 0 != strcmp(afb_evt_event_fullname(ev->eventid), name)))
+ while (ev != NULL && (ev->id != id || 0 != strcmp(afb_evt_eventid_fullname(ev->eventid), name)))
ev = ev->next;
return ev;
@@ -403,7 +403,7 @@ static void api_dbus_client_event_create(struct api_dbus *api, int id, const cha
/* no conflict, try to add it */
ev = malloc(sizeof *ev);
if (ev != NULL) {
- ev->eventid = afb_evt_create_event(name);
+ ev->eventid = afb_evt_eventid_create(name);
if (ev->eventid == NULL)
free(ev);
else {
@@ -440,7 +440,7 @@ static void api_dbus_client_event_drop(struct api_dbus *api, int id, const char
*prv = ev->next;
/* destroys the event */
- afb_evt_event_unref(ev->eventid);
+ afb_evt_eventid_unref(ev->eventid);
free(ev);
}
@@ -459,7 +459,7 @@ static void api_dbus_client_event_push(struct api_dbus *api, int id, const char
/* destroys the event */
object = json_tokener_parse(data);
- afb_evt_push(ev->eventid, object);
+ afb_evt_eventid_push(ev->eventid, object);
}
/* subscribes an event */
@@ -848,9 +848,9 @@ static int dbus_req_subscribe(struct afb_xreq *xreq, struct afb_eventid *eventid
uint64_t msgid;
int rc;
- rc = afb_evt_add_watch(dreq->listener->listener, eventid);
+ rc = afb_evt_eventid_add_watch(dreq->listener->listener, eventid);
sd_bus_message_get_cookie(dreq->message, &msgid);
- afb_api_dbus_server_event_send(dreq->listener->origin, 'S', afb_evt_event_fullname(eventid), afb_evt_event_id(eventid), "", msgid);
+ afb_api_dbus_server_event_send(dreq->listener->origin, 'S', afb_evt_eventid_fullname(eventid), afb_evt_eventid_id(eventid), "", msgid);
return rc;
}
@@ -861,8 +861,8 @@ static int dbus_req_unsubscribe(struct afb_xreq *xreq, struct afb_eventid *event
int rc;
sd_bus_message_get_cookie(dreq->message, &msgid);
- afb_api_dbus_server_event_send(dreq->listener->origin, 'U', afb_evt_event_fullname(eventid), afb_evt_event_id(eventid), "", msgid);
- rc = afb_evt_remove_watch(dreq->listener->listener, eventid);
+ afb_api_dbus_server_event_send(dreq->listener->origin, 'U', afb_evt_eventid_fullname(eventid), afb_evt_eventid_id(eventid), "", msgid);
+ rc = afb_evt_eventid_remove_watch(dreq->listener->listener, eventid);
return rc;
}