4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
31 #include "ail_private.h"
33 static const char *filter[] = {
34 "app_info.PACKAGE='%s'",
36 "((localname.name is NULL and app_info.name like '%%%s%%') or (localname.name like '%%%s%%'))",
37 "app_info.TYPE like '%%%s%%'",
39 "app_info.CATEGORIES like '%%%s%%'",
40 "app_info.VERSION='%s'",
41 "app_info.MIMETYPE like '%%%s%%'",
42 "app_info.X_SLP_SERVICE like '%%%s%%'",
43 "app_info.X_SLP_PACKAGETYPE='%s'",
44 "app_info.X_SLP_PACKAGECATEGORIES like '%%%s%%'",
45 "app_info.X_SLP_PACKAGEID='%s'",
46 "app_info.X_SLP_URI='%s'",
47 "app_info.X_SLP_SVC like '%%%s%%'",
48 "app_info.X_SLP_EXE_PATH='%s'",
49 "app_info.X_SLP_APPID='%s'",
50 "app_info.X_SLP_PKGID='%s'",
51 "app_info.X_SLP_DOMAIN='%s'",
52 "app_info.X_SLP_SUBMODEMAINID='%s'",
53 "app_info.X_SLP_INSTALLEDSTORAGE='%s'",
54 "app_info.X_SLP_BASELAYOUTWIDTH=%d",
55 "app_info.X_SLP_INSTALLEDTIME=%d",
56 "app_info.NODISPLAY=%d",
57 "app_info.X_SLP_TASKMANAGE=%d",
58 "app_info.X_SLP_MULTIPLE=%d",
59 "app_info.X_SLP_REMOVABLE=%d",
60 "app_info.X_SLP_ISHORIZONTALSCALE=%d",
61 "app_info.X_SLP_ENABLED=%d",
62 "app_info.X_SLP_SUBMODE=%d",
67 inline const char *sql_get_filter(int prop)
69 retv_if(prop < 0 || prop >= NUM_OF_PROP , NULL);
74 inline char *sql_get_locale(void)
80 retv_if ((l = vconf_get_str(VCONFKEY_LANGSET)) == NULL, NULL);
81 snprintf(buf, sizeof(buf), "%s", l);
89 inline int sql_get_app_info_idx(int prop)