b38f5cd74805db16c7697331bd2c21e98394afe2
[apps/native/menu-screen.git] / include / all_apps / db.h
1 /*
2  * MENU-SCREEN
3  *
4  * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20 #ifndef __MENU_SCREEN_ALL_APPS_DB_H__
21 #define __MENU_SCREEN_ALL_APPS_DB_H__
22
23 #include "Elementary.h"
24 #include "util.h"
25
26 typedef struct _db_info {
27         long long rowid;
28         int type;
29
30         char *appid;
31         char *name;
32         char *content_info;
33         char *icon;
34 } db_info;
35
36 extern menu_screen_error_e all_apps_db_init(void);
37 extern void all_apps_db_fini(void);
38
39 extern Eina_List *all_apps_db_retrieve_all_info(void);
40 extern void all_apps_db_unretrieve_info(db_info *info);
41 extern void all_apps_db_unretrieve_all_info(Eina_List *list);
42
43 extern long long all_apps_db_insert_shortcut(const char *appid, const char *name, int type, const char *content_info, const char *icon);
44 extern menu_screen_error_e all_apps_db_delete_shortcut(long long rowid);
45 extern int all_apps_db_count_shortcut(const char *appid, const char *name);
46
47 #endif // __MENU_SCREEN_ALL_APPS_DB_H__
48 // End of file