tizen 2.3.1 release
[framework/web/mobile/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 <EWebKit.h>
27 #include <EWebKit_internal.h>
28
29 namespace ViewModule {
30 WebNotificationData::WebNotificationData(Ewk_Notification* ewkNotification) :
31     m_notificaionId(0),
32     m_data(ewkNotification)
33 {}
34
35 WebNotificationData::~WebNotificationData()
36 {}
37
38 int WebNotificationData::getNotiId()
39 {
40     return m_notificaionId;
41 }
42
43 void WebNotificationData::setNotiId(const int notiId)
44 {
45     m_notificaionId = notiId;
46 }
47
48 uint64_t WebNotificationData::getEwkNotiId()
49 {
50     return ewk_notification_id_get(m_data);
51 }
52
53 const char* WebNotificationData::getIconUrl()
54 {
55     return ewk_notification_icon_url_get(m_data);
56 }
57
58 const char* WebNotificationData::getTitle()
59 {
60     return ewk_notification_title_get(m_data);
61 }
62
63 const char* WebNotificationData::getBody()
64 {
65     return ewk_notification_body_get(m_data);
66 }
67
68 Ewk_Notification* WebNotificationData::getData()
69 {
70     return m_data;
71 }
72 } //namespace ViewModule