ekg2
|
00001 #ifndef __ICQ_SNAC_H 00002 #define __ICQ_SNAC_H 00003 00004 #include <stdint.h> 00005 00006 #include <ekg/sessions.h> 00007 #include <ekg/stuff.h> 00008 00009 #include "icq.h" 00010 00011 typedef struct { /* flap_packet_t->data ** if flap_packet_t->cmd == 0x02 */ 00012 uint16_t family; 00013 uint16_t cmd; 00014 uint16_t flags; 00015 uint32_t ref; 00016 unsigned char *data; 00017 } snac_packet_t; 00018 #define SNAC_PACKET_LEN 10 00019 00020 void icq_makesnac(session_t *s, string_t pkt, uint16_t fam, uint16_t cmd, private_data_t *data, snac_subhandler_t subhandler); 00021 void icq_makemetasnac(session_t *s, string_t pkt, uint16_t type, uint16_t subtype, private_data_t *data, snac_subhandler_t subhandler); 00022 00023 int icq_snac_handler(session_t *s, uint16_t family, uint16_t cmd, unsigned char *buf, int len, uint16_t flags, uint32_t ref_no); 00024 void icq_snac_error_handler(session_t *s, const char *from, uint16_t error); 00025 00026 void icq_snac_references_list_destroy(icq_snac_reference_list_t **lista); 00027 TIMER_SESSION(icq_snac_ref_list_cleanup); 00028 00029 SNAC_SUBHANDLER(icq_my_meta_information_response); 00030 SNAC_SUBHANDLER(icq_cmd_addssi_ack); 00031 void display_whoami(session_t *s); 00032 00033 void icq_pack_append_nullterm_msg(string_t pkt, const char *msg); 00034 void icq_pack_append_rendezvous(string_t pkt, int version, int cookie, int mtype, int mflags, int accept, int priority); 00035 00036 SNAC_HANDLER(icq_snac_service_handler); 00037 SNAC_HANDLER(icq_snac_location_handler); 00038 SNAC_HANDLER(icq_snac_buddy_handler); 00039 SNAC_HANDLER(icq_snac_message_handler); 00040 SNAC_HANDLER(icq_snac_bos_handler); 00041 SNAC_HANDLER(icq_snac_lookup_handler); 00042 SNAC_HANDLER(icq_snac_status_handler); 00043 SNAC_HANDLER(icq_snac_userlist_handler); 00044 SNAC_HANDLER(icq_snac_extension_handler); 00045 SNAC_HANDLER(icq_snac_sigon_handler); 00046 00047 #endif