2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FAppNotificationMessage.cpp
20 * @brief This is the placeholder for NotificationMessage class.
25 #include <FAppNotificationMessage.h>
27 #include <FBaseSysLog.h>
28 #include "FApp_NotificationMessageImpl.h"
30 using namespace Tizen::Base;
31 using namespace Tizen::Security;
34 namespace Tizen { namespace App
37 NotificationMessage::NotificationMessage(bool appBinding)
38 : __pNotificationMessageImpl(null)
40 __pNotificationMessageImpl = new (std::nothrow) _NotificationMessageImpl(appBinding);
41 SysTryReturnVoidResult(NID_APP, __pNotificationMessageImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
44 NotificationMessage::~NotificationMessage()
46 delete __pNotificationMessageImpl;
49 NotificationMessage::NotificationMessage(const NotificationMessage& rhs)
51 __pNotificationMessageImpl = new (std::nothrow) _NotificationMessageImpl(*rhs.__pNotificationMessageImpl);
52 SysTryReturnVoidResult(NID_APP, __pNotificationMessageImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
56 NotificationMessage::operator =(const NotificationMessage& rhs)
60 delete __pNotificationMessageImpl;
62 __pNotificationMessageImpl = new (std::nothrow) _NotificationMessageImpl(*rhs.__pNotificationMessageImpl);
63 SysTryReturn(NID_APP, __pNotificationMessageImpl, *this, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
70 NotificationMessage::Equals(const Object& rhs) const
72 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
73 return __pNotificationMessageImpl->Equals(rhs);
77 NotificationMessage::GetHashCode(void) const
79 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
80 return __pNotificationMessageImpl->GetHashCode();
84 NotificationMessage::GetBadgeNumber(void) const
86 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
88 return __pNotificationMessageImpl->GetBadgeNumber();
92 NotificationMessage::SetBadgeNumber(int badgeNumber)
94 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
96 return __pNotificationMessageImpl->SetBadgeNumber(badgeNumber);
100 NotificationMessage::GetBadgeOffset() const
102 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
104 return __pNotificationMessageImpl->GetBadgeOffset();
108 NotificationMessage::SetBadgeOffset(int badgeOffset)
110 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
112 return __pNotificationMessageImpl->SetBadgeOffset(badgeOffset);
116 NotificationMessage::GetAlertText() const
118 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
120 return __pNotificationMessageImpl->GetAlertText();
124 NotificationMessage::SetAlertText(const String& alertText)
126 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
128 return __pNotificationMessageImpl->SetAlertText(alertText);
132 NotificationMessage::GetAppMessage() const
134 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
136 return __pNotificationMessageImpl->GetAppMessage();
141 NotificationMessage::SetAppMessage(const String& appMessage)
143 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
145 return __pNotificationMessageImpl->SetAppMessage(appMessage);
149 NotificationMessage::GetTitleText() const
151 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
153 return __pNotificationMessageImpl->GetTitleText();
157 NotificationMessage::SetTitleText(const String& titleText)
159 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
161 return __pNotificationMessageImpl->SetTitleText(titleText);
165 NotificationMessage::GetIconFilePath() const
167 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
169 return __pNotificationMessageImpl->GetIconFilePath();
173 NotificationMessage::SetIconFilePath(const String& iconFilePath)
175 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
177 return __pNotificationMessageImpl->SetIconFilePath(iconFilePath);
181 NotificationMessage::GetSoundFilePath() const
183 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
185 return __pNotificationMessageImpl->GetSoundFilePath();
189 NotificationMessage::SetSoundFilePath(const String& soundFilePath)
191 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
193 return __pNotificationMessageImpl->SetSoundFilePath(soundFilePath);
197 NotificationMessage::GetOngoingActivityType() const
199 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
201 return __pNotificationMessageImpl->GetOngoingActivityType();
205 NotificationMessage::SetOngoingActivityType(OngoingActivityType activityType)
207 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
209 return __pNotificationMessageImpl->SetOngoingActivityType(activityType);
213 NotificationMessage::GetOngoingActivityProgressValue() const
215 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
217 return __pNotificationMessageImpl->GetOngoingActivityProgressValue();
221 NotificationMessage::SetOngoingActivityProgressValue(int progressValue)
223 SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
225 return __pNotificationMessageImpl->SetOngoingActivityProgressValue(progressValue);