Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/common


Modified Files:
        evfs_io.c evfs_vfolder.c 


Log Message:
* evfs_operation work

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/common/evfs_io.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- evfs_io.c   1 Feb 2006 05:00:43 -0000       1.42
+++ evfs_io.c   2 Feb 2006 21:56:29 -0000       1.43
@@ -370,9 +370,32 @@
 /*------------------------------------------------------------------------*/
 //Some ugly duplication here - maybe we should consider reworking this so it 
can
 //be generic
+//
+void evfs_write_operation_command(evfs_connection* conn, evfs_command* 
command) {
+       int size_ret = 0;
+
+       char* data = eet_data_descriptor_encode(_evfs_operation_edd, 
command->op, &size_ret);
+
+       evfs_write_ecore_ipc_server_message(conn->server, 
+                       ecore_ipc_message_new(EVFS_COMMAND, 
EVFS_COMMAND_PART_OPERATION, 0,0,0,
+                       data, size_ret));
+       free(data);
+}
 
 void evfs_write_command(evfs_connection* conn, evfs_command* command) {
 
+       /*Write the command type structure*/
+       evfs_write_ecore_ipc_server_message(conn->server, 
+                       ecore_ipc_message_new(EVFS_COMMAND, EVFS_COMMAND_TYPE, 
0,0,0,
+                       &command->type, sizeof(evfs_command_type)));
+
+
+       evfs_write_ecore_ipc_server_message(conn->server, 
+                       ecore_ipc_message_new(EVFS_COMMAND, EVFS_COMMAND_EXTRA, 
0,0,0,
+                       &command->file_command.extra, sizeof(int)));
+
+       printf("Command type at write command: %d\n", command->type);
+       
        switch (command->type) {
                case EVFS_CMD_STOPMON_FILE:
                case EVFS_CMD_STARTMON_FILE:
@@ -387,11 +410,17 @@
                case EVFS_CMD_PING:
                        evfs_write_file_command(conn, command);
                        break;
+               case EVFS_CMD_OPERATION_RESPONSE:
+                       evfs_write_operation_command(conn, command);
+                       break;
                default:
                        printf("Command type not handled in switch\n");
                        break;
        }
 
+       /*Send a final*/
+       evfs_write_command_end(conn);
+
 }
 
 void evfs_write_command_client(evfs_client* client, evfs_command* command) {
@@ -434,18 +463,6 @@
 
        bzero(uri, 1024);
        
-       /*Write the command type structure*/
-       evfs_write_ecore_ipc_server_message(conn->server, 
-                       ecore_ipc_message_new(EVFS_COMMAND, EVFS_COMMAND_TYPE, 
0,0,0,
-                       &command->type, sizeof(evfs_command_type)));
-
-
-       evfs_write_ecore_ipc_server_message(conn->server, 
-                       ecore_ipc_message_new(EVFS_COMMAND, EVFS_COMMAND_EXTRA, 
0,0,0,
-                       &command->file_command.extra, sizeof(int)));
-
-       
-
        /*Write the files*/
        /*Send them de-parsed to save time*/
        for (i=0;i<command->file_command.num_files;i++) {
@@ -500,9 +517,6 @@
 
        }
 
-       /*Send a final*/
-       evfs_write_command_end(conn);
-       
 
 }
 
@@ -674,6 +688,12 @@
                        }
                        break;
 
+               case EVFS_COMMAND_PART_OPERATION: {
+                       evfs_operation* op = 
eet_data_descriptor_decode(_evfs_operation_edd, message->data, message->len);
+                       command->op = op;
+               }
+               break;
+
 
                case EVFS_COMMAND_END:  
                         /*TODO cleanp ref event*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/common/evfs_vfolder.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evfs_vfolder.c      15 Jan 2006 12:26:40 -0000      1.1
+++ evfs_vfolder.c      2 Feb 2006 21:56:29 -0000       1.2
@@ -1,6 +1,6 @@
 #include <evfs.h>
 
-static evfs_vfolder_init=0;
+static int evfs_vfolder_init=0;
 static Eet_Data_Descriptor *_evfs_vfolder_edd;
 
 void evfs_vfolder_initialise() {




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to