minimenu now has a (lame) 'reveal this normally hidden' category option in the select...
[pandora-libraries.git] / test / notifytest.c
1
2 #include <stdio.h> // for stdio
3 #include <unistd.h> // for exit()
4 #include <stdlib.h> // for exit()
5
6 #include "pnd_conf.h"
7 #include "pnd_container.h"
8 #include "pnd_apps.h"
9 #include "pnd_notify.h"
10
11 int main ( int argc, char *argv[] ) {
12
13   pnd_notify_handle nh;
14
15   nh = pnd_notify_init();
16
17   if ( ! nh ) {
18     printf ( "INOTIFY failed to init.\n" );
19     exit ( 0 );
20   }
21
22   printf ( "INOTIFY is up.\n" );
23
24   /* do it!
25    */
26
27   unsigned int countdown = 10;
28
29   while ( countdown ) {
30     printf ( "Countdown = %u\n", countdown );
31
32     if ( pnd_notify_rediscover_p ( nh ) ) {
33       printf ( "Must do a rediscover!\n" );
34       break;
35     }
36
37     countdown--;
38   }
39
40   /* do it!
41    */
42
43   pnd_notify_shutdown ( nh );
44
45   return ( 0 );
46 }