2 * ail_list.c is based on ail_filter.c
4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
26 #include "ail_private.h"
29 static void usage(const char *name)
31 fprintf(stderr, "\n");
32 fprintf(stderr, " Usage: %s\n", name);
33 fprintf(stderr, "\n");
37 ail_cb_ret_e appinfo_list_appid_namefunc(const ail_appinfo_h appinfo, void *user_data)
39 char* package_str_name = NULL;
40 char* package_str_appid = NULL;
41 char* package_str_x_slp_exe = NULL;
42 ail_appinfo_get_str(appinfo, AIL_PROP_X_SLP_APPID_STR, &package_str_appid);
43 ail_appinfo_get_str(appinfo, AIL_PROP_NAME_STR, &package_str_name);
44 ail_appinfo_get_str(appinfo, AIL_PROP_X_SLP_EXE_PATH, &package_str_x_slp_exe);
46 printf("'%s' '%s' '%s'\n",package_str_appid, package_str_name, package_str_x_slp_exe);
52 int main(int argc, char *argv[])
57 printf("Please use it as non root user\n");
61 printf("Application List for user %lu\n", (long)getuid());
62 printf("User's Application \n");
63 printf("APPID NAME EXEPATH \n");
64 ail_filter_list_usr_appinfo_foreach(NULL, appinfo_list_appid_namefunc, NULL, getuid());
65 printf("Global's / Common Applications \n");
66 printf("APPID NAME EXEPATH \n");
67 ail_filter_list_appinfo_foreach(NULL, appinfo_list_appid_namefunc, NULL);
68 printf("=================================================\n");