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 #include "AppStatisticsTypes.h"
18 #include "AppStatsLogger.h"
22 AppStatsLogger::AppStatsLogger() :
23 ContextProvider(APP_SUBJ_LOGGER),
28 __initializer = new(std::nothrow) AppDbInitializer();
29 IF_FAIL_VOID_TAG(__initializer, _E, "Memory allocation failed");
31 __installMon = new(std::nothrow) AppInstallMonitor();
32 __launchMon = new(std::nothrow) AppUseMonitor();
33 IF_FAIL_CATCH_TAG(__installMon && __launchMon, _E, "Memory allocation failed");
43 AppStatsLogger::~AppStatsLogger()
49 void AppStatsLogger::getPrivilege(std::vector<const char*> &privilege)
51 privilege.push_back(PRIV_APP_HISTORY);
54 int AppStatsLogger::subscribe(Json option, Json* requestResult)
59 int AppStatsLogger::unsubscribe(Json option)