Enlightenment CVS committal Author : lordchaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/demo Modified Files: evfs_demo.c Log Message: * Finished work on EVFS_CMD_STOPMON_FILE for posix plugin * Added evfs-config.in for library linking =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/demo/evfs_demo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evfs_demo.c 16 Aug 2005 07:31:40 -0000 1.4 +++ evfs_demo.c 16 Aug 2005 09:00:21 -0000 1.5 @@ -1,5 +1,9 @@ #include <evfs.h> +static int mon_current =0; /*A demo of stopping monitoring, after 10 events*/ +evfs_file_uri_path* dir_path; +evfs_connection* con; + void callback(evfs_event* data) { if (data->type == EVFS_EV_REPLY) { @@ -7,16 +11,23 @@ case EVFS_EV_SUB_MONITOR_NOTIFY: printf("DEMO: Received a file monitor notification\n"); printf("DEMO: For file: '%s'\n", data->data); + mon_current++; + break; } } + if (mon_current == 10) { + printf("Removing monitor...\n"); + evfs_monitor_remove(con, dir_path->files[0]); + } + /*TODO : Free event*/ } int main() { - evfs_connection* con; + evfs_file_uri_path* path; - evfs_file_uri_path* dir_path; + char pathi[1024]; printf("EVFS Demo system..\n"); ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs