Fix invalid licenses
[platform/framework/web/crosswalk-tizen.git] / src / common / application_data.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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 WRT_COMMON_APPLICATION_DATA_H_
18 #define WRT_COMMON_APPLICATION_DATA_H_
19
20 #include <manifest_handlers/application_icons_handler.h>
21 #include <manifest_handlers/application_manifest_constants.h>
22 #include <manifest_handlers/appwidget_handler.h>
23 #include <manifest_handlers/app_control_handler.h>
24 #include <manifest_handlers/category_handler.h>
25 #include <manifest_handlers/ime_handler.h>
26 #include <manifest_handlers/metadata_handler.h>
27 #include <manifest_handlers/navigation_handler.h>
28 #include <manifest_handlers/permissions_handler.h>
29 #include <manifest_handlers/service_handler.h>
30 #include <manifest_handlers/setting_handler.h>
31 #include <manifest_handlers/splash_screen_handler.h>
32 #include <manifest_handlers/tizen_application_handler.h>
33 #include <manifest_handlers/widget_handler.h>
34 #include <manifest_handlers/content_handler.h>
35
36
37 #include <memory>
38 #include <string>
39
40 namespace wrt {
41
42 class ApplicationData {
43  public:
44   explicit ApplicationData(const std::string& appid);
45   ~ApplicationData();
46
47   bool LoadManifestData();
48
49   std::shared_ptr<const wgt::parse::AppControlInfoList>
50     app_control_info_list() const;
51   std::shared_ptr<const wgt::parse::CategoryInfoList>
52     category_info_list() const;
53   std::shared_ptr<const wgt::parse::MetaDataInfo>
54     meta_data_info() const;
55   std::shared_ptr<const wgt::parse::AllowedNavigationInfo>
56     allowed_navigation_info() const;
57   std::shared_ptr<const wgt::parse::PermissionsInfo>
58     permissions_info() const;
59   std::shared_ptr<const wgt::parse::SettingInfo>
60     setting_info() const;
61   std::shared_ptr<const wgt::parse::SplashScreenInfo>
62     splash_screen_info() const;
63   std::shared_ptr<const wgt::parse::TizenApplicationInfo>
64     tizen_application_info() const;
65   std::shared_ptr<const wgt::parse::WidgetInfo>
66     widget_info() const;
67   std::shared_ptr<const wgt::parse::ContentInfo>
68     content_info() const;
69
70   const std::string application_path() const { return application_path_; }
71   const std::string pkg_id() const { return pkg_id_; }
72   const std::string app_id() const { return app_id_; }
73
74  private:
75   std::shared_ptr<const wgt::parse::AppControlInfoList>
76     app_control_info_list_;
77   std::shared_ptr<const wgt::parse::CategoryInfoList>
78     category_info_list_;
79   std::shared_ptr<const wgt::parse::MetaDataInfo>
80     meta_data_info_;
81   std::shared_ptr<const wgt::parse::AllowedNavigationInfo>
82     allowed_navigation_info_;
83   std::shared_ptr<const wgt::parse::PermissionsInfo>
84     permissions_info_;
85   std::shared_ptr<const wgt::parse::SettingInfo>
86     setting_info_;
87   std::shared_ptr<const wgt::parse::SplashScreenInfo>
88     splash_screen_info_;
89   std::shared_ptr<const wgt::parse::TizenApplicationInfo>
90     tizen_application_info_;
91   std::shared_ptr<const wgt::parse::WidgetInfo>
92     widget_info_;
93   std::shared_ptr<const wgt::parse::ContentInfo>
94     content_info_;
95
96   std::string application_path_;
97   std::string pkg_id_;
98   std::string app_id_;
99 };
100
101 }  // namespace wrt
102
103 #endif  // WRT_COMMON_APPLICATION_DATA_H_