Setting UX is changed so permission check menu is removed.
[apps/core/preloaded/wrt-setting.git] / webapp-detail / detailview.h
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 WEB_SRC_SETTING_WEBAPP_DETAIL_DETAILVIEW_H_
18 #define WEB_SRC_SETTING_WEBAPP_DETAIL_DETAILVIEW_H_
19
20 #include <Evas.h>
21 #include <ui-gadget.h>
22
23 #undef None
24 #include <dpl/wrt-dao-rw/widget_dao.h>
25 #include <dpl/scoped_ptr.h>
26
27 #include "view.h"
28
29 namespace WebAppDetailSetting {
30
31 class AdvancedView;
32
33 typedef struct {
34     std::string license;
35     std::string href;
36     Evas_Object* evasObj;
37 } LicenseInfo;
38
39 class DetailView : public View
40 {
41     enum WebkitVersion {
42         WEBKIT_VERSION_WK1,
43         WEBKIT_VERSION_WK2,
44         WEBKIT_VERSION_UNKNOWN
45     };
46
47     Evas_Object *m_naviframe;
48     Evas_Object *m_parent;
49     Evas_Object *m_bx;
50     Evas_Object *check_webkit;
51     Evas_Object *check_login;
52     ui_gadget_h m_ug;
53     DPL::ScopedPtr<WrtDB::WidgetDAO> m_dao;
54     WrtDB::WidgetLocalizedInfo m_localizedInfo;
55     DPL::String m_appID;
56     LicenseInfo *m_licenseInfo;
57     DPL::ScopedPtr<AdvancedView> m_advancedView;
58
59     void getLocalizedInfo(void);
60     static void onBackBtnClicked(void *data,
61                                     Evas_Object *obj,
62                                     void *event_info);
63   public:
64     DetailView(Evas_Object* naviframe, ui_gadget_h ug, DPL::String appID);
65     ~DetailView(void);
66
67     Evas_Object *loadView(void);
68 };
69
70 class DetailData
71 {
72   public:
73     DetailView *m_detailView;
74     std::string m_title;
75     std::string m_subtitle;
76     int m_dataType;
77     DetailData(DetailView *detailView,
78               const char *title,
79               const char *subtitle) :
80         m_detailView(detailView),
81         m_title(title),
82         m_subtitle(subtitle) { };
83
84     ~DetailData(void) { };
85 };
86
87 } /* WebAppDetailSetting */
88
89 #endif /* WEB_SRC_SETTING_WEBAPP_DETAIL_DETAILVIEW_H_ */