mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
python: implement Value.owner, Value.recipient
This commit is contained in:
1 parent
e60b6bead5
commit
6b6d18b750
2 files changed
+24
-8
No files matched your search
+12
-8
@@ -39,14 +39,6 @@ cdef extern from "opendht/infohash.h" namespace "dht":
|
||||
@staticmethod
|
||||
InfoHash getRandom()
|
||||
|
||||
cdef extern from "opendht/value.h" namespace "dht":
|
||||
cdef cppclass Value:
|
||||
Value() except +
|
||||
Value(vector[uint8_t]) except +
|
||||
Value(const uint8_t* dat_ptr, size_t dat_len) except +
|
||||
string toString() const
|
||||
vector[uint8_t] data
|
||||
|
||||
cdef extern from "opendht/crypto.h" namespace "dht::crypto":
|
||||
ctypedef pair[shared_ptr[PrivateKey], shared_ptr[Certificate]] Identity
|
||||
cdef Identity generateIdentity(string name, Identity ca, unsigned bits)
|
||||
@@ -63,6 +55,18 @@ cdef extern from "opendht/crypto.h" namespace "dht::crypto":
|
||||
Certificate()
|
||||
InfoHash getId() const
|
||||
|
||||
cdef extern from "opendht/value.h" namespace "dht":
|
||||
cdef cppclass Value:
|
||||
Value() except +
|
||||
Value(vector[uint8_t]) except +
|
||||
Value(const uint8_t* dat_ptr, size_t dat_len) except +
|
||||
string toString() const
|
||||
uint64_t id
|
||||
PublicKey owner
|
||||
InfoHash recipient
|
||||
vector[uint8_t] data
|
||||
string user_type
|
||||
|
||||
cdef extern from "opendht/dht.h" namespace "dht":
|
||||
cdef cppclass Node:
|
||||
Node() except +
|
||||
|
||||
Reference in new issue
Block a user