ipc is #defineable (rough for now - maybe able to be undefined and eventually


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 17 years ago
parent 978312dc10
commit 1785ad3a32
  1. 2
      src/bin/e.h
  2. 1678
      src/bin/e_config.c
  3. 11
      src/bin/e_config.h
  4. 9
      src/bin/e_ipc.c
  5. 2
      src/bin/e_ipc.h
  6. 2
      src/bin/e_ipc_codec.c
  7. 5
      src/bin/e_ipc_codec.h
  8. 10
      src/bin/e_remote_main.c
  9. 3
      src/lib/e_main.c
  10. 4
      src/lib/e_private.h

@ -6,6 +6,8 @@
#include "config.h"
#define USE_IPC
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

File diff suppressed because it is too large Load Diff

@ -45,11 +45,14 @@ typedef Eet_Data_Descriptor E_Config_DD;
#define E_CONFIG_H
/* increment this whenever we change config enough that you need new
* defaults for e to work - started at 100 when we introduced this config
* versioning feature. the value of this is really irrelevant - just as
* long as it increases every time we change something
* defaults for e to work.
*/
#define E_CONFIG_FILE_VERSION 141
#define E_CONFIG_FILE_EPOCH 0x0000
/* incriment this whenever a new set of configvalues are added but the users
* config doesn't need top be wiped - simply new values need to be put in
*/
#define E_CONFIG_FILE_GENERATION 0x008d
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
#define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1

@ -1,5 +1,6 @@
#include "e.h"
#ifdef USE_IPC
/* local subsystem functions */
static int _e_ipc_cb_client_add(void *data, int type, void *event);
static int _e_ipc_cb_client_del(void *data, int type, void *event);
@ -7,11 +8,13 @@ static int _e_ipc_cb_client_data(void *data, int type, void *event);
/* local subsystem globals */
static Ecore_Ipc_Server *_e_ipc_server = NULL;
#endif
/* externally accessible functions */
EAPI int
e_ipc_init(void)
{
#ifdef USE_IPC
char buf[1024];
char *disp;
@ -25,20 +28,24 @@ e_ipc_init(void)
ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DATA, _e_ipc_cb_client_data, NULL);
e_ipc_codec_init();
#endif
return 1;
}
EAPI void
e_ipc_shutdown(void)
{
#ifdef USE_IPC
e_ipc_codec_shutdown();
if (_e_ipc_server)
{
ecore_ipc_server_del(_e_ipc_server);
_e_ipc_server = NULL;
}
#endif
}
#ifdef USE_IPC
/* local subsystem globals */
static int
_e_ipc_cb_client_add(void *data __UNUSED__, int type __UNUSED__, void *event)
@ -79,4 +86,4 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
}
return 1;
}
#endif

@ -3,6 +3,7 @@
*/
#ifdef E_TYPEDEFS
#ifdef USE_IPC
#include "e_ipc_handlers_list.h"
typedef enum _E_Ipc_Domain
@ -16,6 +17,7 @@ typedef enum _E_Ipc_Domain
} E_Ipc_Domain;
typedef int E_Ipc_Op;
#endif
#else
#ifndef E_IPC_H

@ -1,5 +1,6 @@
#include "e.h"
#ifdef USE_IPC
/* local subsystem functions */
/* encode functions, Should these be global? */
@ -670,3 +671,4 @@ e_ipc_codec_str_4int_list_enc(Evas_List *list, int *size_ret)
/* local subsystem globals */
#endif

@ -3,6 +3,7 @@
*/
#ifdef E_TYPEDEFS
#ifdef USE_IPC
typedef struct _E_Ipc_Int E_Ipc_Int;
typedef struct _E_Ipc_Double E_Ipc_Double;
typedef struct _E_Ipc_2Int E_Ipc_2Int;
@ -18,11 +19,13 @@ typedef struct _E_Ipc_5Int_2Str E_Ipc_5Int_2Str;
typedef struct _E_Ipc_3Int_4Str E_Ipc_3Int_4Str;
typedef struct _E_Ipc_3Int_3Str E_Ipc_3Int_3Str;
typedef struct _E_Ipc_Str_4Int E_Ipc_Str_4Int;
#endif
#else
#ifndef E_IPC_CODEC_H
#define E_IPC_CODEC_H
#ifdef USE_IPC
struct _E_Ipc_Int
{
int val;
@ -149,5 +152,7 @@ EAPI int e_ipc_codec_str_4int_dec(char *data, int bytes, E_Ipc_Str_4Int **d
EAPI void *e_ipc_codec_str_4int_enc(const char *str1, int val1, int val2, int val3, int val4, int *size_ret);
EAPI int e_ipc_codec_str_4int_list_dec(char *data, int bytes, Evas_List **dest);
EAPI void *e_ipc_codec_str_4int_list_enc(Evas_List *list, int *size_ret);
#endif
#endif
#endif

@ -3,6 +3,8 @@
*/
#include "e.h"
#ifdef USE_IPC
typedef struct _Opt Opt;
struct _Opt
@ -34,9 +36,12 @@ static const char *display_name = NULL;
static int reply_count = 0;
static int reply_expect = 0;
#endif
int
main(int argc, char **argv)
{
#ifdef USE_IPC
int i;
char *s, buf[1024];
@ -121,11 +126,13 @@ main(int argc, char **argv)
_e_ipc_shutdown();
ecore_ipc_shutdown();
ecore_shutdown();
#endif
/* just return 0 to keep the compiler quiet */
return 0;
}
#ifdef USE_IPC
/* local subsystem functions */
static int
_e_cb_signal_exit(void *data, int ev_type, void *ev)
@ -265,5 +272,4 @@ _e_help(void)
printf("%s\n", opt->desc);
}
}
#endif

@ -23,6 +23,7 @@
#include "E_Lib.h"
#include "e.h"
#ifdef USE_IPC
#include "e_ipc_codec.c"
typedef struct _Opt Opt;
@ -635,4 +636,4 @@ _e_cb_dir_list_free(void *data __UNUSED__, void *ev)
free(e);
}
#endif

@ -5,6 +5,8 @@
#include <config.h>
#endif
#ifdef USE_IPC
#if HAVE___ATTRIBUTE__
#define __UNUSED__ __attribute__((unused))
#else
@ -25,4 +27,6 @@
#endif
#endif

Loading…
Cancel
Save