annotate src/protocols/gg/libgg.h @ 9478:0efa260e384f

[gaim-migrate @ 10303] " This patch adds the following features for zephyr, in order of usefulness :-) Protocol action (Retrieve subscriptions from server) to list user's subscriptions (chats) in a popup window. Typing notification - (both sending and receiving -- using zephyrs with opcode ping). Correct interpretation of %host% and %canon% entries in .zephyr.subs . These are often used to subscribe to system messages concerning a specific machine (by hostname and canonical hostname, respectively). An updated .todo list." --Arun A Tharuvai committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 07 Jul 2004 21:56:57 +0000
parents 1c4092217e4a
children 318d14658f95
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9415
1c4092217e4a [gaim-migrate @ 10230]
Luke Schierer <lschiere@pidgin.im>
parents: 9265
diff changeset
1 /* $Id: libgg.h 10230 2004-06-27 18:19:09Z lschiere $ */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 /*
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
4 * (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl>,
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
5 * Robert J. Woźny <speedy@ziew.org>
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 *
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 * it under the terms of the GNU General Public License Version 2 as
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * published by the Free Software Foundation.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 *
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 * GNU General Public License for more details.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 *
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
21 #ifndef __GG_LIBGG_H
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
22 #define __GG_LIBGG_H
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 #ifdef __cplusplus
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 extern "C" {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 #endif
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
28 #if defined(sun) && !defined(INADDR_NONE)
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
29 #define INADDR_NONE 0xffffffff
2475
ba7ee4c1908c [gaim-migrate @ 2488]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2399
diff changeset
30 #endif
ba7ee4c1908c [gaim-migrate @ 2488]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2399
diff changeset
31
9265
6a1f2c444ee7 [gaim-migrate @ 10064]
Ethan Blanton <elb@pidgin.im>
parents: 9253
diff changeset
32 #ifdef HAVE_STDINT_H
6a1f2c444ee7 [gaim-migrate @ 10064]
Ethan Blanton <elb@pidgin.im>
parents: 9253
diff changeset
33 # include <stdint.h>
6a1f2c444ee7 [gaim-migrate @ 10064]
Ethan Blanton <elb@pidgin.im>
parents: 9253
diff changeset
34 #endif
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
35 #include <sys/types.h>
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
36
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 /*
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 * typ zmiennej określającej numerek danej osoby.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
40 typedef unsigned long uin_t;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
41
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
42 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
43 * struktura opisująca daną sesję. tworzona przez gg_login().
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
44 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
45 struct gg_session {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
46 int fd; /* podglądany deskryptor */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
47 int check; /* sprawdzamy zapis czy odczyt */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
48 int state; /* aktualny stan maszynki */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
49 int error; /* kod błędu dla GG_STATE_ERROR */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
50 int type; /* rodzaj sesji. == GG_SESSION_GG */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
51
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
52 int async; /* czy połączenie jest asynchroniczne */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
53 int pid; /* pid procesu resolvera */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
54 int port; /* port, z którym się łączymy */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
55 int seq; /* numer sekwencyjny ostatniej wiadomości */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
56 int last_pong; /* czas otrzymania ostatniego ping/pong */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
57
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
58 unsigned int server_ip; /* adres serwera */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
59 unsigned int client_ip; /* adres klienta */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
60 int client_port; /* port, na którym klient słucha */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
61
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
62 uin_t uin; /* numerek klienta */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
63 char *password; /* i jego hasło. zwalniane automagicznie */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
64
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
65 int initial_status; /* początkowy stan klienta */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
66
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
67 char *recv_buf; /* bufor na otrzymywane pakiety */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
68 int recv_done; /* ile już wczytano do bufora */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
69 int recv_left; /* i ile jeszcze trzeba wczytać */
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
70
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
71 char *userlist_reply; /* fragment odpowiedzi listy kontaktów */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
72
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
73 int userlist_blocks; /* na ile kawałków podzielono listę kontaktów */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
74 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 /*
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
77 * ogólna struktura opisująca stan wszystkich operacji http.
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
79 struct gg_http {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
80 int fd; /* podglądany deskryptor */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
81 int check; /* sprawdzamy zapis czy odczyt */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
82 int state; /* aktualny stan maszynki */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
83 int error; /* kod błędu dla GG_STATE_ERROR */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
84 int type; /* rodzaj sesji. == GG_SESSION_HTTP */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
85
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
86 int async; /* czy połączenie asynchroniczne */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
87 int pid; /* pid procesu resolvera */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
88 int port; /* port, z którym się łączymy */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
89
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
90 char *query; /* bufor zapytania http */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
91 char *header; /* bufor nagłówka */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
92 int header_size; /* rozmiar wczytanego nagłówka */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
93 char *body; /* bufor otrzymanych informacji */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
94 int body_size; /* ilość informacji */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
96 void *data; /* dane danej operacji http */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
97 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
99 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
100 * ogólna struktura opisująca różne sesje. przydatna w klientach.
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
101 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
102 struct gg_common {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
103 int fd; /* podglądany deskryptor */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
104 int check; /* sprawdzamy zapis czy odczyt */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
105 int state; /* aktualny stan maszynki */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
106 int error; /* kod błędu dla GG_STATE_ERROR */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
107 int type; /* rodzaj sesji */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
108 };
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
109
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
110 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
111 * rodzaje sesji.
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
112 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
113 enum {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
114 GG_SESSION_GG = 1, /* połączenie z serwerem gg */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
115 GG_SESSION_HTTP, /* ogólna sesja http */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
116 GG_SESSION_SEARCH, /* szukanie */
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 3466
diff changeset
117 GG_SESSION_REGISTER /* rejestrowanie */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
118 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120 /*
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 * różne stany asynchronicznej maszynki.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122 */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
123 enum {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
124 /* wspólne */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
125 GG_STATE_IDLE = 0, /* nie powinno wystąpić. */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
126 GG_STATE_RESOLVING, /* wywołał gethostbyname() */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
127 GG_STATE_CONNECTING, /* wywołał connect() */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
128 GG_STATE_READING_DATA, /* czeka na dane http */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
129 GG_STATE_ERROR, /* wystąpił błąd. kod w x->error */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
130
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
131 /* gg_session */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
132 GG_STATE_CONNECTING_GG, /* wywołał connect() */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
133 GG_STATE_READING_KEY, /* czeka na klucz */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
134 GG_STATE_READING_REPLY, /* czeka na odpowiedź */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
135 GG_STATE_CONNECTED, /* połączył się */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
136
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
137 /* gg_http */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
138 GG_STATE_READING_HEADER, /* czeka na nagłówek http */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
139 GG_STATE_PARSING, /* przetwarza dane */
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 3466
diff changeset
140 GG_STATE_DONE /* skończył */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
141 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
142
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
143 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
144 * dla zachowania kompatybilności wstecz. w wersji 1.0 będzie usunięte. oby.
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
145 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
146 #define GG_STATE_WRITING_HTTP GG_STATE_READING_DATA
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
147 #define GG_STATE_WAITING_FOR_KEY GG_STATE_READING_KEY
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
148 #define GG_STATE_SENDING_KEY GG_STATE_READING_REPLY
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
149 #define GG_STATE_FINISHED GG_STATE_DONE
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
150
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
151 /*
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
152 * co proces klienta powinien sprawdzać w deskryptorach?
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
153 */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
154 enum {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
155 GG_CHECK_NONE = 0, /* nic. nie powinno wystąpić */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
156 GG_CHECK_WRITE = 1, /* sprawdzamy możliwość zapisu */
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 3466
diff changeset
157 GG_CHECK_READ = 2 /* sprawdzamy możliwość odczytu */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
158 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
159
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
160 struct gg_session *gg_login(uin_t uin, char *password, int async);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
161 void gg_free_session(struct gg_session *sess);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
162 void gg_logoff(struct gg_session *sess);
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
163 int gg_write(struct gg_session *sess, const char *buf, int length);
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
164 int gg_change_status(struct gg_session *sess, int status);
9415
1c4092217e4a [gaim-migrate @ 10230]
Luke Schierer <lschiere@pidgin.im>
parents: 9265
diff changeset
165 int gg_change_status_descr(struct gg_session *sess, int status, const char *descr);
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
166 int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message);
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
167 int gg_send_message_richtext(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message, const unsigned char *format, int formatlen);
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
168 int gg_ping(struct gg_session *sess);
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
169 int gg_userlist_request(struct gg_session *sess, char type, const char *request);
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
170
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
171 struct gg_notify_reply {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
172 uin_t uin; /* numerek */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
173 unsigned long status; /* status danej osoby */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
174 unsigned long remote_ip; /* adres ip delikwenta */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
175 unsigned short remote_port; /* port, na którym słucha klient */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
176 unsigned long version; /* == 0x0b */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
177 unsigned short dunno2; /* znowu port? */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
178 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
179 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
180 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
181 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
182 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
183
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
184 #define GG_NOTIFY_REPLY60 0x0011
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
185
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
186 struct gg_notify_reply60 {
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
187 uint32_t uin; /* numerek plus flagi w MSB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
188 uint8_t status; /* status danej osoby */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
189 uint32_t remote_ip; /* adres ip delikwenta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
190 uint16_t remote_port; /* port, na którym słucha klient */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
191 uint8_t version; /* wersja klienta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
192 uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
193 uint8_t dunno1; /* 0x00 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
194 }
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
195 #ifdef __GNUC__
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
196 __attribute__ ((packed))
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
197 #endif
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
198 ;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
199
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
200 #define GG_STATUS60 0x000f
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
201
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
202 struct gg_status60 {
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
203 uint32_t uin; /* numerek plus flagi w MSB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
204 uint8_t status; /* status danej osoby */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
205 uint32_t remote_ip; /* adres ip delikwenta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
206 uint16_t remote_port; /* port, na którym słucha klient */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
207 uint8_t version; /* wersja klienta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
208 uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
209 uint8_t dunno1; /* 0x00 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
210 }
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
211 #ifdef __GNUC__
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
212 __attribute__ ((packed))
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
213 #endif
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
214 ;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
215
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
216
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
217 struct gg_status {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
218 uin_t uin; /* numerek */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
219 unsigned long status; /* nowy stan */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
220 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
221 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
222 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
223 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
224 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
225
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
226 enum {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
227 GG_EVENT_NONE = 0,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
228 GG_EVENT_MSG,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
229 GG_EVENT_NOTIFY,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
230 GG_EVENT_STATUS,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
231 GG_EVENT_ACK,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
232 GG_EVENT_CONN_FAILED,
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
233 GG_EVENT_CONN_SUCCESS,
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
234 GG_EVENT_STATUS60, /* ktoś zmienił stan w GG 6.0 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
235 GG_EVENT_NOTIFY60, /* ktoś się pojawił w GG 6.0 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
236 GG_EVENT_USERLIST, /* odpowiedź listy kontaktów w GG 6.0 */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
237 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
238
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
239 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
240 * niedługo się tego pozbędę na rzecz sensownej obsługi błędów. --w
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
241 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
242 enum {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
243 GG_FAILURE_RESOLVING = 1,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
244 GG_FAILURE_CONNECTING,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
245 GG_FAILURE_INVALID,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
246 GG_FAILURE_READING,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
247 GG_FAILURE_WRITING,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
248 GG_FAILURE_PASSWORD,
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 3466
diff changeset
249 GG_FAILURE_404
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
250 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
251
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
252 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
253 * rodzaje błędów, na razie używane przez http. bez rozczulania się nad
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
254 * powodami. klient powie, że albo nie znalazł hosta, albo nie mógł się
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
255 * połączyć, albo nie mógł wysłać, albo nie mógł odebrac. i tyle. jak
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
256 * ktoś będzie chciał, to będzie mógł sprawdzić errno. ale po co?
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
257 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
258 enum {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
259 GG_ERROR_RESOLVING = 1,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
260 GG_ERROR_CONNECTING,
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
261 GG_ERROR_READING,
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 3466
diff changeset
262 GG_ERROR_WRITING
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
263 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
264
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
265 /*
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
266 * struktura opisująca rodzaj zdarzenia. wychodzi z gg_watch_fd()
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
267 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
268 struct gg_event {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
269 int type;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
270 union {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
271 struct {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
272 uin_t sender;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
273 int msgclass;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
274 time_t time;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
275 unsigned char *message;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
276 } msg;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
277 struct gg_notify_reply *notify;
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
278 struct { /* @notify60 informacja o liście kontaktów -- GG_EVENT_NOTIFY60 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
279 uin_t uin; /* numer */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
280 int status; /* stan */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
281 uint32_t remote_ip; /* adres ip */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
282 uint16_t remote_port; /* port */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
283 int version; /* wersja klienta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
284 int image_size; /* maksymalny rozmiar grafiki w KiB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
285 char *descr; /* opis stanu */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
286 time_t time; /* czas powrotu */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
287 } *notify60;
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
288 struct gg_status status;
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
289 struct { /* @status60 zmiana stanu -- GG_EVENT_STATUS60 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
290 uin_t uin; /* numer */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
291 int status; /* nowy stan */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
292 uint32_t remote_ip; /* adres ip */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
293 uint16_t remote_port; /* port */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
294 int version; /* wersja klienta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
295 int image_size; /* maksymalny rozmiar grafiki w KiB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
296 char *descr; /* opis stanu */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
297 time_t time; /* czas powrotu */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
298 } status60;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
299 struct { /* @userlist odpowiedź listy kontaktów serwera */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
300 char type; /* rodzaj odpowiedzi */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
301 char *reply; /* treść odpowiedzi */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
302 } userlist;
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
303 struct {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
304 uin_t recipient;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
305 int status;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
306 int seq;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
307 } ack;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
308 int failure;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
309 } event;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
310 };
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
311
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
312 struct gg_event *gg_watch_fd(struct gg_session *sess);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
313 void gg_free_event(struct gg_event *e);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
314
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
315 int gg_notify(struct gg_session *sess, uin_t *userlist, int count);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
316 int gg_add_notify(struct gg_session *sess, uin_t uin);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
317 int gg_remove_notify(struct gg_session *sess, uin_t uin);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
318
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
319
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
320 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
321 * OBSŁUGA HTTP
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
322 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
323
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
324 struct gg_http *gg_http_connect(char *hostname, int port, int async, char *method, char *path, char *header);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
325 int gg_http_watch_fd(struct gg_http *h);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
326 void gg_http_stop(struct gg_http *h);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
327 void gg_free_http(struct gg_http *h);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
328
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
329 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
330 * SZUKANIE UŻYTKOWNIKÓW
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
331 */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
332
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
333 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
334 * struktura opisująca kryteria wyszukiwania. argument gg_search().
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
335 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
336 struct gg_search_request {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
337 int active; /* czy ma szukać tylko aktywnych? */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
338
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
339 /* mode 0 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
340 char *nickname; /* pseudonim */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
341 char *first_name; /* imię */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
342 char *last_name; /* nazwisko */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
343 char *city; /* miasto */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
344 int gender; /* płeć */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
345 int min_birth; /* urodzony od roku... */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
346 int max_birth; /* urodzony do roku... */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
347
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
348 /* mode 1 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
349 char *email; /* adres e-mail */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
350
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
351 /* mode 2 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
352 char *phone; /* numer telefonu */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
353
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
354 /* mode 3 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
355 uin_t uin; /* numerek */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
356 };
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
357
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
358 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
359 * struktura opisująca rezultat wyszukiwania. pole gg_http.
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
360 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
361 struct gg_search {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
362 int count; /* ilość znalezionych */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
363 struct gg_search_result *results; /* tabelka z nimi */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
364 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
365
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
366 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
367 * pojedynczy rezultat wyszukiwania.
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
368 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
369 struct gg_search_result {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
370 uin_t uin; /* numerek */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
371 char *first_name; /* imię */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
372 char *last_name; /* nazwisko */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
373 char *nickname; /* pseudonim */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
374 int born; /* rok urodzenia */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
375 int gender; /* płeć */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
376 char *city; /* miasto */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
377 int active; /* czy jest aktywny */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
378 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
379
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
380 #define GG_GENDER_NONE 0 /* nie podano lub bez znaczenia */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
381 #define GG_GENDER_FEMALE 1 /* kobieta */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
382 #define GG_GENDER_MALE 2 /* mężczyzna */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
383
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
384 struct gg_http *gg_search(struct gg_search_request *r, int async);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
385 int gg_search_watch_fd(struct gg_http *f);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
386 void gg_free_search(struct gg_http *f);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
387
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
388 struct gg_search_request *gg_search_request_mode_0(char *nickname, char *first_name, char *last_name, char *city, int gender, int min_birth, int max_birth, int active);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
389 struct gg_search_request *gg_search_request_mode_1(char *email, int active);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
390 struct gg_search_request *gg_search_request_mode_2(char *phone, int active);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
391 struct gg_search_request *gg_search_request_mode_3(uin_t uin, int active);
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
392
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
393 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
394 * OPERACJE NA KATALOGU PUBLICZNYM
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
395 */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
396
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
397 struct gg_pubdir {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
398 int success; /* czy się udało */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
399 uin_t uin; /* otrzymany numerek. 0 jeśli błąd */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
400 };
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
401
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
402 struct gg_http *gg_register(char *email, char *password, int async);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
403 void gg_free_register(struct gg_http *f);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
404
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
405 int gg_pubdir_watch_fd(struct gg_http *f);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
406 #define gg_register_watch_fd gg_pubdir_watch_fd
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
407
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
408 /*
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
409 * jeśli chcemy sobie podebugować, wystarczy ustawić `gg_debug_level'.
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
410 * niestety w miarę przybywania wpisów `gg_debug(...)' nie chciało mi
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
411 * się ustawiać odpowiednich leveli, więc większość szła do _MISC.
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
412 */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
413
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
414 extern int gg_debug_level;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
415
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
416 #define GG_DEBUG_NET 1
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
417 #define GG_DEBUG_TRAFFIC 2
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
418 #define GG_DEBUG_DUMP 4
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
419 #define GG_DEBUG_FUNCTION 8
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
420 #define GG_DEBUG_MISC 16
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
421
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
422 void gg_debug(int level, char *format, ...);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
423
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
424 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
425 * Pare małych zmiennych do obsługi "http proxy"
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
426 *
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
427 */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
428
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
429 extern int gg_http_use_proxy;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
430 extern char *gg_http_proxy_host;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
431 extern int gg_http_proxy_port;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
432
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
433 /*
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
434 * -------------------------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
435 * poniżej znajdują się wewnętrzne sprawy biblioteki. zwykły klient nie
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
436 * powinien ich w ogóle ruszać, bo i nie ma po co. wszystko można załatwić
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
437 * procedurami wyższego poziomu, których definicje znajdują się na początku
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
438 * tego pliku.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
439 * -------------------------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
440 */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
441
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
442 int gg_resolve(int *fd, int *pid, char *hostname);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
443 void gg_debug(int level, char *format, ...);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
444 char *gg_alloc_sprintf(char *format, ...);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
445 char *gg_get_line(char **ptr);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
446 int gg_connect(void *addr, int port, int async);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
447 void gg_read_line(int sock, char *buf, int length);
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
448 void gg_chomp(char *line);
3466
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 2884
diff changeset
449 char *gg_urlencode(const char *str);
7a3f16a375a5 [gaim-migrate @ 3516]
Sean Egan <seanegan@gmail.com>
parents: 2884
diff changeset
450 int gg_http_hash(const unsigned char *email, const unsigned char *password);
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
451
8160
a0b7039de507 [gaim-migrate @ 8872]
Luke Schierer <lschiere@pidgin.im>
parents: 6063
diff changeset
452 #define GG_APPMSG_HOST "appmsg.gadugadu.pl"
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
453 #define GG_APPMSG_PORT 80
8160
a0b7039de507 [gaim-migrate @ 8872]
Luke Schierer <lschiere@pidgin.im>
parents: 6063
diff changeset
454 #define GG_PUBDIR_HOST "pubdir.gadugadu.pl"
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
455 #define GG_PUBDIR_PORT 80
8160
a0b7039de507 [gaim-migrate @ 8872]
Luke Schierer <lschiere@pidgin.im>
parents: 6063
diff changeset
456 #define GG_REGISTER_HOST "register.gadugadu.pl"
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
457 #define GG_REGISTER_PORT 80
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
458 #define GG_DEFAULT_PORT 8074
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
459 #define GG_HTTPS_PORT 443
8160
a0b7039de507 [gaim-migrate @ 8872]
Luke Schierer <lschiere@pidgin.im>
parents: 6063
diff changeset
460 #define GG_HTTP_USERAGENT "Mozilla/4.0 (compatible MSIE 5.0; Windows 98; I)"
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
461 #define GG_HAS_AUDIO_MASK 0x40000000
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
462
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
463 struct gg_header {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
464 unsigned long type; /* typ pakietu */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
465 unsigned long length; /* długość reszty pakietu */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
466 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
467 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
468 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
469 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
470 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
471
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
472 #define GG_WELCOME 0x0001
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
473
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
474 struct gg_welcome {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
475 unsigned long key; /* klucz szyfrowania hasła */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
476 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
477 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
478 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
479 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
480 ;
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
481
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
482 #define GG_LOGIN 0x000c
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
483
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
484 struct gg_login {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
485 uin_t uin; /* twój numerek */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
486 unsigned long hash; /* hash hasła */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
487 unsigned long status; /* status na dzień dobry */
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
488 unsigned long version; /* == 0x20 */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
489 unsigned long local_ip; /* mój adres ip */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
490 unsigned short local_port; /* port, na którym słucham */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
491 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
492 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
493 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
494 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
495 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
496
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
497 #define GG_LOGIN60 0x0015
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
498
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
499 struct gg_login60 {
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
500 uint32_t uin; /* mój numerek */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
501 uint32_t hash; /* hash hasła */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
502 uint32_t status; /* status na dzień dobry */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
503 uint32_t version; /* moja wersja klienta */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
504 uint8_t dunno1; /* 0x00 */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
505 uint32_t local_ip; /* mój adres ip */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
506 uint16_t local_port; /* port, na którym słucham */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
507 uint32_t external_ip; /* zewnętrzny adres ip */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
508 uint16_t external_port; /* zewnętrzny port */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
509 uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
510 uint8_t dunno2; /* 0xbe */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
511 }
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
512 #ifdef __GNUC__
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
513 __attribute__ ((packed))
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
514 #endif
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
515 ;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
516
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
517 #define GG_LOGIN_OK 0x0003
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
518
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
519 #define GG_LOGIN_FAILED 0x0009
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
520
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
521 #define GG_NEW_STATUS 0x0002
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
522
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
523 #define GG_STATUS_NOT_AVAIL 0x0001 /* niedostępny */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
524 #define GG_STATUS_NOT_AVAIL_DESCR 0x0015 /* niedostępny z opisem (4.8) */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
525 #define GG_STATUS_AVAIL 0x0002 /* dostępny */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
526 #define GG_STATUS_AVAIL_DESCR 0x0004 /* dostępny z opisem (4.9) */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
527 #define GG_STATUS_BUSY 0x0003 /* zajęty */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
528 #define GG_STATUS_BUSY_DESCR 0x0005 /* zajęty z opisem (4.8) */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
529 #define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny (4.6) */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
530 #define GG_STATUS_INVISIBLE_DESCR 0x0016 /* niewidoczny z opisem (4.9) */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
531 #define GG_STATUS_BLOCKED 0x0006 /* zablokowany */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
532
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
533 #define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla znajomych (4.6) */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
534
9415
1c4092217e4a [gaim-migrate @ 10230]
Luke Schierer <lschiere@pidgin.im>
parents: 9265
diff changeset
535 #define GG_STATUS_DESCR_MAXSIZE 70
1c4092217e4a [gaim-migrate @ 10230]
Luke Schierer <lschiere@pidgin.im>
parents: 9265
diff changeset
536
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
537 /* GG_S() stan bez uwzględnienia trybu tylko dla znajomych */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
538 #define GG_S(x) ((x) & ~GG_STATUS_FRIENDS_MASK)
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
539
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
540 /* GG_S_D() stan opisowy */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
541 #define GG_S_D(x) (GG_S(x) == GG_STATUS_NOT_AVAIL_DESCR || GG_S(x) == GG_STATUS_AVAIL_DESCR || GG_S(x) == GG_STATUS_BUSY_DESCR || GG_S(x) == GG_STATUS_INVISIBLE_DESCR)
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
542
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
543 struct gg_new_status {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
544 unsigned long status; /* na jaki zmienić? */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
545 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
546 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
547 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
548 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
549 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
550
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
551 #define GG_NOTIFY 0x0010
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
552
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
553 struct gg_notify {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
554 uin_t uin; /* numerek danej osoby */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
555 char dunno1; /* == 3 */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
556 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
557 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
558 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
559 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
560 ;
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
561
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
562 #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
563
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
564 /* struct gg_notify_reply zadeklarowane wyżej */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
565
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
566 #define GG_ADD_NOTIFY 0x000d
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
567 #define GG_REMOVE_NOTIFY 0x000e
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
568
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
569 struct gg_add_remove {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
570 uin_t uin; /* numerek */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
571 char dunno1; /* == 3 */
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
572 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
573 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
574 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
575 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
576 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
577
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
578 #define GG_STATUS 0x0002
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
579
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
580 /* struct gg_status zadeklarowane wcześniej */
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
581
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
582 #define GG_SEND_MSG 0x000b
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
583
2792
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
584 #define GG_CLASS_QUEUED 0x0001
9123abd0db92 [gaim-migrate @ 2805]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2510
diff changeset
585 #define GG_CLASS_OFFLINE GG_CLASS_QUEUED
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
586 #define GG_CLASS_MSG 0x0004
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
587 #define GG_CLASS_CHAT 0x0008
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
588
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
589 struct gg_send_msg {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
590 unsigned long recipient;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
591 unsigned long seq;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
592 unsigned long msgclass;
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
593 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
594 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
595 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
596 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
597 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
598
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
599 #define GG_SEND_MSG_ACK 0x0005
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
600
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
601 #define GG_ACK_DELIVERED 0x0002
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
602 #define GG_ACK_QUEUED 0x0003
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
603
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
604 struct gg_send_msg_ack {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
605 unsigned long status;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
606 unsigned long recipient;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
607 unsigned long seq;
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
608 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
609 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
610 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
611 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
612 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
613
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
614 #define GG_RECV_MSG 0x000a
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
615
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
616 struct gg_recv_msg {
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
617 unsigned long sender;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
618 unsigned long seq;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
619 unsigned long time;
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
620 unsigned long msgclass;
2884
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
621 }
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
622 #ifdef __GNUC__
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
623 __attribute__ ((packed))
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
624 #endif
12309c877020 [gaim-migrate @ 2897]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2846
diff changeset
625 ;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
626
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
627 #define GG_PING 0x0008
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
628
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
629 #define GG_PONG 0x0007
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
630
8775
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
631 #define GG_USERLIST_REQUEST 0x0016
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
632
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
633 #define GG_USERLIST_PUT 0x00
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
634 #define GG_USERLIST_PUT_MORE 0x01
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
635 #define GG_USERLIST_GET 0x02
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
636
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
637 struct gg_userlist_request {
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
638 uint8_t type;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
639 }
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
640 #ifdef __GNUC__
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
641 __attribute__ ((packed))
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
642 #endif
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
643 ;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
644
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
645 #define GG_USERLIST_REPLY 0x0010
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
646
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
647 #define GG_USERLIST_PUT_REPLY 0x00
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
648 #define GG_USERLIST_PUT_MORE_REPLY 0x02
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
649 #define GG_USERLIST_GET_REPLY 0x06
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
650 #define GG_USERLIST_GET_MORE_REPLY 0x04
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
651
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
652 struct gg_userlist_reply {
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
653 uint8_t type;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
654 }
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
655 #ifdef __GNUC__
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
656 __attribute__ ((packed))
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
657 #endif
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
658 ;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
659
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
660 /* listy */
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
661
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
662 struct list {
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
663 void *data;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
664 struct list *next;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
665 };
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
666
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
667 typedef struct list * list_t;
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
668
ce90b119b103 [gaim-migrate @ 9537]
Luke Schierer <lschiere@pidgin.im>
parents: 8160
diff changeset
669
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
670 #ifdef __cplusplus
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
671 }
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
672 #endif
2846
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
673
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
674 #endif /* __GG_LIBGG_H */
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
675
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
676 /*
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
677 * Local variables:
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
678 * c-indentation-style: k&r
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
679 * c-basic-offset: 8
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
680 * indent-tabs-mode: notnil
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
681 * End:
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
682 *
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
683 * vim: shiftwidth=8:
4b3f17ca66bf [gaim-migrate @ 2859]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2792
diff changeset
684 */