* @{
*/
-#include<sys/types.h>
-#include<stdbool.h>
+#include <sys/types.h>
+#include <stdbool.h>
+#include <time.h>
#ifdef __cplusplus
extern "C" {
* This enumeration has error codes of alarm
*/
typedef enum {
+ ERR_ALARM_NOT_PERMITTED_APP = -11,
ERR_ALARM_INVALID_PARAM = -10,
/**<Invalid parameter*/
ERR_ALARM_INVALID_ID, /**<Invalid id*/
#define ALARM_TYPE_DEFAULT 0x0 /*< non volatile */
#define ALARM_TYPE_VOLATILE 0x02 /*< volatile */
#define ALARM_TYPE_NOLAUNCH 0x04 /*<without launch */
+#define ALARM_TYPE_INEXACT 0x08 /*<inexact alarm */
/**
}
}
* @endcode
- * @limo
*/
int alarmmgr_init(const char *appid);
}
* @endcode
- * @limo
*/
int alarmmgr_set_cb(alarm_cb_t handler, void *user_param);
* @endcode
- * @limo
*/
alarm_entry_t *alarmmgr_create_alarm(void);
}
* @endcode
- * @limo
*/
int alarmmgr_free_alarm(alarm_entry_t *alarm);
}
* @endcode
- * @limo
*/
int alarmmgr_set_time(alarm_entry_t *alarm, alarm_date_t time);
}
* @endcode
- * @limo
*/
int alarmmgr_get_time(const alarm_entry_t *alarm, alarm_date_t *time);
}
* @endcode
- * @limo
*/
int alarmmgr_set_repeat_mode(alarm_entry_t *alarm,
alarm_repeat_mode_t repeat_mode,
}
* @endcode
- * @limo
*/
int alarmmgr_get_repeat_mode(const alarm_entry_t *alarm,
alarm_repeat_mode_t *repeat_mode,
}
* @endcode
- * @limo
*/
int alarmmgr_set_type(alarm_entry_t *alarm, int alarm_type);
}
* @endcode
- * @limo
*/
int alarmmgr_get_type(const alarm_entry_t *alarm, int *alarm_type);
}
* @endcode
- * @limo
*/
int alarmmgr_add_alarm_appsvc_with_localtime(alarm_entry_t *alarm,void *bundle_data, alarm_id_t *alarm_id);
alarmmgr_free_alarm( alarm) ;
}
* @endcode
- * @limo
*/
int alarmmgr_add_alarm_with_localtime(alarm_entry_t *alarm,
const char *destination,
}
* @endcode
- * @limo
*/
int alarmmgr_add_alarm_appsvc(int alarm_type, time_t trigger_at_time,
time_t interval, void *bundle_data,
}
* @endcode
- * @limo
*/
int alarmmgr_add_alarm(int alarm_type, time_t trigger_at_time,
time_t interval, const char *destination,
}
* @endcode
- * @limo
*/
int alarmmgr_remove_alarm(alarm_id_t alarm_id);
}
* @endcode
- * @limo
*/
int alarmmgr_enum_alarm_ids(alarm_enum_fn_t fn, void *user_param);
alarmmgr_remove_alarm( alarm_id) ;
}
* @endcode
- * @limo
*/
int alarmmgr_get_info(alarm_id_t alarm_id, alarm_entry_t *alarm);
}
* @endcode
- * @limo
*/
void *alarmmgr_get_alarm_appsvc_info(alarm_id_t alarm_id, int *return_code);
}
* @endcode
- * @limo
*/
int alarmmgr_set_rtc_time(alarm_date_t *time);
int alarmmgr_set_systime(int new_time);
/**
+ * This function changes the system time and compensates the time using propagation delay.
+ * @param [in] new_time system time to be set (seconds, nanoseconds)
+ * @param [in] req_time time to request to change the system time (seconds, nanoseconds)
+ *
+ * @return @c ALARMMGR_RESULT_SUCCESS on success,
+ * otherwise a negative error value
+ * @retval #ALARMMGR_RESULT_SUCCESS Successful
+ * @retval #ERR_ALARM_SYSTEM_FAIL System failure
+ * @retval #ERR_ALARM_INVALID_PARAM invalid parameter
+ */
+int alarmmgr_set_systime_with_propagation_delay(struct timespec new_time, struct timespec req_time);
+
+/**
* This function changes the timezone which tranferred by other module
* @param [in] tzpath_str the path to timezone definition file
*