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_STATS_APP_TYPES_H_
18 #define _CONTEXT_STATS_APP_TYPES_H_
20 #include <ProviderTypes.h>
22 #define APP_HISTORY_PRIV PRIV_APP_HISTORY
23 #define APP_SUBJ_LOGGER SUBJ_APP_LOGGER
24 #define APP_SUBJ_RECENTLY_USED SUBJ_APP_RECENTLY_USED
25 #define APP_SUBJ_FREQUENTLY_USED SUBJ_APP_FREQUENTLY_USED
26 #define APP_SUBJ_RARELY_USED SUBJ_APP_RARELY_USED
27 #define APP_SUBJ_PEAK_TIME SUBJ_APP_PEAK_TIME
28 #define APP_SUBJ_COMMON_SETTING SUBJ_APP_COMMON_SETTING
29 #define APP_SUBJ_FREQUENCY SUBJ_APP_FREQUENCY
31 #define APP_TABLE_REMOVABLE_APP "Log_RemovableApp"
32 #define APP_TABLE_REMOVABLE_APP_COLUMNS \
33 "AppId TEXT NOT NULL UNIQUE"
35 #define APP_TABLE_USAGE_LOG "Log_AppLaunch"
36 #define APP_TABLE_USAGE_LOG_COLUMNS \
37 "AppId TEXT NOT NULL, Duration INTEGER NOT NULL DEFAULT 0, " \
38 "SystemVolume INTEGER, MediaVolume INTEGER, AudioJack INTEGER, " \
40 "UTC TIMESTAMP DEFAULT (strftime('%s', 'now')), " \
41 "LocalTime TIMESTAMP DEFAULT (strftime('%s', 'now', 'localtime'))"
43 #define APP_TEMP_USAGE_FREQ "Temp_AppLaunchFreq"
44 #define APP_TEMP_USAGE_FREQ_SQL \
45 "CREATE TABLE IF NOT EXISTS " APP_TEMP_USAGE_FREQ \
46 " (AppId TEXT NOT NULL UNIQUE, TotalCount INTEGER DEFAULT 0);"
48 #endif /* End of _CONTEXT_STATS_APP_TYPES_H_ */