+++ /dev/null
-//
-// Open Service Platform
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-/**
- * @file FAppNotificationMessage.cpp
- * @brief This is the placeholder for NotificationMessage class.
- */
-
-#include <new>
-
-#include <FAppNotificationMessage.h>
-
-#include <FBaseSysLog.h>
-#include "FApp_NotificationMessageImpl.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Security;
-
-
-namespace Tizen { namespace App
-{
-
-NotificationMessage::NotificationMessage(bool appBinding)
- : __pNotificationMessageImpl(null)
-{
- __pNotificationMessageImpl = new (std::nothrow) _NotificationMessageImpl(appBinding);
- SysTryReturnVoidResult(NID_APP, __pNotificationMessageImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
-}
-
-NotificationMessage::~NotificationMessage()
-{
- delete __pNotificationMessageImpl;
-}
-
-NotificationMessage::NotificationMessage(const NotificationMessage& rhs)
-{
- __pNotificationMessageImpl = new (std::nothrow) _NotificationMessageImpl(*rhs.__pNotificationMessageImpl);
- SysTryReturnVoidResult(NID_APP, __pNotificationMessageImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
-}
-
-NotificationMessage&
-NotificationMessage::operator =(const NotificationMessage& rhs)
-{
- if (&rhs != this)
- {
- delete __pNotificationMessageImpl;
-
- __pNotificationMessageImpl = new (std::nothrow) _NotificationMessageImpl(*rhs.__pNotificationMessageImpl);
- SysTryReturn(NID_APP, __pNotificationMessageImpl, *this, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
- }
-
- return(*this);
-}
-
-bool
-NotificationMessage::Equals(const Object& rhs) const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
- return __pNotificationMessageImpl->Equals(rhs);
-}
-
-int
-NotificationMessage::GetHashCode(void) const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
- return __pNotificationMessageImpl->GetHashCode();
-}
-
-int
-NotificationMessage::GetBadgeNumber(void) const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetBadgeNumber();
-}
-
-result
-NotificationMessage::SetBadgeNumber(int badgeNumber)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetBadgeNumber(badgeNumber);
-}
-
-int
-NotificationMessage::GetBadgeOffset() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetBadgeOffset();
-}
-
-result
-NotificationMessage::SetBadgeOffset(int badgeOffset)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetBadgeOffset(badgeOffset);
-}
-
-String
-NotificationMessage::GetAlertText() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetAlertText();
-}
-
-result
-NotificationMessage::SetAlertText(const String& alertText)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetAlertText(alertText);
-}
-
-String
-NotificationMessage::GetAppMessage() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetAppMessage();
-}
-
-
-result
-NotificationMessage::SetAppMessage(const String& appMessage)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetAppMessage(appMessage);
-}
-
-String
-NotificationMessage::GetTitleText() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetTitleText();
-}
-
-result
-NotificationMessage::SetTitleText(const String& titleText)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetTitleText(titleText);
-}
-
-String
-NotificationMessage::GetIconFilePath() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetIconFilePath();
-}
-
-result
-NotificationMessage::SetIconFilePath(const String& iconFilePath)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetIconFilePath(iconFilePath);
-}
-
-String
-NotificationMessage::GetSoundFilePath() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetSoundFilePath();
-}
-
-result
-NotificationMessage::SetSoundFilePath(const String& soundFilePath)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetSoundFilePath(soundFilePath);
-}
-
-OngoingActivityType
-NotificationMessage::GetOngoingActivityType() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetOngoingActivityType();
-}
-
-result
-NotificationMessage::SetOngoingActivityType(OngoingActivityType activityType)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetOngoingActivityType(activityType);
-}
-
-int
-NotificationMessage::GetOngoingActivityProgressValue() const
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->GetOngoingActivityProgressValue();
-}
-
-result
-NotificationMessage::SetOngoingActivityProgressValue(int progressValue)
-{
- SysAssertf(__pNotificationMessageImpl != null, "Instance is not constructed properly.");
-
- return __pNotificationMessageImpl->SetOngoingActivityProgressValue(progressValue);
-}
-
-};
-}; // Tizen::App
+++ /dev/null
-//
-// Open Service Platform
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-/**
- * @file FApp_NotificationMessageImpl.cpp
- * @brief This is the placeholder for _NotificationMessageImpl class.
- */
-
-#include <FBaseBoolean.h>
-#include <FBaseInteger.h>
-#include <FBaseSysLog.h>
-#include <FIoFile.h>
-#include <FAppNotificationManager.h>
-#include <FAppNotificationMessage.h>
-
-#include <FBaseInternalTypes.h>
-#include "FApp_NotificationMessageImpl.h"
-
-
-using namespace Tizen::Base;
-using namespace Tizen::Io;
-
-namespace Tizen { namespace App
-{
-
-_NotificationMessageImpl::_NotificationMessageImpl(bool appBinding)
- : __appBinding(true)
- , __badgeNumber(-1)
- , __badgeOffset(0)
- , __progressValue(-1)
- , __activityType(ONGOING_ACTIVITY_TYPE_TEXT)
-{
-}
-
-_NotificationMessageImpl::_NotificationMessageImpl(const _NotificationMessageImpl& notificationMessage)
- : __appBinding(notificationMessage.__appBinding)
- , __badgeNumber(notificationMessage.__badgeNumber)
- , __badgeOffset(notificationMessage.__badgeOffset)
- , __progressValue(notificationMessage.__progressValue)
- , __activityType(notificationMessage.__activityType)
- , __alertText(notificationMessage.__alertText)
- , __appMessage(notificationMessage.__appMessage)
- , __titleText(notificationMessage.__titleText)
- , __iconFilePath(notificationMessage.__iconFilePath)
- , __soundFilePath(notificationMessage.__soundFilePath)
-{
-}
-
-_NotificationMessageImpl::~_NotificationMessageImpl()
-{
-}
-
-_NotificationMessageImpl&
-_NotificationMessageImpl::operator =(const _NotificationMessageImpl& notificationMessage)
-{
- if (this != ¬ificationMessage)
- {
- __appBinding = notificationMessage.__appBinding;
- __badgeNumber = notificationMessage.__badgeNumber;
- __badgeOffset = notificationMessage.__badgeOffset;
- __progressValue = notificationMessage.__progressValue;
- __activityType = notificationMessage.__activityType;
- __alertText = notificationMessage.__alertText;
- __appMessage = notificationMessage.__appMessage;
- __titleText = notificationMessage.__titleText;
- __iconFilePath = notificationMessage.__iconFilePath;
- __soundFilePath = notificationMessage.__soundFilePath;
- }
- return *this;
-}
-
-bool
-_NotificationMessageImpl::Equals(const Object& rhs) const
-{
- const NotificationMessage* pMsg = dynamic_cast<const NotificationMessage*>(&rhs);
- if (pMsg == null)
- {
- return false;
- }
-
- const _NotificationMessageImpl* pMsgImpl = pMsg->__pNotificationMessageImpl;
- if (pMsgImpl == this)
- {
- return true;
- }
-
- if (__appBinding != pMsgImpl->__appBinding)
- {
- return false;
- }
-
- if (__badgeNumber != pMsgImpl->__badgeNumber)
- {
- return false;
- }
-
- if (__badgeOffset != pMsgImpl->__badgeOffset)
- {
- return false;
- }
-
- if (__progressValue != pMsgImpl->__progressValue)
- {
- return false;
- }
-
- if (__activityType != pMsgImpl->__activityType)
- {
- return false;
- }
-
- if (GetHashCode() != pMsgImpl->GetHashCode())
- {
- return false;
- }
-
- if (__alertText != pMsgImpl->__alertText)
- {
- return false;
- }
-
- if (__appMessage != pMsgImpl->__appMessage)
- {
- return false;
- }
-
- if (__titleText != pMsgImpl->__titleText)
- {
- return false;
- }
-
- if (__iconFilePath != pMsgImpl->__iconFilePath)
- {
- return false;
- }
-
- if (__soundFilePath != __soundFilePath)
- {
- return false;
- }
-
- return true;
-}
-
-int
-_NotificationMessageImpl::GetHashCode(void) const
-{
- return Boolean(__appBinding).GetHashCode()
- ^ Integer(__badgeNumber).GetHashCode()
- ^ Integer(__badgeOffset).GetHashCode()
- ^ Integer(__progressValue).GetHashCode()
- ^ Integer(__activityType).GetHashCode()
- ^ __alertText.GetHashCode()
- ^ __appMessage.GetHashCode()
- ^ __titleText.GetHashCode()
- ^ __iconFilePath.GetHashCode()
- ^ __soundFilePath.GetHashCode();
-}
-
-int
-_NotificationMessageImpl::GetBadgeNumber(void) const
-{
- return __badgeNumber;
-}
-
-result
-_NotificationMessageImpl::SetBadgeNumber(int badgeNumber)
-{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, badgeNumber >= 0 && badgeNumber <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
- "BadgeNumber is less than 0 or greater than MAX_NOTIFICATION_BADGE_NUMBER.");
-
- __badgeOffset = 0;
- __badgeNumber = badgeNumber;
- return r;
-}
-
-int
-_NotificationMessageImpl::GetBadgeOffset() const
-{
- return __badgeOffset;
-}
-
-result
-_NotificationMessageImpl::SetBadgeOffset(int badgeOffset)
-{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, badgeOffset >= 0 && badgeOffset <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
- "BadgeOffset is less than 0 or greater than MAX_NOTIFICATION_BADGE_NUMBER.");
-
- __badgeNumber = -1;
- __badgeOffset = badgeOffset;
- return r;
-}
-
-String
-_NotificationMessageImpl::GetAlertText() const
-{
- return __alertText;
-}
-
-result
-_NotificationMessageImpl::SetAlertText(const String& alertText)
-{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, alertText.GetLength() > 0 && alertText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
- "AlertText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
-
- __alertText = alertText;
- return r;
-}
-
-String
-_NotificationMessageImpl::GetAppMessage() const
-{
- return __appMessage;
-}
-
-
-result
-_NotificationMessageImpl::SetAppMessage(const String& appMessage)
-{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, appMessage.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
- "AppMessage is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
- SysTryReturnResult(NID_APP, __appBinding, E_INVALID_OPERATION,
- "The Notification instance is not bound to Application");
-
- __appMessage = appMessage;
- return r;
-}
-
-String
-_NotificationMessageImpl::GetTitleText() const
-{
- return __titleText;
-}
-
-result
-_NotificationMessageImpl::SetTitleText(const String& titleText)
-{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, titleText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
- "TitleText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
- __titleText = titleText;
- return r;
-}
-
-String
-_NotificationMessageImpl::GetIconFilePath() const
-{
- return __iconFilePath;
-}
-
-result
-_NotificationMessageImpl::SetIconFilePath(const String& iconFilePath)
-{
- result r = E_SUCCESS;
- bool isExist = false;
-
- isExist = File::IsFileExist(iconFilePath);
- SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG,"The Specified File is Invalid");
-
- __iconFilePath = iconFilePath;
- return r;
-}
-
-String
-_NotificationMessageImpl::GetSoundFilePath() const
-{
- return __soundFilePath;
-}
-
-result
-_NotificationMessageImpl::SetSoundFilePath(const String& soundFilePath)
-{
- result r = E_SUCCESS;
- bool isExist = false;
-
- isExist = File::IsFileExist(soundFilePath);
- SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG,"The Specified File is Invalid");
-
- __soundFilePath = soundFilePath;
- return r;
-}
-
-OngoingActivityType
-_NotificationMessageImpl::GetOngoingActivityType() const
-{
- return __activityType;
-}
-
-result
-_NotificationMessageImpl::SetOngoingActivityType(OngoingActivityType activityType)
-{
- result r = E_SUCCESS;
-
- // to prevent weired gcc optimization for enum type
- int type = static_cast<int>(activityType);
-
- switch (type)
- {
- case ONGOING_ACTIVITY_TYPE_TEXT:
- break;
- case ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE:
- SysTryReturnResult(NID_APP, __progressValue == -1 || (__progressValue >= 0 && __progressValue <= 100), E_INVALID_STATE, "Incompatible progress value %d.", __progressValue);
- break;
- case ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE:
- break;
- default:
- SetLastResult(E_INVALID_STATE);
- SysLogException(NID_APP, E_INVALID_STATE, "Invalid activity type %d.", type);
- return E_INVALID_STATE;
- }
-
- __activityType = activityType;
- return r;
-}
-
-int
-_NotificationMessageImpl::GetOngoingActivityProgressValue() const
-{
- return __progressValue;
-}
-
-result
-_NotificationMessageImpl::SetOngoingActivityProgressValue(int progressValue)
-{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, progressValue >= 0, E_INVALID_ARG,"The progress value is less than 0");
-
- // use int type instead of OngoingActivityType to evade weired gcc optimization
- int activitytype = static_cast<int>(GetOngoingActivityType());
- SysTryReturnResult(NID_APP, activitytype > ONGOING_ACTIVITY_TYPE_TEXT && activitytype <= ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE,
- E_INVALID_STATE,"Invalid activity Type %d.", activitytype);
-
- if (activitytype == ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE)
- {
- SysTryReturnResult(NID_APP, progressValue <= 100, E_INVALID_ARG,"Invalid Progress value");
- }
- __progressValue = progressValue;
- return r;
-}
-
-bool
-_NotificationMessageImpl::IsAppBinding()const
-{
- return __appBinding;
-}
-
-};
-}; // Tizen::App
+++ /dev/null
-//
-// Open Service Platform
-// Copyright (c) 2012 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-/**
- * @file FApp_NotificationMessageImpl.h
- * @brief This is the header file for the %_NotificationMessageImpl class.
- */
-
-#ifndef _FAPP_INTERNAL_NOTIFICATION_MESSAGE_IMPL_H_
-#define _FAPP_INTERNAL_NOTIFICATION_MESSAGE_IMPL_H_
-
-#include <FBaseObject.h>
-#include <FAppTypes.h>
-#include <FOspConfig.h>
-
-namespace Tizen { namespace App
-{
-
-class NotificationMessage;
-
-class _NotificationMessageImpl
- : public Tizen::Base::Object
-{
-
-public:
- /**
- * This is the default constructor for this class.
- *
- * @since 2.1
- */
- _NotificationMessageImpl(bool appBinding);
-
- /**
- * This is the destructor for this class.
- *
- * @since 2.1
- */
- virtual ~_NotificationMessageImpl(void);
-
- /**
- * This is the copy constructor for this class.
- *
- * @since 2.1
- *
- * @param[in] rhs An instance of NotificationMessage
- */
- _NotificationMessageImpl(const _NotificationMessageImpl& notificationMessage);
-
- /**
- * This is the assignment operator.
- *
- * @since 2.1
- *
- * @param[in] rhs An instance of NotificationMessage
- */
- _NotificationMessageImpl& operator =(const _NotificationMessageImpl& notificationMessage);
-
- /**
- * Checks whether the specified instance of %NotificationMessage equals the current instance.
- *
- * @since 2.1
- *
- * @return @c true if the specified instance equals the current instance, @n
- * else @c false
- * @param[in] rhs An instance of %NotificationMessage
- * @remarks The method returns @c false if the specified object is not %NotificationMessage.
- */
- virtual bool Equals(const Object& rhs) const;
-
- /**
- * Gets the hash value of the current instance.
- *
- * @since 2.1
- *
- * @return The hash value of the current instance
- */
- virtual int GetHashCode(void) const;
-
- /**
- * Gets the badge number of the application icon.
- *
- * @since 2.1
- *
- * @return The current badge number
- * @exception E_SUCCESS The method is successful.
- * @exception E_SYSTEM A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method. @n
- * In case of failure, this method returns @c -1.
- */
- int GetBadgeNumber(void) const;
-
- /**
- * Gets the badge number of the application icon.
- *
- * @since 2.1
- *
- * @return The current badge number
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c value is less than 0, or greater than App::MAX_NOTIFICATION_BADGE_NUMBER.
- * @remarks The specific error code can be accessed using the GetLastResult() method. @n
- * In case of failure, this method returns @c -1.
- */
- result SetBadgeNumber(int badgeNo);
-/**
- * Gets the badge number offset of the notification message.
- *
- * @since 2.1
- *
- * @return The badge offset value
- */
- int GetBadgeOffset(void) const;
-
- /**
- * Sets a badge number offset of the notification message. @n
- * %NotificationMessage has either badge number or badge number offset.
- * If the badge number offset is set using SetBadgeOffset(), then previous badge number value is cleared.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] value The badge number value
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The absolute value of the specified @c value is greater than App::MAX_NOTIFICATION_BADGE_NUMBER.
- * @see SetBadgeNumber()
- */
- result SetBadgeOffset(int value);
-
- /**
- * Gets the alert text of the notification message.
- *
- * @since 2.1
- *
- * @return The alert text
- */
- Tizen::Base::String GetAlertText(void) const;
-
- /**
- * Sets an alert text of the notification message.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] text The alert text
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The length of @c text is greater than App::MAX_NOTIFICATION_MESSAGE_LENGTH.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- */
- result SetAlertText(const Tizen::Base::String& text);
-
- /**
- * Gets the application message of the notification message.@n
- * This message is delivered to the application as the launch arguments.
- *
- * @since 2.1
- *
- * @return The message for application
- */
- Tizen::Base::String GetAppMessage(void) const;
-
- /**
- * Sets the application message of the notification message.@n
- * This message is delivered to the application as the launch arguments.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] appMessage The message for the application
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The length of @c appMessage is greater than App::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
- * @exception E_INVALID_OPERATION This instance is not bound to application.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks This method returns E_INVALID_OPERATION if %NotificationMessage instance is not bound to application.
- */
- result SetAppMessage(const Tizen::Base::String& appMessage);
-
- /**
- * Gets the title text of the notification message.
- *
- * @since 2.1
- *
- * @return The title text
- */
- Tizen::Base::String GetTitleText(void) const;
-
- /**
- * Sets an alert text of the notification message.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] title The title text
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The length of @c title is greater than App::MAX_NOTIFICATION_TITLE_LENGTH.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- */
- result SetTitleText(const Tizen::Base::String& title);
-
- /**
- * Gets the file path of the icon image for the notification message.
- *
- * @since 2.1
- *
- * @return The file path of the icon image
- */
- Tizen::Base::String GetIconFilePath(void) const;
-
- /**
- * Sets a file path of the icon image for the notification message.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] iconPath The file path of the icon image
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified path is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- */
- result SetIconFilePath(const Tizen::Base::String& iconPath);
-
- /**
- * Gets the file path of the sound file to be played for the notification message.
- *
- * @since 2.1
- *
- * @return The file path of the sound file
- */
- Tizen::Base::String GetSoundFilePath(void) const;
-
- /**
- * Sets a file path of the sound file to be played for the notification message. @n
- * The sound file should be wave file format.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] soundPath The file path of the sound file
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified path is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks If the format of the sound file is not valid, then the sound file is not played properly when the notification message is shown.
- */
- result SetSoundFilePath(const Tizen::Base::String& soundPath);
-
- /**
- * Gets the notification type for ongoing-activity notification.
- *
- * @since 2.1
- *
- * @return ongoing-activity notification type
- * @remarks This information is only meaningful when the NotificationMessage instance is delivered to NotificationManager::NotifyOngoingActivity() method.
- * @see NotificationManager::NotifyOngoingActivity(), SetOngoingActivityType()
- */
- OngoingActivityType GetOngoingActivityType(void) const;
-
- /**
- * Sets the notification type for ongoing-activity notification.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] type ongoing-activity notification type
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_STATE Current progress value is not compatible to the specified type
- * @remarks This information is only meaningful when the NotificationMessage instance is delivered to NotificationManager::NotifyOngoingActivity() method.
- * @see NotificationManager::NotifyOngoingActivity(), SetOngoingActivityProgressValue()
- */
- result SetOngoingActivityType(OngoingActivityType type = ONGOING_ACTIVITY_TYPE_TEXT);
-
- /**
- * Gets the progress value for the ongoing-activity notification.
- *
- * @since 2.1
- *
- * @return The progress value
- */
- int GetOngoingActivityProgressValue(void) const;
-
- /**
- * Updates the progress value to the specified value.
- *
- * @since 2.1
- *
- * @return An error code
- * @param[in] value The value of the progress
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
- * - @c value is less than 0.
- * - @c value does not lie between 0 and 100 for App::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
- * @exception E_INVALID_STATE This instance is in an invalid state. @n
- * OngoingActivityType should be either App::ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE or App::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
- */
- result SetOngoingActivityProgressValue(int value);
-
- /**
- * Gets the appBinding value for the notification.
- *
- * @since 2.1
- *
- * @return The appBinding value
- */
- bool IsAppBinding() const;
-
-private:
- bool __appBinding;
- int __badgeNumber;
- int __badgeOffset;
- int __progressValue;
- OngoingActivityType __activityType;
- Tizen::Base::String __alertText;
- Tizen::Base::String __appMessage;
- Tizen::Base::String __titleText;
- Tizen::Base::String __iconFilePath;
- Tizen::Base::String __soundFilePath;
-
-}; //_NotificationMessageImpl
-
-} } // Tizen::App
-
-#endif // _FAPP_INTERNAL_NOTIFICATION_MESSAGE_IMPL_H_