123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef LC6_LIBCHAT6_H
- #define LC6_LIBCHAT6_H
-
- enum LIBCHAT_USER_STATUS {
- LC6_STATUS_OFFLINE = 0,
- LC6_STATUS_ONLINE,
- LC6_STATUS_AWAY,
- LC6_STATUS_TYPING
- };
-
- enum LIBCHAT_EVENT_TYPE {
- LIBCHAT_EVT_NETWORK,
- LIBCHAT_EVT_FRIEND
- };
-
- typedef struct LIBCHAT_EV_NETWORK {
- char blah[1];
- } LIBCHAT_EV_NETWORK;
-
- typedef struct LIBCHAT_EV_FRIEND {
- char blah[1];
- } LIBCHAT_EV_FRIEND;
-
-
- typedef struct LIBCHAT_EVENT {
- int event_type;
- union {
- LIBCHAT_EV_NETWORK ev_network;
- LIBCHAT_EV_FRIEND ev_friend;
- } event;
- } LIBCHAT_EVENT;
-
- typedef void *LIBCHAT;
- typedef int(*LIBCHAT_CB)(LIBCHAT_EVENT*);
-
- LIBCHAT* libchat_init(char *path, unsigned char *password);
- int libchat_event_reg(LIBCHAT *ctx, LIBCHAT_CB *cb);
- int libchat_start(LIBCHAT *ctx);
- int libchat_stop(LIBCHAT *ctx);
- void libchat_free(LIBCHAT *ctx, unsigned char *password);
-
- #endif
|