pndnotifyd: rework event wait
[pandora-libraries.git] / include / pnd_dbusnotify.h
1
2 #ifndef h_dbusnotify_h
3 #define h_dbusnotify_h
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 typedef void* pnd_dbusnotify_handle;
10
11 /* An option is to use dbus for a lot of things, or even specific things such as
12  * watching for media to be inserted or ejected; one could supplement such info
13  * with inotify for file-moves.
14  * Really, we need a serious model for watching and receiving system state changes
15  * but I started simple, so going to try to keep it simple. For now.
16  */
17
18 /* must invoke this to obtain a handle; other notify functions require it of course.
19  * Returns NULL on failure.
20  */
21 pnd_dbusnotify_handle pnd_dbusnotify_init ( void );
22
23 /* shutdown..
24  */
25 void pnd_dbusnotify_shutdown ( pnd_dbusnotify_handle h );
26
27 /* HACK HACK HACK
28  * I'd like to have a real dbus-listener here using libdbus/whatever, but for now
29  * I'm going to implement a lame little hack to use dbus-monitor, as time is tight!
30  * HACK HACK HACK
31  *
32  */
33 unsigned char pnd_dbusnotify_rediscover_p ( pnd_dbusnotify_handle h );
34
35 int pnd_dbusnotify_fd ( pnd_dbusnotify_handle h );
36
37 #ifdef __cplusplus
38 } /* "C" */
39 #endif
40
41 #endif