[/trunk] Changeset 51 by mikael
Work on libjabber integration. This is a big patch...
* Remove socket.[ch] server.[ch]
We have now fully switched to libjabber.
* Roster is fetched, and buddies are added to the buddylist
* Can send/receive messages using libjabber
* Presence messages are handled. I have added statuses, as there only were
online / offline statuses.
* Use halfdelay to have a non-blocking getch().
And use a timeout in jb_main().
* Use utf8_{encode,decode}
#ifndef __JABGLUE_H__
#define __JABGLUE_H__ 1
#include "../libjabber/jabber.h"
extern jconn jc;
enum imstatus {
offline = 0,
available,
invisible,
freeforchat,
dontdisturb,
occupied,
notavail,
away,
imstatus_size
};
static char imstatus2char[imstatus_size] = {
'_', 'o', 'i', 'f', 'd', 'c', 'n', 'a'
};
jconn jb_connect(const char *jid, unsigned int port, int ssl, const char *pass);
void jb_disconnect(void);
void jb_keepalive();
void jb_main();
void jb_send_msg(const char *, const char *);
#endif /* __JABGLUE_H__ */