|
|
using | ValuesExport = std::pair< InfoHash, Blob > |
| |
|
using | QueryCallback = std::function< bool(const std::vector< std::shared_ptr< FieldValueIndex > > &fields)> |
| |
|
using | GetCallback = std::function< bool(const std::vector< std::shared_ptr< Value > > &values)> |
| |
|
using | ValueCallback = std::function< bool(const std::vector< std::shared_ptr< Value > > &values, bool expired)> |
| |
|
using | GetCallbackSimple = std::function< bool(std::shared_ptr< Value > value)> |
| |
|
using | ShutdownCallback = std::function< void()> |
| |
|
using | IdentityAnnouncedCb = std::function< void(bool)> |
| |
|
using | CertificateStoreQuery = std::function< std::vector< std::shared_ptr< crypto::Certificate > >(const InfoHash &pk_id)> |
| |
|
typedef bool(* | GetCallbackRaw) (std::shared_ptr< Value >, void *user_data) |
| |
|
typedef bool(* | ValueCallbackRaw) (std::shared_ptr< Value >, bool expired, void *user_data) |
| |
|
using | DoneCallback = std::function< void(bool success, const std::vector< std::shared_ptr< Node > > &nodes)> |
| |
|
typedef void(* | DoneCallbackRaw) (bool, std::vector< std::shared_ptr< Node >> *, void *user_data) |
| |
|
typedef void(* | ShutdownCallbackRaw) (void *user_data) |
| |
|
typedef void(* | DoneCallbackSimpleRaw) (bool, void *user_data) |
| |
|
typedef bool(* | FilterRaw) (const Value &, void *user_data) |
| |
|
using | DoneCallbackSimple = std::function< void(bool success)> |
| |
|
using | RestRouter = restinio::router::express_router_t<> |
| |
|
using | RequestStatus = restinio::request_handling_status_t |
| |
|
using | byte = uint8_t |
| |
|
using | InfoHash = Hash< HASH_LEN > |
| |
|
using | h256 = Hash< 32 > |
| |
|
using | PkId = h256 |
| |
|
using | Tid = uint32_t |
| |
|
using | SocketCb = std::function< void(const Sp< Node > &, net::RequestAnswer &&)> |
| |
|
using | NetId = uint32_t |
| |
|
using | want_t = int_fast8_t |
| |
|
template<class T > |
| using | Sp = std::shared_ptr< T > |
| |
|
using | clock = std::chrono::steady_clock |
| |
|
using | system_clock = std::chrono::system_clock |
| |
|
using | time_point = clock::time_point |
| |
|
using | duration = clock::duration |
| |
| using | Blob = std::vector< uint8_t > |
| |
| using | StorePolicy = std::function< bool(InfoHash key, std::shared_ptr< Value > &value, const InfoHash &from, const SockAddr &addr)> |
| |
| using | EditPolicy = std::function< bool(InfoHash key, const std::shared_ptr< Value > &old_val, std::shared_ptr< Value > &new_val, const InfoHash &from, const SockAddr &addr)> |
| |
|
|
constexpr const char * | statusToStr (NodeStatus status) |
| |
|
OPENDHT_PUBLIC GetCallbackSimple | bindGetCb (GetCallbackRaw raw_cb, void *user_data) |
| |
|
OPENDHT_PUBLIC GetCallback | bindGetCb (GetCallbackSimple cb) |
| |
|
OPENDHT_PUBLIC ValueCallback | bindValueCb (ValueCallbackRaw raw_cb, void *user_data) |
| |
|
OPENDHT_PUBLIC ShutdownCallback | bindShutdownCb (ShutdownCallbackRaw shutdown_cb_raw, void *user_data) |
| |
|
OPENDHT_PUBLIC DoneCallback | bindDoneCb (DoneCallbackSimple donecb) |
| |
|
OPENDHT_PUBLIC DoneCallback | bindDoneCb (DoneCallbackRaw raw_cb, void *user_data) |
| |
|
OPENDHT_PUBLIC DoneCallbackSimple | bindDoneCbSimple (DoneCallbackSimpleRaw raw_cb, void *user_data) |
| |
|
OPENDHT_PUBLIC Value::Filter | bindFilterRaw (FilterRaw raw_filter, void *user_data) |
| |
|
template<size_t N> |
| std::ostream & | operator<< (std::ostream &s, const Hash< N > &h) |
| |
|
template<size_t N> |
| std::istream & | operator>> (std::istream &s, Hash< N > &h) |
| |
|
std::string | toHex (const uint8_t *data, size_t size) |
| |
|
std::string | toHex (const std::vector< uint8_t > &data) |
| |
|
OPENDHT_PUBLIC std::string | print_addr (const sockaddr *sa, socklen_t slen) |
| |
|
OPENDHT_PUBLIC std::string | print_addr (const sockaddr_storage &ss, socklen_t sslen) |
| |
|
OPENDHT_PUBLIC bool | operator== (const SockAddr &a, const SockAddr &b) |
| |
|
OPENDHT_PUBLIC const char * | version () |
| |
|
template<typename Key , typename Item , typename Condition > |
| void | erase_if (std::map< Key, Item > &map, const Condition &condition) |
| |
| OPENDHT_PUBLIC std::pair< std::string, std::string > | splitPort (const std::string &s) |
| |
|
time_point | from_time_t (std::time_t t) |
| |
|
std::time_t | to_time_t (time_point t) |
| |
|
std::string | to_str (double d) |
| |
| template<class DT > |
| static double | print_dt (DT d) |
| |
|
template<class DT > |
| static std::string | print_duration (DT d) |
| |
|
template<class TimePoint > |
| static std::string | print_time_relative (TimePoint now, TimePoint d) |
| |
| OPENDHT_PUBLIC Blob | unpackBlob (const msgpack::object &o) |
| |
|
template<typename Type > |
| Blob | packMsg (const Type &t) |
| |
|
template<typename Type > |
| Type | unpackMsg (Blob b) |
| |
|
msgpack::object * | findMapValue (const msgpack::object &map, const char *key, size_t length) |
| |
|
msgpack::object * | findMapValue (const msgpack::object &map, const char *key) |
| |
|
msgpack::object * | findMapValue (const msgpack::object &map, std::string_view key) |
| |
|
static constexpr auto | VALUE_KEY_ID ("id") |
| |
|
static const std::string | VALUE_KEY_DAT ("dat") |
| |
|
static const std::string | VALUE_KEY_PRIO ("p") |
| |
|
static const std::string | VALUE_KEY_SIGNATURE ("sig") |
| |
|
static const std::string | VALUE_KEY_SEQ ("seq") |
| |
|
static const std::string | VALUE_KEY_DATA ("data") |
| |
|
static const std::string | VALUE_KEY_OWNER ("owner") |
| |
|
static const std::string | VALUE_KEY_TYPE ("type") |
| |
|
static const std::string | VALUE_KEY_TO ("to") |
| |
|
static const std::string | VALUE_KEY_BODY ("body") |
| |
|
static const std::string | VALUE_KEY_USERTYPE ("utype") |
| |
|
template<typename T , typename std::enable_if< std::is_base_of< Value::SerializableBase, T >::value, T >::type * = nullptr> |
| Value::Filter | getFilterSet (Value::Filter f) |
| |
|
template<typename T , typename std::enable_if< std::is_base_of< Value::SerializableBase, T >::value, T >::type * = nullptr> |
| Value::Filter | getFilterSet () |
| |
|
template<class T > |
| std::vector< T > | unpackVector (const std::vector< std::shared_ptr< Value >> &vals) |
| |