2010-12-27 21:56:42 +00:00
|
|
|
#ifndef cmsg_node_h
|
|
|
|
#define cmsg_node_h
|
|
|
|
|
2010-12-29 23:12:38 +00:00
|
|
|
typedef struct node_t_ {
|
|
|
|
struct node_class_t_ *node_class;
|
2010-12-27 21:56:42 +00:00
|
|
|
cmsg_bytes_t name; /* used as (partial) routing key for metamessages */
|
2010-12-29 23:12:38 +00:00
|
|
|
} node_t;
|
2010-12-27 21:56:42 +00:00
|
|
|
|
2010-12-29 23:12:38 +00:00
|
|
|
typedef struct node_class_t_ {
|
|
|
|
void (*destroy)(node_t *n);
|
|
|
|
void (*handle_message)(node_t *n, msg_t *m);
|
|
|
|
} node_class_t;
|
|
|
|
|
|
|
|
extern node_t *new_node(
|
2010-12-27 21:56:42 +00:00
|
|
|
|
|
|
|
#endif
|