OpenDHT Class Reference
This class is used to interact with the distributed hash table (OpenDHT).
More...
#include <OpenDHT.h>
List of all members.
Public Slots |
void | rcvDHTputAnswer (QNetworkReply *nr) |
| The slot beeing called after putting data in the DHT.
|
void | rcvDHTgetAnswer (QNetworkReply *nr) |
| The slot beeing called to return the requested data from the DHT.
|
Signals |
void | error (QString err) |
void | finished (QString val, QString id, OpenDHT *inst) |
Public Member Functions |
| OpenDHT (QString id, QObject *parent=0) |
| Construct an Object which is used to interact with OpenDHT.
|
void | sendDHTput (QByteArray key, QByteArray val, int ttl=36000) |
| Store a (key, val) pair in the DHT for TTL seconds.
|
void | sendDHTget (QByteArray key) |
| Get a value from the DHT.
|
void | setId (QString id) |
| Set the id of this instance.
|
Detailed Description
This class is used to interact with the distributed hash table (OpenDHT).
This class offers any function required for intraction with OpenDTH, a distributed and temporal hash table. Any interaction with the service is done in xml-rpc by talking to one (geographically nearest) node selected from http://adeona.cs.washington.edu/gateways.adeona
Constructor & Destructor Documentation
OpenDHT::OpenDHT |
( |
QString |
id, |
|
|
QObject * |
parent = 0 | |
|
) |
| | |
Construct an Object which is used to interact with OpenDHT.
- Parameters:
-
| | id is an arbitrary id of the request. The caller defines what he uses as id |
Member Function Documentation
void OpenDHT::rcvDHTgetAnswer |
( |
QNetworkReply * |
nr |
) |
[slot] |
The slot beeing called to return the requested data from the DHT.
- Parameters:
-
| nr | is a pointer to the QNetworkReply, which contains all information |
void OpenDHT::rcvDHTputAnswer |
( |
QNetworkReply * |
nr |
) |
[slot] |
The slot beeing called after putting data in the DHT.
This conatins the information whether the put succeeded or not
- Parameters:
-
| nr | is a pointer to the QNetworkReply, which contains all information |
void OpenDHT::sendDHTget |
( |
QByteArray |
key |
) |
|
Get a value from the DHT.
- Parameters:
-
| key | is the data's key in the DHT |
void OpenDHT::sendDHTput |
( |
QByteArray |
key, |
|
|
QByteArray |
val, |
|
|
int |
ttl = 36000 | |
|
) |
| | |
Store a (key, val) pair in the DHT for TTL seconds.
- Parameters:
-
| key | is the data's key (max length is 20 Bytes) |
| val | is the data |
| ttl | is the time-to-live in the DHT |
void OpenDHT::setId |
( |
QString |
id |
) |
|
Set the id of this instance.
- Parameters:
-
The documentation for this class was generated from the following files:
- C:/Workspace/SourceForge/Privl_S60/inc/tools/OpenDHT.h
- C:/Workspace/SourceForge/Privl_S60/build/moc/moc_OpenDHT.cpp
- C:/Workspace/SourceForge/Privl_S60/src/tools/OpenDHT.cpp