2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __CONTEXT_APP_STATS_TYPES_H__
18 #define __CONTEXT_APP_STATS_TYPES_H__
20 #include <common_types.h>
22 #define APP_SUBJ_RECENTLY_USED "app/history/recently_used"
23 #define APP_SUBJ_FREQUENTLY_USED "app/history/frequently_used"
24 #define APP_SUBJ_RARELY_USED "app/history/rarely_used"
25 #define APP_SUBJ_PEAK_TIME "app/history/peak_time"
26 #define APP_SUBJ_COMMON_SETTING "app/history/common_setting"
27 #define APP_SUBJ_FREQUENCY "app/history/use_freq"
29 #define APP_TABLE_REMOVABLE_APP "Log_RemovableApp"
30 #define APP_TABLE_REMOVABLE_APP_COLUMNS \
31 "AppId TEXT NOT NULL UNIQUE"
33 #define APP_TABLE_USAGE_LOG "Log_AppLaunch"
34 #define APP_TABLE_USAGE_LOG_COLUMNS \
35 "AppId TEXT NOT NULL, Duration INTEGER NOT NULL DEFAULT 0, " \
36 "SystemVolume INTEGER, MediaVolume INTEGER, AudioJack INTEGER, " \
38 "UTC TIMESTAMP DEFAULT (strftime('%s', 'now')), " \
39 "LocalTime TIMESTAMP DEFAULT (strftime('%s', 'now', 'localtime'))"
41 #define APP_TEMP_USAGE_FREQ "Temp_AppLaunchFreq"
42 #define APP_TEMP_USAGE_FREQ_SQL \
43 "CREATE TABLE IF NOT EXISTS " APP_TEMP_USAGE_FREQ \
44 " (AppId TEXT NOT NULL UNIQUE, TotalCount INTEGER DEFAULT 0);"