From 911a0dd54c9d8a844da0d17b030d7ba045fd8fc6 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Tue, 11 Jun 2019 17:33:07 +0900 Subject: add update shortcut --- include/libhomescreen.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libhomescreen.hpp b/include/libhomescreen.hpp index 0361fa4..d0b270a 100644 --- a/include/libhomescreen.hpp +++ b/include/libhomescreen.hpp @@ -51,7 +51,8 @@ public: Event_ShowNotification, Event_ShowInformation, Event_AppListChanged, - Event_RegisterShortcut, + Event_RegisterShortcut, + Event_UpdateShortcut, Event_Max }; @@ -66,6 +67,7 @@ public: int onScreenReply(const char* reply_message); void set_event_handler(enum EventType et, handler_func f); + void publishSubscription(void); void registerCallback( void (*event_cb)(const std::string& event, struct json_object* event_contents), @@ -83,11 +85,12 @@ public: int showNotification(json_object* json); int showInformation(json_object* json); int getRunnables(void); - int registerShortcut(json_object* json); - + int registerShortcut(const char* application_id, json_object* json); + int updateShortcut(const char* application_id, json_object* json); private: int initialize_websocket(); + int getEventType(const char *event); void (*onEvent)(const std::string& event, struct json_object* event_contents); void (*onReply)(struct json_object* reply); -- cgit 1.2.3-korg