aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_ipc_codec.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-06-27 13:50:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-06-27 13:50:10 +0000
commitb5ece28d8a8631b3fa670e73bab51d98fa394b04 (patch)
tree99948c2425cf4135d9f27abb79774cde205d84d6 /src/bin/e_ipc_codec.c
parentSimpler match. (diff)
downloadenlightenment-b5ece28d8a8631b3fa670e73bab51d98fa394b04.tar.gz
shorne's mouse/key bindings ipc patch... :)
SVN revision: 15548
Diffstat (limited to 'src/bin/e_ipc_codec.c')
-rw-r--r--src/bin/e_ipc_codec.c122
1 files changed, 122 insertions, 0 deletions
diff --git a/src/bin/e_ipc_codec.c b/src/bin/e_ipc_codec.c
index 5056c010a..db03851a4 100644
--- a/src/bin/e_ipc_codec.c
+++ b/src/bin/e_ipc_codec.c
@@ -15,6 +15,10 @@ static Eet_Data_Descriptor *_e_ipc_str_int_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_str_int_list_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_2str_int_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_2str_int_list_edd = NULL;
+static Eet_Data_Descriptor *_e_ipc_4int_2str_edd = NULL;
+static Eet_Data_Descriptor *_e_ipc_4int_2str_list_edd = NULL;
+static Eet_Data_Descriptor *_e_ipc_3int_3str_edd = NULL;
+static Eet_Data_Descriptor *_e_ipc_3int_3str_list_edd = NULL;
/* externally accessible functions */
int
@@ -54,6 +58,28 @@ e_ipc_codec_init(void)
_e_ipc_2str_int_list_edd = E_CONFIG_DD_NEW("2str_int_list", E_Ipc_List);
E_CONFIG_LIST(_e_ipc_2str_int_list_edd, E_Ipc_List, list, _e_ipc_2str_int_edd);
+
+ _e_ipc_4int_2str_edd = E_CONFIG_DD_NEW("4int_2str", E_Ipc_4Int_2Str);
+ E_CONFIG_VAL(_e_ipc_4int_2str_edd, E_Ipc_4Int_2Str, val1, INT);
+ E_CONFIG_VAL(_e_ipc_4int_2str_edd, E_Ipc_4Int_2Str, val2, INT);
+ E_CONFIG_VAL(_e_ipc_4int_2str_edd, E_Ipc_4Int_2Str, val3, INT);
+ E_CONFIG_VAL(_e_ipc_4int_2str_edd, E_Ipc_4Int_2Str, val4, INT);
+ E_CONFIG_VAL(_e_ipc_4int_2str_edd, E_Ipc_4Int_2Str, str1, STR);
+ E_CONFIG_VAL(_e_ipc_4int_2str_edd, E_Ipc_4Int_2Str, str2, STR);
+
+ _e_ipc_4int_2str_list_edd = E_CONFIG_DD_NEW("4int_2str_list", E_Ipc_List);
+ E_CONFIG_LIST(_e_ipc_4int_2str_list_edd, E_Ipc_List, list, _e_ipc_4int_2str_edd);
+
+ _e_ipc_3int_3str_edd = E_CONFIG_DD_NEW("3int_3str", E_Ipc_3Int_3Str);
+ E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, val1, INT);
+ E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, val2, INT);
+ E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, val3, INT);
+ E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, str1, STR);
+ E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, str2, STR);
+ E_CONFIG_VAL(_e_ipc_3int_3str_edd, E_Ipc_3Int_3Str, str3, STR);
+
+ _e_ipc_3int_3str_list_edd = E_CONFIG_DD_NEW("3int_3str_list", E_Ipc_List);
+ E_CONFIG_LIST(_e_ipc_3int_3str_list_edd, E_Ipc_List, list, _e_ipc_3int_3str_edd);
return 1;
}
@@ -70,6 +96,10 @@ e_ipc_codec_shutdown(void)
E_CONFIG_DD_FREE(_e_ipc_str_int_list_edd);
E_CONFIG_DD_FREE(_e_ipc_2str_int_edd);
E_CONFIG_DD_FREE(_e_ipc_2str_int_list_edd);
+ E_CONFIG_DD_FREE(_e_ipc_4int_2str_edd);
+ E_CONFIG_DD_FREE(_e_ipc_4int_2str_list_edd);
+ E_CONFIG_DD_FREE(_e_ipc_3int_3str_edd);
+ E_CONFIG_DD_FREE(_e_ipc_3int_3str_list_edd);
}
int
@@ -322,6 +352,98 @@ e_ipc_codec_2str_int_list_enc(Evas_List *list, int *size_ret)
return eet_data_descriptor_encode(_e_ipc_2str_int_list_edd, &dat, size_ret);
}
+int
+e_ipc_codec_4int_2str_dec(char *data, int bytes, E_Ipc_4Int_2Str **dest)
+{
+ E_Ipc_4Int_2Str *dat;
+
+ if (!data) return 0;
+ dat = eet_data_descriptor_decode(_e_ipc_4int_2str_edd, data, bytes);
+ if (!dat) return 0;
+ if (dest) *dest = dat;
+ return 1;
+}
+
+void *
+e_ipc_codec_4int_2str_enc(int val1, int val2, int val3, int val4, char *str1, char *str2, int *size_ret)
+{
+ E_Ipc_4Int_2Str dat;
+
+ dat.val1 = val1;
+ dat.val2 = val2;
+ dat.val3 = val3;
+ dat.val4 = val4;
+ dat.str1 = str1;
+ dat.str2 = str2;
+ return eet_data_descriptor_encode(_e_ipc_4int_2str_edd, &dat, size_ret);
+}
+
+int
+e_ipc_codec_4int_2str_list_dec(char *data, int bytes, Evas_List **dest)
+{
+ E_Ipc_List *dat;
+
+ if (!data) return 0;
+ dat = eet_data_descriptor_decode(_e_ipc_4int_2str_list_edd, data, bytes);
+ if (!dat) return 0;
+ if (dest) *dest = dat->list;
+ free(dat);
+ return 1;
+}
+
+void *
+e_ipc_codec_4int_2str_list_enc(Evas_List *list, int *size_ret)
+{
+ E_Ipc_List dat;
+ dat.list = list;
+ return eet_data_descriptor_encode(_e_ipc_4int_2str_list_edd, &dat, size_ret);
+}
+int
+e_ipc_codec_3int_3str_dec(char *data, int bytes, E_Ipc_3Int_3Str **dest)
+{
+ E_Ipc_3Int_3Str *dat;
+
+ if (!data) return 0;
+ dat = eet_data_descriptor_decode(_e_ipc_3int_3str_edd, data, bytes);
+ if (!dat) return 0;
+ if (dest) *dest = dat;
+ return 1;
+}
+
+void *
+e_ipc_codec_3int_3str_enc(int val1, int val2, int val3, char *str1, char *str2, char *str3, int *size_ret)
+{
+ E_Ipc_3Int_3Str dat;
+
+ dat.val1 = val1;
+ dat.val2 = val2;
+ dat.val3 = val3;
+ dat.str1 = str1;
+ dat.str2 = str2;
+ dat.str3 = str3;
+ return eet_data_descriptor_encode(_e_ipc_3int_3str_edd, &dat, size_ret);
+}
+
+int
+e_ipc_codec_3int_3str_list_dec(char *data, int bytes, Evas_List **dest)
+{
+ E_Ipc_List *dat;
+
+ if (!data) return 0;
+ dat = eet_data_descriptor_decode(_e_ipc_3int_3str_list_edd, data, bytes);
+ if (!dat) return 0;
+ if (dest) *dest = dat->list;
+ free(dat);
+ return 1;
+}
+
+void *
+e_ipc_codec_3int_3str_list_enc(Evas_List *list, int *size_ret)
+{
+ E_Ipc_List dat;
+ dat.list = list;
+ return eet_data_descriptor_encode(_e_ipc_3int_3str_list_edd, &dat, size_ret);
+}
/* local subsystem globals */