Fix double free
[platform/core/appfw/shortcut.git] / test / shortcut.c
1 /*
2  * Copyright (c) 2011 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #include <Elementary.h>
19 #include <shortcut.h>
20
21 static int shortcut_list_cb(const char *appid, const char *icon, const char *name, const char *extra_key, const char *extra_data, void *data)
22 {
23         printf("appid[%s] icon[%s], name[%s] extra_key[%s], extra_ata[%s]\n", appid, icon, name, extra_key, extra_data);
24         return 0;
25 }
26
27 int elm_main(int argc, char *argv[])
28 {
29         int ret;
30         ret = shortcut_get_list(NULL, shortcut_list_cb, NULL);
31         if (ret < 0)
32                 printf("Error: %d\n", ret);
33
34         elm_run();
35         elm_shutdown();
36
37         return 0;
38 }
39
40 ELM_MAIN()
41 /* End of a file */