2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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 SRC_APPLICATION_APPLICATION_MANAGER_H__
18 #define SRC_APPLICATION_APPLICATION_MANAGER_H__
23 #include <package-manager.h>
25 #include <pkgmgr-info.h>
27 #include "common/picojson.h"
28 #include "common/platform_result.h"
31 namespace application {
33 class ApplicationInstance;
35 class ApplicationManager {
37 explicit ApplicationManager(ApplicationInstance& instance);
38 ~ApplicationManager();
40 void GetCurrentApplication(const std::string& app_id, picojson::object* out);
41 void Kill(const picojson::value& args);
42 void Launch(const picojson::value& args);
43 void LaunchAppControl(const picojson::value& args);
44 void FindAppControl(const picojson::value& args);
45 void GetAppsContext(const picojson::value& args);
46 void GetAppContext(const picojson::value& args, picojson::object* out);
47 void GetAppsInfo(const picojson::value& args);
48 void GetAppInfo(const std::string& app_id, picojson::object* out);
49 void GetAppCerts(const std::string& app_id, picojson::object* out);
50 void GetAppSharedUri(const std::string& app_id, picojson::object* out);
51 void GetAppMetaData(const std::string& app_id, picojson::object* out);
52 void StartAppInfoEventListener(picojson::object* out);
53 void StopAppInfoEventListener();
54 void GetApplicationInformationSize(const picojson::value& args, picojson::object* out);
55 void AsyncResponse(common::PlatformResult& result, std::shared_ptr<picojson::value>* response);
58 char* GetPackageId(const std::string& app_id);
60 pkgmgr_client* pkgmgr_client_handle_;
61 pkgmgrinfo_client* pkgmgrinfo_client_handle_;
62 ApplicationInstance& instance_;
65 } // namespace application
66 } // namespace extension
68 #endif // SRC_APPLICATION_APPLICATION_MANAGER_H__