change some LOGE to LOGI to not to recognize this as error
[platform/core/appfw/pkgmgr-info.git] / src / pkgmgrinfo_private.c
index 450e35a..914a95a 100644 (file)
@@ -103,7 +103,7 @@ struct _appinfo_int_map_t {
 };
 
 static struct _appinfo_int_map_t appinfo_int_prop_map[] = {
-       /*Currently No Fields*/
+       {E_PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER,    PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER}
 };
 
 struct _appinfo_bool_map_t {
@@ -305,15 +305,15 @@ void __get_filter_condition(gpointer data, char **condition)
                break;
        case E_PMINFO_APPINFO_PROP_APP_OPERATION:
                snprintf(temp, sizeof(temp), "(%s)", node->value);
-               snprintf(buf, sizeof(buf), "package_app_app_svc.operation IN %s", temp);
+               snprintf(buf, sizeof(buf), "package_app_app_control.app_control LIKE %s|%%|%%", temp);
                break;
        case E_PMINFO_APPINFO_PROP_APP_URI:
                snprintf(temp, sizeof(temp), "(%s)", node->value);
-               snprintf(buf, sizeof(buf), "package_app_app_svc.uri_scheme IN %s", temp);
+               snprintf(buf, sizeof(buf), "package_app_app_control.app_control LIKE %%|%s|%%", temp);
                break;
        case E_PMINFO_APPINFO_PROP_APP_MIME:
                snprintf(temp, sizeof(temp), "(%s)", node->value);
-               snprintf(buf, sizeof(buf), "package_app_app_svc.mime_type IN %s", temp);
+               snprintf(buf, sizeof(buf), "package_app_app_control.app_control LIKE %%|%%|%s", temp);
                break;
        case E_PMINFO_APPINFO_PROP_APP_CATEGORY:
                snprintf(temp, sizeof(temp), "(%s)", node->value);
@@ -358,6 +358,10 @@ void __get_filter_condition(gpointer data, char **condition)
        case E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE:
                snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_support_disable IN %s", node->value);
                break;
+       case E_PMINFO_APPINFO_PROP_APP_DISABLE_FOR_USER:
+               snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_id NOT IN "
+                               "(SELECT app_id from package_app_disable_for_user WHERE uid='%s')", node->value);
+               break;
        default:
                _LOGE("Invalid Property Type\n");
                *condition = NULL;