Rename the class Json to avoid symbol conflicts with Jsoncpp
[platform/core/context/context-provider.git] / src / app-stats / AppStatsProvider.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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 _CONTEXT_APP_STATS_PROVIDER_H_
18 #define _CONTEXT_APP_STATS_PROVIDER_H_
19
20 #include <ContextProvider.h>
21 #include "AppStatisticsTypes.h"
22
23 namespace ctx {
24
25         class AppStatsProvider : public ContextProvider {
26         public:
27                 int read(CtxJson1 option, CtxJson1 *requestResult);
28                 void getPrivilege(std::vector<const char*> &privilege);
29
30         protected:
31                 AppStatsProvider(const char *subject);
32                 virtual ~AppStatsProvider();
33         };
34
35
36         class RecentAppProvider : public AppStatsProvider {
37         public:
38                 RecentAppProvider() :
39                         AppStatsProvider(APP_SUBJ_RECENTLY_USED) {}
40         };
41
42
43         class FrequentAppProvider : public AppStatsProvider {
44         public:
45                 FrequentAppProvider() :
46                         AppStatsProvider(APP_SUBJ_FREQUENTLY_USED) {}
47         };
48
49
50         class RareAppProvider : public AppStatsProvider {
51         public:
52                 RareAppProvider() :
53                         AppStatsProvider(APP_SUBJ_RARELY_USED) {}
54         };
55
56
57         class AppPeakTimeProvider : public AppStatsProvider {
58         public:
59                 AppPeakTimeProvider() :
60                         AppStatsProvider(APP_SUBJ_PEAK_TIME) {}
61         };
62
63
64         class AppSettingProvider : public AppStatsProvider {
65         public:
66                 AppSettingProvider() :
67                         AppStatsProvider(APP_SUBJ_COMMON_SETTING) {}
68         };
69
70
71         class AppFreqProvider : public AppStatsProvider {
72         public:
73                 AppFreqProvider() :
74                         AppStatsProvider(APP_SUBJ_FREQUENCY) {}
75         };
76
77 }       /* namespace ctx */
78
79 #endif  /* _CONTEXT_APP_STATS_PROVIDER_H_ */