GVariantBuilder *builder = NULL;
GVariant *args = NULL;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- char *pkgtype;
struct cb_info *cb_info;
if (pc == NULL || pkg_path == NULL) {
return PKGMGR_R_EINVAL;
}
- /* TODO: check pkg's type on server-side */
- if (pkg_type == NULL)
- pkgtype = __get_type_from_path(pkg_path);
- else
- pkgtype = strdup(pkg_type);
-
/* build arguments */
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
if (client->tep_path) {
g_variant_builder_unref(builder);
ret = pkgmgr_client_connection_send_request(client, "install",
- g_variant_new("(uss@as)", uid, pkgtype, pkg_path, args),
- &result);
+ g_variant_new("(us@as)", uid, pkg_path, args), &result);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
return ret;
int ret = PKGMGR_R_ECOMM;
char *req_key = NULL;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- char *pkgtype;
- pkgmgrinfo_pkginfo_h handle;
struct cb_info *cb_info;
if (pc == NULL || pkgid == NULL) {
return PKGMGR_R_EINVAL;
}
- ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgid, uid, &handle);
- if (ret < 0)
- return PKGMGR_R_EINVAL;
-
- ret = pkgmgrinfo_pkginfo_get_type(handle, &pkgtype);
- if (ret < 0) {
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
- return PKGMGR_R_ERROR;
- }
-
ret = pkgmgr_client_connection_send_request(client, "reinstall",
- g_variant_new("(uss)", uid, pkgtype, pkgid), &result);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ g_variant_new("(us)", uid, pkgid), &result);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
return ret;
GVariantBuilder *builder = NULL;
GVariant *args = NULL;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- char *pkgtype;
struct cb_info *cb_info;
if (pc == NULL || pkg_path == NULL) {
return PKGMGR_R_EINVAL;
}
- /* TODO: check pkg's type on server-side */
- if (pkg_type == NULL)
- pkgtype = __get_type_from_path(pkg_path);
- else
- pkgtype = strdup(pkg_type);
-
/* build arguments */
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
if (client->tep_path) {
g_variant_builder_unref(builder);
ret = pkgmgr_client_connection_send_request(client, "mount_install",
- g_variant_new("(uss@as)", uid, pkgtype, pkg_path, args),
- &result);
+ g_variant_new("(us@as)", uid, pkg_path, args), &result);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
return ret;
int ret = PKGMGR_R_ECOMM;
char *req_key = NULL;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- char *pkgtype;
- pkgmgrinfo_pkginfo_h handle;
struct cb_info *cb_info;
if (pc == NULL || pkgid == NULL) {
return PKGMGR_R_EINVAL;
}
- ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgid, uid, &handle);
- if (ret < 0)
- return PKGMGR_R_EINVAL;
-
- ret = pkgmgrinfo_pkginfo_get_type(handle, &pkgtype);
- if (ret < 0) {
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
- return PKGMGR_R_ERROR;
- }
-
ret = pkgmgr_client_connection_send_request(client, "uninstall",
- g_variant_new("(uss)", uid, pkgtype, pkgid), &result);
+ g_variant_new("(us)", uid, pkgid), &result);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return ret;
}
g_variant_get(result, "(i&s)", &ret, &req_key);
if (req_key == NULL) {
g_variant_unref(result);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return PKGMGR_R_ECOMM;
}
if (ret != PKGMGR_R_OK) {
g_variant_unref(result);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return ret;
}
}
client->cb_info_list = g_list_append(client->cb_info_list, cb_info);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
-
return cb_info->req_id;
}
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
struct cb_info *cb_info;
- if (pc == NULL || pkg_type == NULL || pkgid == NULL) {
+ if (pc == NULL || pkgid == NULL) {
ERR("invalid parameter");
return PKGMGR_R_EINVAL;
}
}
ret = pkgmgr_client_connection_send_request(client, "move",
- g_variant_new("(ussi)", uid, pkg_type, pkgid,
- move_type), &result);
+ g_variant_new("(usi)", uid, pkgid, move_type), &result);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
return ret;
GVariantBuilder *builder;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- if (pc == NULL || pkgid == NULL || pkg_type == NULL) {
+ if (pc == NULL || pkgid == NULL) {
ERR("invalid parameter");
return PKGMGR_R_EINVAL;
}
g_variant_builder_add(builder, "s", pkgid);
ret = pkgmgr_client_connection_send_request(client, "enable_pkgs",
- g_variant_new("(usas)", uid, pkg_type, builder),
- &result);
+ g_variant_new("(uas)", uid, builder), &result);
g_variant_builder_unref(builder);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
struct cb_info *cb_info;
int i;
- if (pc == NULL || pkgids == NULL || pkg_type == NULL || n_pkgs < 1) {
+ if (pc == NULL || pkgids == NULL || n_pkgs < 1) {
ERR("invalid parameter");
return PKGMGR_R_EINVAL;
}
g_variant_builder_add(builder, "s", pkgids[i]);
ret = pkgmgr_client_connection_send_request(client, "enable_pkgs",
- g_variant_new("(usas)", uid, pkg_type, builder),
- &result);
+ g_variant_new("(uas)", uid, builder), &result);
g_variant_builder_unref(builder);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
int ret = PKGMGR_R_ECOMM;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- if (pc == NULL || pkgid == NULL || pkg_type == NULL) {
+ if (pc == NULL || pkgid == NULL) {
ERR("invalid parameter");
return PKGMGR_R_EINVAL;
}
g_variant_builder_add(builder, "s", pkgid);
ret = pkgmgr_client_connection_send_request(client, "disable_pkgs",
- g_variant_new("(usas)", uid, pkg_type, builder),
- &result);
+ g_variant_new("(uas)", uid, builder), &result);
g_variant_builder_unref(builder);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
struct cb_info *cb_info;
int i;
- if (pc == NULL || pkgids == NULL || pkg_type == NULL || n_pkgs < 1) {
+ if (pc == NULL || pkgids == NULL || n_pkgs < 1) {
ERR("invalid parameter");
return PKGMGR_R_EINVAL;
}
g_variant_builder_add(builder, "s", pkgids[i]);
ret = pkgmgr_client_connection_send_request(client, "disable_pkgs",
- g_variant_new("(usas)", uid, pkg_type, builder), &result);
+ g_variant_new("(uas)", uid, builder), &result);
g_variant_builder_unref(builder);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
int ret;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- if (pc == NULL || pkg_type == NULL || appid == NULL) {
+ if (pc == NULL || appid == NULL) {
ERR("invalid parameter");
return PKGMGR_R_EINVAL;
}
}
ret = pkgmgr_client_connection_send_request(client, "cleardata",
- g_variant_new("(uss)", uid, pkg_type, appid), &result);
+ g_variant_new("(us)", uid, appid), &result);
if (ret == PKGMGR_R_OK) {
ERR("request failed: %d", ret);
return ret;