Remove unnecessary files
[apps/home/wrt-setting.git] / webapp-detail / exceptionsview.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_EXCEPTIONSVIEW_H_
18 #define WEB_SRC_SETTING_WEBAPP_DETAIL_EXCEPTIONSVIEW_H_
19
20 #include <Evas.h>
21
22 #undef None
23 #include <memory>
24 #include <wrt-commons/security-origin-dao/security_origin_dao.h>
25 #include <wrt-commons/security-origin-dao/security_origin_dao_types.h>
26
27 namespace SecurityOriginDB {
28 class SecurityOriginDAO;
29 struct SecurityOriginData;
30 }
31
32 namespace WebAppDetailSetting {
33
34 class ExceptionsView
35 {
36   public:
37     ExceptionsView(Evas_Object *naviframe, DPL::String appID);
38     ~ExceptionsView(void);
39
40     bool loadView(void);
41     void loadEmptyView(Evas_Object* genlist);
42     void loadExceptionsSettingsView(
43         Evas_Object* genlist,
44         SecurityOriginDB::SecurityOriginDataList securityOriginDataList);
45
46   private:
47     Evas_Object *m_naviframe;
48     DPL::String m_appID;
49     SecurityOriginDB::SecurityOriginDAOPtr m_securityOriginDao;
50
51     //Genlist
52     static char* getEmptyTextCallback(
53         void* data,
54         Evas_Object* obj,
55         const char* part);
56     static char* getTextCallback(
57         void* data,
58         Evas_Object* obj,
59         const char* part);
60     static void delCallback(
61         void* data,
62         Evas_Object* obj);
63     static void selectedCallback(
64         void* data,
65         Evas_Object* obj,
66         void* eventInfo);
67
68     //Popup
69     static void removeItemCallback(
70         void* data,
71         Evas_Object* obj,
72         void* eventInfo);
73     static void closePopupCallback(
74         void* data,
75         Evas_Object* obj,
76         void* eventInfo);
77 };
78
79 class ExceptionsSettingsData
80 {
81   public:
82     SecurityOriginDB::SecurityOriginDAO* m_originDao;
83     SecurityOriginDB::SecurityOriginData m_originData;
84
85     ExceptionsSettingsData(
86         SecurityOriginDB::SecurityOriginDAO* dao,
87         SecurityOriginDB::SecurityOriginData data) :
88             m_originDao(dao),
89             m_originData(data)
90     {
91     };
92 };
93
94 } /* WebAppDetailSetting */
95
96 #endif /* WEB_SRC_SETTING_WEBAPP_DETAIL_EXCEPTIONSVIEW_H_ */