Make afb_event_drop obsolete
[src/app-framework-binder.git] / include / afb / afb-service-itf.h
index 1218cd5..490d77e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 "IoT.bzh"
+ * Copyright (C) 2016, 2017 "IoT.bzh"
  * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 #pragma once
 
-/* avoid inclusion of <json-c/json.h> */
-struct json_object;
+#pragma GCC warning "\n\n\
+    This header file <afb/afb-service-itf.h> is OBSOLETE.\n\
+    It is provided for COMPATIBILITY ONLY.\n\n\
+    Please USE <afb/afb-binding.h> and ADAPT YOUR CODE to new names.\n"
 
-struct afb_service_itf
-{
-       void (*call)(void *closure, const char *api, const char *verb, struct json_object *args, void (*callback)(void*, int, struct json_object*), void *callback_closure);
-};
-
-struct afb_service
-{
-       const struct afb_service_itf *itf;
-       void *closure;
-};
-
-extern int afbBindingV1ServiceInit(struct afb_service service);
-
-extern void afbBindingV1ServiceEvent(const char *event, struct json_object *object);
-
-static inline void afb_service_call(struct afb_service service, const char *api, const char *verb, struct json_object *args, void (*callback)(void*, int, struct json_object*), void *callback_closure)
-{
-       service.itf->call(service.closure, api, verb, args, callback, callback_closure);
-}
+#include "afb-binding.h"