toxcore update + private interface update
This commit is contained in:
parent
e801626232
commit
3cf3097094
2
external/solanaceae_tox
vendored
2
external/solanaceae_tox
vendored
@ -1 +1 @@
|
||||
Subproject commit 4bd7235a739dec020365d216509474f641029113
|
||||
Subproject commit ce81ef7cf7cea2fe2091912c9eafe787cbba6100
|
2
external/solanaceae_toxcore
vendored
2
external/solanaceae_toxcore
vendored
@ -1 +1 @@
|
||||
Subproject commit 3b75a1c5d30c945d98df61513d80bc1b9c3ea8a0
|
||||
Subproject commit cf3679018be3f90db0f2f1e9433a966692976421
|
@ -16,4 +16,20 @@ struct ToxPrivateImpl : public ToxPrivateI {
|
||||
uint16_t toxDHTGetNumCloselistAnnounceCapable(void) override {
|
||||
return tox_dht_get_num_closelist_announce_capable(_tox);
|
||||
}
|
||||
|
||||
std::tuple<std::optional<std::string>, Tox_Err_Group_Peer_Query> toxGroupPeerGetIPAddress(uint32_t group_number, uint32_t peer_id) override {
|
||||
Tox_Err_Group_Peer_Query err = TOX_ERR_GROUP_PEER_QUERY_OK;
|
||||
size_t str_size = tox_group_peer_get_ip_address_size(_tox, group_number, peer_id, &err);
|
||||
if (err != TOX_ERR_GROUP_PEER_QUERY_OK) {
|
||||
return {std::nullopt, err};
|
||||
}
|
||||
std::string ip_str(str_size, '\0');
|
||||
|
||||
tox_group_peer_get_ip_address(_tox, group_number, peer_id, reinterpret_cast<uint8_t*>(ip_str.data()), &err);
|
||||
if (err == TOX_ERR_GROUP_PEER_QUERY_OK) {
|
||||
return {ip_str, err};
|
||||
} else {
|
||||
return {std::nullopt, err};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user