add registerShortcut function
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Mon, 15 Apr 2019 02:25:43 +0000 (10:25 +0800)
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Mon, 15 Apr 2019 02:25:43 +0000 (10:25 +0800)
Change-Id: I11def29f7a55c4a3fcca5e7e9a1d8731aa0c352f

include/libhomescreen.hpp
src/libhomescreen.cpp

index b7aae77..afc22f0 100644 (file)
@@ -88,6 +88,7 @@ public:
        int replyShowWindow(const char* application_id, json_object* json);
        int showNotification(json_object* json);
        int showInformation(json_object* json);
+       int registerShortcut(json_object* json);
 
 
 private:
index f302c3b..f0d7cfe 100644 (file)
@@ -580,6 +580,28 @@ int LibHomeScreen::showNotification(json_object* json)
        return this->call("showNotification", json);
 }
 
+/**
+ * register shortcut to homescreen
+ *
+ * Call HomeScreen Service's registerShortcut verb to regitster shortcut.
+ *
+ * #### Parameters
+ * - json [in] : This argument should be specified to the json parameters.
+ *
+ * #### Return
+ * - Returns 0 on success or -1 in case of error.
+ *
+ */
+int LibHomeScreen::registerShortcut(json_object* json)
+{
+       if(!sp_websock)
+       {
+               return -1;
+       }
+
+       return this->call("registerShortcut", json);
+}
+
 /**
  * Sending show information event
  *