[ITC][alarm][NonACR] Removed extra whitespaces 42/292742/2
authorUtkarsh Tiwari <utk.tiwari@samsung.com>
Fri, 12 May 2023 06:29:46 +0000 (11:59 +0530)
committerUtkarsh Tiwari <utk.tiwari@samsung.com>
Fri, 12 May 2023 06:33:10 +0000 (12:03 +0530)
Change-Id: Ifda275a54219d4a14c3cfa202790880d993e10ad
Signed-off-by: Utkarsh Tiwari <utk.tiwari@samsung.com>
src/itc/alarm/ITs-alarm.c

index bd3d3a93e539767a52aa3e66b9c1fcea3d0e174d..40afdab17c6221dc759a84fb87905934f9a012a8 100755 (executable)
@@ -353,7 +353,7 @@ int ITc_alarm_foreach_registered_alarm_p(void)
                app_control_destroy(hAppControl);
                return 1;
        }
-       
+
        if(g_bUserDataMismatch_alarm)
        {
                FPRINTF("[Line : %d][%s] User data in callback is not same which is passed through caller function.\\n", __LINE__, API_NAMESPACE);
@@ -814,7 +814,7 @@ int ITc_alarm_get_current_time_p(void)
        //Target API
        int nRet = alarm_get_current_time(&stdate);
        PRINT_RESULT(ALARM_ERROR_NONE, nRet, "alarm_get_current_time", AlarmGetError(nRet));
-       
+
        if(stdate.tm_sec < 0)
        {
                FPRINTF("[Line : %d][%s] alarm_get_current_time returned invalid time\\n", __LINE__, API_NAMESPACE);
@@ -825,7 +825,7 @@ int ITc_alarm_get_current_time_p(void)
 }
 
 //& type: auto
-//& purpose:Sets and Gets global flag in the alarm. 
+//& purpose:Sets and Gets global flag in the alarm.
 /**
 * @testcase                    ITc_alarm_set_get_global_p
 * @since_tizen         3.0
@@ -858,7 +858,7 @@ int ITc_alarm_set_get_global_p(void)
        nRet = app_control_set_app_id(hAppControl, pszPackage);
        PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_app_id", AppControlGetError(nRet), app_control_destroy(hAppControl));
 
-       int nAlarmID; 
+       int nAlarmID;
        int nDelay = 1;
        nRet = alarm_schedule_after_delay(hAppControl, nDelay,nDelay, &nAlarmID);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_schedule_once_after_delay", AlarmGetError(nRet), app_control_destroy(hAppControl));
@@ -870,12 +870,12 @@ int ITc_alarm_set_get_global_p(void)
                return 1;
        }
 
-       nRet = alarm_set_global(nAlarmID, bSetGlobal); 
+       nRet = alarm_set_global(nAlarmID, bSetGlobal);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_set_global", AlarmGetError(nRet),  alarm_cancel(nAlarmID);app_control_destroy(hAppControl));
-        
-       nRet = alarm_get_global(nAlarmID, &bGetGlobal); 
+
+       nRet = alarm_get_global(nAlarmID, &bGetGlobal);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_get_global", AlarmGetError(nRet),  alarm_cancel(nAlarmID);app_control_destroy(hAppControl));
-        
+
        if(bSetGlobal != bGetGlobal)
        {
                FPRINTF("[Line : %d][%s] value mismatch\\n", __LINE__, API_NAMESPACE);
@@ -883,13 +883,13 @@ int ITc_alarm_set_get_global_p(void)
                app_control_destroy(hAppControl);
                return 1;
        }
-        
+
        nRet = alarm_cancel(nAlarmID);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_cancel", AlarmGetError(nRet), app_control_destroy(hAppControl));
 
        nRet = app_control_destroy(hAppControl);
        PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", AppControlGetError(nRet));
+
        return 0;
 }
 
@@ -917,21 +917,21 @@ int ITc_alarm_schedule_noti_once_at_date_p(void)
        time_t t;
        notification_h hNoti = NULL;
        int alarmId = -1;
-       
+
        time(&t);
        t += 10;
        localtime_r(&t, &stdate);
-       
+
        hNoti = notification_create(NOTIFICATION_TYPE_NOTI);
        CHECK_HANDLE(hNoti,"notification_create");
-       
+
        int nRet = notification_set_text(hNoti, NOTIFICATION_TEXT_TYPE_TITLE, "notification alarm", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        //Target API
        nRet = alarm_schedule_noti_once_at_date(hNoti, &stdate, &alarmId);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_schedule_noti_once_at_date", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        if(stdate.tm_sec < 0 || alarmId < 0)
        {
                FPRINTF("[Line : %d][%s] alarm_schedule_noti_once_at_date returned invalid output parameter\\n", __LINE__, API_NAMESPACE);
@@ -941,7 +941,7 @@ int ITc_alarm_schedule_noti_once_at_date_p(void)
 
        notification_free(hNoti);
        alarm_cancel_all();
-       
+
        return 0;
 }
 
@@ -969,17 +969,17 @@ int ITc_alarm_schedule_noti_after_delay_p(void)
        int alarmId = -1;
        int nDelay = 1;
        int nPeriod = 1;
-       
+
        hNoti = notification_create(NOTIFICATION_TYPE_NOTI);
        CHECK_HANDLE(hNoti,"notification_create");
-       
+
        int nRet = notification_set_text(hNoti, NOTIFICATION_TEXT_TYPE_TITLE, "notification alarm", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        //Target API
        nRet = alarm_schedule_noti_after_delay(hNoti, nDelay, nPeriod, &alarmId);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_schedule_noti_after_delay", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        if(alarmId < 0)
        {
                FPRINTF("[Line : %d][%s] alarm_schedule_noti_after_delay returned invalid output parameter\\n", __LINE__, API_NAMESPACE);
@@ -989,7 +989,7 @@ int ITc_alarm_schedule_noti_after_delay_p(void)
 
        notification_free(hNoti);
        alarm_cancel_all();
-       
+
        return 0;
 }
 
@@ -1016,17 +1016,17 @@ int ITc_alarm_schedule_noti_once_after_delay_p(void)
        notification_h hNoti = NULL;
        int alarmId = -1;
        int nDelay = 1;
-       
+
        hNoti = notification_create(NOTIFICATION_TYPE_NOTI);
        CHECK_HANDLE(hNoti,"notification_create");
-       
+
        int nRet = notification_set_text(hNoti, NOTIFICATION_TEXT_TYPE_TITLE, "notification alarm", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        //Target API
        nRet = alarm_schedule_noti_once_after_delay(hNoti, nDelay, &alarmId);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_schedule_noti_once_after_delay", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        if(alarmId < 0)
        {
                FPRINTF("[Line : %d][%s] alarm_schedule_noti_once_after_delay returned invalid output parameter\\n", __LINE__, API_NAMESPACE);
@@ -1036,7 +1036,7 @@ int ITc_alarm_schedule_noti_once_after_delay_p(void)
 
        notification_free(hNoti);
        alarm_cancel_all();
-       
+
        return 0;
 }
 
@@ -1064,21 +1064,21 @@ int ITc_alarm_schedule_noti_with_recurrence_week_flag_p(void)
        time_t t;
        notification_h hNoti = NULL;
        int alarmId = -1;
-       
+
        time(&t);
        localtime_r(&t, &stdate);
        stdate.tm_sec += 5;
-       
+
        hNoti = notification_create(NOTIFICATION_TYPE_NOTI);
        CHECK_HANDLE(hNoti,"notification_create");
-       
+
        int nRet = notification_set_text(hNoti, NOTIFICATION_TEXT_TYPE_TITLE, "notification alarm", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        //Target API
        nRet = alarm_schedule_noti_with_recurrence_week_flag(hNoti, &stdate, ALARM_WEEK_FLAG_TUESDAY, &alarmId);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_schedule_noti_with_recurrence_week_flag", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        if( alarmId < 0)
        {
                FPRINTF("[Line : %d][%s] alarm_schedule_noti_with_recurrence_week_flag returned invalid output parameter\\n", __LINE__, API_NAMESPACE);
@@ -1088,7 +1088,7 @@ int ITc_alarm_schedule_noti_with_recurrence_week_flag_p(void)
 
        notification_free(hNoti);
        alarm_cancel_all();
-       
+
        return 0;
 }
 
@@ -1118,17 +1118,17 @@ int ITc_alarm_get_notification_p(void)
        int nDelay = 1;
        int nPeriod = 1;
        char *pszText = NULL;
-       
+
        hNoti = notification_create(NOTIFICATION_TYPE_NOTI);
        CHECK_HANDLE(hNoti,"notification_create");
-       
+
        int nRet = notification_set_text(hNoti, NOTIFICATION_TEXT_TYPE_TITLE, "notification alarm", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
        PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_set_text", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        //Target API
        nRet = alarm_schedule_noti_after_delay(hNoti, nDelay, nPeriod, &alarmId);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_schedule_noti_after_delay", AlarmGetError(nRet), notification_free(hNoti));
-       
+
        if(alarmId < 0)
        {
                FPRINTF("[Line : %d][%s] alarm_schedule_noti_after_delay returned invalid output parameter\\n", __LINE__, API_NAMESPACE);
@@ -1139,7 +1139,7 @@ int ITc_alarm_get_notification_p(void)
        nRet = alarm_get_notification(alarmId, &hNotiRet);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_get_notification", AlarmGetError(nRet), notification_free(hNoti));
        CHECK_HANDLE(hNotiRet,"alarm_get_notification");
-       
+
        nRet = notification_get_text(hNotiRet, NOTIFICATION_TEXT_TYPE_TITLE, &pszText);
        PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, nRet, "notification_get_text", AlarmGetError(nRet), notification_free(hNoti));
        if(strcmp(pszText, "notification alarm") != 0)
@@ -1148,10 +1148,10 @@ int ITc_alarm_get_notification_p(void)
                notification_free(hNoti);
                return 1;
        }
-       
+
        notification_free(hNoti);
        alarm_cancel_all();
-       
+
        return 0;
 }
 
@@ -1211,13 +1211,13 @@ int ITc_alarm_update_delay_p(void)
 
        nRet = alarm_update_delay(nAlarmID, nPeriod);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_update_delay", AlarmGetError(nRet),  alarm_cancel(nAlarmID);app_control_destroy(hAppControl));
-        
+
        nRet = alarm_cancel(nAlarmID);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_cancel", AlarmGetError(nRet), app_control_destroy(hAppControl));
 
        nRet = app_control_destroy(hAppControl);
        PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", AppControlGetError(nRet));
+
        return 0;
 }
 
@@ -1256,7 +1256,7 @@ int ITc_alarm_update_date_p(void)
        localtime_r(&tNow, &stDate1);
        tNow += 10;
        localtime_r(&tNow, &stDate2);
-       
+
        nRet = app_control_create(&hAppControl);
        PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "app_control_create", AppControlGetError(nRet));
 
@@ -1290,7 +1290,7 @@ int ITc_alarm_update_date_p(void)
 
        nRet = app_control_destroy(hAppControl);
        PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", AppControlGetError(nRet));
+
        return 0;
 }
 
@@ -1357,7 +1357,7 @@ int ITc_alarm_update_period_p(void)
 
        nRet = app_control_destroy(hAppControl);
        PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", AppControlGetError(nRet));
+
        return 0;
 }
 
@@ -1422,13 +1422,13 @@ int ITc_alarm_update_week_flag_p(void)
 
        nRet = alarm_update_week_flag(nAlarmID, ALARM_WEEK_FLAG_TUESDAY);
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_update_week_flag", AlarmGetError(nRet),  alarm_cancel(nAlarmID);app_control_destroy(hAppControl));
-        
+
        nRet = alarm_cancel_all();
        PRINT_RESULT_CLEANUP(ALARM_ERROR_NONE, nRet, "alarm_cancel_all", AlarmGetError(nRet), app_control_destroy(hAppControl));
 
        nRet = app_control_destroy(hAppControl);
        PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", AppControlGetError(nRet));
+
        return 0;
 }