goinfre/libs/libevent/module.h

goinfre/libs/libevent/module.h

  _____________________________________________________________________________ 
 /   / Index / Goinfre / Resume / Links / Contact / Sitemap /    .: v0.6.1.0 |^|
|\__/-------+         +--------+-------+---------+---------+-----------------+#|
|  1| /goinfre/libs/libevent/module.h                                        |#|
|  2| ==========================================                             |#|
|  3|                                                                        |#|
|  4|                                                   [ raw ] [ download ] |#|
|  5|                                             ` `` ````````````````````` |#|
|  6|                                                                        |#|
|  7| /**                                                                    |#|
|  8|  * libevent/module.h                                                   |#|
|  9|  *                                                                     |#|
| 10|  * Copyright (c) Manfred Touron 2008                                   |#|
| 11|  */                                                                    |#|
| 12|                                                                        |#|
| 13| #ifndef LIBEVENT_MODULE_H                                              |#|
| 14| # define LIBEVENT_MODULE_H                                             |#|
| 15|                                                                        |#|
| 16| # include "common.h"                                                   |#|
| 17|                                                                        |#|
| 18| typedef struct                                                         |#|
| 19| {                                                                      |#|
| 20|   char                  *name;                                         |#|
| 21|   int                  (*init)(void);                                  |#|
| 22|   void                  (*uninit)(void);                               |#|
| 23|   int                  inited;                                         |#|
| 24| }                  t_module;                                           |#|
| 25|                                                                        |#|
| 26| # define EAH_PROTO      const char *, cllbck                           |#|
| 27|                                                                        | |
| 28| extern int      modules_init(t_module *);                              | |
| 29| extern void      modules_uninit(t_module *);                           | |
| 30| extern void      event_del_handler(EAH_PROTO);                         | |
| 31| extern void      event_add_handler(const char *, cllbck);              | |
| 32|                                                                        | |
| 33| extern t_module            client_static_modules[];                    | |
| 34|                                                                        | |
| 35| # define MODULES_INIT()            modules_init(client_static_modules) | |
| 36| # define MODULES_UNINIT()      modules_uninit(client_static_modules)   | |
| 37|                                                                        | |
| 38| #endif /* !LIBEVENT_MODULE_H */                                        | |
| 39|                                                                        | |
+---+                                                                        | |
\_   \______ mo5.so - normal - 1337.so - rev.so - video_r.so +---------------+ |
  |__       \_____   plain.so - color.so - comment.so       /  moul 2008 (c) |V|
     \-----\______\________________________________________/-----------------+-+