#ifndef TGCALLS_INSTANCEV2_IMPL_H #define TGCALLS_INSTANCEV2_IMPL_H #include "Instance.h" #include "StaticThreads.h" namespace tgcalls { class LogSinkImpl; class Manager; template class ThreadLocalObject; class InstanceV2ImplInternal; class InstanceV2Impl final : public Instance { public: explicit InstanceV2Impl(Descriptor &&descriptor); ~InstanceV2Impl() override; void receiveSignalingData(const std::vector &data) override; void setVideoCapture(std::shared_ptr videoCapture) override; void setRequestedVideoAspect(float aspect) override; void setNetworkType(NetworkType networkType) override; void setMuteMicrophone(bool muteMicrophone) override; bool supportsVideo() override { return true; } void setIncomingVideoOutput(std::shared_ptr> sink) override; void setAudioOutputGainControlEnabled(bool enabled) override; void setEchoCancellationStrength(int strength) override; void setAudioInputDevice(std::string id) override; void setAudioOutputDevice(std::string id) override; void setInputVolume(float level) override; void setOutputVolume(float level) override; void setAudioOutputDuckingEnabled(bool enabled) override; void setIsLowBatteryLevel(bool isLowBatteryLevel) override; static std::vector GetVersions(); static int GetConnectionMaxLayer(); std::string getLastError() override; std::string getDebugInfo() override; int64_t getPreferredRelayId() override; TrafficStats getTrafficStats() override; PersistentState getPersistentState() override; void stop(std::function completion) override; private: std::shared_ptr _threads; std::unique_ptr> _internal; std::unique_ptr _logSink; }; } // namespace tgcalls #endif