From 8e3a62090a74c72d4c9fc39559d9996531d97b66 Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Mon, 15 Apr 2019 10:25:43 +0800 Subject: add registerShortcut function Change-Id: I11def29f7a55c4a3fcca5e7e9a1d8731aa0c352f --- src/libhomescreen.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/libhomescreen.cpp b/src/libhomescreen.cpp index f302c3b..f0d7cfe 100644 --- a/src/libhomescreen.cpp +++ b/src/libhomescreen.cpp @@ -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 * -- cgit 1.2.3-korg