Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / tools / tizen / xwalk_package_installer_helper.h
1 // Copyright (c) 2014 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef XWALK_APPLICATION_TOOLS_TIZEN_XWALK_PACKAGE_INSTALLER_HELPER_H_
6 #define XWALK_APPLICATION_TOOLS_TIZEN_XWALK_PACKAGE_INSTALLER_HELPER_H_
7
8 #include <pkgmgr_installer.h>
9
10 #include <string>
11
12 class PackageInstallerHelper {
13  public:
14   explicit PackageInstallerHelper(const std::string& appid);
15   ~PackageInstallerHelper();
16   bool InstallApplication(const std::string& xmlpath,
17                           const std::string& iconpath);
18   bool UninstallApplication();
19   bool UpdateApplication(const std::string& xmlpath,
20                          const std::string& iconpath);
21
22  private:
23   bool InstallApplicationInternal(const std::string& xmlpath,
24                                   const std::string& iconpath);
25   bool UninstallApplicationInternal();
26   bool UpdateApplicationInternal(const std::string& xmlpath,
27                                  const std::string& iconpath);
28
29   bool SendSignal(const std::string& key, const std::string& value);
30
31   pkgmgr_installer* handle_;
32
33   std::string appid_;
34 };
35
36 #endif  // XWALK_APPLICATION_TOOLS_TIZEN_XWALK_PACKAGE_INSTALLER_HELPER_H_