Add extension APIs
[platform/core/api/alarm.git] / src / alarm.c
index b3d97ef..a4327c2 100755 (executable)
@@ -911,3 +911,36 @@ int alarm_update_week_flag(int alarm_id, int week_flag)
 
        return convert_error_code_to_alarm(__FUNCTION__, result);
 }
+
+int alarm_set_systime(int new_time)
+{
+       int result;
+
+       result = alarmmgr_set_systime(new_time);
+       if (result < 0)
+               return convert_error_code_to_alarm(__FUNCTION__, result);
+
+       return ALARM_ERROR_NONE;
+}
+
+int alarm_set_systime_with_propagation_delay(struct timespec new_time, struct timespec req_time)
+{
+       int result;
+
+       result = alarmmgr_set_systime_with_propagation_delay(new_time, req_time);
+       if (result < 0)
+               return convert_error_code_to_alarm(__FUNCTION__, result);
+
+       return ALARM_ERROR_NONE;
+}
+
+int alarm_set_timezone(char *tzpath_str)
+{
+       int result;
+
+       result = alarmmgr_set_timezone(tzpath_str);
+       if (result < 0)
+               return convert_error_code_to_alarm(__FUNCTION__, result);
+
+       return ALARM_ERROR_NONE;
+}