Chat-O-Matic/libs/libimcomm/protos.h

110 lines
6.8 KiB
C

#ifdef __cplusplus
extern "C" {
#endif
IMCOMM_RET imcomm_im_signon(void *handle, const char *sn, const char *pw);
IMCOMM_RET bos_signon_phase2(void *handle, unsigned const char *server, unsigned const char *cookie, uint16_t cookie_len);
void handle_srv_migration(void *handle, uint8_t * data, uint16_t len);
void bos_md5snac(void *handle, uint8_t * data, uint16_t len);
IMCOMM_RET flap_send(void *handle, uint8_t channel, unsigned char *packet, size_t len, int updateidle);
struct MultiPacket *MultiPktInit(void);
void MultiPktFree(struct MultiPacket * h);
void flap_addToMulti(struct MultiPacket * mpkt, uint8_t channel, unsigned char *packet, size_t len, int updateidle);
IMCOMM_RET flap_sendMulti(void *handle, struct MultiPacket * pktlist);
IMCOMM_RET flap_sendAct(void *handle, uint8_t channel, unsigned char *packet, size_t len, int updateidle);
IMCOMM_RET flap_sendnext(void *handle);
IMCOMM_RET flap_sendpkt(void *handle, uint8_t channel, pkt_t * pkt, int updateidle);
IMCOMM_RET flap_decode(void *handle, unsigned char *header, unsigned char *data);
void *imcomm_create_handle(void);
int imcomm_delete_handle_now(void *vhandle);
int imcomm_delete_handle(void *vhandle);
int imcomm_delete_handle_only(void *vhandle);
void imcomm_delete_buddylist(struct IMComm_BuddyList * buddylist);
void imcomm_delete_familieslist(struct IMComm_Families * families);
void imcomm_set_oscar_port(void *handle, uint16_t port);
void *imcomm_create_child_handle(void *parent);
void remove_deleted_handles(void);
void imcomm_set_proxy(void *handle, int type, char *proxyserver, uint16_t proxyport);
void imcomm_register_callback(void *handle, int event, void (*ptr) ());
IMCOMM_RET imcomm_select(int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout);
int imcomm_internal_add_buddy(void *handle, char *sn, const unsigned long idletime, const unsigned long onlinetime, int isaway);
void imcomm_update_buddy_times(void *handle, const char *sn, int type, unsigned long value);
void imcomm_update_buddy_away(void *handle, const char *sn, int isaway);
void imcomm_internal_delete_buddy(void *handle, const char *sn);
char *imcomm_simplify_sn(const char *sn);
void imcomm_set_idle_time(void *handle, uint32_t idlesecs);
void imcomm_set_profile(void *handle, char *profile);
void imcomm_set_invisible(void *handle, int inv);
void imcomm_set_away(void *handle, char *msg);
void imcomm_set_unaway(void *handle);
int imcomm_compare_nicks(void *handle, const char *s1, const char *s2);
uint16_t imcomm_get_max_message_size(void *handle);
int getbyteorder(void);
pkt_t *pkt_init(size_t len);
void pkt_zero(pkt_t * pkt);
void pkt_free(pkt_t * pkt);
void pkt_freeP(pkt_t * pkt);
pkt_t *pkt_initP(uint8_t * data, uint16_t len);
size_t pkt_empty(pkt_t * pkt);
size_t pkt_getoffset(pkt_t * pkt);
void pkt_skip(pkt_t * pkt, size_t skipnum);
void pkt_setoffset(pkt_t * pkt, size_t offset);
int pkt_end(pkt_t * pkt);
IMCOMM_RET pkt_add8(pkt_t * pkt, uint8_t data);
IMCOMM_RET pkt_add16(pkt_t * pkt, uint16_t val);
IMCOMM_RET pkt_add32(pkt_t * pkt, uint32_t val);
IMCOMM_RET pkt_addraw(pkt_t * pkt, uint8_t * data, size_t len);
uint8_t pkt_get8(pkt_t * pkt);
uint16_t pkt_get16(pkt_t * pkt);
uint32_t pkt_get32(pkt_t * pkt);
uint8_t *pkt_getraw(pkt_t * pkt, size_t len);
uint8_t *pkt_getstr(pkt_t * pkt, size_t len);
void pkt_dump(pkt_t * pkt);
int connect_socks5(void *handle, char *host, uint16_t port);
int connect_https(void *handle, char *host, uint16_t port);
IMCOMM_RET snac_decode(void *handle, uint8_t * data, uint16_t len);
void snac_addToMulti(void *handle, struct MultiPacket * mpkt, uint16_t family, uint16_t subtype, unsigned char *data, uint16_t len, int updateidle);
IMCOMM_RET snac_send(void *handle, uint16_t family, uint16_t subtype, unsigned char *data, uint16_t len, int updateidle);
IMCOMM_RET snac_sendpkt(void *handle, uint8_t family, uint8_t subtype, pkt_t * pkt, int updateidle);
IMCOMM_RET snac_send_versions(void *handle);
IMCOMM_RET snac_request_limits(void *handle);
IMCOMM_RET snac_ack_srv_pause(void *handle, uint8_t * data, size_t len);
IMCOMM_RET snac_get_srv_families(void *handle, uint8_t * data, size_t len);
IMCOMM_RET snac_ack_limits(void *handle, unsigned char *data, size_t len);
IMCOMM_RET snac_multireq(void *handle);
IMCOMM_RET snac_get_privacy_rights(void *handle, uint8_t * data, uint16_t len);
IMCOMM_RET snac_set_location_info(void *handle);
IMCOMM_RET snac_send_icbm_params(void *handle, uint16_t channel, uint16_t max_msg_size);
IMCOMM_RET snac_ssi_activate(void *handle);
IMCOMM_RET snac_ssi_get_list(void *handle, uint8_t * data, uint16_t len);
IMCOMM_RET snac_send_cli_update(void *handle);
IMCOMM_RET multi_ssiact_cliready(void *handle);
IMCOMM_RET snac_send_cli_ready(void *handle);
size_t count_tlv(unsigned char *data, size_t len);
size_t count_tlv_pkt(pkt_t * tp);
TLVLIST *tlv_split(unsigned char *data, size_t len, size_t numtlv);
void clear_tlv_list(TLVLIST * tlvlist);
uint32_t four_to_32(unsigned char *value);
uint16_t two_to_16(unsigned char *value);
IMCOMM_RET snac_get_incoming_im(void *handle, uint8_t * data, uint16_t len);
IMCOMM_RET snac_get_signoff(void *handle, uint8_t * data, uint16_t len);
IMCOMM_RET snac_get_signon(void *handle, uint8_t * data, uint16_t len);
void snac_get_user_info(void *handle, uint8_t * data, uint16_t len);
void imcomm_im_send_message(void *handle, const char *whom, const char *msg, int automsg);
void imcomm_request_awayprofile(void *handle, char *sn);
void imcomm_request_profile(void *handle, char *sn);
void imcomm_request_awaymsg(void *handle, char *sn);
void imcomm_request_massawaymsg(void *handle, char **sns, int num);
void imcomm_addtobuddylist(void *handle, char *sn, uint16_t id, uint16_t group_id);
uint16_t imcomm_get_next_id(void *handle);
void imcomm_im_add_buddy(void *handle, char *sn);
void imcomm_im_remove_buddy(void *handle, const char *sn);
void snac_request_new_service(void *handle, uint16_t service);
void snac_new_subconnection(void *handle, unsigned char *data, uint16_t len);
void imcomm_upload_icon(void *handle, uint8_t * data, uint16_t icon_len);
void snac_finish_buddy_icon(void *handle);
#ifdef __cplusplus
}
#endif