Merge "fix: use EINA_* booleans instread of TRUE/FALSE" into tizen
[platform/framework/web/wrt.git] / src / view / webkit / view_logic_web_notification_data.cpp
1 /*
2  * Copyright (c) 2013 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  *
18  * @file    view_logic_web_notification_data.cpp
19  * @author  Jihoon Chung (jihoon.chung@samsung.com)
20  *
21  */
22
23 #include "view_logic_web_notification_data.h"
24
25 #include <stdint.h>
26 #include <EWebKit2.h>
27
28 namespace ViewModule {
29 WebNotificationData::WebNotificationData(Ewk_Notification* ewkNotification) :
30     m_notificaionId(0),
31     m_data(ewkNotification)
32 {}
33
34 WebNotificationData::~WebNotificationData()
35 {}
36
37 int WebNotificationData::getNotiId()
38 {
39     return m_notificaionId;
40 }
41
42 void WebNotificationData::setNotiId(const int notiId)
43 {
44     m_notificaionId = notiId;
45 }
46
47 uint64_t WebNotificationData::getEwkNotiId()
48 {
49     return ewk_notification_id_get(m_data);
50 }
51
52 const char* WebNotificationData::getIconUrl()
53 {
54     return ewk_notification_icon_url_get(m_data);
55 }
56
57 const char* WebNotificationData::getTitle()
58 {
59     return ewk_notification_title_get(m_data);
60 }
61
62 const char* WebNotificationData::getBody()
63 {
64     return ewk_notification_body_get(m_data);
65 }
66
67 Ewk_Notification* WebNotificationData::getData()
68 {
69     return m_data;
70 }
71 } //namespace ViewModule