2004-06-08 23:54:24 +00:00
|
|
|
#ifndef fooclienthfoo
|
|
|
|
|
#define fooclienthfoo
|
|
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
|
|
struct client {
|
|
|
|
|
uint32_t index;
|
2004-06-15 17:05:03 +00:00
|
|
|
|
|
|
|
|
char *name;
|
|
|
|
|
struct core *core;
|
2004-06-08 23:54:24 +00:00
|
|
|
const char *protocol_name;
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void (*kill)(struct client *c);
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void *userdata;
|
2004-06-08 23:54:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct client *client_new(struct core *c, const char *protocol_name, char *name);
|
2004-06-14 20:30:50 +00:00
|
|
|
|
|
|
|
|
/* This function should be called only by the code that created the client */
|
2004-06-08 23:54:24 +00:00
|
|
|
void client_free(struct client *c);
|
|
|
|
|
|
2004-06-14 20:30:50 +00:00
|
|
|
/* Code that didn't create the client should call this function to
|
|
|
|
|
* request destruction of the client */
|
|
|
|
|
void client_kill(struct client *c);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#endif
|