pkgmgr
x11
vconf
+ ail
)
FOREACH(flag ${pkgs_CFLAGS})
extern int livebox_service_nodisplay(const char *pkgid);
/*!
+ * \brief Check the status of the livebox
+ * \param[in] lbid Livebox Id
+ * \return int 1 enabled, 0 disabled
+ */
+extern int livebox_service_is_enabled(const char *lbid);
+
+/*!
* \brief
* \param[in]
* \return
Name: liblivebox-service
Summary: Service API for gathering installed livebox information.
-Version: 0.3.2
+Version: 0.3.3
Release: 1
Group: framework/livebox
License: Flora License
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(ail)
%description
-Service API for gathering installed livebox information
+Service API for gathering information of installed liveboxes
%package devel
Summary: Files for livebox service.
#include <package-manager.h>
#include <vconf.h>
#include <vconf-keys.h>
+#include <ail.h>
#include "dlist.h"
#include "util.h"
return ret;
}
+EAPI int livebox_service_is_enabled(const char *lbid)
+{
+ ail_appinfo_h ai;
+ char *pkgname;
+ bool enabled;
+ int ret;
+
+ pkgname = livebox_service_appid(lbid);
+ if (!pkgname)
+ return 0;
+
+ ret = ail_get_appinfo(pkgname, &ai);
+ if (ret != AIL_ERROR_OK) {
+ free(pkgname);
+ return 0;
+ }
+
+ if (ail_appinfo_get_bool(ai, AIL_PROP_X_SLP_ENABLED_BOOL, &enabled) != AIL_ERROR_OK)
+ enabled = false;
+
+ ail_destroy_appinfo(ai);
+ free(pkgname);
+ return enabled == true;
+}
+
+/*!
+ * appid == Package ID
+ * pkgid == Livebox ID
+ */
EAPI char *livebox_service_appid(const char *pkgname)
{
sqlite3_stmt *stmt;