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:
* Yet more vfolder work
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/plugins/file/evfs_fs_vfolder.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evfs_fs_vfolder.c 16 Jul 2006 06:43:36 -0000 1.2
+++ evfs_fs_vfolder.c 16 Jul 2006 07:23:31 -0000 1.3
@@ -75,12 +75,15 @@
{
Ecore_List *files = ecore_list_new();
evfs_filereference* ref;
+ char* path;
+
+ path = command->file_command.files[0]->path;
/*We should make this generic - perhaps a plugin system*/
/*FIXME - but this will do for testing*/
printf("Vfolder listing '%s'..\n", command->file_command.files[0]->path);
- if (!strcmp(command->file_command.files[0]->path, "/")) {
+ if (!strcmp(path, "/")) {
/*Metadata groups ref*/
ref = NEW(evfs_filereference);
@@ -95,8 +98,36 @@
ref->path = strdup(EVFS_PLUGIN_VFOLDER_QUERIES_ID);
ref->file_type = EVFS_FILE_DIRECTORY;
ecore_list_append(files, ref);
- } else if (!strncmp(command->file_command.files[0]->path, "/Groups",
strlen("/Groups"))) {
- printf("User requested a metagroup listing\n");
+ } 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;
+ Evas_List* iter;
+ char assemble[PATH_MAX];
+ evfs_metadata_group_header* g;
+
+ /*Get group list, and return*/
+ group_list = evfs_metadata_groups_get();
+
+ for (iter = group_list; iter; ) {
+ g = iter->data;
+
+ snprintf(assemble, sizeof(assemble), "%s/%s",
+ EVFS_PLUGIN_VFOLDER_GROUPS_ID,
g->name);
+
+ ref = NEW(evfs_filereference);
+ ref->plugin_uri = strdup(EVFS_PLUGIN_VFOLDER_URI);
+ ref->path = strdup(assemble);
+ ref->file_type = EVFS_FILE_DIRECTORY;
+ ecore_list_append(files, ref);
+
+ iter = iter->next;
+ }
+ } else {
+ char* group_name;
+ group_name = strstr(path + 1, "/") + 1;
+
+ printf("Group name: %s\n", group_name);
+ }
}
*directory_list = evfs_file_list_sort(files);
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs