ERR_ALARM_NO_SERVICE_NAME,
/**<there is no alarm service
for this applicaation. */
+ ERR_ALARM_INVALID_TYPE, /*Invalid type*/
+ ERR_ALARM_NO_PERMISSION, /*No permission*/
ERR_ALARM_SYSTEM_FAIL = -1,
ALARMMGR_RESULT_SUCCESS = 0,
} alarm_error_t;
*/
int alarmmgr_get_info(alarm_id_t alarm_id, alarm_entry_t *alarm);
+
+/**
+ * This function retrieves bundle associated with alarm.
+ * Server will remember this entry, and pass the bundle information upon alarm expiry.
+ * Server will call app-svc interface to sent notification to destination application. Destination information
+ * should be available in the input bundle.
+ * @param [in] alarm_id alarm id
+ * @param [out] ALARMMGR_RESULT_SUCCESS on success or negative number on failure.
+ *
+ * @return This function returns bundle on success or NULL on failure.
+ *
+ * @pre None.
+ * @post None.
+ * @see None
+ * @remark None.
+ *
+ * @par Sample code:
+ * @code
+#include <alarm.h>
+
+ ...
+
+alarm_id_t alarm_id;
+
+register_alarm(){
+ int result;
+ bundle *b=NULL;
+ b=bundle_create();
+
+ if (NULL == b)
+ {
+ printf("Unable to create bundle!!!\n");
+ return;
+ }
+
+ appsvc_set_pkgname(b,"org.tizen.alarm-test");
+ appsvc_set_operation(b,APPSVC_OPERATION_DEFAULT);
+
+ if ((result = alarmmgr_add_alarm_appsvc(ALARM_TYPE_DEFAULT, 10, 0, (void *)b ,&alarm_id)))
+ printf("Unable to add alarm. Alarmmgr alarm no is %d\n", result);
+ else
+ printf("Alarm added successfully. Alarm Id is %d\n", alarm_id);
+}
+int main(int argc,char **argv {
+ register_alarm();
+
+ int return_code = 0;
+ bundle *b = NULL;
+ b = alarmmgr_get_alarm_appsvc_info(alarm_id, &return_code);
+ if (b){
+ const char *pkgname = appsvc_get_pkgname(b);
+ if (pkgname){
+ printf("Package name is %s\n",pkgname);
+ }
+ }
+
+ return 0;
+
+ }
+ * @endcode
+ * @limo
+ */
+void *alarmmgr_get_alarm_appsvc_info(alarm_id_t alarm_id, int *return_code);
+
+
+
+/**
+ * This function sets power RTC (which can power on the system).
+ * @param [in] alarm_date_t time
+ *
+ * @return This function returns the result. On success, ALARMMGR_RESULT_SUCCESS will be returned
+ * else, appropriate error no will be returned.
+ * @pre None.
+ * @post None.
+ * @see None
+ * @remark None.
+ *
+ * @par Sample code:
+ * @code
+#include <alarm.h>
+
+ ...
+
+alarm_date_t alarm_date={2012,04,05,10,10,00};
+
+int main(int argc,char **argv {
+ int return_code = 0;
+ return_code = alarmmgr_set_rtc_time(&alarm_date);
+ if (return_code != ALARMMGR_RESULT_SUCCESS){
+ printf("Error returned is %d\n",return_code);
+ }
+ return 0;
+
+ }
+ * @endcode
+ * @limo
+ */
+int alarmmgr_set_rtc_time(alarm_date_t *time);
+
+
/**
* @}
*/