diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-02-08 15:53:45 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-02-08 15:53:45 +0000 |
| commit | 1b7c1982896dba1d38e1fe84ba9660996607f5f9 (patch) | |
| tree | d12047cb37ded1e18d4d5b97844412538beb19ff /src/DHTTokenTracker.h | |
| parent | d82e183d346375ac8a58a298a58728be615f947e (diff) | |
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std::
prefix to c++
standard classes.
Included string.h where mem* function are used.
Diffstat (limited to 'src/DHTTokenTracker.h')
| -rw-r--r-- | src/DHTTokenTracker.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/DHTTokenTracker.h b/src/DHTTokenTracker.h index 2c510a91..9fb2f788 100644 --- a/src/DHTTokenTracker.h +++ b/src/DHTTokenTracker.h @@ -36,7 +36,9 @@ #define _D_DHT_TOKEN_TRACKER_H_ #include "common.h" -#include "DHTTokenTrackerDecl.h" +#include <string> + +namespace aria2 { class DHTTokenTracker { private: @@ -44,9 +46,9 @@ private: char _secret[2][SECRET_SIZE]; - string generateToken(const unsigned char* infoHash, - const string& ipaddr, uint16_t port, - const char* secret) const; + std::string generateToken(const unsigned char* infoHash, + const std::string& ipaddr, uint16_t port, + const char* secret) const; public: DHTTokenTracker(); @@ -55,14 +57,16 @@ public: ~DHTTokenTracker(); // TODO handle exception thrown by this function. - string generateToken(const unsigned char* infoHash, - const string& ipaddr, uint16_t port) const; + std::string generateToken(const unsigned char* infoHash, + const std::string& ipaddr, uint16_t port) const; - bool validateToken(const string& token, + bool validateToken(const std::string& token, const unsigned char* infoHash, - const string& ipaddr, uint16_t port) const; + const std::string& ipaddr, uint16_t port) const; void updateTokenSecret(); }; +} // namespace aria2 + #endif // _D_DHT_TOKEN_TRACKER_H_ |
