summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-10 11:42:13 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-10 11:42:13 +0200
commit783b3154cd7b4dbc3fea453dac5f7af09a011ef4 (patch)
tree6f53cf6ef2b7dd9553dd51f5cd3bb71a3beb727a /src/lib
parentb99a632a158519295b8ccaa0afacdb60f2a1702e (diff)
downloadedoors-783b3154cd7b4dbc3fea453dac5f7af09a011ef4.zip
edoors-783b3154cd7b4dbc3fea453dac5f7af09a011ef4.tar.gz
rename Eiotas->Edoors
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/CMakeLists.txt28
-rw-r--r--src/lib/edoors_board.c (renamed from src/lib/eiotas_board.c)10
-rw-r--r--src/lib/edoors_door.c (renamed from src/lib/eiotas_door.c)18
-rw-r--r--src/lib/edoors_iota.c (renamed from src/lib/eiotas_iota.c)42
-rw-r--r--src/lib/edoors_link.c (renamed from src/lib/eiotas_link.c)8
-rw-r--r--src/lib/edoors_main.c (renamed from src/lib/eiotas_main.c)32
-rw-r--r--src/lib/edoors_particle.c (renamed from src/lib/eiotas_particle.c)96
-rw-r--r--src/lib/edoors_private.h (renamed from src/lib/eiotas_private.h)50
-rw-r--r--src/lib/edoors_room.c (renamed from src/lib/eiotas_room.c)18
-rw-r--r--src/lib/edoors_spin.c (renamed from src/lib/eiotas_spin.c)52
10 files changed, 177 insertions, 177 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index e2871fc..cd1ae1e 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -1,12 +1,12 @@
-LIST(APPEND EIOTAS_CC_SOURCES
- eiotas_main.c
- eiotas_particle.c
- eiotas_link.c
- eiotas_iota.c
- eiotas_spin.c
- eiotas_room.c
- eiotas_door.c
- eiotas_board.c
+LIST(APPEND EDOORS_CC_SOURCES
+ edoors_main.c
+ edoors_particle.c
+ edoors_link.c
+ edoors_iota.c
+ edoors_spin.c
+ edoors_room.c
+ edoors_door.c
+ edoors_board.c
)
include_directories(
@@ -14,11 +14,11 @@ include_directories(
${PROJECT_SOURCE_DIR}/src/include
)
-add_library(eiotas SHARED ${EIOTAS_CC_SOURCES})
-target_link_libraries(eiotas
+add_library(edoors SHARED ${EDOORS_CC_SOURCES})
+target_link_libraries(edoors
${EINA_LIBRARIES}
)
-set_target_properties(eiotas PROPERTIES
- VERSION ${EIOTAS_VERSION} SOVERSION ${EIOTAS_VERSION_MAJOR})
-set_target_properties(eiotas PROPERTIES OUTPUT_NAME "eiotas")
+set_target_properties(edoors PROPERTIES
+ VERSION ${EDOORS_VERSION} SOVERSION ${EDOORS_VERSION_MAJOR})
+set_target_properties(edoors PROPERTIES OUTPUT_NAME "edoors")
diff --git a/src/lib/eiotas_board.c b/src/lib/edoors_board.c
index 26a066b..452207c 100644
--- a/src/lib/eiotas_board.c
+++ b/src/lib/edoors_board.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,16 +16,16 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_board.h"
-#include "eiotas_private.h"
+#include "edoors_board.h"
+#include "edoors_private.h"
-EAPI Eiotas_Board* eiotas_board_add(const char* name, const Eiotas_Room *parent, Eiotas_User_Bits *user_bits)
+EAPI Edoors_Board* edoors_board_add(const char* name, const Edoors_Room *parent, Edoors_User_Bits *user_bits)
{
// TODO
return NULL;
}
-void eiotas_board_free(Eiotas_Board *board)
+void edoors_board_free(Edoors_Board *board)
{
DBG("Door free 0x%X",PRINTPTR(board));
// TODO
diff --git a/src/lib/eiotas_door.c b/src/lib/edoors_door.c
index 37d5c3a..60ce591 100644
--- a/src/lib/eiotas_door.c
+++ b/src/lib/edoors_door.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,31 +16,31 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_door.h"
-#include "eiotas_private.h"
+#include "edoors_door.h"
+#include "edoors_private.h"
-EAPI Eiotas_Door* eiotas_door_add(const char* name, const Eiotas_Room *parent, Eiotas_User_Bits *user_bits)
+EAPI Edoors_Door* edoors_door_add(const char* name, const Edoors_Room *parent, Edoors_User_Bits *user_bits)
{
CHECK_PARENT();
CHECK_USERBITS(user_bits);
- BUILD_INSTANCE(Eiotas_Door,door);
+ BUILD_INSTANCE(Edoors_Door,door);
- INIT_IOTA(&door->iota,name,parent,EIOTAS_TYPE_DOOR);
+ INIT_IOTA(&door->iota,name,parent,EDOORS_TYPE_DOOR);
ADD_TO_PARENT(parent,(&door->iota),"Door")
- memcpy(&door->user_bits,user_bits,sizeof(Eiotas_User_Bits));
+ memcpy(&door->user_bits,user_bits,sizeof(Edoors_User_Bits));
return door;
}
-void eiotas_door_free(Eiotas_Door *door)
+void edoors_door_free(Edoors_Door *door)
{
DBG("Door free 0x%X",PRINTPTR(door));
- eiotas_iota_desinit(&door->iota);
+ edoors_iota_desinit(&door->iota);
door->user_bits.free_fct(door->user_bits.data);
free(door);
diff --git a/src/lib/eiotas_iota.c b/src/lib/edoors_iota.c
index d41a69d..4735ba3 100644
--- a/src/lib/eiotas_iota.c
+++ b/src/lib/edoors_iota.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,17 +16,17 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_iota.h"
-#include "eiotas_spin.h"
-#include "eiotas_room.h"
-#include "eiotas_door.h"
-#include "eiotas_board.h"
-#include "eiotas_private.h"
+#include "edoors_iota.h"
+#include "edoors_spin.h"
+#include "edoors_room.h"
+#include "edoors_door.h"
+#include "edoors_board.h"
+#include "edoors_private.h"
-int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, Eiotas_Type type)
+int edoors_iota_init(Edoors_Iota *iota, const char *name, Edoors_Iota *parent, Edoors_Type type)
{
int ln, lp;
- char tmp[EIOTAS_MAX_PATH_LENGTH];
+ char tmp[EDOORS_MAX_PATH_LENGTH];
ln = strlen(name);
if(name==NULL || ln==0) {
@@ -39,7 +39,7 @@ int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, E
iota->parent = parent;
if(parent) {
lp = eina_stringshare_strlen(parent->path);
- if((ln+lp+2)>EIOTAS_MAX_PATH_LENGTH) {
+ if((ln+lp+2)>EDOORS_MAX_PATH_LENGTH) {
ERR("buffer overflow (%d)",(ln+lp+2));
return 1;
}
@@ -56,26 +56,26 @@ int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, E
return 0;
}
-void eiotas_iota_desinit(Eiotas_Iota *iota)
+void edoors_iota_desinit(Edoors_Iota *iota)
{
STRINGSHARE_FREE(iota->name);
STRINGSHARE_FREE(iota->path);
}
-void eiotas_iota_free(Eiotas_Iota *iota)
+void edoors_iota_free(Edoors_Iota *iota)
{
switch(iota->type) {
- case EIOTAS_TYPE_SPIN:
- eiotas_spin_free((Eiotas_Spin*)iota);
+ case EDOORS_TYPE_SPIN:
+ edoors_spin_free((Edoors_Spin*)iota);
break;
- case EIOTAS_TYPE_ROOM:
- eiotas_room_free((Eiotas_Room*)iota);
+ case EDOORS_TYPE_ROOM:
+ edoors_room_free((Edoors_Room*)iota);
break;
- case EIOTAS_TYPE_DOOR:
- eiotas_door_free((Eiotas_Door*)iota);
+ case EDOORS_TYPE_DOOR:
+ edoors_door_free((Edoors_Door*)iota);
break;
- case EIOTAS_TYPE_BOARD:
- eiotas_board_free((Eiotas_Board*)iota);
+ case EDOORS_TYPE_BOARD:
+ edoors_board_free((Edoors_Board*)iota);
break;
default:
CRITICAL("SPANK SPANK: 0x%X type %d is unknown, memory leak",PRINTPTR(iota),iota->type);
@@ -83,7 +83,7 @@ void eiotas_iota_free(Eiotas_Iota *iota)
}
}
-EAPI void eiotas_iota_show(Eiotas_Iota *iota)
+EAPI void edoors_iota_show(Edoors_Iota *iota)
{
DBG("Iota(%d) 0x%X : %s (%s) [0x%X] {0x%X}",iota->type,PRINTPTR(iota),iota->name,iota->path,
PRINTPTR(iota->parent),PRINTPTR(iota->spin));
diff --git a/src/lib/eiotas_link.c b/src/lib/edoors_link.c
index 96cdab6..82cb2f3 100644
--- a/src/lib/eiotas_link.c
+++ b/src/lib/edoors_link.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,10 +16,10 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_link.h"
-#include "eiotas_private.h"
+#include "edoors_link.h"
+#include "edoors_private.h"
-void eiotas_link_free(Eiotas_Link *link)
+void edoors_link_free(Edoors_Link *link)
{
DBG("Link free 0x%X",PRINTPTR(link));
// TODO
diff --git a/src/lib/eiotas_main.c b/src/lib/edoors_main.c
index e4799a1..e2242a4 100644
--- a/src/lib/eiotas_main.c
+++ b/src/lib/edoors_main.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,43 +16,43 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_main.h"
-#include "eiotas_private.h"
+#include "edoors_main.h"
+#include "edoors_private.h"
#include "eina_main.h"
#include <stdio.h>
-static int _eiotas_main_count = 0;
+static int _edoors_main_count = 0;
-int _eiotas_log_dom;
+int _edoors_log_dom;
-static Eiotas_Version _version = { VMAJ, VMIN, VMIC };
+static Edoors_Version _version = { VMAJ, VMIN, VMIC };
-EAPI Eiotas_Version *eiotas_version = &_version;
+EAPI Edoors_Version *edoors_version = &_version;
-EAPI int eiotas_init()
+EAPI int edoors_init()
{
- if (EINA_LIKELY(_eiotas_main_count > 0))
- return ++_eiotas_main_count;
+ if (EINA_LIKELY(_edoors_main_count > 0))
+ return ++_edoors_main_count;
if(!eina_init()) {
fprintf(stderr,"Error during the initialization of Eina_Log module\n");
return EXIT_FAILURE;
}
- _eiotas_log_dom = eina_log_domain_register("eiotas", EINA_COLOR_CYAN);
- _eiotas_main_count = 1;
+ _edoors_log_dom = eina_log_domain_register("edoors", EINA_COLOR_CYAN);
+ _edoors_main_count = 1;
return 1;
}
-EAPI int eiotas_shutdown()
+EAPI int edoors_shutdown()
{
- _eiotas_main_count--;
- if (EINA_UNLIKELY(_eiotas_main_count == 0)) {
+ _edoors_main_count--;
+ if (EINA_UNLIKELY(_edoors_main_count == 0)) {
eina_shutdown();
}
- return _eiotas_main_count;
+ return _edoors_main_count;
}
diff --git a/src/lib/eiotas_particle.c b/src/lib/edoors_particle.c
index 5051750..468cd5b 100644
--- a/src/lib/eiotas_particle.c
+++ b/src/lib/edoors_particle.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,37 +16,37 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_particle.h"
-#include "eiotas_private.h"
+#include "edoors_particle.h"
+#include "edoors_private.h"
-static void update_link_value(Eiotas_Particle *particle, const char *field);
-static char* add_destination(Eiotas_Particle *particle, const char *dst);
+static void update_link_value(Edoors_Particle *particle, const char *field);
+static char* add_destination(Edoors_Particle *particle, const char *dst);
-Eiotas_Particle* eiotas_particle_alloc()
+Edoors_Particle* edoors_particle_alloc()
{
- BUILD_INSTANCE(Eiotas_Particle,particle);
+ BUILD_INSTANCE(Edoors_Particle,particle);
particle->ts = 0;
particle->src = NULL;
particle->dst = NULL;
- particle->dsts = eina_array_new(EIOTAS_PARTICLE_ARRAY_STEP);
+ particle->dsts = eina_array_new(EDOORS_PARTICLE_ARRAY_STEP);
particle->cur_dst = 0;
particle->cur_action = NULL;
particle->cur_door = NULL;
particle->cur_room = NULL;
particle->payload = eina_hash_string_small_new((Eina_Free_Cb)&eina_stringshare_del);
particle->merged = NULL;
- particle->link_fields = eina_array_new(EIOTAS_PARTICLE_ARRAY_STEP);
+ particle->link_fields = eina_array_new(EDOORS_PARTICLE_ARRAY_STEP);
particle->link_value = NULL;
return particle;
}
-void eiotas_particle_free(Eiotas_Particle *particle)
+void edoors_particle_free(Edoors_Particle *particle)
{
unsigned int i;
Eina_Stringshare *s;
- Eiotas_Particle *p;
+ Edoors_Particle *p;
Eina_Inlist *li;
Eina_Array_Iterator it;
@@ -58,7 +58,7 @@ void eiotas_particle_free(Eiotas_Particle *particle)
STRINGSHARE_FREE(particle->cur_door);
STRINGSHARE_FREE(particle->cur_room);
eina_hash_free(particle->payload);
- EINA_INLIST_FOREACH_SAFE(particle->merged, li, p) eiotas_particle_free(p);
+ EINA_INLIST_FOREACH_SAFE(particle->merged, li, p) edoors_particle_free(p);
EINA_ARRAY_ITER_NEXT(particle->link_fields, i, s, it) eina_stringshare_del(s);
eina_array_free(particle->link_fields);
STRINGSHARE_FREE(particle->link_value);
@@ -66,11 +66,11 @@ void eiotas_particle_free(Eiotas_Particle *particle)
free(particle);
}
-EAPI void eiotas_particle_reset(Eiotas_Particle *particle)
+EAPI void edoors_particle_reset(Edoors_Particle *particle)
{
unsigned int i;
Eina_Stringshare *s;
- Eiotas_Particle *p;
+ Edoors_Particle *p;
Eina_Inlist *li;
Eina_Array_Iterator it;
@@ -84,42 +84,42 @@ EAPI void eiotas_particle_reset(Eiotas_Particle *particle)
STRINGSHARE_FREE(particle->cur_door);
STRINGSHARE_FREE(particle->cur_room);
eina_hash_free_buckets(particle->payload);
- EINA_INLIST_FOREACH_SAFE(particle->merged, li, p) eiotas_particle_free(p);
+ EINA_INLIST_FOREACH_SAFE(particle->merged, li, p) edoors_particle_free(p);
particle->merged = NULL;
EINA_ARRAY_ITER_NEXT(particle->link_fields, i, s, it) eina_stringshare_del(s);
eina_array_clean(particle->link_fields);
STRINGSHARE_FREE(particle->link_value);
}
-EAPI void eiotas_particle_init(Eiotas_Particle *particle, Eiotas_Iota *iota)
+EAPI void edoors_particle_init(Edoors_Particle *particle, Edoors_Iota *iota)
{
particle->src = iota;
particle->ts = time(NULL);
}
-EAPI void eiotas_particle_merge(Eiotas_Particle *particle, const Eiotas_Particle *p)
+EAPI void edoors_particle_merge(Edoors_Particle *particle, const Edoors_Particle *p)
{
- particle->merged = eina_inlist_append(particle->merged, EINA_INLIST_GET((Eiotas_Particle*)p));
+ particle->merged = eina_inlist_append(particle->merged, EINA_INLIST_GET((Edoors_Particle*)p));
}
-EAPI Eina_Bool eiotas_particle_has_dst(Eiotas_Particle *particle)
+EAPI Eina_Bool edoors_particle_has_dst(Edoors_Particle *particle)
{
return ( (eina_array_count_get(particle->dsts)>particle->cur_dst) ? EINA_TRUE : EINA_FALSE );
}
-EAPI Eina_Bool eiotas_particle_next_dst(Eiotas_Particle *particle)
+EAPI Eina_Bool edoors_particle_next_dst(Edoors_Particle *particle)
{
particle->cur_dst+=1;
return ( (eina_array_count_get(particle->dsts)>particle->cur_dst) ? EINA_TRUE : EINA_FALSE );
}
-EAPI void eiotas_particle_split_dst(Eiotas_Particle *particle)
+EAPI void edoors_particle_split_dst(Edoors_Particle *particle)
{
unsigned int l, n;
char *sep, *tmp;
Eina_Stringshare *dst;
- if(!eiotas_particle_has_dst(particle)) {
+ if(!edoors_particle_has_dst(particle)) {
STRINGSHARE_FREE(particle->cur_action);
STRINGSHARE_FREE(particle->cur_door);
STRINGSHARE_FREE(particle->cur_room);
@@ -130,9 +130,9 @@ EAPI void eiotas_particle_split_dst(Eiotas_Particle *particle)
l = eina_stringshare_strlen(dst);
sep = (char*)dst+l-sizeof(char);
- for(; (sep!=dst && *sep!=EIOTAS_ACTION_SEP ); sep--) /* reverse search for action separator */;
+ for(; (sep!=dst && *sep!=EDOORS_ACTION_SEP ); sep--) /* reverse search for action separator */;
- if(*sep==EIOTAS_ACTION_SEP) {
+ if(*sep==EDOORS_ACTION_SEP) {
tmp = sep+sizeof(char);
/* action defined */
if(particle->cur_action) {
@@ -152,7 +152,7 @@ EAPI void eiotas_particle_split_dst(Eiotas_Particle *particle)
sep = (char*)dst+l-sizeof(char);
}
- for(; (sep!=dst && *sep!=EIOTAS_PATH_SEP ); sep--) /* reverse search path for separator */;
+ for(; (sep!=dst && *sep!=EDOORS_PATH_SEP ); sep--) /* reverse search path for separator */;
if(sep==dst) {
/* no room */
@@ -185,56 +185,56 @@ EAPI void eiotas_particle_split_dst(Eiotas_Particle *particle)
}
}
-EAPI void eiotas_particle_destination_set(Eiotas_Particle *particle, const char *destination)
+EAPI void edoors_particle_destination_set(Edoors_Particle *particle, const char *destination)
{
char *tmp;
tmp = add_destination(particle,destination);
- if(*tmp=='\0' || *tmp==' ' || *tmp==EIOTAS_FIELDS_SEP)
+ if(*tmp=='\0' || *tmp==' ' || *tmp==EDOORS_FIELDS_SEP)
particle->cur_dst = eina_array_count_get(particle->dsts)-1;
}
-EAPI void eiotas_particle_destinations_add(Eiotas_Particle *particle, const char* destinations)
+EAPI void edoors_particle_destinations_add(Edoors_Particle *particle, const char* destinations)
{
char *dst;
dst = (char*)destinations;
for(;;) {
dst = add_destination(particle,dst);
- for(; (*dst && *dst!=EIOTAS_FIELDS_SEP); dst++) /* eat whatever is following */;
+ for(; (*dst && *dst!=EDOORS_FIELDS_SEP); dst++) /* eat whatever is following */;
if(!*dst) return;
dst++;
}
}
-static char* add_destination(Eiotas_Particle *particle, const char *dst)
+static char* add_destination(Edoors_Particle *particle, const char *dst)
{
char *start, *end, *last_path_sep, *action_sep;
Eina_Stringshare *s;
for(start=(char*)dst; *start && *start==' '; start++) /* eat leading spaces */;
- if(*start=='\0' || *start==EIOTAS_FIELDS_SEP) {
+ if(*start=='\0' || *start==EDOORS_FIELDS_SEP) {
ERR("ignore empty destination");
return start;
}
- if(*start==EIOTAS_ACTION_SEP || *start==EIOTAS_PATH_SEP ) {
+ if(*start==EDOORS_ACTION_SEP || *start==EDOORS_PATH_SEP ) {
ERR("ignore destination starting with '%c' ",*start);
return start;
}
last_path_sep = action_sep = NULL;
- for(end=start; (*end && *end!=EIOTAS_FIELDS_SEP && *end!=' '); end++) {
- if(*end==EIOTAS_PATH_SEP) {
+ for(end=start; (*end && *end!=EDOORS_FIELDS_SEP && *end!=' '); end++) {
+ if(*end==EDOORS_PATH_SEP) {
last_path_sep = end;
- } else if(*end==EIOTAS_ACTION_SEP) {
+ } else if(*end==EDOORS_ACTION_SEP) {
if(action_sep) {
- ERR("ignore destination with more then 1 '%c' ",EIOTAS_ACTION_SEP);
+ ERR("ignore destination with more then 1 '%c' ",EDOORS_ACTION_SEP);
return end;
}
if(last_path_sep==(end-sizeof(char))) {
- ERR("ignore destination with '%c%c' ",EIOTAS_PATH_SEP,EIOTAS_ACTION_SEP);
+ ERR("ignore destination with '%c%c' ",EDOORS_PATH_SEP,EDOORS_ACTION_SEP);
return end;
}
action_sep = end;
@@ -253,7 +253,7 @@ static char* add_destination(Eiotas_Particle *particle, const char *dst)
return end;
}
-EAPI void eiotas_particle_link_fields_set(Eiotas_Particle *particle, const char *link_fields)
+EAPI void edoors_particle_link_fields_set(Edoors_Particle *particle, const char *link_fields)
{
int n;
unsigned int i;
@@ -268,7 +268,7 @@ EAPI void eiotas_particle_link_fields_set(Eiotas_Particle *particle, const char
for(; *field;) {
for(; *field==' '; field++) /* eat leading spaces */;
sep = field;
- for(; (*sep && *sep!=EIOTAS_FIELDS_SEP && *sep!=' '); sep++) /* search field end */;
+ for(; (*sep && *sep!=EDOORS_FIELDS_SEP && *sep!=' '); sep++) /* search field end */;
n = (sep-field);
if(n==0) {
ERR("ignore empty field");
@@ -277,19 +277,19 @@ EAPI void eiotas_particle_link_fields_set(Eiotas_Particle *particle, const char
eina_array_push(particle->link_fields,s);
DBG("add field >%s<",s);
}
- for(; (*sep && *sep!=EIOTAS_FIELDS_SEP); sep++) /* eat whatever following */;
+ for(; (*sep && *sep!=EDOORS_FIELDS_SEP); sep++) /* eat whatever following */;
if(!*sep) return;
field = sep+sizeof(char);
}
update_link_value(particle,NULL);
}
-EAPI const char* eiotas_particle_data_get(Eiotas_Particle *particle, const char* key)
+EAPI const char* edoors_particle_data_get(Edoors_Particle *particle, const char* key)
{
return eina_hash_find(particle->payload,key);
}
-EAPI Eina_Bool eiotas_particle_data_set(Eiotas_Particle *particle, const char* key, const char* value)
+EAPI Eina_Bool edoors_particle_data_set(Edoors_Particle *particle, const char* key, const char* value)
{
unsigned int i;
Eina_Stringshare *s;
@@ -302,7 +302,7 @@ EAPI Eina_Bool eiotas_particle_data_set(Eiotas_Particle *particle, const char* k
return EINA_TRUE;
}
-EAPI Eina_Bool eiotas_particle_data_del(Eiotas_Particle *particle, const char* key)
+EAPI Eina_Bool edoors_particle_data_del(Edoors_Particle *particle, const char* key)
{
unsigned int i;
Eina_Stringshare *s;
@@ -314,12 +314,12 @@ EAPI Eina_Bool eiotas_particle_data_del(Eiotas_Particle *particle, const char* k
return EINA_TRUE;
}
-EAPI Eina_Bool eiotas_particle_match(Eiotas_Particle *particle, const Eiotas_Particle *p)
+EAPI Eina_Bool edoors_particle_match(Edoors_Particle *particle, const Edoors_Particle *p)
{
return ( (particle->link_value==p->link_value) ? EINA_TRUE : EINA_FALSE );
}
-static void update_link_value(Eiotas_Particle *particle, const char *field)
+static void update_link_value(Edoors_Particle *particle, const char *field)
{
unsigned int i;
unsigned int l,t;
@@ -327,7 +327,7 @@ static void update_link_value(Eiotas_Particle *particle, const char *field)
Eina_Stringshare *v;
Eina_Array_Iterator it;
Eina_Bool update;
- char tmp[EIOTAS_MAX_VALUE_LENGTH];
+ char tmp[EDOORS_MAX_VALUE_LENGTH];
char *dst;
if(field!=NULL) {
@@ -349,8 +349,8 @@ static void update_link_value(Eiotas_Particle *particle, const char *field)
if(v!=NULL) {
l = strlen(v);
t += l;
- if(t>EIOTAS_MAX_VALUE_LENGTH) {
- ERR("buffer overflow (%d>%d) link_value untouched",t,EIOTAS_MAX_VALUE_LENGTH);
+ if(t>EDOORS_MAX_VALUE_LENGTH) {
+ ERR("buffer overflow (%d>%d) link_value untouched",t,EDOORS_MAX_VALUE_LENGTH);
return;
}
memcpy(dst,v,l);
diff --git a/src/lib/eiotas_private.h b/src/lib/edoors_private.h
index 27ee9e8..c392443 100644
--- a/src/lib/eiotas_private.h
+++ b/src/lib/edoors_private.h
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,32 +16,32 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __EIOTAS_PRIVATE_H__
-#define __EIOTAS_PRIVATE_H__
+#ifndef __EDOORS_PRIVATE_H__
+#define __EDOORS_PRIVATE_H__
#ifdef HAVE_CONFIG_H
-# include "eiotas_config.h"
+# include "edoors_config.h"
#endif
-#include "eiotas_main.h"
-#include "eiotas_iota.h"
+#include "edoors_main.h"
+#include "edoors_iota.h"
#include <eina_log.h>
#undef EINA_LOG_DOMAIN_DEFAULT
-#define EINA_LOG_DOMAIN_DEFAULT eiotas_log_dom
-#define EIOTA_LOG_DOMAIN "eiotas"
+#define EINA_LOG_DOMAIN_DEFAULT edoors_log_dom
+#define EIOTA_LOG_DOMAIN "edoors"
-#define EIOTAS_MAX_VALUE_LENGTH 1024
-#define EIOTAS_MAX_PATH_LENGTH 256
-#define EIOTAS_MAX_ACTION_LENGTH 16
+#define EDOORS_MAX_VALUE_LENGTH 1024
+#define EDOORS_MAX_PATH_LENGTH 256
+#define EDOORS_MAX_ACTION_LENGTH 16
-#define EIOTAS_PATH_SEP '/'
-#define EIOTAS_FIELDS_SEP ','
-#define EIOTAS_ACTION_SEP '?'
-#define EIOTAS_PARTICLE_ARRAY_STEP 3
+#define EDOORS_PATH_SEP '/'
+#define EDOORS_FIELDS_SEP ','
+#define EDOORS_ACTION_SEP '?'
+#define EDOORS_PARTICLE_ARRAY_STEP 3
-void eiotas_iota_desinit(Eiotas_Iota *iota);
+void edoors_iota_desinit(Edoors_Iota *iota);
-int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, Eiotas_Type type);
+int edoors_iota_init(Edoors_Iota *iota, const char *name, Edoors_Iota *parent, Edoors_Type type);
#undef PRINTPTR
#ifdef __clang__
@@ -70,14 +70,14 @@ int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, E
}
#define INIT_IOTA(_iota,_name,_parent,_type) \
- if(eiotas_iota_init(_iota,_name,(Eiotas_Iota*)_parent,_type)) { \
+ if(edoors_iota_init(_iota,_name,(Edoors_Iota*)_parent,_type)) { \
return NULL; \
}
#define ADD_TO_PARENT(_parent,_iota,_st_name) \
if(eina_hash_find(_parent->children,_iota->name)) { \
ERR("%s %s already exists in %s",_st_name,_iota->name,parent->iota.path); \
- eiotas_iota_desinit(_iota); \
+ edoors_iota_desinit(_iota); \
return NULL; \
} \
eina_hash_direct_add(_parent->children,_iota->name,_iota);
@@ -101,26 +101,26 @@ int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, E
#ifdef CRITICAL
#undef CRITICAL
#endif
-#define CRITICAL(...) EINA_LOG_DOM_CRIT(_eiotas_log_dom, __VA_ARGS__)
+#define CRITICAL(...) EINA_LOG_DOM_CRIT(_edoors_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_eiotas_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_edoors_log_dom, __VA_ARGS__)
#ifdef WRN
#undef WRN
#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_eiotas_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_edoors_log_dom, __VA_ARGS__)
#ifdef INF
#undef INF
#endif
-#define INF(...) EINA_LOG_DOM_INFO(_eiotas_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_edoors_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_eiotas_log_dom, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(_edoors_log_dom, __VA_ARGS__)
-#endif // __EIOTAS_PRIVATE_H__
+#endif // __EDOORS_PRIVATE_H__
diff --git a/src/lib/eiotas_room.c b/src/lib/edoors_room.c
index bc508ae..3d5d251 100644
--- a/src/lib/eiotas_room.c
+++ b/src/lib/edoors_room.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,30 +16,30 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_room.h"
-#include "eiotas_private.h"
+#include "edoors_room.h"
+#include "edoors_private.h"
-EAPI Eiotas_Room* eiotas_room_add(const char* name, const Eiotas_Room *parent)
+EAPI Edoors_Room* edoors_room_add(const char* name, const Edoors_Room *parent)
{
CHECK_PARENT();
- BUILD_INSTANCE(Eiotas_Room,room);
+ BUILD_INSTANCE(Edoors_Room,room);
- INIT_IOTA(&room->iota,name,parent,EIOTAS_TYPE_ROOM);
+ INIT_IOTA(&room->iota,name,parent,EDOORS_TYPE_ROOM);
ADD_TO_PARENT(parent,(&room->iota),"Room")
room->links = NULL; // TODO
- room->children = eina_hash_stringshared_new((Eina_Free_Cb)&eiotas_iota_free);
+ room->children = eina_hash_stringshared_new((Eina_Free_Cb)&edoors_iota_free);
return room;
}
-void eiotas_room_free(Eiotas_Room *room)
+void edoors_room_free(Edoors_Room *room)
{
DBG("Room free 0x%X",PRINTPTR(room));
- eiotas_iota_desinit(&room->iota);
+ edoors_iota_desinit(&room->iota);
// TODO room->links
eina_hash_free(room->children);
diff --git a/src/lib/eiotas_spin.c b/src/lib/edoors_spin.c
index 873a4d1..bb59fc4 100644
--- a/src/lib/eiotas_spin.c
+++ b/src/lib/edoors_spin.c
@@ -1,4 +1,4 @@
-/* EIOTAS
+/* EDOORS
* Copyright (C) 2012 Jérémy Zurcher
*
* This library is free software; you can redistribute it and/or
@@ -16,19 +16,19 @@
* if not, see <http://www.gnu.org/licenses/>.
*/
-#include "eiotas_spin.h"
-#include "eiotas_iota.h"
-#include "eiotas_particle.h"
-#include "eiotas_private.h"
+#include "edoors_spin.h"
+#include "edoors_iota.h"
+#include "edoors_particle.h"
+#include "edoors_private.h"
-EAPI Eiotas_Spin* eiotas_spin_add(const char* name, unsigned int step)
+EAPI Edoors_Spin* edoors_spin_add(const char* name, unsigned int step)
{
- BUILD_INSTANCE(Eiotas_Spin,spin);
+ BUILD_INSTANCE(Edoors_Spin,spin);
- INIT_IOTA(&spin->room.iota,name,NULL,EIOTAS_TYPE_SPIN);
+ INIT_IOTA(&spin->room.iota,name,NULL,EDOORS_TYPE_SPIN);
spin->room.links = NULL; /* not used */
- spin->room.children = eina_hash_stringshared_new((Eina_Free_Cb)&eiotas_iota_free);
+ spin->room.children = eina_hash_stringshared_new((Eina_Free_Cb)&edoors_iota_free);
spin->free_particles = eina_array_new(step);
spin->sys_fifo = NULL;
spin->app_fifo = NULL;
@@ -36,56 +36,56 @@ EAPI Eiotas_Spin* eiotas_spin_add(const char* name, unsigned int step)
return spin;
}
-EAPI void eiotas_spin_free(Eiotas_Spin *spin)
+EAPI void edoors_spin_free(Edoors_Spin *spin)
{
unsigned int i;
- Eiotas_Particle *particle;
+ Edoors_Particle *particle;
Eina_Array_Iterator iterator;
Eina_Inlist *list;
DBG("Spin free 0x%X",PRINTPTR(spin));
- eiotas_iota_desinit(&spin->room.iota);
+ edoors_iota_desinit(&spin->room.iota);
eina_hash_free(spin->room.children);
- EINA_ARRAY_ITER_NEXT(spin->free_particles, i, particle, iterator) eiotas_particle_free(particle);
+ EINA_ARRAY_ITER_NEXT(spin->free_particles, i, particle, iterator) edoors_particle_free(particle);
eina_array_free(spin->free_particles);
- EINA_INLIST_FOREACH_SAFE(spin->sys_fifo, list,particle) eiotas_particle_free(particle);
- EINA_INLIST_FOREACH_SAFE(spin->app_fifo, list,particle) eiotas_particle_free(particle);
+ EINA_INLIST_FOREACH_SAFE(spin->sys_fifo, list,particle) edoors_particle_free(particle);
+ EINA_INLIST_FOREACH_SAFE(spin->app_fifo, list,particle) edoors_particle_free(particle);
free(spin);
}
-EAPI Eiotas_Particle* eiotas_spin_require_particle(Eiotas_Spin *spin)
+EAPI Edoors_Particle* edoors_spin_require_particle(Edoors_Spin *spin)
{
- Eiotas_Particle *particle;
+ Edoors_Particle *particle;
if(eina_array_count(spin->free_particles)>0) {
particle = eina_array_pop(spin->free_particles);
} else {
- particle = (Eiotas_Particle*)eiotas_particle_alloc();
+ particle = (Edoors_Particle*)edoors_particle_alloc();
}
return particle;
}
-EAPI void eiotas_spin_release_particle(Eiotas_Spin *spin, Eiotas_Particle *particle)
+EAPI void edoors_spin_release_particle(Edoors_Spin *spin, Edoors_Particle *particle)
{
- Eiotas_Particle *p;
+ Edoors_Particle *p;
Eina_Inlist *list;
while (particle->merged) {
- p = EINA_INLIST_CONTAINER_GET(particle->merged,Eiotas_Particle);
+ p = EINA_INLIST_CONTAINER_GET(particle->merged,Edoors_Particle);
particle->merged = eina_inlist_remove(particle->merged,particle->merged);
- eiotas_spin_release_particle(spin,p);
+ edoors_spin_release_particle(spin,p);
}
- eiotas_particle_reset(particle);
+ edoors_particle_reset(particle);
eina_array_push(spin->free_particles,particle);
}
-EAPI void eiotas_spin_send_particle(Eiotas_Spin *spin, const Eiotas_Particle *particle, Eina_Bool system)
+EAPI void edoors_spin_send_particle(Edoors_Spin *spin, const Edoors_Particle *particle, Eina_Bool system)
{
if(system) {
- spin->sys_fifo = eina_inlist_append(spin->sys_fifo,EINA_INLIST_GET((Eiotas_Particle*)particle));
+ spin->sys_fifo = eina_inlist_append(spin->sys_fifo,EINA_INLIST_GET((Edoors_Particle*)particle));
} else {
- spin->app_fifo = eina_inlist_append(spin->app_fifo,EINA_INLIST_GET((Eiotas_Particle*)particle));
+ spin->app_fifo = eina_inlist_append(spin->app_fifo,EINA_INLIST_GET((Edoors_Particle*)particle));
}
}