********** Method of HomeScreen Service (API) **********
*/
-static void pingSample(struct afb_req request)
+static void pingSample(afb_req_t request)
{
static int pingcount = 0;
afb_req_success_f(request, json_object_new_int(pingcount), "Ping count = %d", pingcount);
* None
*
*/
-static void tap_shortcut (struct afb_req request)
+static void tap_shortcut (afb_req_t request)
{
HMI_NOTICE("homescreen-service","called.");
* None
*
*/
-static void on_screen_message (struct afb_req request)
+static void on_screen_message (afb_req_t request)
{
HMI_NOTICE("homescreen-service","called.");
* None
*
*/
-static void on_screen_reply (struct afb_req request)
+static void on_screen_reply (afb_req_t request)
{
HMI_NOTICE("homescreen-service","called.");
* None
*
*/
-static void subscribe(struct afb_req request)
+static void subscribe(afb_req_t request)
{
const char *value = afb_req_value(request, "event");
HMI_NOTICE("homescreen-service","value is %s", value);
* None
*
*/
-static void unsubscribe(struct afb_req request)
+static void unsubscribe(afb_req_t request)
{
const char *value = afb_req_value(request, "event");
HMI_NOTICE("homescreen-service","value is %s", value);
/*
* array of the verbs exported to afb-daemon
*/
-static const struct afb_verb_v2 verbs[]= {
- /* 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 },
+static const afb_verb_t verbs[]= {
+ /* VERB'S NAME FUNCTION TO CALL */
+ { .verb="ping", .callback=pingSample },
+ { .verb="tap_shortcut", .callback=tap_shortcut },
+ { .verb="on_screen_message", .callback=on_screen_message },
+ { .verb="on_screen_reply", .callback=on_screen_reply },
+ { .verb="subscribe", .callback=subscribe },
+ { .verb="unsubscribe", .callback=unsubscribe },
{NULL } /* marker for end of the array */
};
* homescreen binding preinit function
*
* #### Parameters
- * - null
+ * - api : the api serving the request
*
* #### Return
* None
*
*/
-static int preinit()
+static int preinit(afb_api_t api)
{
HMI_NOTICE("homescreen-service","binding preinit (was register)");
return 0;
* homescreen binding init function
*
* #### Parameters
- * - null
+ * - api : the api serving the request
*
* #### Return
* None
*
*/
-static int init()
+static int init(afb_api_t api)
{
HMI_NOTICE("homescreen-service","binding init");
* homescreen binding event function
*
* #### Parameters
+ * - api : the api serving the request
* - event : event name
* - object : event json object
*
* None
*
*/
-static void onevent(const char *event, struct json_object *object)
+static void onevent(afb_api_t api, const char *event, struct json_object *object)
{
HMI_NOTICE("homescreen-service","on_event %s", event);
}
-const struct afb_binding_v2 afbBindingV2 = {
+const afb_binding_t afbBindingExport = {
.api = "homescreen",
.specification = NULL,
.info = NULL,