mirror of https://github.com/PurpleI2P/i2pd.git
orignal
10 years ago
7 changed files with 59 additions and 6 deletions
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#include <boost/property_tree/ptree.hpp> |
||||
#include <boost/property_tree/ini_parser.hpp> |
||||
#include "Profiling.h" |
||||
|
||||
namespace i2p |
||||
{ |
||||
namespace data |
||||
{ |
||||
RouterProfile::RouterProfile (const IdentHash& identHash): |
||||
m_IdentHash (identHash), m_NumTunnelsAgreed (0), m_NumTunnelsDeclined (0) |
||||
{ |
||||
} |
||||
|
||||
std::shared_ptr<RouterProfile> GetProfile (const IdentHash& identHash) |
||||
{ |
||||
return std::make_shared<RouterProfile> (identHash); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#ifndef PROFILING_H__ |
||||
#define PROFILING_H__ |
||||
|
||||
#include <memory> |
||||
#include "Identity.h" |
||||
|
||||
namespace i2p |
||||
{ |
||||
namespace data |
||||
{ |
||||
class RouterProfile |
||||
{ |
||||
public: |
||||
|
||||
RouterProfile (const IdentHash& identHash); |
||||
|
||||
private: |
||||
|
||||
IdentHash m_IdentHash; |
||||
// participation
|
||||
uint32_t m_NumTunnelsAgreed; |
||||
uint32_t m_NumTunnelsDeclined; |
||||
}; |
||||
|
||||
std::shared_ptr<RouterProfile> GetProfile (const IdentHash& identHash); |
||||
} |
||||
} |
||||
|
||||
#endif |
Loading…
Reference in new issue