diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-23 12:01:08 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-23 12:01:08 +0200 |
commit | ea1ed4eea16de9da03db47e15d5e83456082ade0 (patch) | |
tree | 53e71d6ddfb74dd5ea66b2f878318c6650b78fb5 /src/include/eiotas_userbits.h | |
parent | 216fb6d612dadf33201af4935e52a1a1f99cfd58 (diff) | |
download | edoors-ea1ed4eea16de9da03db47e15d5e83456082ade0.zip edoors-ea1ed4eea16de9da03db47e15d5e83456082ade0.tar.gz |
cleanup structs
Diffstat (limited to 'src/include/eiotas_userbits.h')
-rw-r--r-- | src/include/eiotas_userbits.h | 32 |
1 files changed, 19 insertions, 13 deletions
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__ |