Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/plugins/file


Modified Files:
        evfs_fs_vfolder.c 


Log Message:
* Begin migration to plugin based vfolder architecture (Yes, more plugins. No, 
I'm not addicted, it's just extensible)

===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_vfolder.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evfs_fs_vfolder.c   22 Jul 2006 18:11:44 -0000      1.9
+++ evfs_fs_vfolder.c   12 Aug 2006 08:17:24 -0000      1.10
@@ -42,6 +42,7 @@
 #define EVFS_PLUGIN_VFOLDER_GROUPS_ID "/Groups"
 #define EVFS_PLUGIN_VFOLDER_QUERIES_ID "/Queries"
 #define EVFS_PLUGIN_VFOLDER_URI "vfolder"
+#define MAX_GROUP_LENGTH 255
 
 void evfs_dir_list(evfs_client * client, evfs_command * command,
               Ecore_List ** directory_list);
@@ -84,20 +85,23 @@
    printf("Vfolder listing '%s'..\n", command->file_command.files[0]->path);
    
    if (!strcmp(path, "/")) {
+          Ecore_List* keys = 
ecore_hash_keys(evfs_server_get()->plugin_vfolder_hash);
+          char* key;
+          char path[MAX_GROUP_LENGTH];
+
+          ecore_list_goto_first(keys);
+          while ((key = ecore_list_next(keys))) {
+                  snprintf(path,sizeof(path),"/%s",key); 
+
+                  /*Metadata groups ref*/
+                  ref = NEW(evfs_filereference);
+                  ref->plugin_uri = strdup(EVFS_PLUGIN_VFOLDER_URI);
+                  ref->path = strdup(path);
+                  ref->file_type = EVFS_FILE_DIRECTORY;
+                  ecore_list_append(files, ref);
+          }
+          ecore_list_destroy(keys);
 
-          /*Metadata groups ref*/
-          ref = NEW(evfs_filereference);
-          ref->plugin_uri = strdup(EVFS_PLUGIN_VFOLDER_URI);
-          ref->path = strdup(EVFS_PLUGIN_VFOLDER_GROUPS_ID);
-          ref->file_type = EVFS_FILE_DIRECTORY;
-          ecore_list_append(files, ref);
-
-          /*Metadata queries ref*/
-          ref = NEW(evfs_filereference);
-          ref->plugin_uri = strdup(EVFS_PLUGIN_VFOLDER_URI);
-          ref->path = strdup(EVFS_PLUGIN_VFOLDER_QUERIES_ID);
-          ref->file_type = EVFS_FILE_DIRECTORY;
-          ecore_list_append(files, ref);
    } else if (!strncmp(path, EVFS_PLUGIN_VFOLDER_GROUPS_ID, 
strlen(EVFS_PLUGIN_VFOLDER_GROUPS_ID))) {
           if (!strcmp(path, EVFS_PLUGIN_VFOLDER_GROUPS_ID)) {
                   Evas_List* group_list;



-------------------------------------------------------------------------
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

Reply via email to