summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-01-23 03:07:28 +0000
committerSung-jae Park <nicesj.park@samsung.com>2013-01-23 03:07:28 +0000
commit2deb3b8f723541e993249369c16c005b8fed5e25 (patch)
treee65c31cc99d01f0b38638c48718a507a6cf6d1b3
parenta256d48370241a78e85a008dfa6575680db6d715 (diff)
downloadlivebox-service-2deb3b8f723541e993249369c16c005b8fed5e25.tar.gz
livebox-service-2deb3b8f723541e993249369c16c005b8fed5e25.tar.bz2
livebox-service-2deb3b8f723541e993249369c16c005b8fed5e25.zip
Add mouse_event attribute
Change-Id: I53537eb3816a0b35b89a3509758a1d64df101f79
-rw-r--r--include/livebox-service.h7
-rw-r--r--packaging/liblivebox-service.spec2
-rw-r--r--src/livebox-service.c37
3 files changed, 45 insertions, 1 deletions
diff --git a/include/livebox-service.h b/include/livebox-service.h
index f9f8383..7fdd3f0 100644
--- a/include/livebox-service.h
+++ b/include/livebox-service.h
@@ -38,6 +38,7 @@ enum livebox_size_type {
* \param[in] type
* \param[out] width
* \param[out] height
+ * \return 0 for success
*/
extern int livebox_service_get_size(int type, int *width, int *height);
@@ -49,6 +50,12 @@ extern int livebox_service_get_size(int type, int *width, int *height);
extern int livebox_service_size_type(int width, int height);
/*!
+ * \param[in] pkgid Livebox's appid
+ * \return true(1) / false(0)
+ */
+extern int livebox_service_mouse_event(const char *pkgid);
+
+/*!
*/
extern int livebox_service_trigger_update(const char *pkgname, const char *cluster, const char *category);
diff --git a/packaging/liblivebox-service.spec b/packaging/liblivebox-service.spec
index 1205bcf..df9690f 100644
--- a/packaging/liblivebox-service.spec
+++ b/packaging/liblivebox-service.spec
@@ -1,6 +1,6 @@
Name: liblivebox-service
Summary: Library for the development of a livebox service
-Version: 0.2.10
+Version: 0.2.11
Release: 1
Group: main/app
License: Flora License
diff --git a/src/livebox-service.c b/src/livebox-service.c
index 292834f..1632389 100644
--- a/src/livebox-service.c
+++ b/src/livebox-service.c
@@ -725,6 +725,43 @@ out:
return ret;
}
+EAPI int livebox_service_mouse_event(const char *pkgid)
+{
+ sqlite3_stmt *stmt;
+ sqlite3 *handle;
+ int ret;
+
+ handle = open_db();
+ if (!handle)
+ return 0;
+
+ ret = sqlite3_prepare_v2(handle, "SELECT mouse_event FROM client WHERE pkgid = ?", -1, &stmt, NULL);
+ if (ret != SQLITE_OK) {
+ ErrPrint("Error: %s\n", sqlite3_errmsg(handle));
+ close_db(handle);
+ return 0;
+ }
+
+ ret = sqlite3_bind_text(stmt, 1, pkgid, -1, NULL);
+ if (ret != SQLITE_OK) {
+ ErrPrint("Error: %s\n", sqlite3_errmsg(handle));
+ ret = 0;
+ goto out;
+ }
+
+ ret = sqlite3_step(stmt);
+ if (ret == SQLITE_ROW)
+ ret = !!sqlite3_column_int(stmt, 0);
+ else
+ ret = 0;
+
+out:
+ sqlite3_reset(stmt);
+ sqlite3_finalize(stmt);
+ close_db(handle);
+ return ret;
+}
+
EAPI char *livebox_service_preview(const char *pkgid, int size_type)
{
sqlite3_stmt *stmt;