Allow reference tgcalls implementation.

This commit is contained in:
John Preston 2020-07-30 14:32:37 +04:00
parent c1f727bde9
commit b692242012
5 changed files with 10 additions and 5 deletions

View File

@ -34,6 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace tgcalls {
class InstanceImpl;
class InstanceImplLegacy;
class InstanceImplReference;
void SetLegacyGlobalServerConfig(const std::string &serverConfig);
} // namespace tgcalls
@ -48,6 +49,7 @@ const auto kDefaultVersion = "2.4.4"_q;
const auto RegisterTag = tgcalls::Register<tgcalls::InstanceImpl>();
const auto RegisterTagLegacy = tgcalls::Register<tgcalls::InstanceImplLegacy>();
const auto RegisterTagReference = tgcalls::Register<tgcalls::InstanceImplReference>();
void AppendEndpoint(
std::vector<tgcalls::Endpoint> &list,
@ -56,7 +58,7 @@ void AppendEndpoint(
if (data.vpeer_tag().v.length() != 16) {
return;
}
auto endpoint = tgcalls::Endpoint{
tgcalls::Endpoint endpoint = {
.endpointId = (int64_t)data.vid().v,
.host = tgcalls::EndpointHost{
.ipv4 = data.vip().v.toStdString(),
@ -654,7 +656,7 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
memcpy(encryptionKeyValue->data(), _authKey.data(), 256);
const auto weak = base::make_weak(this);
auto descriptor = tgcalls::Descriptor{
tgcalls::Descriptor descriptor = {
.config = tgcalls::Config{
.initializationTimeout = serverConfig.callConnectTimeoutMs / 1000.,
.receiveTimeout = serverConfig.callPacketTimeoutMs / 1000.,

@ -1 +1 @@
Subproject commit cad0db2f0d96cf137820fd787e7def6b16ee55c7
Subproject commit a0e5c98cfd8c53d3a8dc7fd1ff47552f0f5ea1cd

View File

@ -79,6 +79,9 @@ PRIVATE
# Linux
# POSIX
reference/InstanceImplReference.cpp
reference/InstanceImplReference.h
)
target_compile_definitions(lib_tgcalls

@ -1 +1 @@
Subproject commit 817d74d734385fa4eb814c7f3ff0b4284b872b91
Subproject commit 29026bab2166c746b51c088de4a218f9b7a5921e

2
cmake

@ -1 +1 @@
Subproject commit d7c7e92ebc68bb9b6c5187dc8476d9f62b00058c
Subproject commit 83150a4691abed94cd349296baeb470ca973b0eb