Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/bin


Modified Files:
        evfs_main.c evfs_metadata.c evfs_server_handle.c 


Log Message:
* First working model of metadata_set - note that this is not at all generic, 
and is just for testing

===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_main.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- evfs_main.c 24 Jun 2006 16:59:02 -0000      1.48
+++ evfs_main.c 25 Jun 2006 05:58:51 -0000      1.49
@@ -222,6 +222,8 @@
 
      case EVFS_CMD_METADATA_FILE_SET:
        printf("Key/value: %s -> %s\n", command->file_command.ref, 
command->file_command.ref2);
+       evfs_handle_metadata_string_file_set_command(client,command, 
+                       command->file_command.ref, command->file_command.ref2);
        break;
      case EVFS_CMD_METADATA_FILE_GET:
        break;
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_metadata.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evfs_metadata.c     24 Jun 2006 16:59:02 -0000      1.3
+++ evfs_metadata.c     25 Jun 2006 05:58:51 -0000      1.4
@@ -77,9 +77,33 @@
 void evfs_metadata_file_set_key_value_edd(evfs_filereference* ref, char* key, 
                void* value, Eet_Data_Descriptor* edd) 
 {
+
 }
 
 void evfs_metadata_file_set_key_value_string(evfs_filereference* ref, char* 
key,
                char* value) 
 {
+       evfs_metadata_object obj;
+       char path[PATH_MAX];
+       char* data;
+       int size;
+       int ret;
+
+       snprintf(path, PATH_MAX, "/%s/%s/string/%s", ref->plugin_uri, 
ref->path, key);
+       ret = 0;
+
+       obj.description = "string";
+       obj.key = key;
+       obj.value = (char*)value;
+
+       data = eet_data_descriptor_encode(Evfs_Metadata_String_Edd, &obj, 
&size);
+       
+       _evfs_metadata_eet = eet_open(metadata_file, EET_FILE_MODE_WRITE);
+       if (data) {
+               ret = eet_write(_evfs_metadata_eet, path, data, size, 0);
+       }
+       if (ret) {
+               printf("Wrote %s for %s\n", value, path);
+       }
+       eet_close(_evfs_metadata_eet);
 }
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_server_handle.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- evfs_server_handle.c        10 Jun 2006 02:35:58 -0000      1.54
+++ evfs_server_handle.c        25 Jun 2006 05:58:51 -0000      1.55
@@ -564,7 +564,7 @@
 {
        char* type = "audio/x-mp3";
        evfs_plugin_meta* plugin;
-       Ecore_List* ret_list;
+       Evas_List* ret_list;
 
        plugin = 
EVFS_PLUGIN_META(evfs_meta_plugin_get_for_type(evfs_server_get(),type));
        if (plugin) {
@@ -575,4 +575,12 @@
                printf("Could not find plugin to tag this type\n");
        }
        
+}
+
+void evfs_handle_metadata_string_file_set_command(evfs_client* client, 
+               evfs_command* command, char* key, char* value) 
+{
+       if (command->file_command.num_files > 0) {
+               
evfs_metadata_file_set_key_value_string(command->file_command.files[0], key, 
value);
+       }
 }



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