summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_http.h
blob: 292de1e73abd9f7b7cff861e2c889b54f49c62c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// ---------------------------------------------------------------------------80
//                ICQ plugin for Miranda Instant Messenger
//                ________________________________________
//
// Copyright © 2000,2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
// Copyright © 2001,2002 Jon Keating, Richard Hughes
// Copyright © 2002,2003,2004 Martin Цberg, Sam Kothari, Robert Rainwater
// Copyright © 2004,2005 Joe Kucera
// Copyright © 2012-2017 Miranda NG Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// -----------------------------------------------------------------------------

#ifndef __ICQ_HTTP_H
#define __ICQ_HTTP_H

#define HTTP_PROXY_VERSION  0x0443

#define HTTP_PACKETTYPE_HELLOREPLY   2
#define HTTP_PACKETTYPE_LOGIN        3
#define HTTP_PACKETTYPE_LOGINREPLY   4    /* contains 1 byte: 0 */
#define HTTP_PACKETTYPE_FLAP         5
#define HTTP_PACKETTYPE_CLOSE        6    /* contains no data */
#define HTTP_PACKETTYPE_CLOSEREPLY   7    /* contains 1 byte: 0 */

int icq_httpGatewayInit(HNETLIBCONN hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPREQUEST *nlhr);
int icq_httpGatewayBegin(HNETLIBCONN hConn, NETLIBOPENCONNECTION *nloc);
int icq_httpGatewayWrapSend(HNETLIBCONN hConn, PBYTE buf, int len, int flags);
PBYTE icq_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int bufLen, int *outBufLen, void *(*NetlibRealloc)(void *, size_t));
int icq_httpGatewayWalkTo(HNETLIBCONN hConn, NETLIBOPENCONNECTION* nloc);

#endif /* __ICQ_HTTP_H */