Implement hybrid webapplication installation
[platform/core/appfw/wgt-backend.git] / src / wgt / wgt_app_query_interface.h
1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache 2.0 license that can be
3 // found in the LICENSE file.
4
5 #ifndef WGT_WGT_APP_QUERY_INTERFACE_H_
6 #define WGT_WGT_APP_QUERY_INTERFACE_H_
7
8 #include <common/app_query_interface.h>
9
10 namespace wgt {
11
12 /**
13  * \brief Helper functionalities used before
14  *        configuring app-installer steps.
15  *        Eg. it is used to check, if package is to be installed or updated
16  */
17 class WgtAppQueryInterface : public common_installer::AppQueryInterface {
18  public:
19   /**
20    * \brief method for checking if package is installed based
21    *        on argv
22    *
23    * \param argc main() argc argument passed to the backend
24    * \param argv main() argv argument passed to the backend
25    *
26    * \return true if package is installed
27    */
28   bool IsAppInstalledByArgv(int argc, char** argv) override;
29
30   /**
31    * \brief This method is workaround for detecting installation of hybrid
32    *        application.
33    *
34    * \param argc main() argc argument passed to the backend
35    * \param argv main() argv argument passed to the backend
36    *
37    * \return true if package is hybrid
38    */
39   bool IsHybridApplication(int argc, char** argv);
40 };
41
42 }  // namespace wgt
43
44 #endif  // WGT_WGT_APP_QUERY_INTERFACE_H_