diff options
author | Jiwoong Im <jiwoong.im@samsung.com> | 2016-01-11 14:54:54 +0900 |
---|---|---|
committer | Jiwoong Im <jiwoong.im@samsung.com> | 2016-04-17 22:59:13 -0700 |
commit | 3ee9a9485261e7ed54c2dca8a389764a3845df85 (patch) | |
tree | f440dcd3524d3efc5f83574029b2b8476e174286 /include | |
parent | 90acba0ff8907a08086f5a4e5d67f9dfd574fa52 (diff) | |
download | application-3ee9a9485261e7ed54c2dca8a389764a3845df85.tar.gz application-3ee9a9485261e7ed54c2dca8a389764a3845df85.tar.bz2 application-3ee9a9485261e7ed54c2dca8a389764a3845df85.zip |
Add alarm api to support global alarmsubmit/tizen/20160422.045948
- alarm_set_global
alarm_get_global
Change-Id: Ie804a7c23ac4acaab368406d6b736ac8c25591ef
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/app_alarm.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/app_alarm.h b/include/app_alarm.h index c29862a..8aac216 100644 --- a/include/app_alarm.h +++ b/include/app_alarm.h @@ -407,6 +407,51 @@ int alarm_get_current_time(struct tm *date); */ int alarm_get_app_control(int alarm_id, app_control_h *app_control); + +/** + * @brief Sets global flag in the alarm. + * @details Sets @a global flag to set/unset alarm globally. + * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/alarm.set + * @remarks The @a alarm_id must be id of alarm which will launch global application. + * The function returns an error (error code #ALARM_ERROR_NOT_PERMITTED) if it is not. + * Note that the application which is launched by global alarm runs in the user session that is logined currently. + * It doesn't run in the session for the user who registers the global alarm. + * So, If the application uses application's private data for each user to handling the app_control for the alarm, it might not show proper data to the user. + * Therefore, We recommend to contain all the data for the alarm to the app_control handle for the global alarm. + * Then, the launched application would be able to use the data to show proper alarm UX to the user. + * @param[in] alarm_id The alarm ID uniquely identifies an alarm + * @param[in] global The global flag to set/unset alarm globally + * @return @c 0 on success, + * otherwise a negative error value + * @retval #ALARM_ERROR_NONE Successful + * @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #ALARM_ERROR_NOT_PERMITTED @a alarm_id is not permitted. + * @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied + * @see alarm_schedule_at_date() + * @see alarm_schedule_after_delay() + * @see alarm_schedule_with_recurrence_week_flag() + */ +int alarm_set_global(int alarm_id, bool global); + + +/** + * @brief Gets whether the alarm will launch global application or not. + * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/alarm.get + * @param[in] alarm_id The alarm ID uniquely identifies an alarm + * @param[out] global Whether the alarm will launch global application or not. + * @return @c 0 on success, + * otherwise a negative error value + * @retval #ALARM_ERROR_NONE Successful + * @retval #ALARM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #ALARM_ERROR_PERMISSION_DENIED Permission denied + * @see alarm_set_global(); + */ +int alarm_get_global(int alarm_id, bool *global); + /** * @} */ |