diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-26 22:02:48 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-26 22:02:48 +0900 |
| commit | c13dc166dec73d93dbc05d5cbb53e51dac5d4dc8 (patch) | |
| tree | 9934c2d6c6693315c4f62f13b3525da62cf7de0e /src/PeerSessionResource.h | |
| parent | f0000a87544fde9beb3d38fa979f02ce001c7efe (diff) | |
Rewritten ExtensionMessageRegistry
Diffstat (limited to 'src/PeerSessionResource.h')
| -rw-r--r-- | src/PeerSessionResource.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/PeerSessionResource.h b/src/PeerSessionResource.h index aab6ebbc..c0d19261 100644 --- a/src/PeerSessionResource.h +++ b/src/PeerSessionResource.h @@ -43,6 +43,7 @@ #include "BtConstants.h" #include "PeerStat.h" #include "TimerA2.h" +#include "ExtensionMessageRegistry.h" namespace aria2 { @@ -73,7 +74,7 @@ private: // fast index set which localhost has sent to a peer. std::set<size_t> amAllowedIndexSet_; bool extendedMessagingEnabled_; - Extensions extensions_; + ExtensionMessageRegistry extreg_; bool dhtEnabled_; PeerStat peerStat_; @@ -192,11 +193,11 @@ public: void extendedMessagingEnabled(bool b); - uint8_t getExtensionMessageID(const std::string& name) const; + uint8_t getExtensionMessageID(int key) const; - std::string getExtensionName(uint8_t id) const; + const char* getExtensionName(uint8_t id) const; - void addExtension(const std::string& name, uint8_t id); + void addExtension(int key, uint8_t id); bool dhtEnabled() const { |
