#include <memory>
#include <algorithm>
#include "hs-helper.h"
#include "hmi-debug.h"
#include "hs-clientmanager.h"
Go to the source code of this file.
static void hideWindow |
( |
afb_req_t |
request | ) |
|
|
static |
hideWindow event
Parameters
Return
None
Definition at line 221 of file homescreen.cpp.
227 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
232 struct json_object *res = json_object_new_object();
235 afb_req_success(request, res,
"afb_event_push event [hideWindow]");
int hideWindow(afb_req_t request)
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static int init |
( |
afb_api_t |
api | ) |
|
|
static |
homescreen binding init function
Parameters
- api : the api serving the request
Return
None
Definition at line 368 of file homescreen.cpp.
370 HMI_NOTICE(
"homescreen-service",
"binding init");
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
static void on_screen_message |
( |
afb_req_t |
request | ) |
|
|
static |
HomeScreen OnScreen message
Parameters
Request key
- display_message : message for display
Return
None
Definition at line 85 of file homescreen.cpp.
91 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
96 struct json_object *res = json_object_new_object();
99 afb_req_success(request, res,
"afb_event_push event [on_screen_message]");
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
int on_screen_message(afb_req_t request)
static void on_screen_reply |
( |
afb_req_t |
request | ) |
|
|
static |
HomeScreen OnScreen Reply
Parameters
Request key
- reply_message : message for reply
Return
None
Definition at line 113 of file homescreen.cpp.
119 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
124 struct json_object *res = json_object_new_object();
127 afb_req_success(request, res,
"afb_event_push event [on_screen_reply]");
int on_screen_reply(afb_req_t request)
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static void onevent |
( |
afb_api_t |
api, |
|
|
const char * |
event, |
|
|
struct json_object * |
object |
|
) |
| |
|
static |
homescreen binding event function
Parameters
- api : the api serving the request
- event : event name
- object : event json object
Return
None
Definition at line 389 of file homescreen.cpp.
391 HMI_NOTICE(
"homescreen-service",
"on_event %s", event);
#define HMI_NOTICE(prefix, args,...)
static void pingSample |
( |
afb_req_t |
request | ) |
|
|
static |
Definition at line 38 of file homescreen.cpp.
40 static int pingcount = 0;
41 afb_req_success_f(request, json_object_new_int(pingcount),
"Ping count = %d", pingcount);
42 HMI_NOTICE(
"homescreen-service",
"Verbosity macro at level notice invoked at ping invocation count = %d", pingcount);
#define HMI_NOTICE(prefix, args,...)
static int preinit |
( |
afb_api_t |
api | ) |
|
|
static |
homescreen binding preinit function
Parameters
- api : the api serving the request
Return
None
Definition at line 352 of file homescreen.cpp.
354 HMI_NOTICE(
"homescreen-service",
"binding preinit (was register)");
#define HMI_NOTICE(prefix, args,...)
static void replyShowWindow |
( |
afb_req_t |
request | ) |
|
|
static |
replyShowWindow event
Parameters
Return
None
Definition at line 248 of file homescreen.cpp.
254 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
259 struct json_object *res = json_object_new_object();
262 afb_req_success(request, res,
"afb_event_push event [replyShowWindow]");
#define HMI_NOTICE(prefix, args,...)
int replyShowWindow(afb_req_t request)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static void showInformation |
( |
afb_req_t |
request | ) |
|
|
static |
showInformation event
the contents to homescreen which display at bottom area.
Parameters
Return
None
Definition at line 306 of file homescreen.cpp.
312 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
317 struct json_object *res = json_object_new_object();
320 afb_req_success(request, res,
"afb_event_push event [showInformation]");
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
int showInformation(afb_req_t request)
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static void showNotification |
( |
afb_req_t |
request | ) |
|
|
static |
showNotification event
the contents to homescreen which display at top area.
Parameters
Return
None
Definition at line 277 of file homescreen.cpp.
283 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
288 struct json_object *res = json_object_new_object();
291 afb_req_success(request, res,
"afb_event_push event [showNotification]");
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
int showNotification(afb_req_t request)
static void showWindow |
( |
afb_req_t |
request | ) |
|
|
static |
showWindow event
Parameters
Return
None
Definition at line 194 of file homescreen.cpp.
200 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
205 struct json_object *res = json_object_new_object();
208 afb_req_success(request, res,
"afb_event_push event [showWindow]");
#define HMI_NOTICE(prefix, args,...)
int showWindow(afb_req_t request)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static void subscribe |
( |
afb_req_t |
request | ) |
|
|
static |
Subscribe event
Parameters
Return
None
Definition at line 140 of file homescreen.cpp.
146 afb_req_fail_f(request,
"afb_req_subscribe failed",
"called %s.", __FUNCTION__);
151 struct json_object *res = json_object_new_object();
154 afb_req_success_f(request, res,
"homescreen binder subscribe.");
int subscribe(afb_req_t request)
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static void tap_shortcut |
( |
afb_req_t |
request | ) |
|
|
static |
tap_shortcut notify for homescreen When Shortcut area is tapped, notify these applciations
Parameters
Request key
- application_id : application id
Return
None
Definition at line 58 of file homescreen.cpp.
63 afb_req_fail_f(request,
"failed",
"called %s, Unknown parameter", __FUNCTION__);
68 struct json_object *res = json_object_new_object();
71 afb_req_success(request, res,
"afb_event_push event [tap_shortcut]");
int tap_shortcut(afb_req_t request)
#define HMI_NOTICE(prefix, args,...)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
static void unsubscribe |
( |
afb_req_t |
request | ) |
|
|
static |
Unsubscribe event
Parameters
Return
None
Definition at line 167 of file homescreen.cpp.
173 afb_req_fail_f(request,
"afb_req_unsubscribe failed",
"called %s.", __FUNCTION__);
178 struct json_object *res = json_object_new_object();
181 afb_req_success_f(request, res,
"homescreen binder unsubscribe success.");
#define HMI_NOTICE(prefix, args,...)
int unsubscribe(afb_req_t request)
static HS_ClientManager * g_client_manager
void hs_add_object_to_json_object_func(struct json_object *j_obj, const char *verb_name, int count,...)
const char _application_id[] = "application_id" |
const char _display_message[] = "display_message" |
const char _error[] = "error" |
const char _reply_message[] = "reply_message" |
const afb_binding_t afbBindingExport |
Initial value:= {
.api = "homescreen",
.specification = NULL,
.info = NULL,
}
static const afb_verb_t verbs[]
static void onevent(afb_api_t api, const char *event, struct json_object *object)
static int preinit(afb_api_t api)
static int init(afb_api_t api)
Definition at line 394 of file homescreen.cpp.
Initial value:= {
{NULL }
}
static void showWindow(afb_req_t request)
static void on_screen_reply(afb_req_t request)
static void on_screen_message(afb_req_t request)
static void subscribe(afb_req_t request)
static void unsubscribe(afb_req_t request)
static void showInformation(afb_req_t request)
static void pingSample(afb_req_t request)
static void hideWindow(afb_req_t request)
static void replyShowWindow(afb_req_t request)
static void showNotification(afb_req_t request)
static void tap_shortcut(afb_req_t request)
Definition at line 326 of file homescreen.cpp.