From 1e672c7991c235716e711cc8f079ed3797074a46 Mon Sep 17 00:00:00 2001 From: sebastid Date: Tue, 27 Sep 2005 21:11:30 +0000 Subject: [PATCH] Add profile-list. And data is null, so don't care about it (stupid me). SVN revision: 16998 --- src/bin/e_ipc_handlers.h | 64 ++++++++++++++++++++++++++++++----- src/bin/e_ipc_handlers_list.h | 9 +++-- src/bin/e_remote_main.c | 9 ++--- 3 files changed, 64 insertions(+), 18 deletions(-) diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 23e12829e..853d6b790 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -1490,13 +1490,14 @@ break; /****************************************************************************/ #define HDL E_IPC_OP_DIRS_APPEND #if (TYPE == E_REMOTE_OPTIONS) - OP("-dirs-list-append", 1, "Append the directory of type specified by 'OPT2 to the list in 'OPT1'", 0, HDL) + OP("-dirs-list-append", 2, "Append the directory of type specified by 'OPT2' to the list in 'OPT1'", 0, HDL) #elif (TYPE == E_REMOTE_OUT) REQ_2STRING(params[0], params[1], HDL); #elif (TYPE == E_WM_IN) STRING2(s1, s2, e_2str, HDL); - { E_PATH_GET(path, s1) - e_path_user_path_append(path, s2); + { + E_PATH_GET(path, s1) + e_path_user_path_append(path, s2); } SAVE; END_STRING2(e_2str) @@ -1508,13 +1509,14 @@ break; /****************************************************************************/ #define HDL E_IPC_OP_DIRS_PREPEND #if (TYPE == E_REMOTE_OPTIONS) - OP("-dirs-list-prepend", 1, "Prepend the directory of type specified by 'OPT2 to the list in 'OPT1'", 0, HDL) + OP("-dirs-list-prepend", 2, "Prepend the directory of type specified by 'OPT2' to the list in 'OPT1'", 0, HDL) #elif (TYPE == E_REMOTE_OUT) REQ_2STRING(params[0], params[1], HDL); #elif (TYPE == E_WM_IN) STRING2(s1, s2, e_2str, HDL); - { E_PATH_GET(path, s1) - e_path_user_path_prepend(path, s2); + { + E_PATH_GET(path, s1) + e_path_user_path_prepend(path, s2); } SAVE; END_STRING2(e_2str) @@ -1526,13 +1528,14 @@ break; /****************************************************************************/ #define HDL E_IPC_OP_DIRS_REMOVE #if (TYPE == E_REMOTE_OPTIONS) - OP("-dirs-list-remove", 1, "Remove the directory of type specified by 'OPT2 to the list in 'OPT1'", 0, HDL) + OP("-dirs-list-remove", 2, "Remove the directory of type specified by 'OPT2' from the list in 'OPT1'", 0, HDL) #elif (TYPE == E_REMOTE_OUT) REQ_2STRING(params[0], params[1], HDL); #elif (TYPE == E_WM_IN) STRING2(s1, s2, e_2str, HDL); - { E_PATH_GET(path, s1) - e_path_user_path_remove(path, s2); + { + E_PATH_GET(path, s1) + e_path_user_path_remove(path, s2); } SAVE; END_STRING2(e_2str) @@ -4831,6 +4834,49 @@ break; #endif #undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_PROFILE_LIST +#if (TYPE == E_REMOTE_OPTIONS) + OP("-profile-list", 0, "List all existing profiles", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + GENERIC(HDL); + LIST_DATA(); + Evas_List *profiles; + profiles = e_config_profile_list(); + printf("%p\n", profiles); + ENCODE(profiles, e_ipc_codec_str_list_enc); + SEND_DATA(E_IPC_OP_PROFILE_LIST_REPLY); + while (profiles) + { + printf("%s\n", profiles->data); + free(profiles->data); + profiles = evas_list_remove_list(profiles, profiles); + } + END_GENERIC(); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_PROFILE_LIST_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + GENERIC(HDL); + LIST(); + DECODE(e_ipc_codec_str_list_dec) { + FOR(dat) { + printf("REPLY: \"%s\"\n", (char *)(l->data)); + } + FREE_LIST(dat); + } + END_GENERIC(); +#endif +#undef HDL + /****************************************************************************/ #define HDL E_IPC_OP_DESKTOP_NAME_ADD #if (TYPE == E_REMOTE_OPTIONS) diff --git a/src/bin/e_ipc_handlers_list.h b/src/bin/e_ipc_handlers_list.h index 5b802dd23..199ac6017 100644 --- a/src/bin/e_ipc_handlers_list.h +++ b/src/bin/e_ipc_handlers_list.h @@ -215,9 +215,6 @@ #define E_IPC_OP_FOCUS_REVERT_ON_HIDE_OR_CLOSE_SET 215 #define E_IPC_OP_FOCUS_REVERT_ON_HIDE_OR_CLOSE_GET 216 #define E_IPC_OP_FOCUS_REVERT_ON_HIDE_OR_CLOSE_GET_REPLY 217 -#define E_IPC_OP_PROFILE_SET 218 -#define E_IPC_OP_PROFILE_GET 219 -#define E_IPC_OP_PROFILE_GET_REPLY 220 #define E_IPC_OP_DESKTOP_NAME_ADD 221 #define E_IPC_OP_DESKTOP_NAME_DEL 222 #define E_IPC_OP_DESKTOP_NAME_LIST 223 @@ -287,3 +284,9 @@ #define E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_SET 279 #define E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET 280 #define E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET_REPLY 281 + +#define E_IPC_OP_PROFILE_SET 218 +#define E_IPC_OP_PROFILE_GET 219 +#define E_IPC_OP_PROFILE_GET_REPLY 220 +#define E_IPC_OP_PROFILE_LIST 282 +#define E_IPC_OP_PROFILE_LIST_REPLY 283 diff --git a/src/bin/e_remote_main.c b/src/bin/e_remote_main.c index 70f352d0d..341585e6d 100644 --- a/src/bin/e_remote_main.c +++ b/src/bin/e_remote_main.c @@ -229,16 +229,13 @@ _e_ipc_cb_server_data(void *data, int type, void *event) e = event; printf("REPLY <- BEGIN\n"); - if (data) + switch (e->minor) { - switch (e->minor) - { #define TYPE E_REMOTE_IN #include "e_ipc_handlers.h" #undef TYPE - default: - break; - } + default: + break; } printf("REPLY <- END\n"); reply_count++;