annotate src/protocols/gg/protocol.txt @ 10732:c4cb90065e1d

[gaim-migrate @ 12334] "gaim_escape_html (according to Ethan) predates g_markup_escape_text. Current code in Gaim uses both functions. This patch removes gaim_escape_html from the API and replaces all calls in the Gaim tree with g_markup_escape_text. I included a ChangeLog.API note. As far as I can tell, this still works perfectly. This is obviously intended for HEAD only, as it removes a public function." --rlaager this was discussed extensively this morning committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 26 Mar 2005 02:43:49 +0000
parents 1ffac7cf4e94
children 40d04a6570de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 ---------------------------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
3 Protokół G*du-G*du 4.x
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
4
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
5 (C) Copyright 2001 by Wojtek Kaniewski <wojtekka@irc.pl>,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
6 Robert J. Woźny <speedy@atman.pl>,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
7 Tomasz Jarzynka <tomee@cpi.pl>,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
8 Adam Ludwikowski <adam.ludwikowski@wp.pl>,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
9 Marek Kozina <klith@hybrid.art.pl>,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
10 Rafał Florek <raf@regionet.regionet.pl>,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
11 Igor Popik <igipop@wsfiz.edu.pl>
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 --- 0) disclaimer ---------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
15 opis protokołu bazują na doświadczeniach przeprowadzonych na moim
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
16 domowym komputerze oraz informacjach przysłanych do mnie przez różnych
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
17 ludzi. żaden klient g*du-g*du nie został skrzywdzony podczas
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 przeprowadzania badań, blabla.
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 --- 1) transmisja, format wszystkich pakietów -----------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 w przeciwieństwie do zabawek typu icq, g*du-g*du korzysta z protokołu tcp.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 każdy pakiet zawiera dwa stałe pola:
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 struct gg_header {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 int type; /* typ pakietu */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 int length; /* długość reszty pakietu */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 dla ułatwienia przyjmuję następujące długości zmiennych: sizeof(char) = 1,
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 sizeof(short) = 2, sizeof(int) = 4. oczywiście wszystkie liczby są zgodnie
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 z intelowym endianem. zakładam też, że wszystkie zmienne są bez znaku. nie
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 chce mi się wszędzie pisać `unsigned'.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 pola, co do których znaczenia nie mam pewności, lub w ogóle nie mam pojęcia,
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 skąd się tam wzięły, oznaczam `dunno'.
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 --- 2) zanim się połączymy -------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 żeby wiedzieć, z jakim serwerem mamy się połączyć, należy poudawać przez
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 chwilę Internet Explorera, połączyć się z hostem `appmsg.gadu-gadu.pl'.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43 GET /appsvc/appmsg.asp?fmnumber=<tutaj_numerek_gg> HTTP/1.0
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 Host: appmsg.gadu-gadu.pl
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 User-Agent: Mozilla/4.7 [en] (Win98; I)
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46 Pragma: no-cache
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
48 oryginalny klient może wysłać jeden z podanych identyfikatorów przeglądarki:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
49
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
50 Mozilla/4.04 [en] (Win95; I ;Nav)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
51 Mozilla/4.7 [en] (Win98; I)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
52 Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
53 Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
54 Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
55 Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
56
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
57 nowsze wersje klienta do zapytania dodają również `version=...' opisujące,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
58 z jakim klientem serwer ma do czynienia. jednak ze względu na możliwe
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
59 różnice w protokole, lepiej pomijać ten parametr i uwagać GG 4.0. w każdym
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
60 razie na to zapytanie serwer powinien odpowiedzieć:
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 HTTP/1.0 200 OK
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 0 1 0 217.17.33.21:8074 217.17.33.21 217.17.33.21
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66 co to oznacza? nie mam pojęcia ;) wygląda na to, że cały g*du-g*du jest
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67 przemyślany i w przyszłości będzie można używać różnych serwerów do różnych
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68 rzeczy, typu szukanie, obsługa klientów itd. póki co, łączyć się trzeba na
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
69 pierwszy adres (tak, ten z portem).
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
70 Jeżeli połączenie z portem 8074 nie wyjdzie z jakiś specyficznych powodów -
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
71 można się łączyć na port 443.
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73 --- 3) logowanie się -------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
75 po połączeniu się portem serwera g*du-g*du, dostajemy pakiet typu 0x0001,
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 który na potrzeby tego dokumentu nazwiemy:
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 #define GG_WELCOME 0x0001
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
80 reszta pakietu zawiera liczbę, na podstawie której liczony jest hash z hasła
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81 klienta:
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
82
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
83 struct gg_welcome {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
84 int key; /* klucz szyfrowania hasła */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87 kiedy mamy już tą wartość możemy odesłać pakiet logowania
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89 #define GG_LOGIN 0x000c
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 musimy podać kilka informacji:
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
92
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 struct gg_login {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
94 int uin; /* twój numerek */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 int hash; /* hash hasła */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96 int status; /* status na dzień dobry */
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
97 int version; /* wersja klienta */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 int local_ip; /* mój adres ip */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99 short local_port; /* port, na którym słucham */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
101
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
102 jak obliczyć hash hasła? hmm... nic prostszego. do każdej literki hasła
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103 dodaje się jedynkę, mnoży wszystko razem, a potem przez liczbę podaną przez
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104 serwer.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
105
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
106 for (hash = 1; *passwd; passwd++)
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 hash *= (*passwd) + 1;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
108
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
109 zrozumiałe, racja? liczba oznaczająca wersję może być jedną z poniższych:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
110
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
111 0x11 - 4.6.1
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
112 0x10 - 4.5.22, 4.5.21, 4.5.19, 4.5.17, 4.5.15
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
113 0x0f - 4.5.12
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
114 0x0b - 4.0.30, 4.0.29, 4.0.28, 4.0.25
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
115
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
116 oczywiście nie są to wszystkie możliwe wersje klientów, lecz te, które
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
117 udało się sprawdzić. najbezpieczniej będzie przedstawiać się jako ta
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
118 wersja, której ficzerów używamy. wiadomo, że 4.0.x nie obsługiwały trybu
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
119 ukrytego, ani tylko dla znajomych itd.
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
120
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
121 jeśli wszystko się powiedzie, dostaniemy w odpowiedzi pakiet typu
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
123 #define GG_LOGIN_OK 0x0003
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
124
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
125 z polem header->length = 0, lub pakiet
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
126
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
127 #define GG_LOGIN_FAILED 0x0009
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
129 --- 4) zmiana statusu -----------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
130
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131 g*du-g*du przewiduje trzy stany klienta, które zmieniamy pakietem
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
133 #define GG_NEW_STATUS 0x0002
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
134
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
135 #define GG_STATUS_NOT_AVAIL 0x0001 /* rozłączony */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
136 #define GG_STATUS_AVAIL 0x0002 /* dostępny */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
137 #define GG_STATUS_BUSY 0x0003 /* zajęty */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138 #define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
139
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
140 #define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla przyjaciół */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
141
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
142 struct gg_new_status {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
143 int status; /* na jaki zmienić? */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144 }
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
145
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
146 należy pamiętać, żeby przed rozłączeniem się z serwerem należy zmienić
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
147 stan na GG_STATUS_NOT_AVAIL. jeśli ma być widoczny tylko dla przyjaciół,
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
148 należy dodać GG_STATUS_FRIENDS do normalnej wartości stanu.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
149
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
150 --- 5) ludzie przychodzą, ludzie odchodzą ---------------------------------
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 zaraz po zalogowaniu możemy wysłać serwerowi listę ludzików w naszej liście
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
153 kontaktów, żeby dowiedzieć się, czy są w tej chwili dostępni. pakiet zawiera
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
154 dowolną ilość struktur gg_notify:
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
155
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
156 #define GG_NOTIFY 0x0010
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
157
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
158 struct gg_notify {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
159 int uin; /* numerek danej osoby */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
160 char dunno1; /* == 3 */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
161 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
162
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
163 jeśli ktoś jest, serwer odpowie pakietem zawierającym jedną lub więcej
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
164 struktur gg_notify_reply:
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
165
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
166 #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
167
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
168 struct gg_notify_reply {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
169 int uin; /* numerek */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
170 int status; /* status danej osoby */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
171 int remote_ip; /* adres ip delikwenta */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
172 short remote_port; /* port, na którym słucha klient */
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
173 int version; /* wersja klienta */
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
174 short dunno1; /* znowu port? */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
175 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
176
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
177 jeśli klient nie obsługuje połączeń między klientami (np. g*du-g*du 3.x)
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
178 zamiast adresu ip jest 0, zamiast portu może być 0, 1, 2... nieważne ;)
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
179 port może przyjmować wartość 1, jeśli klient znajduje się za jakimś
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
180 firewallem lub innym urządzeniem robiącym NAT. w każdym razie, jeśli ktoś
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
181 się pojawi w trakcie pracy, również zostanie przysłany ten pakiet.
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
182 proste? proste :)
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
183
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
184 żeby dodać kogoś do listy w trakcie pracy, trzeba wysłać niżej opisany
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
185 pakiet. jego format jest identyczny jak przy GG_NOTIFY.
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
186
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
187 #define GG_ADD 0x000d
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
188
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
189 struct gg_add {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
190 int uin; /* numerek */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
191 char dunno1; /* == 3 */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
192 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
193
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
194 jeśli ktoś opuści g*du-g*du lub zmieni stan, otrzymamy pakiet
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
195
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
196 #define GG_STATUS 0x0002
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
197
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
198 struct gg_status {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
199 int uin; /* numerek */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
200 int status; /* nowy stan */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
201 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
202
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
203 --- 6) wysyłanie wiadomości ------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
204
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
205 przejdźmy do sedna sprawy ;)
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
206
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
207 #define GG_SEND_MSG 0x000b
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
208
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
209 #define GG_CLASS_QUEUED 0x0001 /* tylko przy odbieraniu */
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
210 #define GG_CLASS_MSG 0x0004
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
211 #define GG_CLASS_CHAT 0x0008
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
212 #define GG_CLASS_UNKNOWN_1 0x0020
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
213
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
214 struct gg_send_msg {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
215 int recipient;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
216 int seq;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
217 int class;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
218 char message[];
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
219 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
220
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
221 wiadomo, odbiorca. numer sekwencyjny, który wykorzystujemy potem do
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
222 potwierdzenia. nie wykluczone, że w jakis sposób odróżnia się różne
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
223 rozmowy za pomocą części bajtów, ale raczej nie ma znaczenia. klasa
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
224 wiadomości pozwala odróżnić, czy wiadomość ma się pokazać w osobym
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
225 okienku czy jako kolejna linijka w okienku rozmowy. wygląda na to,
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
226 że to jakaś bitmapa, więc najlepiej olać inne bity niż 0x0e. (czasem
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
227 klienty wysyłają 0x04, czasem 0x24 -- widocznie 0x20 to też jakaś
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
228 flaga). jeśli odbiorca był niedostępny podczas wysyłania wiadomości,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
229 zostanie zaznaczony bit 0x01.
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
230
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
231 oryginalny klient wysyłając wiadomość do kilku użytkowników, wysyła po
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
232 prostu kilka takich samych pakietów z różnymi numerkami odbiorców. nie
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
233 ma osobnego pakietu do tego. natomiast jeśli chodzi o ,,konferencyjnę''
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
234 do pakietu doklejana jest za ,,char message[];'' następująca struktura:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
235
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
236 struct gg_send_recipients {
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
237 char flag; /* == 1 */
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
238 int count; /* ilość odbiorców */
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
239 int recipients[]; /* tablica odbiorców */
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
240 };
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
241
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
242 na przykład, by wysłać do trzech ludzi, należy wysłać pakiet:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
243
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
244 - -- --- --+--+--+--+--+--+--+-----------+-----------+
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
245 treść |\0|\1| 0x02 | uin1 | uin2 |
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
246 - -- -- ---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
247
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
248 serwer po otrzymaniu wiadomości odsyła informację o tym. przy okazji
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
249 mówi, czy wiadomość dotarła do odbiorcy (status == GG_ACK_DELIVERED),
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
250 czy może jest offline i została zakolejkowana (GG_ACK_QUEUED):
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
251
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
252 #define GG_SEND_MSG_ACK 0x0005
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
253
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
254 #define GG_ACK_DELIVERED 0x0002
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
255 #define GG_ACK_QUEUED 0x0003
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
256
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
257 struct gg_send_msg_ack {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
258 int status;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
259 int recipient;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
260 int seq;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
261 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
262
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
263 numer sekwencyjny i adresat ten sam, co przy wysyłaniu.
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 --- 7) otrzymywanie wiadomości ---------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
266
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
267 zbyt wiele wyjaśnień chyba nie trzeba. wiadomo od kogo. drugie pole to
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
268 najprawdopodobniej jakiś numerek sekwencyjny. trzecie oznacza czas nadania
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
269 wiadomości. klasa wiadomości taka sama jak przy wysyłaniu:
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
270
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
271 #define GG_RECV_MSG 0x000a
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
272
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
273 struct gg_recv_msg {
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
274 int sender;
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
275 int seq;
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
276 int time;
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
277 int class;
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
278 char message[];
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
279 };
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
280
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
281 w przypadku pakietów ,,konferencyjnych'' na koncu pakietu doklejona jest
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
282 struktura identyczna ze struct gg_send_recipients zawierająca pozostałych
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
283 rozmówców.
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
284
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
285 --- 8) ping/pong -----------------------------------------------------------
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
286
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
287 od czasu do czasu klient wysyła pakiet a'la ping do serwera i dostaje pustą
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
288 odpowiedź. o ile dobrze pamiętam, serwer rozłącza się po upływie 5 minut od
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
289 otrzymania ostatniej informacji.
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
290
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
291 #define GG_PING 0x0008
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
292
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
293 /* nie ma niczego */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
294
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
295 #define GG_PONG 0x0007
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
296
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
297 /* nie ma niczego */
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
298
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
299 --- 9) podziękowania -------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
300
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
301 swój wkład w poznanie protokołu mieli:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
302 - Robert J. Woźny <speedy@atman.pl>:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
303 opis nowości w protokole GG 4.6,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
304 - Tomasz Jarzynka <tomee@cpi.pl>:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
305 badanie timeoutów,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
306 - Adam Ludwikowski <adam.ludwikowski@wp.pl>:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
307 wiele różnych poprawek do tekstu, badanie wersji,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
308 - Marek Kozina <klith@hybrid.art.pl>:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
309 czas otrzymania wiadomości,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
310 - Rafał Florek <raf@regionet.regionet.pl>:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
311 konferencje,
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
312 - Igor Popik <igipop@wsfiz.edu.pl>:
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
313 klasy wiadomości przy odbieraniu zakolejkowanej.
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
314
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
315 ----------------------------------------------------------------------------
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
316
2806
1ffac7cf4e94 [gaim-migrate @ 2819]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2393
diff changeset
317 $Id: protocol.txt 2819 2001-11-27 22:54:32Z warmenhoven $
2393
a7ecfd3f7714 [gaim-migrate @ 2406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
318