libktorrent
2.1.1
src
dht
packednodecontainer.h
1
/***************************************************************************
2
* Copyright (C) 2012 by *
3
* Joris Guisson <joris.guisson@gmail.com> *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
20
21
#ifndef DHT_PACKEDNODECONTAINER_H
22
#define DHT_PACKEDNODECONTAINER_H
23
24
#include <QList>
25
#include <QByteArray>
26
27
namespace
dht
28
{
29
34
class
PackedNodeContainer
35
{
36
public
:
37
PackedNodeContainer();
38
virtual
~PackedNodeContainer();
39
41
void
addNode
(
const
QByteArray & a);
42
44
const
QByteArray &
getNodes
()
const
{
return
nodes;}
45
47
const
QByteArray &
getNodes6
()
const
{
return
nodes6;}
48
protected
:
49
QByteArray nodes;
50
QByteArray nodes6;
51
};
52
53
}
54
55
#endif // DHT_PACKEDNODECONTAINER_H
dht::PackedNodeContainer::addNode
void addNode(const QByteArray &a)
Add a single node to the nodes or nodes2 parameter depending on it's size.
dht::PackedNodeContainer::getNodes6
const QByteArray & getNodes6() const
Get the nodes6 parameter.
Definition:
packednodecontainer.h:83
dht::PackedNodeContainer::getNodes
const QByteArray & getNodes() const
Get the nodes parameter.
Definition:
packednodecontainer.h:80
Generated by
1.8.18