summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/eiotas_board.h6
-rw-r--r--src/include/eiotas_door.h4
-rw-r--r--src/include/eiotas_iota.h10
-rw-r--r--src/include/eiotas_room.h6
-rw-r--r--src/include/eiotas_spin.h8
-rw-r--r--src/include/eiotas_userbits.h32
6 files changed, 36 insertions, 30 deletions
diff --git a/src/include/eiotas_board.h b/src/include/eiotas_board.h
index 87d628a..4813808 100644
--- a/src/include/eiotas_board.h
+++ b/src/include/eiotas_board.h
@@ -28,9 +28,9 @@
typedef struct _Eiotas_Board Eiotas_Board;
struct _Eiotas_Board {
- Eiotas_Iota iota; /* structural info */
- Eiotas_User_Bits user_bits; /* user bits */
- Eina_Hash *postponed; /* TODO Particles */
+ Eiotas_Iota iota; /* structural info */
+ Eiotas_User_Bits user_bits; /* user bits */
+ Eina_Hash *postponed; /* TODO Particles */
};
void eiotas_board_free(Eiotas_Board *board);
diff --git a/src/include/eiotas_door.h b/src/include/eiotas_door.h
index 3b40415..05060c4 100644
--- a/src/include/eiotas_door.h
+++ b/src/include/eiotas_door.h
@@ -28,8 +28,8 @@
typedef struct _Eiotas_Door Eiotas_Door;
struct _Eiotas_Door {
- Eiotas_Iota iota; /* structural info */
- Eiotas_User_Bits user_bits; /* user bits */
+ Eiotas_Iota iota; /* structural info */
+ Eiotas_User_Bits user_bits; /* user bits */
};
void eiotas_door_free(Eiotas_Door *door);
diff --git a/src/include/eiotas_iota.h b/src/include/eiotas_iota.h
index 6e4a346..12f093b 100644
--- a/src/include/eiotas_iota.h
+++ b/src/include/eiotas_iota.h
@@ -33,11 +33,11 @@ typedef enum _Eiotas_Type
typedef struct _Eiotas_Iota Eiotas_Iota;
struct _Eiotas_Iota {
- Eiotas_Type type; /* type of the iota */
- Eiotas_Iota *spin; /* top level iota which is a Eiota_Spin */
- Eiotas_Iota *parent; /* direct parent in the hierarchy */
- Eina_Stringshare *name; /* iota's name */
- Eina_Stringshare *path; /* full path to this iota */
+ Eiotas_Type type; /* type of the iota */
+ Eiotas_Iota *spin; /* top level iota which is a Eiotas_Spin */
+ Eiotas_Iota *parent; /* direct parent in the hierarchy */
+ Eina_Stringshare *name; /* iota's name */
+ Eina_Stringshare *path; /* full path to this iota */
};
EAPI void eiotas_iota_show(Eiotas_Iota *iota);
diff --git a/src/include/eiotas_room.h b/src/include/eiotas_room.h
index 1b2bc2c..877a91c 100644
--- a/src/include/eiotas_room.h
+++ b/src/include/eiotas_room.h
@@ -26,9 +26,9 @@
typedef struct _Eiotas_Room Eiotas_Room;
struct _Eiotas_Room {
- Eiotas_Iota iota; /* structural info */
- Eina_Hash *links; /* TODO */
- Eina_Hash *children; /* stringshared values optimized hash table holding Rooms, Doors and Boards */
+ Eiotas_Iota iota; /* structural info */
+ Eina_Hash *links; /* TODO */
+ Eina_Hash *children; /* stringshared values optimized hash table holding Rooms, Doors and Boards */
};
void eiotas_room_free(Eiotas_Room *room);
diff --git a/src/include/eiotas_spin.h b/src/include/eiotas_spin.h
index 7b5b2d3..326164c 100644
--- a/src/include/eiotas_spin.h
+++ b/src/include/eiotas_spin.h
@@ -28,10 +28,10 @@
typedef struct _Eiotas_Spin Eiotas_Spin;
struct _Eiotas_Spin {
- Eiotas_Room room; /* higher level Room */
- Eina_Array *free_particles; /* lifo of free to reuse Particles TODO support different particle types, use an Eina_Hash */
- Eina_Array *app_fifo; /* fifo of application priority particles */
- Eina_Array *sys_fifo; /* fifo of system priority particles */
+ Eiotas_Room room; /* higher level Room */
+ Eina_Array *free_particles; /* lifo of free to reuse Particles TODO support different particle types, use an Eina_Hash */
+ Eina_Array *app_fifo; /* fifo of application priority particles */
+ Eina_Array *sys_fifo; /* fifo of system priority particles */
};
EAPI void eiotas_spin_free(Eiotas_Spin *spin);
diff --git a/src/include/eiotas_userbits.h b/src/include/eiotas_userbits.h
index e0405d9..4e33d1e 100644
--- a/src/include/eiotas_userbits.h
+++ b/src/include/eiotas_userbits.h
@@ -25,21 +25,27 @@
typedef struct _Eiotas_User_Bits Eiotas_User_Bits;
typedef void Eiotas_User_Data;
-typedef void (*Eiotas_User_Data_Free)(Eiotas_User_Data*);
-typedef void (*Eiotas_Receive_Particle)(Eiotas_Iota *iota, Eiotas_Particle *particle, Eiotas_User_Data *data);
-typedef void (*Eiotas_Start)(Eiotas_Iota *iota, Eiotas_User_Data *data);
-typedef void (*Eiotas_Suspend)(Eiotas_Iota *iota, Eiotas_User_Data *data);
-typedef void (*Eiotas_Resume)(Eiotas_Iota *iota, Eiotas_User_Data *data);
-typedef void (*Eiotas_Stop)(Eiotas_Iota *iota, Eiotas_User_Data *data);
+
+typedef void (*Eiotas_User_Data_Free) (Eiotas_User_Data*);
+
+typedef void (*Eiotas_Receive_Particle) (Eiotas_Iota *iota, Eiotas_Particle *particle, Eiotas_User_Data *data);
+
+typedef void (*Eiotas_Init) (Eiotas_Iota *iota, Eiotas_User_Data *data);
+
+typedef void (*Eiotas_Shutdown) (Eiotas_Iota *iota, Eiotas_User_Data *data);
+
+typedef void (*Eiotas_Suspend) (Eiotas_Iota *iota, Eiotas_User_Data *data);
+
+typedef void (*Eiotas_Resume) (Eiotas_Iota *iota, Eiotas_User_Data *data);
struct _Eiotas_User_Bits {
- Eiotas_User_Data *data;
- Eiotas_User_Data_Free free_fct;
- Eiotas_Receive_Particle recv_fct;
- Eiotas_Start start_fct;
- Eiotas_Stop stop_fct;
- Eiotas_Suspend suspend_fct;
- Eiotas_Resume resume_fct;
+ Eiotas_User_Data *data; /* user data */
+ Eiotas_User_Data_Free free_fct; /* to free user data */
+ Eiotas_Receive_Particle recv_fct; /* to receive and process a particle */
+ Eiotas_Init init_fct; /* to initialize user data on system init */
+ Eiotas_Shutdown shutdown_fct; /* to finalize user data on system shutdown */
+ Eiotas_Suspend suspend_fct; /* to serialize user data on system shutdown */
+ Eiotas_Resume resume_fct; /* to deserialize data on system resume */
};
#endif // __EIOTAS_USERBITS_H__