Support screenshot feature
[platform/core/appfw/librua.git] / src / db-schema.h
1 /*
2  * Copyright (c) 2000 - 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 #ifndef __RUA_SCHEMA_H__
18 #define __RUA_SCHEMA_H__
19
20 #define CREATE_RUA_HISTORY_TABLE " \
21 PRAGMA journal_mode = OFF; \
22 \
23 CREATE TABLE IF NOT EXISTS rua_history ( \
24         pkg_name TEXT, \
25         app_path TEXT, \
26         arg TEXT, \
27         launch_time INTEGER, \
28         instance_id TEXT, \
29         instance_name TEXT, \
30         icon TEXT, \
31         uri TEXT, \
32         image TEXT, \
33         PRIMARY KEY(pkg_name, instance_id) \
34 );"
35
36 #define CREATE_RUA_STAT_TABLE " \
37 PRAGMA journal_mode = OFF; \
38 \
39 CREATE TABLE if not exists rua_panel_stat ( \
40         caller_panel TEXT NOT NULL, \
41         rua_stat_tag TEXT NOT NULL, \
42         score INTEGER DEFAULT 0, \
43         PRIMARY KEY(rua_stat_tag, caller_panel) \
44 );"
45
46 /* table index */
47 enum {
48         RUA_COL_PKGNAME,
49         RUA_COL_APPPATH,
50         RUA_COL_ARG,
51         RUA_COL_LAUNCHTIME,
52         RUA_COL_INSTANCE_ID,
53         RUA_COL_INSTANCE_NAME,
54         RUA_COL_ICON,
55         RUA_COL_URI,
56         RUA_COL_IMAGE,
57 };
58
59 enum {
60         RUA_STAT_COL_CALLER_PANEL = 0x00,
61         RUA_STAT_COL_RUA_STAT_TAG,
62         RUA_SATA_COL_SCORE
63 };
64
65 #endif /* __RUA_SCHEMA_H__ */