diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-07-19 12:02:41 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-07-19 14:32:36 -0700 |
commit | b4b49ff3450ae3350155851227f348b88d2274e1 (patch) | |
tree | 18abc57f274cd323e8e0990174723178542804eb /binding | |
parent | ed1352fd128f98c1ba8f7bad15f6e66322544e5b (diff) |
binding: geoclue: upgrade to binding framework v3guppy_6.90.0guppy/6.90.0flounder_5.99.6flounder_5.99.5flounder_5.99.4flounder_5.99.3flounder_5.99.2flounder/5.99.6flounder/5.99.5flounder/5.99.4flounder/5.99.3flounder/5.99.26.90.05.99.65.99.55.99.45.99.35.99.2
Change-Id: Ia4252f9e8682358b845ca5f43ec905bde341b445
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r-- | binding/afm-geoclue-binding.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/binding/afm-geoclue-binding.c b/binding/afm-geoclue-binding.c index 3f8e4f4..884c252 100644 --- a/binding/afm-geoclue-binding.c +++ b/binding/afm-geoclue-binding.c @@ -27,10 +27,10 @@ #include <glib-object.h> #include <json-c/json.h> -#define AFB_BINDING_VERSION 2 +#define AFB_BINDING_VERSION 3 #include <afb/afb-binding.h> -static struct afb_event location_event; +static afb_event_t location_event; static GClueSimple *simple; /* @@ -99,7 +99,7 @@ static void send_event(GClueSimple *simple) afb_event_push(location_event, jresp); } -static void get_data(struct afb_req request) +static void get_data(afb_req_t request) { json_object *jresp = json_object_new_object(); GClueLocation *location; @@ -139,7 +139,7 @@ static void *geoclue_loop_thread(void *ptr) return NULL; } -static int init() +static int init(afb_api_t api) { pthread_t thread_id; @@ -148,7 +148,7 @@ static int init() return pthread_create(&thread_id, NULL, geoclue_loop_thread, NULL); } -static void subscribe(struct afb_req request) +static void subscribe(afb_req_t request) { const char *value = afb_req_value(request, "value"); @@ -169,7 +169,7 @@ static void subscribe(struct afb_req request) afb_req_fail(request, "failed", "Invalid event"); } -static void unsubscribe(struct afb_req request) +static void unsubscribe(afb_req_t request) { const char *value = afb_req_value(request, "value"); @@ -182,7 +182,7 @@ static void unsubscribe(struct afb_req request) afb_req_fail(request, "failed", "Invalid event"); } -static const struct afb_verb_v2 binding_verbs[] = { +static const struct afb_verb_v3 binding_verbs[] = { { .verb = "location", .callback = get_data, .info = "Get GeoClue coordinates" }, { .verb = "subscribe", .callback = subscribe, .info = "Subscribe to GeoClue events" }, { .verb = "unsubscribe", .callback = unsubscribe, .info = "Unsubscribe to GeoClue events" }, @@ -192,7 +192,7 @@ static const struct afb_verb_v2 binding_verbs[] = { /* * binder API description */ -const struct afb_binding_v2 afbBindingV2 = { +const struct afb_binding_v3 afbBindingV3 = { .api = "geoclue", .specification = "GeoClue service API", .verbs = binding_verbs, |