INCLUDE(FindPkgConfig)
pkg_check_modules(pkg REQUIRED
- ail
dlog
aul
vconf
badge-service
libsmack
shortcut
+ pkgmgr-info
)
IF (LIVEBOX)
Name: data-provider-master
Summary: Master service provider for liveboxes
-Version: 0.44.4
+Version: 0.44.5
Release: 1
Group: HomeTF/Livebox
License: Flora
Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
BuildRequires: cmake, gettext-tools, smack, coreutils
-BuildRequires: pkgconfig(ail)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(com-core)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pkgmgr)
+BuildRequires: pkgconfig(pkgmgr-info)
# This will not be works, I know. But...
%if "%{sec_product_feature_livebox}" != "0"
#include <packet.h>
#include <livebox-errno.h>
#include <livebox-service.h>
+#include <pkgmgr-info.h>
#include <ail.h>
#include "critical_log.h"
HAPI int package_is_enabled(const char *appid)
{
- ail_appinfo_h ai;
+ pkgmgrinfo_appinfo_h handle;
bool enabled;
int ret;
- ret = ail_get_appinfo(appid, &ai);
- if (ret != AIL_ERROR_OK) {
- ErrPrint("Unable to get appinfo (%s): %d\n", appid, ret);
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK) {
+ ErrPrint("Failed to get info\n");
return 0;
}
- if (ail_appinfo_get_bool(ai, AIL_PROP_X_SLP_ENABLED_BOOL, &enabled) != AIL_ERROR_OK) {
+ ret = pkgmgrinfo_appinfo_is_enabled(handle, &enabled);
+ if (ret != PMINFO_R_OK) {
+ ErrPrint("Failed to get info\n");
enabled = false;
}
- ail_destroy_appinfo(ai);
-
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
return enabled == true;
}
inst_list = package_instance_list(pkg);
EINA_LIST_FOREACH(inst_list, l, inst) {
- fprintf(fp, "%s %s %s %lf %s %d %d\n",
+ fprintf(fp, "%s %s %s %s %lf %s %d %d\n",
instance_id(inst),
+ buffer_handler_id(instance_lb_buffer(inst)),
instance_cluster(inst),
instance_category(inst),
instance_period(inst),
struct instance {
char *id;
+ char *buf_id;
char *cluster;
char *category;
double period;
}
free(info->id);
+ free(info->buf_id);
free(info->cluster);
free(info->category);
free(info->state);
info = node_data(node);
- printf(" %5.2f %6s %10s %10s %4dx%-4d ", info->period, info->state, info->cluster, info->category, info->width, info->height);
+ printf(" %5.2f %s %6s %10s %10s %4dx%-4d ", info->period, info->buf_id, info->state, info->cluster, info->category, info->width, info->height);
snprintf(buf, sizeof(buf), "/opt/usr/share/live_magazine/reader/%s", node_name(node));
if (lstat(buf, &stat) < 0) {
printf("%3d ERR ", errno);
char pkgname[256];
char abi[256];
char inst_id[4096];
+ char buf_id[256];
char cluster[256];
char category[256];
+ char str_period[64];
char state[10];
int refcnt;
int fault_count;
slaveinfo->ttl = ttl;
break;
case INST_LIST:
- if (sscanf(buffer, "%[^ ] %[^ ] %[^ ] %lf %[^ ] %d %d", inst_id, cluster, category, &period, state, &width, &height) != 7) {
+ if (sscanf(buffer, "%[^ ] %[^ ] %[^ ] %[^ ] %[^ ] %[^ ] %d %d", inst_id, buf_id, cluster, category, str_period, state, &width, &height) != 8) {
printf("Invalid format : [%s]\n", buffer);
return;
}
+ period = strtod(str_period, NULL);
+
for (i = strlen(inst_id); i > 0 && inst_id[i] != '/'; i--);
i += (inst_id[i] == '/');
node_set_age(node, s_info.age);
free(instinfo->id);
+ free(instinfo->buf_id);
free(instinfo->cluster);
free(instinfo->category);
free(instinfo->state);
printf("Error: %s\n", strerror(errno));
}
+ if (strlen(buf_id)) {
+ instinfo->buf_id = strdup(buf_id);
+ }
+
instinfo->period = period;
instinfo->width = width;
instinfo->height = height;