Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_con


Modified Files:
      Tag: SPLIT
        Ecore_Con.h ecore_con.c ecore_con_private.h 


Log Message:


ecore_ipc module added - parses ipc "chunks" and just give you entire ipc
decoded chunks. currenly all ipc messages are of the format:
DWORD major_opcode
DWORD minor_opcode
DWORD payload_data_byte_size
[payload data]
... next chunk
etc.
this gives 64 bits of address space for ipc calls (32 + 32) and you can have
up to 2Gbytes of payload "data" attached (or 0 bytes - depending what you
want) and ecore_ipc does the endianess translations of the major & minor
opcodes and size amount for you. the data payload is opaque and its up to the
app to do any bit swizzling there.

but it seems to work... all hail IPC! :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/Attic/Ecore_Con.h,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- Ecore_Con.h 17 Mar 2003 13:19:07 -0000      1.1.2.4
+++ Ecore_Con.h 26 Mar 2003 07:54:47 -0000      1.1.2.5
@@ -6,15 +6,16 @@
 #endif
    
 #ifndef _ECORE_CON_PRIVATE_H
-typedef void Ecore_Con_Server; /**< A connection handle */
-typedef void Ecore_Con_Client; /**< A connection handle */
-
-typedef enum _Ecore_Con_Type
-{
-   ECORE_CON_LOCAL_USER,
-     ECORE_CON_LOCAL_SYSTEM,
-     ECORE_CON_REMOTE_SYSTEM,
-} Ecore_Con_Type;
+   typedef void Ecore_Con_Server; /**< A connection handle */
+   typedef void Ecore_Con_Client; /**< A connection handle */
+   
+   typedef enum _Ecore_Con_Type
+     {
+       ECORE_CON_LOCAL_USER,
+         ECORE_CON_LOCAL_SYSTEM,
+         ECORE_CON_REMOTE_SYSTEM,
+     } Ecore_Con_Type;
+   
 #endif
    
    typedef struct _Ecore_Con_Event_Client_Add  Ecore_Con_Event_Client_Add;
@@ -78,7 +79,9 @@
    
    int               ecore_con_client_send(Ecore_Con_Client *cl, void *data, int 
size);
    Ecore_Con_Server *ecore_con_client_server_get(Ecore_Con_Client *cl);
-   void              ecore_con_client_del(Ecore_Con_Client *cl);
+   void             *ecore_con_client_del(Ecore_Con_Client *cl);
+   void              ecore_con_client_data_set(Ecore_Con_Client *cl, const void 
*data);
+   void             *ecore_con_client_data_get(Ecore_Con_Client *cl);
    
 #ifdef __cplusplus
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/Attic/ecore_con.c,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -3 -r1.1.2.7 -r1.1.2.8
--- ecore_con.c 17 Mar 2003 13:19:08 -0000      1.1.2.7
+++ ecore_con.c 26 Mar 2003 07:54:47 -0000      1.1.2.8
@@ -59,7 +59,7 @@
        ECORE_CON_EVENT_CLIENT_DATA = ecore_event_type_new();
        ECORE_CON_EVENT_SERVER_DATA = ecore_event_type_new();
      }
-   return 1;
+   return init_count;
 }
 
 /**
@@ -473,16 +473,56 @@
  * FIXME: To be fixed.
  * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  */
-void
+void *
 ecore_con_client_del(Ecore_Con_Client *cl)
 {
+   void *data;
+   
    if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
      {
        ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT,
                         "ecore_con_client_del");
-       return;
+       return NULL;
      }   
+   data = cl->data;
    _ecore_con_client_free(cl);
+   return cl->data;
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void
+ecore_con_client_data_set(Ecore_Con_Client *cl, const void *data)
+{
+   if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
+     {
+       ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT,
+                        "ecore_con_client_data_set");
+       return;
+     }
+   cl->data = (void *)data;
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
+void *
+ecore_con_client_data_get(Ecore_Con_Client *cl)
+{
+   if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
+     {
+       ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT,
+                        "ecore_con_client_data_get");
+       return NULL;
+     }
+   return cl->data;
 }
 
 static void
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/Attic/ecore_con_private.h,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- ecore_con_private.h 17 Mar 2003 13:19:08 -0000      1.1.2.4
+++ ecore_con_private.h 26 Mar 2003 07:54:47 -0000      1.1.2.5
@@ -4,22 +4,23 @@
 #define ECORE_MAGIC_CON_SERVER             0x77665544
 #define ECORE_MAGIC_CON_CLIENT             0x77556677
 
+typedef struct _Ecore_Con_Client Ecore_Con_Client;
+typedef struct _Ecore_Con_Server Ecore_Con_Server;
+
 typedef enum _Ecore_Con_Type
 {
    ECORE_CON_LOCAL_USER,
      ECORE_CON_LOCAL_SYSTEM,
-     ECORE_CON_REMOTE_SYSTEM
+     ECORE_CON_REMOTE_SYSTEM,
 } Ecore_Con_Type;
 
-typedef struct _Ecore_Con_Client Ecore_Con_Client;
-typedef struct _Ecore_Con_Server Ecore_Con_Server;
-
 struct _Ecore_Con_Client
 {
    Ecore_List        __list_data;
    ECORE_MAGIC;
    int               fd;
    Ecore_Con_Server *server;
+   void             *data;
    Ecore_Fd_Handler *fd_handler;
    int               buf_size;
    int               buf_offset;




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to