author | Mikael Berthe <mikael@lilotux.net> |
Sat, 03 Dec 2005 23:40:40 +0100 | |
changeset 572 | afc2bd38b15c |
parent 568 | eb1df2371581 |
child 576 | 8b3db0b555a1 |
permissions | -rw-r--r-- |
29 | 1 |
#ifndef __JABGLUE_H__ |
2 |
#define __JABGLUE_H__ 1 |
|
3 |
||
159 | 4 |
#include <glib.h> |
5 |
||
572
afc2bd38b15c
Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents:
568
diff
changeset
|
6 |
#include "roster.h" |
29 | 7 |
#include "../libjabber/jabber.h" |
8 |
||
237 | 9 |
#if HAVE_CONFIG_H |
10 |
# include <config.h> |
|
11 |
#endif |
|
12 |
||
13 |
#if ! HAVE_DECL_STRPTIME |
|
14 |
extern char *strptime (); |
|
15 |
#endif |
|
16 |
||
29 | 17 |
extern jconn jc; |
18 |
||
46 | 19 |
extern char imstatus2char[]; |
277
4d7040cff8ee
Remove busy/occupied status, which does not really exist
Mikael Berthe <mikael@lilotux.net>
parents:
272
diff
changeset
|
20 |
// Status chars: '_', 'o', 'i', 'f', 'd', 'n', 'a' |
46 | 21 |
|
37 | 22 |
enum agtype { |
23 |
unknown, |
|
24 |
groupchat, |
|
25 |
transport, |
|
26 |
search |
|
27 |
}; |
|
28 |
||
298
35cda94e570d
Add /connect and /disconnect commands
Mikael Berthe <mikael@lilotux.net>
parents:
294
diff
changeset
|
29 |
char *compose_jid(const char *username, const char *servername, |
35cda94e570d
Add /connect and /disconnect commands
Mikael Berthe <mikael@lilotux.net>
parents:
294
diff
changeset
|
30 |
const char *resource); |
403
17aa60c6dc63
Allow a different server name than the jid domain name
Mikael Berthe <mikael@lilotux.net>
parents:
300
diff
changeset
|
31 |
jconn jb_connect(const char *jid, const char *server, unsigned int port, |
17aa60c6dc63
Allow a different server name than the jid domain name
Mikael Berthe <mikael@lilotux.net>
parents:
300
diff
changeset
|
32 |
int ssl, const char *pass); |
472
75442262c082
Disable some commands when not connected
Mikael Berthe <mikael@lilotux.net>
parents:
469
diff
changeset
|
33 |
inline unsigned char jb_getonline(void); |
29 | 34 |
void jb_disconnect(void); |
35 |
void jb_main(); |
|
244 | 36 |
void jb_addbuddy(const char *jid, const char *name, const char *group); |
205 | 37 |
void jb_delbuddy(const char *jid); |
208 | 38 |
void jb_updatebuddy(const char *jid, const char *name, const char *group); |
116 | 39 |
inline enum imstatus jb_getstatus(); |
519
5c338d31de56
Show current global status message in "/status"
Mikael Berthe <mikael@lilotux.net>
parents:
486
diff
changeset
|
40 |
inline const char *jb_getstatusmsg(); |
444 | 41 |
void jb_setstatus(enum imstatus st, const char *recipient, const char *msg); |
475
fa49ac0bb8f3
Add "/room topic", and display topic changes
Mikael Berthe <mikael@lilotux.net>
parents:
472
diff
changeset
|
42 |
void jb_send_msg(const char *jid, const char *text, int type, |
fa49ac0bb8f3
Add "/room topic", and display topic changes
Mikael Berthe <mikael@lilotux.net>
parents:
472
diff
changeset
|
43 |
const char *subject); |
436 | 44 |
void jb_send_raw(const char *str); |
112 | 45 |
void jb_keepalive(); |
46 |
inline void jb_reset_keepalive(); |
|
47 |
void jb_set_keepalive_delay(unsigned int delay); |
|
469
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
449
diff
changeset
|
48 |
void jb_room_join(const char *room, const char *nickname); |
449 | 49 |
void jb_room_unlock(const char *room); |
486 | 50 |
void jb_room_invite(const char *room, const char *jid, const char *reason); |
572
afc2bd38b15c
Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents:
568
diff
changeset
|
51 |
int jb_room_setaffil(const char *roomid, const char *jid, const char *nick, |
afc2bd38b15c
Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents:
568
diff
changeset
|
52 |
enum imaffiliation, const char *reason); |
29 | 53 |
|
54 |
#endif /* __JABGLUE_H__ */ |