libktorrent
2.2.0
src
tracker
httpannouncejob.h
1
/*
2
Copyright (C) 2009 by Joris Guisson (joris.guisson@gmail.com)
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License along
15
with this program; if not, write to the Free Software Foundation, Inc.,
16
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#ifndef BT_HTTPANNOUNCEJOB_H
20
#define BT_HTTPANNOUNCEJOB_H
21
22
#include <ktorrent_export.h>
23
#include <kio/jobclasses.h>
24
#include <QUrl>
25
#include <QBuffer>
26
#include <QSslError>
27
28
namespace
bt
29
{
34
class
KTORRENT_EXPORT
HTTPAnnounceJob
:
public
KIO::Job
35
{
36
Q_OBJECT
37
public
:
38
HTTPAnnounceJob
(
const
QUrl & url);
39
virtual
~
HTTPAnnounceJob
();
40
46
void
setProxy
(
const
QString & host,
int
port);
47
49
QUrl
announceUrl
()
const
{
return
url;}
50
52
const
QByteArray &
replyData
()
const
{
return
reply_data;}
53
54
virtual
void
start();
55
virtual
void
kill(
bool
quietly=
true
);
56
57
private
Q_SLOTS:
58
void
requestFinished(
int
id
,
bool
err);
59
// void readData(const QHttpResponseHeader & hdr); //PORT: KF5
60
void
sendRequest();
61
void
sslErrors(
const
QList<QSslError> & errors);
62
63
private
:
64
// void handleRedirect(const QHttpResponseHeader & hdr); //PORT: KF5
65
66
private
:
67
QUrl url;
68
// QHttp* http; //PORT: KF5
69
QByteArray reply_data;
70
int
get_id;
71
72
QString proxy_host;
73
int
proxy_port;
74
};
75
76
}
77
78
#endif // BT_HTTPANNOUNCEJOB_H
bt::HTTPAnnounceJob::setProxy
void setProxy(const QString &host, int port)
bt::HTTPAnnounceJob
Definition:
httpannouncejob.h:35
bt::HTTPAnnounceJob::announceUrl
QUrl announceUrl() const
Get the announce url.
Definition:
httpannouncejob.h:49
bt::HTTPAnnounceJob::replyData
const QByteArray & replyData() const
Get the reply data.
Definition:
httpannouncejob.h:52
Generated by
1.8.20