#define VIEW_LOGIC_WEB_NOTIFICATION_SUPPORT_H_
#include <memory>
-#include <stdint.h>
-#include <dpl/exception.h>
-#include <EWebKit2.h>
-
-//Forward declarations
-class WidgetModel;
-namespace SecurityOriginDB {
- class SecurityOriginDAO;
-}
+#include <dpl/wrt-dao-ro/common_dao_types.h>
+#include "view_logic_web_notification_data.h"
namespace ViewModule {
-namespace WebNotification {
-
-class WebNotificationData {
+class WebNotificationSupportImplementation;
+class WebNotificationSupport
+{
public:
- WebNotificationData(WidgetModel* widgetModel, uint64_t id);
- virtual ~WebNotificationData();
-
- WidgetModel* m_widgetModel;
- uint64_t m_id;
- std::string m_iconURL;
- std::string m_title;
- std::string m_body;
- std::string m_url;
-};
+ WebNotificationSupport();
+ virtual ~WebNotificationSupport();
+ void initialize(WrtDB::TizenPkgId pkgId);
+ void deinitialize(void);
-typedef std::shared_ptr<WebNotificationData> WebNotificationDataPtr;
+ bool show(WebNotificationDataPtr notiData);
+ void* hide(uint64_t ewkNotiId);
-class Exception {
- public:
- DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
- DECLARE_EXCEPTION_TYPE(Base, InitError)
- DECLARE_EXCEPTION_TYPE(Base, NotificationShowError)
- DECLARE_EXCEPTION_TYPE(Base, DownloadImageError)
+ private:
+ std::unique_ptr<WebNotificationSupportImplementation> m_impl;
};
-
-void webNotificationPermissionRequest(
- Evas_Object* window,
- SecurityOriginDB::SecurityOriginDAO* securityOriginDAO,
- Ewk_Context* ewkContext,
- void* data);
-bool showWebNotification(WebNotificationDataPtr notiData);
-
-} // namespace SecuritySupport
-} // namespace WebNotification
-
+} // namespace ViewModule
#endif /* VIEW_LOGIC_WEB_NOTIFICATION_H_ */