r = ConvertNotificationResult(notification_set_image(notiHandle, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, pIndicatorIconPath.get()));
SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the indicator icon path failed.", GetErrorMessage(r));
// Set - sound file path
- if (pSoundPath.get())
+ if (pRequestImpl->GetSoundState() == _SOUND_STATE_MUTE)
{
- if (isOngoing && needUpdate)
- {
- r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_NONE, NULL));
- }
- else
- {
- r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_USER_DATA, pSoundPath.get()));
- }
+ r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_NONE, NULL));
}
else
{
- if (isOngoing)
+ if (pSoundPath.get())
{
- r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_NONE, NULL));
+ if (isOngoing && needUpdate)
+ {
+ r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_NONE, NULL));
+ }
+ else
+ {
+ r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_USER_DATA, pSoundPath.get()));
+ }
}
else
{
- r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL));
+ if (isOngoing)
+ {
+ r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_NONE, NULL));
+ }
+ else
+ {
+ r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL));
+ }
}
}
SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the sound failed.", GetErrorMessage(r));
+ if (pRequestImpl->GetVibrationType() == _VIBRATION_TYPE_DEFAULT)
+ {
+ r = ConvertNotificationResult(notification_set_vibration(notiHandle, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the vibration failed.", GetErrorMessage(r));
+ }
+
// Set extended - text, thumbnail and background image
if (!isOngoing)
{
, __lightOnTime(0)
, __lightOffTime(0)
, __iconStyle(_INDICATOR_ICON_STYLE_NORMAL)
+ , __vibrationType(_VIBRATION_TYPE_NONE)
+ , __soundState(_SOUND_STATE_NORMAL)
{
}
, __lightOnTime(notificationMessage.__lightOnTime)
, __lightOffTime(notificationMessage.__lightOffTime)
, __iconStyle(notificationMessage.__iconStyle)
+ , __vibrationType(notificationMessage.__vibrationType)
+ , __soundState(notificationMessage.__soundState)
{
}
__lightOffTime = notificationMessage.__lightOffTime;
__iconStyle = notificationMessage.__iconStyle;
+ __vibrationType = notificationMessage.__vibrationType;
+ __soundState = notificationMessage.__soundState;
}
return *this;
}
{
return false;
}
+ if (__vibrationType != pMsgImpl->__vibrationType)
+ {
+ return false;
+ }
+ if (__soundState != pMsgImpl->__soundState)
+ {
+ return false;
+ }
+
return true;
}
^ Integer(__lightOnTime).GetHashCode()
^ Integer(__lightOffTime).GetHashCode()
^ Integer(static_cast<int>(__iconStyle)).GetHashCode()
+ ^ Integer(static_cast<int>(__vibrationType)).GetHashCode()
+ ^ Integer(static_cast<int>(__soundState)).GetHashCode()
;
}
return __iconStyle;
}
+result
+_NotificationRequestImpl::SetVibrationType(_VibrationType vibrationType)
+{
+ __vibrationType = vibrationType;
+ return E_SUCCESS;
+}
+
+_VibrationType
+_NotificationRequestImpl::GetVibrationType(void) const
+{
+ return __vibrationType;
+}
+
+result
+_NotificationRequestImpl::SetSoundState(_SoundState soundState)
+{
+ __soundState = soundState;
+ return E_SUCCESS;
+}
+
+_SoundState
+_NotificationRequestImpl::GetSoundState(void) const
+{
+ return __soundState;
+}
+
_NotificationRequestImpl*
_NotificationRequestImpl::GetInstance(NotificationRequest& request)
enum _IndicatorIconStyle
{
- _INDICATOR_ICON_STYLE_NORMAL, /**< The icon is normal style */
- _INDICATOR_ICON_STYLE_DOWNLOADING, /**< The icon is downloading style */
- _INDICATOR_ICON_STYLE_UPLOADING /**< The icon is uploading style */
+ _INDICATOR_ICON_STYLE_NORMAL, /**< The icon is normal style */
+ _INDICATOR_ICON_STYLE_DOWNLOADING, /**< The icon is downloading style */
+ _INDICATOR_ICON_STYLE_UPLOADING /**< The icon is uploading style */
};
+enum _VibrationType
+{
+ _VIBRATION_TYPE_NONE, /**< The no vibration */
+ _VIBRATION_TYPE_DEFAULT /**< The default type vibration */
+};
+
+enum _SoundState
+{
+ _SOUND_STATE_NORMAL, /**< The normal state sound */
+ _SOUND_STATE_MUTE /**< The mute sate sound */
+};
+
+
+
class _OSP_EXPORT_ _NotificationRequestImpl
: public Tizen::Base::Object
{
*/
_IndicatorIconStyle GetIndicatorIcon(void) const;
+
+ result SetVibrationType(_VibrationType vibrationType);
+
+ _VibrationType GetVibrationType(void) const;
+
+ result SetSoundState(_SoundState soundState);
+
+ _SoundState GetSoundState(void) const;
+
+
//
// Gets the implementation.
//
int __lightOffTime;
// 2.2.1
_IndicatorIconStyle __iconStyle;
+ // After 2.2.1
+ _VibrationType __vibrationType;
+ _SoundState __soundState;
}; //_NotificationRequestImpl