Editing Documentation/Maemo 5 Developer Guide/Using Generic Platform Components/Alarm Framework

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 34: Line 34:
Communication with the alarmd daemon is performed through D-Bus. It listens to both system and session buses. The easiest way is to use the C client API library, which offers straightforward API to modify the queue.
Communication with the alarmd daemon is performed through D-Bus. It listens to both system and session buses. The easiest way is to use the C client API library, which offers straightforward API to modify the queue.
-
The alarm queue used by the alarmd daemon is stored in file <code>alarm_queue.ini</code>, located in <code>/var/cache/alarmd</code> directory.
+
The alarm queue used by the alarmd daemon is stored in file alarm_queue.ini, located in <code>/var/cache/alarmd</code> directory.
== Alarm Events ==
== Alarm Events ==
-
Alarm events and the functions to manage them are defined in the <code>libalarm.h</code> header file located in <code>/usr/include/alarmd</code>. It is a part of the [http://maemo.org/packages/view/libalarm-dev/ libalarm-dev] Debian package.
+
Alarm events and the functions to manage them are defined in libalarm.h header file located in <code>/usr/include/alarmd</code>. It is a part of the <code>libalarm-dev</code> Debian package.
Alarm event structures contains basic information about the alarm such as:
Alarm event structures contains basic information about the alarm such as:
Line 109: Line 109:
}
}
</source>
</source>
-
 
+
{{ambox|text=Use of absolute time triggering, i.e., alarm_time field of the alarm event, allows 1-second precision. Alarms that use broken-down time, i.e., alarm_tm field, trigger alarms at the start of the next full minute from the alarm. The two fields should not be set simultaneously. Alarm_time-set alarms do not take timezone changes into account.}}
-
{{ambox|text=Use of absolute time triggering, i.e., <code>alarm_time</code> field of the alarm event, allows 1-second precision. Alarms that use broken-down time, i.e., the <code>alarm_tm</code> field, trigger alarms at the start of the next full minute from the alarm. The two fields should not be set simultaneously. Alarm_time-set alarms do not take timezone changes into account.}}
+
===Fetching Details of Alarm Event===
===Fetching Details of Alarm Event===
Line 153: Line 152:
To delete an alarm event, the <code>alarmd_event_del()</code> function needs to be called, passing the event cookie as a parameter.
To delete an alarm event, the <code>alarmd_event_del()</code> function needs to be called, passing the event cookie as a parameter.
-
 
<source lang="c">
<source lang="c">
static void delete_alarm(cookie_t cookie)
static void delete_alarm(cookie_t cookie)
Line 171: Line 169:
The <code>alarmd_event_query()</code> function can be used for querying alarms in the queue.
The <code>alarmd_event_query()</code> function can be used for querying alarms in the queue.
-
 
<source lang="c">
<source lang="c">
static void list_alarms()
static void list_alarms()

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: