mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Allow reference tgcalls implementation.
This commit is contained in:
@@ -34,6 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
namespace tgcalls {
|
namespace tgcalls {
|
||||||
class InstanceImpl;
|
class InstanceImpl;
|
||||||
class InstanceImplLegacy;
|
class InstanceImplLegacy;
|
||||||
|
class InstanceImplReference;
|
||||||
void SetLegacyGlobalServerConfig(const std::string &serverConfig);
|
void SetLegacyGlobalServerConfig(const std::string &serverConfig);
|
||||||
} // namespace tgcalls
|
} // namespace tgcalls
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ const auto kDefaultVersion = "2.4.4"_q;
|
|||||||
|
|
||||||
const auto RegisterTag = tgcalls::Register<tgcalls::InstanceImpl>();
|
const auto RegisterTag = tgcalls::Register<tgcalls::InstanceImpl>();
|
||||||
const auto RegisterTagLegacy = tgcalls::Register<tgcalls::InstanceImplLegacy>();
|
const auto RegisterTagLegacy = tgcalls::Register<tgcalls::InstanceImplLegacy>();
|
||||||
|
const auto RegisterTagReference = tgcalls::Register<tgcalls::InstanceImplReference>();
|
||||||
|
|
||||||
void AppendEndpoint(
|
void AppendEndpoint(
|
||||||
std::vector<tgcalls::Endpoint> &list,
|
std::vector<tgcalls::Endpoint> &list,
|
||||||
@@ -56,7 +58,7 @@ void AppendEndpoint(
|
|||||||
if (data.vpeer_tag().v.length() != 16) {
|
if (data.vpeer_tag().v.length() != 16) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto endpoint = tgcalls::Endpoint{
|
tgcalls::Endpoint endpoint = {
|
||||||
.endpointId = (int64_t)data.vid().v,
|
.endpointId = (int64_t)data.vid().v,
|
||||||
.host = tgcalls::EndpointHost{
|
.host = tgcalls::EndpointHost{
|
||||||
.ipv4 = data.vip().v.toStdString(),
|
.ipv4 = data.vip().v.toStdString(),
|
||||||
@@ -654,7 +656,7 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
|
|||||||
memcpy(encryptionKeyValue->data(), _authKey.data(), 256);
|
memcpy(encryptionKeyValue->data(), _authKey.data(), 256);
|
||||||
|
|
||||||
const auto weak = base::make_weak(this);
|
const auto weak = base::make_weak(this);
|
||||||
auto descriptor = tgcalls::Descriptor{
|
tgcalls::Descriptor descriptor = {
|
||||||
.config = tgcalls::Config{
|
.config = tgcalls::Config{
|
||||||
.initializationTimeout = serverConfig.callConnectTimeoutMs / 1000.,
|
.initializationTimeout = serverConfig.callConnectTimeoutMs / 1000.,
|
||||||
.receiveTimeout = serverConfig.callPacketTimeoutMs / 1000.,
|
.receiveTimeout = serverConfig.callPacketTimeoutMs / 1000.,
|
||||||
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
Submodule Telegram/ThirdParty/tgcalls updated: cad0db2f0d...a0e5c98cfd
@@ -79,6 +79,9 @@ PRIVATE
|
|||||||
# Linux
|
# Linux
|
||||||
|
|
||||||
# POSIX
|
# POSIX
|
||||||
|
|
||||||
|
reference/InstanceImplReference.cpp
|
||||||
|
reference/InstanceImplReference.h
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(lib_tgcalls
|
target_compile_definitions(lib_tgcalls
|
||||||
|
Submodule Telegram/lib_webrtc updated: 817d74d734...29026bab21
2
cmake
2
cmake
Submodule cmake updated: d7c7e92ebc...83150a4691
Reference in New Issue
Block a user