libchat6
libchat6.h
1 #ifndef LC6_LIBCHAT6_H
2 #define LC6_LIBCHAT6_H
3 
4 enum LIBCHAT_USER_STATUS {
5  LC6_STATUS_OFFLINE = 0,
6  LC6_STATUS_ONLINE,
7  LC6_STATUS_AWAY,
8  LC6_STATUS_TYPING
9 };
10 
11 enum LIBCHAT_EVENT_TYPE {
12  LIBCHAT_EVT_NETWORK,
13  LIBCHAT_EVT_FRIEND
14 };
15 
16 typedef struct LIBCHAT_EV_NETWORK {
17  char blah[1];
19 
20 typedef struct LIBCHAT_EV_FRIEND {
21  char blah[1];
23 
24 
25 typedef struct LIBCHAT_EVENT {
26  int event_type;
27  union {
28  LIBCHAT_EV_NETWORK ev_network;
29  LIBCHAT_EV_FRIEND ev_friend;
30  } event;
32 
33 typedef void *LIBCHAT;
34 typedef int(*LIBCHAT_CB)(LIBCHAT_EVENT*);
35 
36 LIBCHAT* libchat_init(char *path, unsigned char *password);
37 int libchat_event_reg(LIBCHAT *ctx, LIBCHAT_CB *cb);
38 int libchat_start(LIBCHAT *ctx);
39 int libchat_stop(LIBCHAT *ctx);
40 void libchat_free(LIBCHAT *ctx, unsigned char *password);
41 
42 #endif
Definition: libchat6.h:25
Definition: libchat6.h:20
Definition: libchat6.h:16