* @description Creates internal structure data and returns a notification handle.
* @parameter NotificationType
* @return NA
-*/
+*/
bool CreateNotification(notification_type_e eNotificationType)
{
FreeAndDeleteNotificationResourceHandle();
-
+
g_NotificationHandle = notification_create(eNotificationType);
CHECK_HANDLE(g_NotificationHandle, "notification_create");
-
+
return true;
}
/**
* @function FreeAndDeleteNotificationResourceHandle
* @description Free internal data structure and notification handle.
-* @parameter
+* @parameter
* @return NA
*/
void FreeAndDeleteNotificationResourceHandle()
*/
int CTc_Notification_PrivilegeNotification_delete(void)
{
+ int nRet;
+
START_TEST;
+
if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
{
return 1;
}
- int nRet = notification_delete(g_NotificationHandle);
- PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_delete", NotificationPrintAPIErrorMSG(nRet), notification_free(g_NotificationHandle), NOTIFICATION_ERROR_NONE);
- nRet = notification_free(g_NotificationHandle);
-
+ nRet = notification_delete(g_NotificationHandle);
+ PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_delete", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle(););
+
+ FreeAndDeleteNotificationResourceHandle();
+
return 0;
}
*/
int CTc_Notification_PrivilegeNotification_delete_all(void)
{
+ int nRet;
+
START_TEST;
if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
{
return 1;
}
- int nRet = notification_delete_all(NOTIFICATION_TYPE_NOTI);
- PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_delete_all", NotificationPrintAPIErrorMSG(nRet), notification_delete(g_NotificationHandle);notification_free(g_NotificationHandle), NOTIFICATION_ERROR_NONE);
- nRet = notification_free(g_NotificationHandle);
-
+ nRet = notification_delete_all(NOTIFICATION_TYPE_NOTI);
+ PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_delete_all", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle(););
+
+ FreeAndDeleteNotificationResourceHandle();
return 0;
}
//& purpose: check tizen.org/privilege/notification privilege.
*/
int CTc_Notification_PrivilegeNotification_post(void)
{
+ int nRet;
+
START_TEST;
- int eRetNotiErr;
+
if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
{
return 1;
}
-
- eRetNotiErr = notification_post(g_NotificationHandle);
- PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, eRetNotiErr, "notification_post", NotificationGetError(eRetNotiErr), FreeAndDeleteNotificationResourceHandle(););
-
+
+ nRet = notification_post(g_NotificationHandle);
+ PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_post", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle(););
+
FreeAndDeleteNotificationResourceHandle();
return 0;
}
*/
int CTc_Notification_PrivilegeNotification_load_by_tag(void)
{
- START_TEST;
- int nRet = -1;
+ int nRet;
char* pSetTag = NOTIFICATION_TAG;
+
+ START_TEST;
+
if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
{
return 1;
}
+
notification_load_by_tag(pSetTag);
nRet = get_last_result();
PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_load_by_tag", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle(););
-
+
FreeAndDeleteNotificationResourceHandle();
return 0;
}
*/
int CTc_Notification_PrivilegeNotification_update(void)
{
+ int nRet;
+
START_TEST;
+
if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
{
return 1;
}
- int eRetNotiErr = notification_update(g_NotificationHandle);
- PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, eRetNotiErr, "notification_update", NotificationGetError(eRetNotiErr), FreeAndDeleteNotificationResourceHandle(););
+
+ nRet = notification_update(g_NotificationHandle);
+ PRINT_RESULT_CLEANUP(TIZEN_ERROR_PERMISSION_DENIED, nRet, "notification_update", NotificationGetError(nRet), FreeAndDeleteNotificationResourceHandle(););
FreeAndDeleteNotificationResourceHandle();
return 0;
-}
\ No newline at end of file
+}