annotate mcabber/server.h @ 0:b3b2332715fb

Tailorization of /trunk Import of the upstream sources from Repository: file:///tmp/svn-mcabber Module: /trunk Revision: 15
author tailor@frmp8452
date Thu, 30 Jun 2005 21:39:31 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
1 #ifndef __SERVER_H__
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
2 #define __SERVER_H__ 1
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
3
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
4 typedef enum {
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
5 SM_MESSAGE,
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
6 SM_PRESENCE,
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
7 SM_UNHANDLED
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
8 } SRV_MSGTYPE;
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
9
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
10 typedef struct {
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
11 SRV_MSGTYPE m; /* message type: see above! */
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
12 int connected; /* meaningful only with SM_PRESENCE */
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
13 char *from; /* sender */
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
14 char *body; /* meaningful only with SM_MESSAGE */
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
15 } srv_msg;
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
16
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
17 char *srv_poll(int sock);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
18 int srv_connect(const char *server, unsigned int port);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
19 char *srv_login(int sock, const char *server, const char *user,
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
20 const char *pass, const char *resource);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
21 int srv_setpresence(int sock, const char *type);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
22 char *srv_getroster(int sock);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
23 int srv_sendtext(int sock, const char *to, const char *text,
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
24 const char *from);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
25 int check_io(int fd1, int fd2);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
26 srv_msg *readserver(int sock);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
27 void srv_DelBuddy(int sock, char *jidname);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
28 void srv_AddBuddy(int sock, char *jidname);
b3b2332715fb Tailorization of /trunk
tailor@frmp8452
parents:
diff changeset
29 #endif