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;
}
+ if (pkg_type)
+ 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("(us@as)", uid, pkg_path, args), &result);
+ g_variant_new("(uss@as)", uid, pkgtype, pkg_path, args),
+ &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;
}
+ if (pkg_type)
+ 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("(us@as)", uid, pkg_path, args), &result);
+ g_variant_new("(uss@as)", uid, pkgtype, pkg_path, args),
+ &result);
if (ret != PKGMGR_R_OK) {
ERR("request failed: %d", ret);
return ret;