src/protocols/gg/lib/libgadu.h

changeset 11546
acb5676e57bb
parent 11360
b77fd5a8959a
child 12007
bf1190509b70
equal deleted inserted replaced
11545:df2f9bb3fd6e 11546:acb5676e57bb
1 /* $Id: libgadu.h 13582 2005-08-28 22:46:01Z boler $ */ 1 /* $Id: libgadu.h 13801 2005-09-14 19:10:39Z datallah $ */
2 2
3 /* 3 /*
4 * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl> 4 * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl>
5 * Robert J. Woźny <speedy@ziew.org> 5 * Robert J. Woźny <speedy@ziew.org>
6 * Arkadiusz Miśkiewicz <arekm@pld-linux.org> 6 * Arkadiusz Miśkiewicz <arekm@pld-linux.org>
25 25
26 #ifndef __GG_LIBGADU_H 26 #ifndef __GG_LIBGADU_H
27 #define __GG_LIBGADU_H 27 #define __GG_LIBGADU_H
28 28
29 #ifdef __cplusplus 29 #ifdef __cplusplus
30 #ifdef _WIN32 30 #ifdef _MSC_VER
31 #pragma pack(push, 1) 31 #pragma pack(push, 1)
32 #endif 32 #endif
33 extern "C" { 33 extern "C" {
34 #endif 34 #endif
35 35
96 uint32_t client_addr; /* adres klienta */ 96 uint32_t client_addr; /* adres klienta */
97 uint16_t client_port; /* port, na którym klient słucha */ 97 uint16_t client_port; /* port, na którym klient słucha */
98 98
99 uint32_t external_addr; /* adres zewnetrzny klienta */ 99 uint32_t external_addr; /* adres zewnetrzny klienta */
100 uint16_t external_port; /* port zewnetrzny klienta */ 100 uint16_t external_port; /* port zewnetrzny klienta */
101 101
102 uin_t uin; /* numerek klienta */ 102 uin_t uin; /* numerek klienta */
103 char *password; /* i jego hasło. zwalniane automagicznie */ 103 char *password; /* i jego hasło. zwalniane automagicznie */
104 104
105 int initial_status; /* początkowy stan klienta */ 105 int initial_status; /* początkowy stan klienta */
106 int status; /* aktualny stan klienta */ 106 int status; /* aktualny stan klienta */
107 107
108 char *recv_buf; /* bufor na otrzymywane pakiety */ 108 char *recv_buf; /* bufor na otrzymywane pakiety */
109 int recv_done; /* ile już wczytano do bufora */ 109 int recv_done; /* ile już wczytano do bufora */
137 struct gg_image_queue *images; /* aktualnie wczytywane obrazki */ 137 struct gg_image_queue *images; /* aktualnie wczytywane obrazki */
138 }; 138 };
139 139
140 /* 140 /*
141 * struct gg_http 141 * struct gg_http
142 * 142 *
143 * ogólna struktura opisująca stan wszystkich operacji HTTP. tworzona 143 * ogólna struktura opisująca stan wszystkich operacji HTTP. tworzona
144 * przez gg_http_connect(), zwalniana przez gg_http_free(). 144 * przez gg_http_connect(), zwalniana przez gg_http_free().
145 */ 145 */
146 struct gg_http { 146 struct gg_http {
147 gg_common_head(struct gg_http) 147 gg_common_head(struct gg_http)
173 173
174 #define GG_MAX_PATH 276 174 #define GG_MAX_PATH 276
175 175
176 /* 176 /*
177 * struct gg_file_info 177 * struct gg_file_info
178 * 178 *
179 * odpowiednik windowsowej struktury WIN32_FIND_DATA niezbędnej przy 179 * odpowiednik windowsowej struktury WIN32_FIND_DATA niezbędnej przy
180 * wysyłaniu plików. 180 * wysyłaniu plików.
181 */ 181 */
182 struct gg_file_info { 182 struct gg_file_info {
183 uint32_t mode; /* dwFileAttributes */ 183 uint32_t mode; /* dwFileAttributes */
192 unsigned char short_filename[14]; /* cAlternateFileName */ 192 unsigned char short_filename[14]; /* cAlternateFileName */
193 } GG_PACKED; 193 } GG_PACKED;
194 194
195 /* 195 /*
196 * struct gg_dcc 196 * struct gg_dcc
197 * 197 *
198 * struktura opisująca nasłuchujące gniazdo połączeń między klientami. 198 * struktura opisująca nasłuchujące gniazdo połączeń między klientami.
199 * tworzona przez gg_dcc_socket_create(), zwalniana przez gg_dcc_free(). 199 * tworzona przez gg_dcc_socket_create(), zwalniana przez gg_dcc_free().
200 */ 200 */
201 struct gg_dcc { 201 struct gg_dcc {
202 gg_common_head(struct gg_dcc) 202 gg_common_head(struct gg_dcc)
242 GG_SESSION_USERLIST_GET, /* pobieranie userlisty */ 242 GG_SESSION_USERLIST_GET, /* pobieranie userlisty */
243 GG_SESSION_USERLIST_PUT, /* wysyłanie userlisty */ 243 GG_SESSION_USERLIST_PUT, /* wysyłanie userlisty */
244 GG_SESSION_UNREGISTER, /* usuwanie konta */ 244 GG_SESSION_UNREGISTER, /* usuwanie konta */
245 GG_SESSION_USERLIST_REMOVE, /* usuwanie userlisty */ 245 GG_SESSION_USERLIST_REMOVE, /* usuwanie userlisty */
246 GG_SESSION_TOKEN, /* pobieranie tokenu */ 246 GG_SESSION_TOKEN, /* pobieranie tokenu */
247 247
248 GG_SESSION_USER0 = 256, /* zdefiniowana dla użytkownika */ 248 GG_SESSION_USER0 = 256, /* zdefiniowana dla użytkownika */
249 GG_SESSION_USER1, /* j.w. */ 249 GG_SESSION_USER1, /* j.w. */
250 GG_SESSION_USER2, /* j.w. */ 250 GG_SESSION_USER2, /* j.w. */
251 GG_SESSION_USER3, /* j.w. */ 251 GG_SESSION_USER3, /* j.w. */
252 GG_SESSION_USER4, /* j.w. */ 252 GG_SESSION_USER4, /* j.w. */
347 int tls; /* czy łączymy po TLS? */ 347 int tls; /* czy łączymy po TLS? */
348 int image_size; /* maksymalny rozmiar obrazka w KiB */ 348 int image_size; /* maksymalny rozmiar obrazka w KiB */
349 int era_omnix; /* czy udawać klienta era omnix? */ 349 int era_omnix; /* czy udawać klienta era omnix? */
350 350
351 char dummy[6 * sizeof(int)]; /* miejsce na kolejnych 6 zmiennych, 351 char dummy[6 * sizeof(int)]; /* miejsce na kolejnych 6 zmiennych,
352 * żeby z dodaniem parametru nie 352 * żeby z dodaniem parametru nie
353 * zmieniał się rozmiar struktury */ 353 * zmieniał się rozmiar struktury */
354 }; 354 };
355 355
356 struct gg_session *gg_login(const struct gg_login_params *p); 356 struct gg_session *gg_login(const struct gg_login_params *p);
357 void gg_free_session(struct gg_session *sess); 357 void gg_free_session(struct gg_session *sess);
501 struct gg_notify_reply *notify; /* informacje o liście kontaktów -- GG_EVENT_NOTIFY */ 501 struct gg_notify_reply *notify; /* informacje o liście kontaktów -- GG_EVENT_NOTIFY */
502 502
503 enum gg_failure_t failure; /* błąd połączenia -- GG_EVENT_FAILURE */ 503 enum gg_failure_t failure; /* błąd połączenia -- GG_EVENT_FAILURE */
504 504
505 struct gg_dcc *dcc_new; /* nowe połączenie bezpośrednie -- GG_EVENT_DCC_NEW */ 505 struct gg_dcc *dcc_new; /* nowe połączenie bezpośrednie -- GG_EVENT_DCC_NEW */
506 506
507 int dcc_error; /* błąd połączenia bezpośredniego -- GG_EVENT_DCC_ERROR */ 507 int dcc_error; /* błąd połączenia bezpośredniego -- GG_EVENT_DCC_ERROR */
508 508
509 gg_pubdir50_t pubdir50; /* wynik operacji związanej z katalogiem publicznym -- GG_EVENT_PUBDIR50_* */ 509 gg_pubdir50_t pubdir50; /* wynik operacji związanej z katalogiem publicznym -- GG_EVENT_PUBDIR50_* */
510 510
511 struct { /* @msg odebrano wiadomość -- GG_EVENT_MSG */ 511 struct { /* @msg odebrano wiadomość -- GG_EVENT_MSG */
512 uin_t sender; /* numer nadawcy */ 512 uin_t sender; /* numer nadawcy */
513 int msgclass; /* klasa wiadomości */ 513 int msgclass; /* klasa wiadomości */
514 time_t time; /* czas nadania */ 514 time_t time; /* czas nadania */
515 unsigned char *message; /* treść wiadomości */ 515 unsigned char *message; /* treść wiadomości */
516 516
517 int recipients_count; /* ilość odbiorców konferencji */ 517 int recipients_count; /* ilość odbiorców konferencji */
518 uin_t *recipients; /* odbiorcy konferencji */ 518 uin_t *recipients; /* odbiorcy konferencji */
519 519
520 int formats_length; /* długość informacji o formatowaniu tekstu */ 520 int formats_length; /* długość informacji o formatowaniu tekstu */
521 void *formats; /* informacje o formatowaniu tekstu */ 521 void *formats; /* informacje o formatowaniu tekstu */
522 } msg; 522 } msg;
523 523
524 struct { /* @notify_descr informacje o liście kontaktów z opisami stanu -- GG_EVENT_NOTIFY_DESCR */ 524 struct { /* @notify_descr informacje o liście kontaktów z opisami stanu -- GG_EVENT_NOTIFY_DESCR */
525 struct gg_notify_reply *notify; /* informacje o liście kontaktów */ 525 struct gg_notify_reply *notify; /* informacje o liście kontaktów */
526 char *descr; /* opis stanu */ 526 char *descr; /* opis stanu */
527 } notify_descr; 527 } notify_descr;
528 528
529 struct { /* @status zmiana stanu -- GG_EVENT_STATUS */ 529 struct { /* @status zmiana stanu -- GG_EVENT_STATUS */
530 uin_t uin; /* numer */ 530 uin_t uin; /* numer */
531 uint32_t status; /* nowy stan */ 531 uint32_t status; /* nowy stan */
532 char *descr; /* opis stanu */ 532 char *descr; /* opis stanu */
533 } status; 533 } status;
551 int version; /* wersja klienta */ 551 int version; /* wersja klienta */
552 int image_size; /* maksymalny rozmiar grafiki w KiB */ 552 int image_size; /* maksymalny rozmiar grafiki w KiB */
553 char *descr; /* opis stanu */ 553 char *descr; /* opis stanu */
554 time_t time; /* czas powrotu */ 554 time_t time; /* czas powrotu */
555 } *notify60; 555 } *notify60;
556 556
557 struct { /* @ack potwierdzenie wiadomości -- GG_EVENT_ACK */ 557 struct { /* @ack potwierdzenie wiadomości -- GG_EVENT_ACK */
558 uin_t recipient; /* numer odbiorcy */ 558 uin_t recipient; /* numer odbiorcy */
559 int status; /* stan doręczenia wiadomości */ 559 int status; /* stan doręczenia wiadomości */
560 int seq; /* numer sekwencyjny wiadomości */ 560 int seq; /* numer sekwencyjny wiadomości */
561 } ack; 561 } ack;
758 #define gg_change_passwd_free gg_pubdir_free 758 #define gg_change_passwd_free gg_pubdir_free
759 #define gg_free_change_passwd gg_pubdir_free 759 #define gg_free_change_passwd gg_pubdir_free
760 760
761 /* 761 /*
762 * struct gg_change_info_request 762 * struct gg_change_info_request
763 * 763 *
764 * opis żądania zmiany informacji w katalogu publicznym. 764 * opis żądania zmiany informacji w katalogu publicznym.
765 */ 765 */
766 struct gg_change_info_request { 766 struct gg_change_info_request {
767 char *first_name; /* imię */ 767 char *first_name; /* imię */
768 char *last_name; /* nazwisko */ 768 char *last_name; /* nazwisko */
833 */ 833 */
834 extern int gg_debug_level; /* poziom debugowania. mapa bitowa stałych GG_DEBUG_* */ 834 extern int gg_debug_level; /* poziom debugowania. mapa bitowa stałych GG_DEBUG_* */
835 835
836 /* 836 /*
837 * można podać wskaźnik do funkcji obsługującej wywołania gg_debug(). 837 * można podać wskaźnik do funkcji obsługującej wywołania gg_debug().
838 * nieoficjalne, nieudokumentowane, może się zmienić. jeśli ktoś jest 838 * nieoficjalne, nieudokumentowane, może się zmienić. jeśli ktoś jest
839 * zainteresowany, niech da znać na ekg-devel. 839 * zainteresowany, niech da znać na ekg-devel.
840 */ 840 */
841 extern void (*gg_debug_handler)(int level, const char *format, va_list ap); 841 extern void (*gg_debug_handler)(int level, const char *format, va_list ap);
842 842
843 /* 843 /*
868 extern char *gg_proxy_username; /* określa nazwę użytkownika przy autoryzacji serwera proxy */ 868 extern char *gg_proxy_username; /* określa nazwę użytkownika przy autoryzacji serwera proxy */
869 extern char *gg_proxy_password; /* określa hasło użytkownika przy autoryzacji serwera proxy */ 869 extern char *gg_proxy_password; /* określa hasło użytkownika przy autoryzacji serwera proxy */
870 extern int gg_proxy_http_only; /* włącza obsługę proxy wyłącznie dla usług HTTP */ 870 extern int gg_proxy_http_only; /* włącza obsługę proxy wyłącznie dla usług HTTP */
871 871
872 872
873 /* 873 /*
874 * adres, z którego ślemy pakiety (np łączymy się z serwerem) 874 * adres, z którego ślemy pakiety (np łączymy się z serwerem)
875 * używany przy gg_connect() 875 * używany przy gg_connect()
876 */ 876 */
877 extern unsigned long gg_local_ip; 877 extern unsigned long gg_local_ip;
878 /* 878 /*
879 * ------------------------------------------------------------------------- 879 * -------------------------------------------------------------------------
880 * poniżej znajdują się wewnętrzne sprawy biblioteki. zwykły klient nie 880 * poniżej znajdują się wewnętrzne sprawy biblioteki. zwykły klient nie
881 * powinien ich w ogóle ruszać, bo i nie ma po co. wszystko można załatwić 881 * powinien ich w ogóle ruszać, bo i nie ma po co. wszystko można załatwić
882 * procedurami wyższego poziomu, których definicje znajdują się na początku 882 * procedurami wyższego poziomu, których definicje znajdują się na początku
884 * ------------------------------------------------------------------------- 884 * -------------------------------------------------------------------------
885 */ 885 */
886 886
887 #ifdef __GG_LIBGADU_HAVE_PTHREAD 887 #ifdef __GG_LIBGADU_HAVE_PTHREAD
888 int gg_resolve_pthread(int *fd, void **resolver, const char *hostname); 888 int gg_resolve_pthread(int *fd, void **resolver, const char *hostname);
889 #elif defined _WIN32
890 int gg_resolve_win32thread(int *fd, void **resolver, const char *hostname);
889 #endif 891 #endif
890 892
891 #ifdef _WIN32 893 #ifdef _WIN32
892 int gg_thread_socket(int thread_id, int socket); 894 int gg_thread_socket(int thread_id, int socket);
893 #endif 895 #endif
957 #define GG_NEED_EMAIL 0x0014 959 #define GG_NEED_EMAIL 0x0014
958 960
959 struct gg_welcome { 961 struct gg_welcome {
960 uint32_t key; /* klucz szyfrowania hasła */ 962 uint32_t key; /* klucz szyfrowania hasła */
961 } GG_PACKED; 963 } GG_PACKED;
962 964
963 #define GG_LOGIN 0x000c 965 #define GG_LOGIN 0x000c
964 966
965 struct gg_login { 967 struct gg_login {
966 uint32_t uin; /* mój numerek */ 968 uint32_t uin; /* mój numerek */
967 uint32_t hash; /* hash hasła */ 969 uint32_t hash; /* hash hasła */
1074 1076
1075 #define GG_NOTIFY_FIRST 0x000f 1077 #define GG_NOTIFY_FIRST 0x000f
1076 #define GG_NOTIFY_LAST 0x0010 1078 #define GG_NOTIFY_LAST 0x0010
1077 1079
1078 #define GG_NOTIFY 0x0010 1080 #define GG_NOTIFY 0x0010
1079 1081
1080 struct gg_notify { 1082 struct gg_notify {
1081 uint32_t uin; /* numerek danej osoby */ 1083 uint32_t uin; /* numerek danej osoby */
1082 uint8_t dunno1; /* rodzaj wpisu w liście */ 1084 uint8_t dunno1; /* rodzaj wpisu w liście */
1083 } GG_PACKED; 1085 } GG_PACKED;
1084 1086
1085 #define GG_USER_OFFLINE 0x01 /* będziemy niewidoczni dla użytkownika */ 1087 #define GG_USER_OFFLINE 0x01 /* będziemy niewidoczni dla użytkownika */
1086 #define GG_USER_NORMAL 0x03 /* zwykły użytkownik */ 1088 #define GG_USER_NORMAL 0x03 /* zwykły użytkownik */
1087 #define GG_USER_BLOCKED 0x04 /* zablokowany użytkownik */ 1089 #define GG_USER_BLOCKED 0x04 /* zablokowany użytkownik */
1088 1090
1089 #define GG_LIST_EMPTY 0x0012 1091 #define GG_LIST_EMPTY 0x0012
1090 1092
1091 #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */ 1093 #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */
1092 1094
1093 struct gg_notify_reply { 1095 struct gg_notify_reply {
1094 uint32_t uin; /* numerek */ 1096 uint32_t uin; /* numerek */
1095 uint32_t status; /* status danej osoby */ 1097 uint32_t status; /* status danej osoby */
1096 uint32_t remote_ip; /* adres ip delikwenta */ 1098 uint32_t remote_ip; /* adres ip delikwenta */
1097 uint16_t remote_port; /* port, na którym słucha klient */ 1099 uint16_t remote_port; /* port, na którym słucha klient */
1098 uint32_t version; /* wersja klienta */ 1100 uint32_t version; /* wersja klienta */
1099 uint16_t dunno2; /* znowu port? */ 1101 uint16_t dunno2; /* znowu port? */
1100 } GG_PACKED; 1102 } GG_PACKED;
1101 1103
1102 #define GG_NOTIFY_REPLY60 0x0011 1104 #define GG_NOTIFY_REPLY60 0x0011
1103 1105
1104 struct gg_notify_reply60 { 1106 struct gg_notify_reply60 {
1105 uint32_t uin; /* numerek plus flagi w MSB */ 1107 uint32_t uin; /* numerek plus flagi w MSB */
1106 uint8_t status; /* status danej osoby */ 1108 uint8_t status; /* status danej osoby */
1107 uint32_t remote_ip; /* adres ip delikwenta */ 1109 uint32_t remote_ip; /* adres ip delikwenta */
1108 uint16_t remote_port; /* port, na którym słucha klient */ 1110 uint16_t remote_port; /* port, na którym słucha klient */
1110 uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */ 1112 uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
1111 uint8_t dunno1; /* 0x00 */ 1113 uint8_t dunno1; /* 0x00 */
1112 } GG_PACKED; 1114 } GG_PACKED;
1113 1115
1114 #define GG_STATUS60 0x000f 1116 #define GG_STATUS60 0x000f
1115 1117
1116 struct gg_status60 { 1118 struct gg_status60 {
1117 uint32_t uin; /* numerek plus flagi w MSB */ 1119 uint32_t uin; /* numerek plus flagi w MSB */
1118 uint8_t status; /* status danej osoby */ 1120 uint8_t status; /* status danej osoby */
1119 uint32_t remote_ip; /* adres ip delikwenta */ 1121 uint32_t remote_ip; /* adres ip delikwenta */
1120 uint16_t remote_port; /* port, na którym słucha klient */ 1122 uint16_t remote_port; /* port, na którym słucha klient */
1123 uint8_t dunno1; /* 0x00 */ 1125 uint8_t dunno1; /* 0x00 */
1124 } GG_PACKED; 1126 } GG_PACKED;
1125 1127
1126 #define GG_ADD_NOTIFY 0x000d 1128 #define GG_ADD_NOTIFY 0x000d
1127 #define GG_REMOVE_NOTIFY 0x000e 1129 #define GG_REMOVE_NOTIFY 0x000e
1128 1130
1129 struct gg_add_remove { 1131 struct gg_add_remove {
1130 uint32_t uin; /* numerek */ 1132 uint32_t uin; /* numerek */
1131 uint8_t dunno1; /* bitmapa */ 1133 uint8_t dunno1; /* bitmapa */
1132 } GG_PACKED; 1134 } GG_PACKED;
1133 1135
1135 1137
1136 struct gg_status { 1138 struct gg_status {
1137 uint32_t uin; /* numerek */ 1139 uint32_t uin; /* numerek */
1138 uint32_t status; /* nowy stan */ 1140 uint32_t status; /* nowy stan */
1139 } GG_PACKED; 1141 } GG_PACKED;
1140 1142
1141 #define GG_SEND_MSG 0x000b 1143 #define GG_SEND_MSG 0x000b
1142 1144
1143 #define GG_CLASS_QUEUED 0x0001 1145 #define GG_CLASS_QUEUED 0x0001
1144 #define GG_CLASS_OFFLINE GG_CLASS_QUEUED 1146 #define GG_CLASS_OFFLINE GG_CLASS_QUEUED
1145 #define GG_CLASS_MSG 0x0004 1147 #define GG_CLASS_MSG 0x0004
1155 uint32_t seq; 1157 uint32_t seq;
1156 uint32_t msgclass; 1158 uint32_t msgclass;
1157 } GG_PACKED; 1159 } GG_PACKED;
1158 1160
1159 struct gg_msg_richtext { 1161 struct gg_msg_richtext {
1160 uint8_t flag; 1162 uint8_t flag;
1161 uint16_t length; 1163 uint16_t length;
1162 } GG_PACKED; 1164 } GG_PACKED;
1163 1165
1164 struct gg_msg_richtext_format { 1166 struct gg_msg_richtext_format {
1165 uint16_t position; 1167 uint16_t position;
1166 uint8_t font; 1168 uint8_t font;
1167 } GG_PACKED; 1169 } GG_PACKED;
1168 1170
1169 struct gg_msg_richtext_image { 1171 struct gg_msg_richtext_image {
1170 uint16_t unknown1; 1172 uint16_t unknown1;
1171 uint32_t size; 1173 uint32_t size;
1176 #define GG_FONT_ITALIC 0x02 1178 #define GG_FONT_ITALIC 0x02
1177 #define GG_FONT_UNDERLINE 0x04 1179 #define GG_FONT_UNDERLINE 0x04
1178 #define GG_FONT_COLOR 0x08 1180 #define GG_FONT_COLOR 0x08
1179 #define GG_FONT_IMAGE 0x80 1181 #define GG_FONT_IMAGE 0x80
1180 1182
1181 struct gg_msg_richtext_color { 1183 struct gg_msg_richtext_color {
1182 uint8_t red; 1184 uint8_t red;
1183 uint8_t green; 1185 uint8_t green;
1184 uint8_t blue; 1186 uint8_t blue;
1185 } GG_PACKED; 1187 } GG_PACKED;
1186 1188
1208 #define GG_ACK_BLOCKED 0x0001 1210 #define GG_ACK_BLOCKED 0x0001
1209 #define GG_ACK_DELIVERED 0x0002 1211 #define GG_ACK_DELIVERED 0x0002
1210 #define GG_ACK_QUEUED 0x0003 1212 #define GG_ACK_QUEUED 0x0003
1211 #define GG_ACK_MBOXFULL 0x0004 1213 #define GG_ACK_MBOXFULL 0x0004
1212 #define GG_ACK_NOT_DELIVERED 0x0006 1214 #define GG_ACK_NOT_DELIVERED 0x0006
1213 1215
1214 struct gg_send_msg_ack { 1216 struct gg_send_msg_ack {
1215 uint32_t status; 1217 uint32_t status;
1216 uint32_t recipient; 1218 uint32_t recipient;
1217 uint32_t seq; 1219 uint32_t seq;
1218 } GG_PACKED; 1220 } GG_PACKED;
1219 1221
1220 #define GG_RECV_MSG 0x000a 1222 #define GG_RECV_MSG 0x000a
1221 1223
1222 struct gg_recv_msg { 1224 struct gg_recv_msg {
1223 uint32_t sender; 1225 uint32_t sender;
1224 uint32_t seq; 1226 uint32_t seq;
1225 uint32_t time; 1227 uint32_t time;
1226 uint32_t msgclass; 1228 uint32_t msgclass;
1227 } GG_PACKED; 1229 } GG_PACKED;
1228 1230
1229 #define GG_PING 0x0008 1231 #define GG_PING 0x0008
1230 1232
1231 #define GG_PONG 0x0007 1233 #define GG_PONG 0x0007
1232 1234
1233 #define GG_DISCONNECTING 0x000b 1235 #define GG_DISCONNECTING 0x000b
1234 1236
1235 #define GG_USERLIST_REQUEST 0x0016 1237 #define GG_USERLIST_REQUEST 0x0016
1287 #define GG_DCC_TIMEOUT_GET 1800 /* 30 minut */ 1289 #define GG_DCC_TIMEOUT_GET 1800 /* 30 minut */
1288 #define GG_DCC_TIMEOUT_FILE_ACK 300 /* 5 minut */ 1290 #define GG_DCC_TIMEOUT_FILE_ACK 300 /* 5 minut */
1289 #define GG_DCC_TIMEOUT_VOICE_ACK 300 /* 5 minut */ 1291 #define GG_DCC_TIMEOUT_VOICE_ACK 300 /* 5 minut */
1290 1292
1291 #ifdef __cplusplus 1293 #ifdef __cplusplus
1292 } 1294 #ifdef _MSC_VER
1293 #ifdef _WIN32
1294 #pragma pack(pop) 1295 #pragma pack(pop)
1295 #endif 1296 #endif
1297 }
1296 #endif 1298 #endif
1297 1299
1298 #endif /* __GG_LIBGADU_H */ 1300 #endif /* __GG_LIBGADU_H */
1299 1301
1300 /* 1302 /*

mercurial