Enlightenment CVS committal Author : chaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/demo Modified Files: evfs_demo.c Log Message: * Oops - local test not destined to CVS =================================================================== RCS file: /cvs/e/e17/apps/evfs/src/demo/evfs_demo.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- evfs_demo.c 23 Apr 2006 14:23:01 -0000 1.27 +++ evfs_demo.c 23 Apr 2006 14:25:36 -0000 1.28 @@ -1,15 +1,10 @@ #include <evfs.h> #include <string.h> -#include <limits.h> static int mon_current = 0; /*A demo of stopping monitoring, after 10 events */ evfs_file_uri_path *dir_path; evfs_connection *con; -Ecore_List* files; -char buffer[PATH_MAX]; -char *current; - void callback(evfs_event * data, void *obj) { @@ -53,14 +48,7 @@ printf("Title: '%s'\n", ecore_hash_get(data->meta->meta_hash, "title")); printf("Length: '%s'\n", ecore_hash_get(data->meta->meta_hash, "length")); - current = ecore_list_next(files); - snprintf(buffer,PATH_MAX,"file:///mnt/music/alexmp3/%s", current); - - printf("Getting meta for '%s'...\n", buffer); - - dir_path = evfs_parse_uri(buffer); - evfs_client_metadata_retrieve(con, dir_path->files[0]); - evfs_cleanup_file_uri_path(dir_path); + } @@ -78,6 +66,7 @@ * * } */ + exit(0); } int @@ -150,17 +139,13 @@ /*evfs_monitor_add(con, dir_path->files[0]); * evfs_client_file_copy(con, dir_path->files[0], NULL); */ - files = ecore_file_ls("/mnt/music/alexmp3"); - - ecore_list_goto_first(files); - current = ecore_list_next(files); - snprintf(buffer,PATH_MAX,"file:///mnt/music/alexmp3/%s", current); - - printf("Getting meta for '%s'...\n", buffer); - - dir_path = evfs_parse_uri(buffer); - evfs_client_metadata_retrieve(con, dir_path->files[0]); - + if (!strcmp(cmd, "DIR")) { + evfs_client_dir_list(con, dir_path->files[0]); + } else if (!strcmp(cmd, "STAT")) { + evfs_client_file_stat(con, dir_path->files[0]); + } else if (!strcmp(cmd, "META")) { + evfs_client_metadata_retrieve(con, dir_path->files[0]); + } ecore_main_loop_begin(); evfs_disconnect(con); } ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs