Temporary fix for asking geolocation permission popup crash.
[platform/framework/web/wrt.git] / src / view / common / view_logic_certificate_support.h
1 /*
2  * Copyright (c) 2011 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  * @file    view_logic_certificate_origin_support.h
18  * @author  Leerang Song (leerang.song@samsung.com)
19  * @version 1.0
20  * @brief   Header file for certificate
21  */
22
23 #ifndef VIEW_LOGIC_CERTIFICATE_SUPPORT_H_
24 #define VIEW_LOGIC_CERTIFICATE_SUPPORT_H_
25
26 #include <memory>
27 #include <Evas.h>
28 #include <Elementary.h>
29 #include <dpl/wrt-dao-ro/common_dao_types.h>
30 #include <wrt-commons/certificate-dao/certificate_dao.h>
31
32 class WidgetModel;
33 namespace CertificateDB {
34 class CertificateDAO;
35 }
36
37 namespace ViewModule {
38 class CertificateSupportImplementation;
39
40 class CertificateSupport
41 {
42   public:
43     CertificateSupport(WidgetModel* widgetModel);
44     virtual ~CertificateSupport();
45     CertificateDB::CertificateDAO* getCertificateDAO();
46
47   private:
48     std::unique_ptr<CertificateSupportImplementation> m_impl;
49 };
50
51 namespace CertificateSupportUtil {
52 class PermissionData
53 {
54   public:
55     CertificateDB::CertificateDAO* m_certiDao;
56     CertificateDB::CertificateData m_certiData;
57     void* m_data;
58
59     PermissionData(
60         CertificateDB::CertificateDAO* certiDao,
61         CertificateDB::CertificateData certiData,
62         void* data) :
63         m_certiDao(certiDao),
64         m_certiData(certiData),
65         m_data(data)
66     {}
67 };
68
69 Evas_Object* createPopup(Evas_Object* window,
70                          const char* bodyText,
71                          const char* checkText,
72                          Evas_Smart_Cb buttonCallback,
73                          void* data);
74 Evas_Object* getPopup(Evas_Object* button);
75 Evas_Object* getCheck(Evas_Object* popup);
76 CertificateDB::Result getResult(Evas_Object* button);
77 };
78 } // namespace ViewModule
79
80 #endif // VIEW_LOGIC_CERTIFICATE_SUPPORT_H_