* 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.
+ * limitations under the License.
*/
static void utc_alarm_get_scheduled_recurrence_week_flag_negative(void);
static void utc_alarm_get_current_time_positive(void);
static void utc_alarm_get_current_time_negative(void);
-static void utc_alarm_get_service_positive(void);
-static void utc_alarm_get_service_negative(void);
+static void utc_alarm_get_app_control_positive(void);
+static void utc_alarm_get_app_control_negative(void);
{ utc_alarm_get_scheduled_recurrence_week_flag_negative, 2 },
{ utc_alarm_get_current_time_positive, 1 },
{ utc_alarm_get_current_time_negative, 2 },
- { utc_alarm_get_service_positive, 1 },
- { utc_alarm_get_service_negative, 2 },
+ { utc_alarm_get_app_control_positive, 1 },
+ { utc_alarm_get_app_control_negative, 2 },
{ NULL, 0 },
};
}
dts_message("utc_alarm_foreach_registered_alarm_positive", "registered id = %d callback id = %d", alarm, tid);
-
+
return true;
}
{
time_t current_time;
struct tm current_tm;
- service_h service;
+ app_control_h app_control;
int tid;
GMainLoop *loop;
int ret = ALARM_ERROR_NONE;
- service_create(&service);
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- service_set_package(service, "com.samsung.memo");
-
+ app_control_create(&app_control);
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+ app_control_set_package(app_control, "org.tizen.memo");
+
loop = g_main_loop_new(NULL, FALSE);
- g_timeout_add(5000,timeout , loop);
-
- ret = alarm_schedule_after_delay(service, 1, 1, &tid);
-
+ g_timeout_add(5000,timeout , loop);
+
+ ret = alarm_schedule_after_delay(app_control, 1, 1, &tid);
+
g_main_loop_run(loop);
-
+
if(ret == ALARM_ERROR_NONE)
{
dts_pass("utc_alarm_schedule_after_delay_positive", "passed");
{
dts_fail("utc_alarm_schedule_after_delay_positive", "failed");
}
-
- service_destory(service);
+
+ app_control_destory(app_control);
alarm_cancel_all();
}
{
time_t current_time;
struct tm current_tm;
- service_h service;
+ app_control_h app_control;
int ret = ALARM_ERROR_NONE;
int tid;
GMainLoop *loop;
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
-
- ret = alarm_schedule_after_delay(service, 1, 1, NULL);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+
+ ret = alarm_schedule_after_delay(app_control, 1, 1, NULL);
g_main_loop_run(loop);
{
dts_pass("utc_alarm_schedule_after_delay_negative", "passed");
}
-
- service_destory(service);
+
+ app_control_destory(app_control);
alarm_cancel_all();
}
{
time_t current_time;
struct tm current_tm;
- service_h service;
+ app_control_h app_control;
int ret = ALARM_ERROR_NONE;
int tid;
GMainLoop *loop;
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
loop = g_main_loop_new(NULL, FALSE);
g_timeout_add(5000,timeout , loop);
-
- ret = alarm_schedule_after_delay(service, 1, 1, &tid);
+
+ ret = alarm_schedule_after_delay(app_control, 1, 1, &tid);
ret = alarm_cancel(tid);
g_main_loop_run(loop);
-
+
if(ret == ALARM_ERROR_NONE)
{
dts_pass("utc_alarm_cancel_positive", "passed");
{
dts_fail("utc_alarm_cancel_positive", "passed");
}
-
- service_destory(service);
+
+ app_control_destory(app_control);
alarm_cancel_all();
}
static void utc_alarm_cancel_negative(void)
{
int ret = ALARM_ERROR_NONE;
-
+
ret = alarm_cancel(NULL);
if(ret == ALARM_ERROR_NONE)
{
int ret = ALARM_ERROR_NONE;
time_t current_time;
struct tm current_tm;
- service_h service;
+ app_control_h app_control;
int tid;
GMainLoop *loop;
loop = g_main_loop_new(NULL, FALSE);
g_timeout_add(1000,timeout , loop);
-
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- alarm_schedule_after_delay(service, 1, 5, &tid);
-
+
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+ alarm_schedule_after_delay(app_control, 1, 5, &tid);
+
ret = alarm_foreach_registered_alarm(foreach_alarm_cb,NULL);
g_main_loop_run(loop);
{
dts_pass("utc_alarm_foreach_registered_alarm_positive" , "passed");
}
-
- service_destory(service);
+
+ app_control_destory(app_control);
alarm_cancel_all();
}
static void utc_alarm_foreach_registered_alarm_negative(void)
{
int ret = ALARM_ERROR_NONE;
-
+
// do i need to call alarm_init??
ret = alarm_foreach_registered_alarm(NULL,NULL);
static void utc_alarm_get_scheduled_date_positive(void)
{
struct tm date;
- service_h service;
+ app_control_h app_control;
int ret = ALARM_ERROR_NONE;
int tid;
GMainLoop *loop;
loop = g_main_loop_new(NULL, FALSE);
g_timeout_add(5000,timeout , loop);
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- alarm_schedule_after_delay(service, 1, 5, &tid);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+ alarm_schedule_after_delay(app_control, 1, 5, &tid);
ret = alarm_get_scheduled_date(tid, &date);
{
dts_fail("utc_alarm_get_date_positive", "failed");
}
-
- service_destory(service);
+
+ app_control_destory(app_control);
alarm_cancel_all();
}
{
struct tm date;
int ret = ALARM_ERROR_NONE;
-
+
ret = alarm_get_scheduled_date(NULL, &date);
if(ret == ALARM_ERROR_NONE)
{
time_t current_time;
struct tm current_tm;
- service_h service;
+ app_control_h app_control;
int ret = ALARM_ERROR_NONE;
int period = 0;
int tid;
loop = g_main_loop_new(NULL, FALSE);
g_timeout_add(1000,timeout , loop);
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- alarm_schedule_after_delay(service, 1, 1, &tid);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+ alarm_schedule_after_delay(app_control, 1, 1, &tid);
ret = alarm_get_scheduled_period(tid, &period);
dts_fail("utc_alarm_get_scheduled_period_positive", "failed");
}
- service_destory(service);
+ app_control_destory(app_control);
alarm_cancel_all();
}
time_t current_time;
struct tm date;
time_t now;
- service_h service;
+ app_control_h app_control;
int tid;
GMainLoop *loop;
time(&now);
localtime_r(&now, &date);
-
+
date.tm_sec += 3;
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
- ret = alarm_schedule_at_date(service, &date, 2, &tid);
+ ret = alarm_schedule_at_date(app_control, &date, 2, &tid);
g_main_loop_run(loop);
if(ret == ALARM_ERROR_NONE)
{
dts_pass("utc_alarm_schedule_at_date_positive", "passed");
-
+
}
else
{
dts_fail("utc_alarm_schedule_at_date_positive", "failed");
}
- service_destory(service);
+ app_control_destory(app_control);
alarm_cancel_all();
}
time_t current_time;
struct tm current_tm;
int ret = ALARM_ERROR_NONE;
- service_h service;
-
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- ret = alarm_schedule_at_date(service, NULL, 1, &tid);
+ app_control_h app_control;
+
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+ ret = alarm_schedule_at_date(app_control, NULL, 1, &tid);
if(ret == ALARM_ERROR_NONE)
{
dts_pass("utc_alarm_schedule_at_date_negative", "passed");
}
- service_destory(service);
+ app_control_destory(app_control);
alarm_cancel_all();
}
time_t current_time;
struct tm date;
time_t now;
- service_h service;
+ app_control_h app_control;
int tid;
GMainLoop *loop;
time(&now);
localtime_r(&now, &date);
date.tm_sec += 3;
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
- alarm_schedule_with_recurrence_week_flag(service, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+ alarm_schedule_with_recurrence_week_flag(app_control, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
g_main_loop_run(loop);
dts_fail("utc_alarm_schedule_with_recurrence_week_flag_positive", "failed");
}
- service_destory(service);
+ app_control_destory(app_control);
alarm_cancel_all();
}
time_t current_time;
struct tm date;
time_t now;
- service_h service;
+ app_control_h app_control;
int tid;
GMainLoop *loop;
int week_flag = 0;
time(&now);
localtime_r(&now, &date);
date.tm_sec += 3;
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
- alarm_schedule_with_recurrence_week_flag(service, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+ alarm_schedule_with_recurrence_week_flag(app_control, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
alarm_get_scheduled_recurrence_week_flag(tid, &week_flag);
-
+
if(ret != ALARM_ERROR_NONE)
{
dts_fail("utc_alarm_get_scheduled_recurrence_week_flag_positive", "failed");
{
dts_fail("utc_alarm_get_scheduled_recurrence_week_flag_positive", "failed");
}
- service_destory(service);
+ app_control_destory(app_control);
alarm_cancel_all();
}
{
struct tm date;
int ret = ALARM_ERROR_NONE;
-
+
ret = alarm_get_current_time(&date);
if(ret == ALARM_ERROR_NONE)
{
}
}
-static void utc_alarm_get_service_positive(void)
+static void utc_alarm_get_app_control_positive(void)
{
time_t current_time;
struct tm current_tm;
- service_h service;
- service_h service_return;
+ app_control_h app_control;
+ app_control_h app_control_return;
int ret = ALARM_ERROR_NONE;
int tid;
loop = g_main_loop_new(NULL, FALSE);
g_timeout_add(1000,timeout , loop);
- service_create(&service);
- service_set_package(service, "com.samsung.memo");
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- alarm_schedule_after_delay(service, 3, 0, &tid);
+ app_control_create(&app_control);
+ app_control_set_package(app_control, "org.tizen.memo");
+ app_control_set_operation(app_control, SERVICE_OPERATION_DEFAULT);
+ alarm_schedule_after_delay(app_control, 3, 0, &tid);
- ret = alarm_get_service(tid, &service_return);
+ ret = alarm_get_app_control(tid, &app_control_return);
g_main_loop_run(loop);
if(ret != ALARM_ERROR_NONE)
{
- dts_fail("utc_alarm_get_service_positive", "failed");
+ dts_fail("utc_alarm_get_app_control_positive", "failed");
}
-
- ret = service_get_package(service_return, &package);
-
+
+ ret = app_control_get_package(app_control_return, &package);
+
if(ret != SERVICE_ERROR_NONE)
{
- dts_fail("utc_alarm_get_service_positive", "failed");
+ dts_fail("utc_alarm_get_app_control_positive", "failed");
}
- if(!strcmp(package, "com.samsung.memo"))
+ if(!strcmp(package, "org.tizen.memo"))
{
- dts_pass("utc_alarm_get_service_positive", "passed");
+ dts_pass("utc_alarm_get_app_control_positive", "passed");
}
else
{
- dts_fail("utc_alarm_get_service_positive", "failed");
+ dts_fail("utc_alarm_get_app_control_positive", "failed");
}
-
+
if(package != NULL)
{
free(package);
}
- service_destory(service);
- service_destory(service_return);
+ app_control_destory(app_control);
+ app_control_destory(app_control_return);
alarm_cancel_all();
}
-static void utc_alarm_get_service_negative(void)
+static void utc_alarm_get_app_control_negative(void)
{
int ret = ALARM_ERROR_NONE;
- ret = alarm_get_service(NULL,NULL);
+ ret = alarm_get_app_control(NULL,NULL);
if(ret == ALARM_ERROR_NONE)
{
- dts_fail("utc_alarm_get_service_negative", "failed");
+ dts_fail("utc_alarm_get_app_control_negative", "failed");
}
else
{
- dts_pass("utc_alarm_get_service_negative", "passed");
+ dts_pass("utc_alarm_get_app_control_negative", "passed");
}
}