Commit 09a04cd3 authored by Guillaume Roguez's avatar Guillaume Roguez

daemon: namespace cleanup

- all the code moved under the ring namespace, or a sub-namespace,
exception of ring_api.cpp as exporting a C accessible API.
- fixed namespaces hierarchy.
- removed forbiden usage of using-declaration.

Refs #64647

Change-Id: I23fdeca1252150d490828c1ce907097f17e1d41c
parent d6e8102e
...@@ -169,7 +169,7 @@ int main(int argc, char *argv []) ...@@ -169,7 +169,7 @@ int main(int argc, char *argv [])
std::vector<char> writable(programName.size() + 1); std::vector<char> writable(programName.size() + 1);
std::copy(programName.begin(), programName.end(), writable.begin()); std::copy(programName.begin(), programName.end(), writable.begin());
fileutils::set_program_dir(writable.data()); ring::fileutils::set_program_dir(writable.data());
#ifdef TOP_BUILDDIR #ifdef TOP_BUILDDIR
if (!getenv("CODECS_PATH")) if (!getenv("CODECS_PATH"))
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include <yaml-cpp/yaml.h> #include <yaml-cpp/yaml.h>
namespace ring {
const char * const Account::AUDIO_CODECS_KEY = "audioCodecs"; // 0/9/110/111/112/ const char * const Account::AUDIO_CODECS_KEY = "audioCodecs"; // 0/9/110/111/112/
const char * const Account::VIDEO_CODECS_KEY = "videoCodecs"; const char * const Account::VIDEO_CODECS_KEY = "videoCodecs";
const char * const Account::VIDEO_CODEC_ENABLED = "enabled"; const char * const Account::VIDEO_CODEC_ENABLED = "enabled";
...@@ -173,8 +175,6 @@ void Account::loadDefaultCodecs() ...@@ -173,8 +175,6 @@ void Account::loadDefaultCodecs()
void Account::serialize(YAML::Emitter &out) void Account::serialize(YAML::Emitter &out)
{ {
using namespace Conf;
out << YAML::Key << ID_KEY << YAML::Value << accountID_; out << YAML::Key << ID_KEY << YAML::Value << accountID_;
out << YAML::Key << ALIAS_KEY << YAML::Value << alias_; out << YAML::Key << ALIAS_KEY << YAML::Value << alias_;
out << YAML::Key << ACCOUNT_ENABLE_KEY << YAML::Value << enabled_; out << YAML::Key << ACCOUNT_ENABLE_KEY << YAML::Value << enabled_;
...@@ -193,7 +193,8 @@ void Account::serialize(YAML::Emitter &out) ...@@ -193,7 +193,8 @@ void Account::serialize(YAML::Emitter &out)
void Account::unserialize(const YAML::Node &node) void Account::unserialize(const YAML::Node &node)
{ {
using namespace yaml_utils; using yaml_utils::parseValue;
parseValue(node, ALIAS_KEY, alias_); parseValue(node, ALIAS_KEY, alias_);
parseValue(node, ACCOUNT_ENABLE_KEY, enabled_); parseValue(node, ACCOUNT_ENABLE_KEY, enabled_);
parseValue(node, USERNAME_KEY, username_); parseValue(node, USERNAME_KEY, username_);
...@@ -204,7 +205,7 @@ void Account::unserialize(const YAML::Node &node) ...@@ -204,7 +205,7 @@ void Account::unserialize(const YAML::Node &node)
parseValue(node, AUDIO_CODECS_KEY, audioCodecStr_); parseValue(node, AUDIO_CODECS_KEY, audioCodecStr_);
// Update codec list which one is used for SDP offer // Update codec list which one is used for SDP offer
setActiveAudioCodecs(ring::split_string(audioCodecStr_, '/')); setActiveAudioCodecs(split_string(audioCodecStr_, '/'));
parseValue(node, DISPLAY_NAME_KEY, displayName_); parseValue(node, DISPLAY_NAME_KEY, displayName_);
parseValue(node, HOSTNAME_KEY, hostname_); parseValue(node, HOSTNAME_KEY, hostname_);
...@@ -217,18 +218,18 @@ void Account::unserialize(const YAML::Node &node) ...@@ -217,18 +218,18 @@ void Account::unserialize(const YAML::Node &node)
void Account::setAccountDetails(const std::map<std::string, std::string> &details) void Account::setAccountDetails(const std::map<std::string, std::string> &details)
{ {
// Account setting common to SIP and IAX // Account setting common to SIP and IAX
parseString(details, CONFIG_ACCOUNT_ALIAS, alias_); parseString(details, Conf::CONFIG_ACCOUNT_ALIAS, alias_);
parseBool(details, CONFIG_ACCOUNT_ENABLE, enabled_); parseBool(details, Conf::CONFIG_ACCOUNT_ENABLE, enabled_);
parseString(details, CONFIG_ACCOUNT_USERNAME, username_); parseString(details, Conf::CONFIG_ACCOUNT_USERNAME, username_);
parseString(details, CONFIG_ACCOUNT_HOSTNAME, hostname_); parseString(details, Conf::CONFIG_ACCOUNT_HOSTNAME, hostname_);
parseString(details, CONFIG_ACCOUNT_MAILBOX, mailBox_); parseString(details, Conf::CONFIG_ACCOUNT_MAILBOX, mailBox_);
parseString(details, CONFIG_ACCOUNT_USERAGENT, userAgent_); parseString(details, Conf::CONFIG_ACCOUNT_USERAGENT, userAgent_);
parseBool(details, CONFIG_ACCOUNT_AUTOANSWER, autoAnswerEnabled_); parseBool(details, Conf::CONFIG_ACCOUNT_AUTOANSWER, autoAnswerEnabled_);
parseBool(details, CONFIG_RINGTONE_ENABLED, ringtoneEnabled_); parseBool(details, Conf::CONFIG_RINGTONE_ENABLED, ringtoneEnabled_);
parseString(details, CONFIG_RINGTONE_PATH, ringtonePath_); parseString(details, Conf::CONFIG_RINGTONE_PATH, ringtonePath_);
parseBool(details, CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT, hasCustomUserAgent_); parseBool(details, Conf::CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT, hasCustomUserAgent_);
if (hasCustomUserAgent_) if (hasCustomUserAgent_)
parseString(details, CONFIG_ACCOUNT_USERAGENT, userAgent_); parseString(details, Conf::CONFIG_ACCOUNT_USERAGENT, userAgent_);
else else
userAgent_ = DEFAULT_USER_AGENT; userAgent_ = DEFAULT_USER_AGENT;
} }
...@@ -237,23 +238,23 @@ std::map<std::string, std::string> Account::getAccountDetails() const ...@@ -237,23 +238,23 @@ std::map<std::string, std::string> Account::getAccountDetails() const
{ {
std::map<std::string, std::string> a; std::map<std::string, std::string> a;
a[CONFIG_ACCOUNT_ALIAS] = alias_; a[Conf::CONFIG_ACCOUNT_ALIAS] = alias_;
a[CONFIG_ACCOUNT_ENABLE] = enabled_ ? "true" : "false"; a[Conf::CONFIG_ACCOUNT_ENABLE] = enabled_ ? "true" : "false";
a[CONFIG_ACCOUNT_TYPE] = getAccountType(); a[Conf::CONFIG_ACCOUNT_TYPE] = getAccountType();
a[CONFIG_ACCOUNT_HOSTNAME] = hostname_; a[Conf::CONFIG_ACCOUNT_HOSTNAME] = hostname_;
a[CONFIG_ACCOUNT_USERNAME] = username_; a[Conf::CONFIG_ACCOUNT_USERNAME] = username_;
a[CONFIG_ACCOUNT_MAILBOX] = mailBox_; a[Conf::CONFIG_ACCOUNT_MAILBOX] = mailBox_;
RegistrationState state(registrationState_); RegistrationState state(registrationState_);
// This method should only stores user-settable fields // This method should only stores user-settable fields
// For legacy reasons, the STATUS will be kept for some time // For legacy reasons, the STATUS will be kept for some time
a[CONFIG_ACCOUNT_REGISTRATION_STATUS] = mapStateNumberToString(state); a[Conf::CONFIG_ACCOUNT_REGISTRATION_STATUS] = mapStateNumberToString(state);
a[CONFIG_ACCOUNT_USERAGENT] = hasCustomUserAgent_ ? userAgent_ : DEFAULT_USER_AGENT; a[Conf::CONFIG_ACCOUNT_USERAGENT] = hasCustomUserAgent_ ? userAgent_ : DEFAULT_USER_AGENT;
a[CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT] = hasCustomUserAgent_ ? TRUE_STR : FALSE_STR; a[Conf::CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT] = hasCustomUserAgent_ ? TRUE_STR : FALSE_STR;
a[CONFIG_ACCOUNT_AUTOANSWER] = autoAnswerEnabled_ ? TRUE_STR : FALSE_STR; a[Conf::CONFIG_ACCOUNT_AUTOANSWER] = autoAnswerEnabled_ ? TRUE_STR : FALSE_STR;
a[CONFIG_RINGTONE_ENABLED] = ringtoneEnabled_ ? TRUE_STR : FALSE_STR; a[Conf::CONFIG_RINGTONE_ENABLED] = ringtoneEnabled_ ? TRUE_STR : FALSE_STR;
a[CONFIG_RINGTONE_PATH] = ringtonePath_; a[Conf::CONFIG_RINGTONE_PATH] = ringtonePath_;
return a; return a;
} }
...@@ -262,7 +263,7 @@ std::map<std::string, std::string> Account::getVolatileAccountDetails() const ...@@ -262,7 +263,7 @@ std::map<std::string, std::string> Account::getVolatileAccountDetails() const
{ {
std::map<std::string, std::string> a; std::map<std::string, std::string> a;
a[CONFIG_ACCOUNT_REGISTRATION_STATUS] = mapStateNumberToString(registrationState_); a[Conf::CONFIG_ACCOUNT_REGISTRATION_STATUS] = mapStateNumberToString(registrationState_);
return a; return a;
} }
...@@ -452,3 +453,5 @@ Account::parseBool(const std::map<std::string, std::string> &details, const char ...@@ -452,3 +453,5 @@ Account::parseBool(const std::map<std::string, std::string> &details, const char
} }
#undef find_iter #undef find_iter
} // namespace ring
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
#include <random> #include <random>
#include <stdexcept> #include <stdexcept>
namespace YAML {
class Emitter;
class Node;
}
namespace ring {
class Call; class Call;
class VoipLinkException : public std::runtime_error { class VoipLinkException : public std::runtime_error {
...@@ -54,11 +61,6 @@ class VoipLinkException : public std::runtime_error { ...@@ -54,11 +61,6 @@ class VoipLinkException : public std::runtime_error {
std::runtime_error("VoipLinkException occured: " + str) {} std::runtime_error("VoipLinkException occured: " + str) {}
}; };
namespace YAML {
class Emitter;
class Node;
}
/** /**
* @file account.h * @file account.h
* @brief Interface to protocol account (SIPAccount, IAXAccount) * @brief Interface to protocol account (SIPAccount, IAXAccount)
...@@ -375,4 +377,6 @@ class Account : public Serializable, public std::enable_shared_from_this<Account ...@@ -375,4 +377,6 @@ class Account : public Serializable, public std::enable_shared_from_this<Account
std::mt19937_64 rand_ {}; std::mt19937_64 rand_ {};
}; };
} // namespace ring
#endif #endif
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
#include <stdexcept> #include <stdexcept>
namespace ring {
const char* const AccountFactory::DEFAULT_ACCOUNT_TYPE = SIPAccount::ACCOUNT_TYPE; const char* const AccountFactory::DEFAULT_ACCOUNT_TYPE = SIPAccount::ACCOUNT_TYPE;
AccountFactory::AccountFactory() AccountFactory::AccountFactory()
...@@ -213,3 +215,5 @@ void AccountFactory::initIP2IPAccount() ...@@ -213,3 +215,5 @@ void AccountFactory::initIP2IPAccount()
ip2ip_account_ = createAccount(SIPAccount::ACCOUNT_TYPE, ip2ip_account_ = createAccount(SIPAccount::ACCOUNT_TYPE,
SIPAccount::IP2IP_PROFILE); SIPAccount::IP2IP_PROFILE);
} }
} // namespace ring
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include <mutex> #include <mutex>
#include <utility> #include <utility>
namespace ring {
class Account; class Account;
class AccountGeneratorBase; class AccountGeneratorBase;
...@@ -169,4 +171,6 @@ template <> ...@@ -169,4 +171,6 @@ template <>
std::size_t std::size_t
AccountFactory::accountCount() const; AccountFactory::accountCount() const;
} // namespace ring
#endif // ACCOUNT_FACTORY_H #endif // ACCOUNT_FACTORY_H
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
* @brief Account specfic keys/constants that must be shared in daemon and clients. * @brief Account specfic keys/constants that must be shared in daemon and clients.
*/ */
namespace ring { namespace Conf {
// Common account parameters // Common account parameters
static const char *const CONFIG_ACCOUNT_TYPE = "Account.type"; static const char *const CONFIG_ACCOUNT_TYPE = "Account.type";
static const char *const CONFIG_ACCOUNT_ALIAS = "Account.alias"; static const char *const CONFIG_ACCOUNT_ALIAS = "Account.alias";
...@@ -112,4 +114,6 @@ static const char *const CONFIG_ACCOUNT_REGISTRATION_STATE_DESC = "Account.regis ...@@ -112,4 +114,6 @@ static const char *const CONFIG_ACCOUNT_REGISTRATION_STATE_DESC = "Account.regis
static const char *const CONFIG_TRANSPORT_STATE_CODE = "Transport.statusCode"; static const char *const CONFIG_TRANSPORT_STATE_CODE = "Transport.statusCode";
static const char *const CONFIG_TRANSPORT_STATE_DESC = "Transport.statusDescription"; static const char *const CONFIG_TRANSPORT_STATE_DESC = "Transport.statusDescription";
}} // namespace ring::Conf
#endif // ACCOUNT_SCHEMA_H_ #endif // ACCOUNT_SCHEMA_H_
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include "map_utils.h" #include "map_utils.h"
#include "call_factory.h" #include "call_factory.h"
namespace ring {
Call::Call(Account& account, const std::string& id, Call::CallType type) Call::Call(Account& account, const std::string& id, Call::CallType type)
: id_(id) : id_(id)
, type_(type) , type_(type)
...@@ -199,17 +201,17 @@ bool ...@@ -199,17 +201,17 @@ bool
Call::toggleRecording() Call::toggleRecording()
{ {
const bool startRecording = Recordable::toggleRecording(); const bool startRecording = Recordable::toggleRecording();
ring::RingBufferPool &rbPool = Manager::instance().getRingBufferPool(); RingBufferPool &rbPool = Manager::instance().getRingBufferPool();
std::string process_id = Recordable::recorder_.getRecorderID(); std::string process_id = Recordable::recorder_.getRecorderID();
if (startRecording) { if (startRecording) {
rbPool.bindHalfDuplexOut(process_id, id_); rbPool.bindHalfDuplexOut(process_id, id_);
rbPool.bindHalfDuplexOut(process_id, ring::RingBufferPool::DEFAULT_ID); rbPool.bindHalfDuplexOut(process_id, RingBufferPool::DEFAULT_ID);
Recordable::recorder_.start(); Recordable::recorder_.start();
} else { } else {
rbPool.unBindHalfDuplexOut(process_id, id_); rbPool.unBindHalfDuplexOut(process_id, id_);
rbPool.unBindHalfDuplexOut(process_id, ring::RingBufferPool::DEFAULT_ID); rbPool.unBindHalfDuplexOut(process_id, RingBufferPool::DEFAULT_ID);
} }
return startRecording; return startRecording;
...@@ -244,7 +246,6 @@ timestamp_to_string(const time_t &timestamp) ...@@ -244,7 +246,6 @@ timestamp_to_string(const time_t &timestamp)
std::map<std::string, std::string> Call::createHistoryEntry() const std::map<std::string, std::string> Call::createHistoryEntry() const
{ {
using ring::HistoryItem;
std::map<std::string, std::string> result; std::map<std::string, std::string> result;
result[HistoryItem::ACCOUNT_ID_KEY] = getAccountId(); result[HistoryItem::ACCOUNT_ID_KEY] = getAccountId();
...@@ -334,8 +335,10 @@ Call::isIceRunning() const ...@@ -334,8 +335,10 @@ Call::isIceRunning() const
return iceTransport_->isRunning(); return iceTransport_->isRunning();
} }
ring::IceSocket* IceSocket*
Call::newIceSocket(unsigned compId) const Call::newIceSocket(unsigned compId) const
{ {
return new ring::IceSocket(iceTransport_, compId); return new IceSocket(iceTransport_, compId);
} }
} // namespace ring
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
#include <vector> #include <vector>
#include <condition_variable> #include <condition_variable>
namespace ring {
class VoIPLink; class VoIPLink;
class Account; class Account;
...@@ -57,7 +59,7 @@ template <class T> using CallMap = std::map<std::string, std::shared_ptr<T> >; ...@@ -57,7 +59,7 @@ template <class T> using CallMap = std::map<std::string, std::shared_ptr<T> >;
* @brief A call is the base class for protocol-based calls * @brief A call is the base class for protocol-based calls
*/ */
class Call : public ring::Recordable, public std::enable_shared_from_this<Call> { class Call : public Recordable, public std::enable_shared_from_this<Call> {
public: public:
static const char * const DEFAULT_ID; static const char * const DEFAULT_ID;
...@@ -310,8 +312,8 @@ class Call : public ring::Recordable, public std::enable_shared_from_this<Call> ...@@ -310,8 +312,8 @@ class Call : public ring::Recordable, public std::enable_shared_from_this<Call>
bool isIceUsed() const; bool isIceUsed() const;
bool isIceRunning() const; bool isIceRunning() const;
ring::IceSocket* newIceSocket(unsigned compId) const; IceSocket* newIceSocket(unsigned compId) const;
std::shared_ptr<ring::IceTransport> getIceTransport() const { std::shared_ptr<IceTransport> getIceTransport() const {
return iceTransport_; return iceTransport_;
} }
...@@ -323,7 +325,7 @@ class Call : public ring::Recordable, public std::enable_shared_from_this<Call> ...@@ -323,7 +325,7 @@ class Call : public ring::Recordable, public std::enable_shared_from_this<Call>
*/ */
Call(Account& account, const std::string& id, Call::CallType type); Call(Account& account, const std::string& id, Call::CallType type);
std::shared_ptr<ring::IceTransport> iceTransport_ {}; std::shared_ptr<IceTransport> iceTransport_ {};
private: private:
bool validTransition(CallState newState); bool validTransition(CallState newState);
...@@ -374,4 +376,6 @@ class Call : public ring::Recordable, public std::enable_shared_from_this<Call> ...@@ -374,4 +376,6 @@ class Call : public ring::Recordable, public std::enable_shared_from_this<Call>
time_t timestamp_stop_ {0}; time_t timestamp_stop_ {0};
}; };
} // namespace ring
#endif // __CALL_H__ #endif // __CALL_H__
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <stdexcept> #include <stdexcept>
namespace ring {
void void
CallFactory::forbid() CallFactory::forbid()
{ {
...@@ -156,3 +158,5 @@ CallFactory::callCount<Call>() ...@@ -156,3 +158,5 @@ CallFactory::callCount<Call>()
return count; return count;
} }
} // namespace ring
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
#include <string> #include <string>
#include <utility> #include <utility>
namespace ring {
class CallFactory { class CallFactory {
public: public:
/** /**
...@@ -239,4 +241,6 @@ CallFactory::getCallIDs<Call>() const; ...@@ -239,4 +241,6 @@ CallFactory::getCallIDs<Call>() const;
template <> std::size_t template <> std::size_t
CallFactory::callCount<Call>(); CallFactory::callCount<Call>();
} // namespace ring
#endif // CALL_FACTORY_H #endif // CALL_FACTORY_H
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include "logger.h" #include "logger.h"
#include "manager.h" #include "manager.h"
namespace ring {
CallManager::CallManager() CallManager::CallManager()
{ {
libav_utils::sfl_avcodec_init(); libav_utils::sfl_avcodec_init();
...@@ -488,3 +490,5 @@ void CallManager::onRtcpReportReceived(const std::string& callID, const std::map ...@@ -488,3 +490,5 @@ void CallManager::onRtcpReportReceived(const std::string& callID, const std::map
evHandlers_.on_rtcp_receive_report(callID, stats); evHandlers_.on_rtcp_receive_report(callID, stats);
} }
} }
} // namespace ring
...@@ -42,16 +42,16 @@ ...@@ -42,16 +42,16 @@
#include "ring.h" #include "ring.h"
namespace ring {
class AudioZrtpSession;
class CallManagerException: public std::runtime_error { class CallManagerException: public std::runtime_error {
public: public:
CallManagerException(const std::string& str = "") : CallManagerException(const std::string& str = "") :
std::runtime_error("A CallManagerException occured: " + str) {} std::runtime_error("A CallManagerException occured: " + str) {}
}; };
namespace ring {
class AudioZrtpSession;
}
class CallManager class CallManager
{ {
public: public:
...@@ -162,4 +162,6 @@ class CallManager ...@@ -162,4 +162,6 @@ class CallManager
#pragma GCC diagnostic warning "-Wmissing-field-initializers" #pragma GCC diagnostic warning "-Wmissing-field-initializers"
}; };
} // namespace ring
#endif//CALLMANAGER_H #endif//CALLMANAGER_H
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
#include "videomanager.h" #include "videomanager.h"
#endif // RING_VIDEO #endif // RING_VIDEO
namespace ring {
Client::Client() : Client::Client() :
callManager_(new CallManager) callManager_(new CallManager)
, configurationManager_(new ConfigurationManager) , configurationManager_(new ConfigurationManager)
...@@ -87,3 +89,5 @@ VideoManager * Client::getVideoManager() ...@@ -87,3 +89,5 @@ VideoManager * Client::getVideoManager()
return videoManager_; return videoManager_;
} }
#endif #endif
} // namespace ring
...@@ -36,11 +36,12 @@ ...@@ -36,11 +36,12 @@
#endif #endif
#include "noncopyable.h" #include "noncopyable.h"
namespace ring {
class ConfigurationManager; class ConfigurationManager;
class CallManager; class CallManager;
class NetworkManager; class NetworkManager;
class Instance; class Instance;
class PresenceManager; class PresenceManager;
#ifdef RING_VIDEO #ifdef RING_VIDEO
...@@ -75,4 +76,6 @@ class Client { ...@@ -75,4 +76,6 @@ class Client {
#endif #endif
}; };
} // namespace ring
#endif #endif
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
#define CODECS_NOT_LOADED 0x1000 /** Codecs not found */ #define CODECS_NOT_LOADED 0x1000 /** Codecs not found */
namespace ring {
void ConfigurationManager::registerEvHandlers(struct ring_config_ev_handlers* evHandlers) void ConfigurationManager::registerEvHandlers(struct ring_config_ev_handlers* evHandlers)
{ {
evHandlers_ = *evHandlers; evHandlers_ = *evHandlers;
...@@ -93,18 +95,18 @@ ConfigurationManager::getTlsSettingsDefault() ...@@ -93,18 +95,18 @@ ConfigurationManager::getTlsSettingsDefault()
portstr << DEFAULT_SIP_TLS_PORT; portstr << DEFAULT_SIP_TLS_PORT;
std::map<std::string, std::string> tlsSettingsDefault; std::map<std::string, std::string> tlsSettingsDefault;
tlsSettingsDefault[CONFIG_TLS_LISTENER_PORT] = portstr.str(); tlsSettingsDefault[Conf::CONFIG_TLS_LISTENER_PORT] = portstr.str();
tlsSettingsDefault[CONFIG_TLS_CA_LIST_FILE] = ""; tlsSettingsDefault[Conf::CONFIG_TLS_CA_LIST_FILE] = "";
tlsSettingsDefault[CONFIG_TLS_CERTIFICATE_FILE] = ""; tlsSettingsDefault[Conf::CONFIG_TLS_CERTIFICATE_FILE] = "";
tlsSettingsDefault[CONFIG_TLS_PRIVATE_KEY_FILE] = ""; tlsSettingsDefault[Conf::CONFIG_TLS_PRIVATE_KEY_FILE] = "";
tlsSettingsDefault[CONFIG_TLS_PASSWORD] = ""; tlsSettingsDefault[Conf::CONFIG_TLS_PASSWORD] = "";
tlsSettingsDefault[CONFIG_TLS_METHOD] = "TLSv1"; tlsSettingsDefault[Conf::CONFIG_TLS_METHOD] = "TLSv1";
tlsSettingsDefault[CONFIG_TLS_CIPHERS] = ""; tlsSettingsDefault[Conf::CONFIG_TLS_CIPHERS] = "";
tlsSettingsDefault[CONFIG_TLS_SERVER_NAME] = ""; tlsSettingsDefault[Conf::CONFIG_TLS_SERVER_NAME] = "";
tlsSettingsDefault[CONFIG_TLS_VERIFY_SERVER] = "true"; tlsSettingsDefault[Conf::CONFIG_TLS_VERIFY_SERVER] = "true";
tlsSettingsDefault[CONFIG_TLS_VERIFY_CLIENT] = "true"; tlsSettingsDefault[Conf::CONFIG_TLS_VERIFY_CLIENT] = "true";
tlsSettingsDefault[CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE] = "true"; tlsSettingsDefault[Conf::CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE] = "true";
tlsSettingsDefault[CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC] = "2"; tlsSettingsDefault[Conf::CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC] = "2";
return tlsSettingsDefault; return tlsSettingsDefault;
} }
...@@ -282,17 +284,17 @@ std::vector<std::string> ConfigurationManager::getAudioInputDeviceList() ...@@ -282,17 +284,17 @@ std::vector<std::string> ConfigurationManager::getAudioInputDeviceList()
void ConfigurationManager::setAudioOutputDevice(int32_t index) void ConfigurationManager::setAudioOutputDevice(int32_t index)
{ {
return Manager::instance().setAudioDevice(index, ring::DeviceType::PLAYBACK); return Manager::instance().setAudioDevice(index, DeviceType::PLAYBACK);
} }
void ConfigurationManager::setAudioInputDevice(int32_t index) void ConfigurationManager::setAudioInputDevice