Enlightenment CVS committal Author : lordchaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/plugins Modified Files: evfs_fs_bzip2.c evfs_fs_posix.c evfs_fs_samba.c evfs_fs_tar.c Log Message: A few API updates to support recursive filesystem nesting (e.g. directory list on posix:///dir/blah.tar.bz2#bzip2:///#tar:///) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_bzip2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- evfs_fs_bzip2.c 30 Oct 2005 22:18:54 -0000 1.1 +++ evfs_fs_bzip2.c 31 Oct 2005 03:32:55 -0000 1.2 @@ -46,11 +46,11 @@ int evfs_client_disconnect(evfs_client* client); int evfs_monitor_start(evfs_client* client, evfs_command* command); int evfs_monitor_stop(evfs_client* client, evfs_command* command); -int evfs_file_open(evfs_filereference* file); +int evfs_file_open(evfs_client*, evfs_filereference* file); int evfs_file_close(evfs_filereference* file); int evfs_file_stat(evfs_command* command, struct stat* file_stat); int evfs_file_seek(evfs_filereference* file, long offset, int whence); -int evfs_file_read(evfs_filereference* file, char* bytes, long size); +int evfs_file_read(evfs_client* client, evfs_filereference* file, char* bytes, long size); int evfs_file_write(evfs_filereference* file, char* bytes, long size); int evfs_file_create(evfs_filereference* file); void evfs_dir_list(evfs_client* client, evfs_command* file); @@ -63,18 +63,21 @@ evfs_plugin_functions* functions = calloc(1, sizeof(evfs_plugin_functions)); functions->evfs_client_disconnect = &evfs_client_disconnect; + functions->evfs_file_open = &evfs_file_open; + functions->evfs_file_read = &evfs_file_read; + /*functions->evfs_dir_list = &evfs_dir_list; functions->evfs_file_remove= &evfs_file_remove; functions->evfs_monitor_start = &evfs_monitor_start; functions->evfs_monitor_stop = &evfs_monitor_stop; functions->evfs_file_stat = &evfs_file_stat; - functions->evfs_file_open = &evfs_file_open; + functions->evfs_file_close = &evfs_file_close; functions->evfs_file_seek = &evfs_file_seek; - functions->evfs_file_read = &evfs_file_read; + functions->evfs_file_write = &evfs_file_write; functions->evfs_file_create = &evfs_file_create;*/ @@ -95,3 +98,17 @@ } +int evfs_file_open(evfs_client* client, evfs_filereference* file) { + evfs_filereference* f_par = file->parent; + + return evfs_uri_open(client, f_par); + +} + +int evfs_file_read(evfs_client* client, evfs_filereference* file, char* bytes, long size) { + evfs_filereference* f_par = file->parent; + + return evfs_uri_read(client,f_par,bytes,size); +} + + =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_posix.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- evfs_fs_posix.c 26 Oct 2005 02:20:01 -0000 1.19 +++ evfs_fs_posix.c 31 Oct 2005 03:32:55 -0000 1.20 @@ -47,11 +47,11 @@ int evfs_client_disconnect(evfs_client* client); int evfs_monitor_start(evfs_client* client, evfs_command* command); int evfs_monitor_stop(evfs_client* client, evfs_command* command); -int evfs_file_open(evfs_filereference* file); +int evfs_file_open(evfs_client* client, evfs_filereference* file); int evfs_file_close(evfs_filereference* file); int evfs_file_stat(evfs_command* command, struct stat* file_stat); int evfs_file_seek(evfs_filereference* file, long offset, int whence); -int evfs_file_read(evfs_filereference* file, char* bytes, long size); +int evfs_file_read(evfs_client* client, evfs_filereference* file, char* bytes, long size); int evfs_file_write(evfs_filereference* file, char* bytes, long size); int evfs_file_create(evfs_filereference* file); @@ -303,7 +303,7 @@ -int evfs_file_open(evfs_filereference* file) { +int evfs_file_open(evfs_client* client, evfs_filereference* file) { printf("Open file '%s'\n", file->path); int fd = open(file->path, O_RDONLY); @@ -333,7 +333,7 @@ return 0; } -int evfs_file_read(evfs_filereference* file, char* bytes, long size) { +int evfs_file_read(evfs_client* client, evfs_filereference* file, char* bytes, long size) { int bytes_read; /*printf("Reading %d bytes from %s\n", size, file->path);*/ =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_samba.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- evfs_fs_samba.c 26 Oct 2005 02:20:01 -0000 1.15 +++ evfs_fs_samba.c 31 Oct 2005 03:32:55 -0000 1.16 @@ -50,10 +50,10 @@ static void smb_evfs_dir_list(evfs_client* client, evfs_command* command); int smb_evfs_file_stat(evfs_command* command, struct stat* file_stat); -int evfs_file_open(evfs_filereference* file); +int evfs_file_open(evfs_client* client, evfs_filereference* file); int evfs_file_close(evfs_filereference* file); int evfs_file_seek(evfs_filereference* file, long offset, int whence); -int evfs_file_read(evfs_filereference* file, char* bytes, long size); +int evfs_file_read(evfs_client* client, evfs_filereference* file, char* bytes, long size); int evfs_file_write(evfs_filereference* file, char* bytes, long size); int evfs_file_create(evfs_filereference* file); @@ -269,7 +269,7 @@ } -int evfs_file_open(evfs_filereference* file) { +int evfs_file_open(evfs_client* client, evfs_filereference* file) { char dir_path[1024]; snprintf(dir_path,1024,"smb:/%s", file->path); @@ -311,7 +311,7 @@ return 0; } -int evfs_file_read(evfs_filereference* file, char* bytes, long size) { +int evfs_file_read(evfs_client* client, evfs_filereference* file, char* bytes, long size) { int bytes_read = 0; /*printf("Reading %ld bytes from file %s\n", size, file->path);*/ =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_tar.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- evfs_fs_tar.c 26 Oct 2005 12:39:55 -0000 1.5 +++ evfs_fs_tar.c 31 Oct 2005 03:32:55 -0000 1.6 @@ -47,7 +47,7 @@ int evfs_client_disconnect(evfs_client* client); int evfs_monitor_start(evfs_client* client, evfs_command* command); int evfs_monitor_stop(evfs_client* client, evfs_command* command); -int evfs_file_open(evfs_filereference* file); +int evfs_file_open(evfs_client* client, evfs_filereference* file); int evfs_file_close(evfs_filereference* file); int evfs_file_stat(evfs_command* command, struct stat* file_stat); int evfs_file_seek(evfs_filereference* file, long offset, int whence); @@ -140,8 +140,8 @@ ecore_hash_set(search_hash, strdup(tok), ele); - /*printf("***** Couldn't find child '%s' at node '%s' in hash %p\n", tok, buf, search_hash); - printf("Created a new child: '%s',with children at %p appending to hash %p\n", tok, ele->children,search_hash);*/ + //printf("***** Couldn't find child '%s' at node '%s' in hash %p\n", tok, buf, search_hash); + //printf("Created a new child: '%s',with children at %p appending to hash %p\n", tok, ele->children,search_hash); /*Our concated path*/ strcat(buf, "/"); @@ -234,9 +234,9 @@ p_ref = ref->parent; printf("Parent ref is '%s'\n", p_ref->plugin_uri); - evfs_uri_open(client->server, p_ref); + evfs_uri_open(client, p_ref); - while (evfs_uri_read(p_ref, &block, 512) == 512) { + while (evfs_uri_read(client,p_ref, &block, 512) == 512) { if ( (!memcmp(block.p.magic, TARPET_GNU_MAGIC, strlen(TARPET_GNU_MAGIC))) || (!memcmp(block.p.magic, TARPET_GNU_MAGIC_OLD, strlen(TARPET_GNU_MAGIC_OLD))) ) { /*printf("Block matches GNU Tar\n"); printf("Magic is '%s'\n", block.p.magic); @@ -245,6 +245,7 @@ tar_name_split(&block, tar); } else { + //printf("No magic - '%s'\n", block.p.magic); } } ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs