* limitations under the License.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
-#define AFB_BINDING_VERSION 2
-#include <afb/afb-binding.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <json-c/json.h>
-#include <glib.h>
-#include <pthread.h>
+#endif
#include "hs-helper.h"
#include "hmi-debug.h"
* array of the verbs exported to afb-daemon
*/
static const struct afb_verb_v2 verbs[]= {
- /* VERB'S NAME SESSION MANAGEMENT FUNCTION TO CALL */
- { .verb = "ping", .session = AFB_SESSION_NONE, .callback = pingSample, .auth = NULL },
- { .verb = "tap_shortcut", .session = AFB_SESSION_NONE, .callback = tap_shortcut, .auth = NULL },
- { .verb = "on_screen_message", .session = AFB_SESSION_NONE, .callback = on_screen_message, .auth = NULL },
- { .verb = "on_screen_reply", .session = AFB_SESSION_NONE, .callback = on_screen_reply, .auth = NULL },
- { .verb = "subscribe", .session = AFB_SESSION_NONE, .callback = subscribe, .auth = NULL },
- { .verb = "unsubscribe", .session = AFB_SESSION_NONE, .callback = unsubscribe, .auth = NULL },
+ /* VERB'S NAME FUNCTION TO CALL authorisation some info SESSION MANAGEMENT */
+ { .verb = "ping", .callback = pingSample, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "tap_shortcut", .callback = tap_shortcut, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "on_screen_message", .callback = on_screen_message, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "on_screen_reply", .callback = on_screen_reply, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "subscribe", .callback = subscribe, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
+ { .verb = "unsubscribe", .callback = unsubscribe, .auth = NULL, .info = NULL, .session = AFB_SESSION_NONE },
{NULL } /* marker for end of the array */
};
const struct afb_binding_v2 afbBindingV2 = {
.api = "homescreen",
.specification = NULL,
+ .info = NULL,
.verbs = verbs,
.preinit = preinit,
.init = init,
#define HOMESCREEN_HELPER_H
#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
-#include <stdint.h>
-#include <glib.h>
-#include <errno.h>
+#include <json-c/json.h>
+
typedef enum REQ_ERROR
{
OUT_RANGE
}REQ_ERROR;
-static const char* evlist[] = {
- "tap_shortcut",
- "on_screen_message",
- "on_screen_reply",
- "reserved"
- };
+extern const char* evlist[];
REQ_ERROR get_value_uint16(const struct afb_req request, const char *source, uint16_t *out_id);
REQ_ERROR get_value_int16(const struct afb_req request, const char *source, int16_t *out_id);