summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-07-19 12:02:41 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-07-19 14:32:36 -0700
commitb4b49ff3450ae3350155851227f348b88d2274e1 (patch)
tree18abc57f274cd323e8e0990174723178542804eb /binding
parented1352fd128f98c1ba8f7bad15f6e66322544e5b (diff)
Change-Id: Ia4252f9e8682358b845ca5f43ec905bde341b445 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/afm-geoclue-binding.c16
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,