ipc is #defineable (rough for now - maybe able to be undefined and eventually
entirely removed - later though). also config shoudl be able to go up versiosn more easily now. SVN revision: 21160
This commit is contained in:
parent
978312dc10
commit
1785ad3a32
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#define USE_IPC
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
1696
src/bin/e_config.c
1696
src/bin/e_config.c
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
|
#define E_CONFIG_H
|
||||||
|
|
||||||
/* increment this whenever we change config enough that you need new
|
/* increment this whenever we change config enough that you need new
|
||||||
* defaults for e to work - started at 100 when we introduced this config
|
* defaults for e to work.
|
||||||
* versioning feature. the value of this is really irrelevant - just as
|
|
||||||
* long as it increases every time we change something
|
|
||||||
*/
|
*/
|
||||||
#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_DEFAULT 0
|
||||||
#define E_EVAS_ENGINE_SOFTWARE_X11 1
|
#define E_EVAS_ENGINE_SOFTWARE_X11 1
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static int _e_ipc_cb_client_add(void *data, int type, void *event);
|
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);
|
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 */
|
/* local subsystem globals */
|
||||||
static Ecore_Ipc_Server *_e_ipc_server = NULL;
|
static Ecore_Ipc_Server *_e_ipc_server = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
EAPI int
|
EAPI int
|
||||||
e_ipc_init(void)
|
e_ipc_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_IPC
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
char *disp;
|
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);
|
ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DATA, _e_ipc_cb_client_data, NULL);
|
||||||
|
|
||||||
e_ipc_codec_init();
|
e_ipc_codec_init();
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_ipc_shutdown(void)
|
e_ipc_shutdown(void)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_IPC
|
||||||
e_ipc_codec_shutdown();
|
e_ipc_codec_shutdown();
|
||||||
if (_e_ipc_server)
|
if (_e_ipc_server)
|
||||||
{
|
{
|
||||||
ecore_ipc_server_del(_e_ipc_server);
|
ecore_ipc_server_del(_e_ipc_server);
|
||||||
_e_ipc_server = NULL;
|
_e_ipc_server = NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
/* local subsystem globals */
|
/* local subsystem globals */
|
||||||
static int
|
static int
|
||||||
_e_ipc_cb_client_add(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
#ifdef E_TYPEDEFS
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
#include "e_ipc_handlers_list.h"
|
#include "e_ipc_handlers_list.h"
|
||||||
|
|
||||||
typedef enum _E_Ipc_Domain
|
typedef enum _E_Ipc_Domain
|
||||||
|
@ -16,6 +17,7 @@ typedef enum _E_Ipc_Domain
|
||||||
} E_Ipc_Domain;
|
} E_Ipc_Domain;
|
||||||
|
|
||||||
typedef int E_Ipc_Op;
|
typedef int E_Ipc_Op;
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_IPC_H
|
#ifndef E_IPC_H
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
|
|
||||||
/* encode functions, Should these be global? */
|
/* 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 */
|
/* local subsystem globals */
|
||||||
|
|
||||||
|
#endif
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
#ifdef E_TYPEDEFS
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
typedef struct _E_Ipc_Int E_Ipc_Int;
|
typedef struct _E_Ipc_Int E_Ipc_Int;
|
||||||
typedef struct _E_Ipc_Double E_Ipc_Double;
|
typedef struct _E_Ipc_Double E_Ipc_Double;
|
||||||
typedef struct _E_Ipc_2Int E_Ipc_2Int;
|
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_4Str E_Ipc_3Int_4Str;
|
||||||
typedef struct _E_Ipc_3Int_3Str E_Ipc_3Int_3Str;
|
typedef struct _E_Ipc_3Int_3Str E_Ipc_3Int_3Str;
|
||||||
typedef struct _E_Ipc_Str_4Int E_Ipc_Str_4Int;
|
typedef struct _E_Ipc_Str_4Int E_Ipc_Str_4Int;
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_IPC_CODEC_H
|
#ifndef E_IPC_CODEC_H
|
||||||
#define E_IPC_CODEC_H
|
#define E_IPC_CODEC_H
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
struct _E_Ipc_Int
|
struct _E_Ipc_Int
|
||||||
{
|
{
|
||||||
int val;
|
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 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 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);
|
EAPI void *e_ipc_codec_str_4int_list_enc(Evas_List *list, int *size_ret);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
*/
|
*/
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
|
|
||||||
typedef struct _Opt Opt;
|
typedef struct _Opt Opt;
|
||||||
|
|
||||||
struct _Opt
|
struct _Opt
|
||||||
|
@ -34,9 +36,12 @@ static const char *display_name = NULL;
|
||||||
static int reply_count = 0;
|
static int reply_count = 0;
|
||||||
static int reply_expect = 0;
|
static int reply_expect = 0;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_IPC
|
||||||
int i;
|
int i;
|
||||||
char *s, buf[1024];
|
char *s, buf[1024];
|
||||||
|
|
||||||
|
@ -121,11 +126,13 @@ main(int argc, char **argv)
|
||||||
_e_ipc_shutdown();
|
_e_ipc_shutdown();
|
||||||
ecore_ipc_shutdown();
|
ecore_ipc_shutdown();
|
||||||
ecore_shutdown();
|
ecore_shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* just return 0 to keep the compiler quiet */
|
/* just return 0 to keep the compiler quiet */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static int
|
static int
|
||||||
_e_cb_signal_exit(void *data, int ev_type, void *ev)
|
_e_cb_signal_exit(void *data, int ev_type, void *ev)
|
||||||
|
@ -265,5 +272,4 @@ _e_help(void)
|
||||||
printf("%s\n", opt->desc);
|
printf("%s\n", opt->desc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "E_Lib.h"
|
#include "E_Lib.h"
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
#include "e_ipc_codec.c"
|
#include "e_ipc_codec.c"
|
||||||
|
|
||||||
typedef struct _Opt Opt;
|
typedef struct _Opt Opt;
|
||||||
|
@ -635,4 +636,4 @@ _e_cb_dir_list_free(void *data __UNUSED__, void *ev)
|
||||||
free(e);
|
free(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -5,6 +5,8 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_IPC
|
||||||
|
|
||||||
#if HAVE___ATTRIBUTE__
|
#if HAVE___ATTRIBUTE__
|
||||||
#define __UNUSED__ __attribute__((unused))
|
#define __UNUSED__ __attribute__((unused))
|
||||||
#else
|
#else
|
||||||
|
@ -25,4 +27,6 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue