Commit 72b87eb5 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Fixing LpConfig change

parent 78d75be8
......@@ -54,7 +54,7 @@ namespace Linphone.Model {
get {
if (_core == null) {
EnableLogCollection(true);
LpConfig config = new LpConfig(GetConfigPath(), GetFactoryConfigPath());
Config config = new Config(GetConfigPath(), GetFactoryConfigPath());
_core = new Core(this, config);
}
return _core;
......
......@@ -126,7 +126,7 @@ namespace Linphone.Model {
/// Utility class used to handle application settings.
/// </summary>
public class ApplicationSettingsManager : SettingsManager, ISettingsManager {
private LpConfig Config;
private Config Config;
#region Constants settings names
private const string LogLevelKeyName = "LogLevel";
......@@ -139,7 +139,7 @@ namespace Linphone.Model {
/// </summary>
public ApplicationSettingsManager() {
if (LinphoneManager.Instance.Core == null) {
Config = new LpConfig(LinphoneManager.Instance.GetConfigPath(), LinphoneManager.Instance.GetFactoryConfigPath());
Config = new Config(LinphoneManager.Instance.GetConfigPath(), LinphoneManager.Instance.GetFactoryConfigPath());
} else {
Config = LinphoneManager.Instance.Core.Config;
}
......@@ -986,7 +986,7 @@ namespace Linphone.Model {
/// Utility class to handle network settings.
/// </summary>
public class NetworkSettingsManager : SettingsManager, ISettingsManager {
private LpConfig Config;
private Config Config;
private Dictionary<string, string> TunnelModeToString;
private Dictionary<string, FirewallPolicy> FirewallPolicyToEnum;
private Dictionary<string, MediaEncryption> MediaEncryptionToEnum;
......@@ -1009,7 +1009,7 @@ namespace Linphone.Model {
/// </summary>
public NetworkSettingsManager() {
if (LinphoneManager.Instance.Core == null) {
// Config = LinphoneManager.Instance.Core.CreateLpConfig(InitManager.GetConfigPath(), InitManager.GetFactoryConfigPath());
// Config = LinphoneManager.Instance.Core.CreateConfig(InitManager.GetConfigPath(), InitManager.GetFactoryConfigPath());
} else {
Config = LinphoneManager.Instance.Core.Config;
}
......
{
"dependencies": {
"LinphoneSDK": "3.9.1.826",
"LinphoneSDK": "3.10.2.633",
"Microsoft.ApplicationInsights": "2.0.1",
"Microsoft.ApplicationInsights.PersistenceChannel": "1.2.3",
"Microsoft.ApplicationInsights.WindowsApps": "1.1.1",
......
......@@ -51,12 +51,12 @@ set(SOURCE_FILES
ChatMessageListener.h
ChatRoom.cpp
ChatRoom.h
Config.cpp
Config.h
Core.cpp
Core.h
CoreListener.h
Enums.h
LpConfig.cpp
LpConfig.h
PayloadType.cpp
PayloadType.h
ProxyConfig.cpp
......
/*
LpConfig.cpp
Config.cpp
Copyright (C) 2015 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
......@@ -15,19 +15,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "ApiLock.h"
#include "LpConfig.h"
#include "Config.h"
bool BelledonneCommunications::Linphone::Native::LpConfig::GetBool(Platform::String^ section, Platform::String^ key, bool defaultValue)
bool BelledonneCommunications::Linphone::Native::Config::GetBool(Platform::String^ section, Platform::String^ key, bool defaultValue)
{
return (GetInt(section, key, defaultValue) == TRUE);
}
void BelledonneCommunications::Linphone::Native::LpConfig::SetBool(Platform::String^ section, Platform::String^ key, bool value)
void BelledonneCommunications::Linphone::Native::Config::SetBool(Platform::String^ section, Platform::String^ key, bool value)
{
SetInt(section, key, (int)value);
}
int BelledonneCommunications::Linphone::Native::LpConfig::GetInt(Platform::String^ section, Platform::String^ key, int defaultValue)
int BelledonneCommunications::Linphone::Native::Config::GetInt(Platform::String^ section, Platform::String^ key, int defaultValue)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -38,7 +38,7 @@ int BelledonneCommunications::Linphone::Native::LpConfig::GetInt(Platform::Strin
return value;
}
void BelledonneCommunications::Linphone::Native::LpConfig::SetInt(Platform::String^ section, Platform::String^ key, int value)
void BelledonneCommunications::Linphone::Native::Config::SetInt(Platform::String^ section, Platform::String^ key, int value)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -48,7 +48,7 @@ void BelledonneCommunications::Linphone::Native::LpConfig::SetInt(Platform::Stri
delete(ccSection);
}
int64 BelledonneCommunications::Linphone::Native::LpConfig::GetInt64(Platform::String^ section, Platform::String^ key, int64 defaultValue)
int64 BelledonneCommunications::Linphone::Native::Config::GetInt64(Platform::String^ section, Platform::String^ key, int64 defaultValue)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -59,7 +59,7 @@ int64 BelledonneCommunications::Linphone::Native::LpConfig::GetInt64(Platform::S
return value;
}
void BelledonneCommunications::Linphone::Native::LpConfig::SetInt64(Platform::String^ section, Platform::String^ key, int64 value)
void BelledonneCommunications::Linphone::Native::Config::SetInt64(Platform::String^ section, Platform::String^ key, int64 value)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -69,7 +69,7 @@ void BelledonneCommunications::Linphone::Native::LpConfig::SetInt64(Platform::St
delete(ccSection);
}
float BelledonneCommunications::Linphone::Native::LpConfig::GetFloat(Platform::String^ section, Platform::String^ key, float defaultValue)
float BelledonneCommunications::Linphone::Native::Config::GetFloat(Platform::String^ section, Platform::String^ key, float defaultValue)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -80,7 +80,7 @@ float BelledonneCommunications::Linphone::Native::LpConfig::GetFloat(Platform::S
return value;
}
void BelledonneCommunications::Linphone::Native::LpConfig::SetFloat(Platform::String^ section, Platform::String^ key, float value)
void BelledonneCommunications::Linphone::Native::Config::SetFloat(Platform::String^ section, Platform::String^ key, float value)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -90,7 +90,7 @@ void BelledonneCommunications::Linphone::Native::LpConfig::SetFloat(Platform::St
delete(ccSection);
}
Platform::String^ BelledonneCommunications::Linphone::Native::LpConfig::GetString(Platform::String^ section, Platform::String^ key, Platform::String^ defaultValue)
Platform::String^ BelledonneCommunications::Linphone::Native::Config::GetString(Platform::String^ section, Platform::String^ key, Platform::String^ defaultValue)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -104,7 +104,7 @@ Platform::String^ BelledonneCommunications::Linphone::Native::LpConfig::GetStrin
return value;
}
void BelledonneCommunications::Linphone::Native::LpConfig::SetString(Platform::String^ section, Platform::String^ key, Platform::String^ value)
void BelledonneCommunications::Linphone::Native::Config::SetString(Platform::String^ section, Platform::String^ key, Platform::String^ value)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -116,7 +116,7 @@ void BelledonneCommunications::Linphone::Native::LpConfig::SetString(Platform::S
delete(ccSection);
}
Platform::Array<int>^ BelledonneCommunications::Linphone::Native::LpConfig::GetRange(Platform::String^ section, Platform::String^ key, const Platform::Array<int>^ defaultValue)
Platform::Array<int>^ BelledonneCommunications::Linphone::Native::Config::GetRange(Platform::String^ section, Platform::String^ key, const Platform::Array<int>^ defaultValue)
{
API_LOCK;
Platform::Array<int>^ range = ref new Platform::Array<int>(2);
......@@ -128,7 +128,7 @@ Platform::Array<int>^ BelledonneCommunications::Linphone::Native::LpConfig::GetR
return range;
}
void BelledonneCommunications::Linphone::Native::LpConfig::SetRange(Platform::String^ section, Platform::String^ key, const Platform::Array<int>^ value)
void BelledonneCommunications::Linphone::Native::Config::SetRange(Platform::String^ section, Platform::String^ key, const Platform::Array<int>^ value)
{
API_LOCK;
const char *ccSection = Utils::pstoccs(section);
......@@ -138,13 +138,13 @@ void BelledonneCommunications::Linphone::Native::LpConfig::SetRange(Platform::St
delete(ccSection);
}
BelledonneCommunications::Linphone::Native::LpConfig::LpConfig(::LpConfig *config) :
BelledonneCommunications::Linphone::Native::Config::Config(::LinphoneConfig *config) :
config(config)
{
lp_config_ref(config);
}
BelledonneCommunications::Linphone::Native::LpConfig::LpConfig(Platform::String^ configPath, Platform::String^ factoryConfigPath)
BelledonneCommunications::Linphone::Native::Config::Config(Platform::String^ configPath, Platform::String^ factoryConfigPath)
{
API_LOCK;
const char *ccConfigPath = Utils::pstoccs(configPath);
......@@ -154,7 +154,7 @@ BelledonneCommunications::Linphone::Native::LpConfig::LpConfig(Platform::String^
delete(ccConfigPath);
}
BelledonneCommunications::Linphone::Native::LpConfig::~LpConfig()
BelledonneCommunications::Linphone::Native::Config::~Config()
{
if (this->config != nullptr) {
lp_config_unref(this->config);
......
/*
LpConfig.h
Config.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
......@@ -41,21 +41,21 @@ namespace BelledonneCommunications
/// enabled=1
/// </example>
/// </summary>
public ref class LpConfig sealed
public ref class Config sealed
{
public:
/// <summary>
/// Creates a LpConfig object using the path to linphonerc files.
/// Creates a Config object using the path to linphonerc files.
/// </summary>
/// <param name="configPath">The path to the user configuration file that must be readable and writable</param>
/// <param name="factoryConfigPath">The path to the factory configuration file that only needs to be readable</param>
/// <returns>The created LpConfig</returns>
LpConfig(Platform::String^ configPath, Platform::String^ factoryConfigPath);
/// <returns>The created Config</returns>
Config(Platform::String^ configPath, Platform::String^ factoryConfigPath);
/// <summary>
/// Destructor of LpConfig object.
/// Destructor of Config object.
/// </summary>
virtual ~LpConfig();
virtual ~Config();
/// <summary>
/// Gets a boolean configuration item.
......@@ -163,9 +163,9 @@ namespace BelledonneCommunications
friend class Utils;
friend ref class Core;
LpConfig(::LpConfig *config);
Config(::LinphoneConfig *config);
::LpConfig *config;
::LinphoneConfig *config;
};
}
}
......
......@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "Core.h"
#include "CoreListener.h"
#include "Enums.h"
#include "LpConfig.h"
#include "Config.h"
#include "PayloadType.h"
#include "ProxyConfig.h"
#include "Transports.h"
......@@ -275,11 +275,11 @@ int Core::ConferenceSize::get()
return linphone_core_get_conference_size(this->lc);
}
BelledonneCommunications::Linphone::Native::LpConfig^ Core::Config::get()
BelledonneCommunications::Linphone::Native::Config^ Core::Config::get()
{
API_LOCK;
::LpConfig *config = linphone_core_get_config(this->lc);
return (LpConfig^)Utils::CreateLpConfig(config);
::LinphoneConfig *config = linphone_core_get_config(this->lc);
return (BelledonneCommunications::Linphone::Native::Config^)Utils::CreateLpConfig(config);
}
CoreListener^ Core::CoreListener::get()
......@@ -1452,13 +1452,13 @@ void log_collection_upload_progress_indication(::LinphoneCore *lc, size_t offset
}
Core::Core(BelledonneCommunications::Linphone::Native::CoreListener^ coreListener)
: lc(nullptr), listener(coreListener), config(ref new LpConfig(nullptr, nullptr)),
: lc(nullptr), listener(coreListener), config(ref new BelledonneCommunications::Linphone::Native::Config(nullptr, nullptr)),
voipCallController(ref new BelledonneCommunications::Linphone::Native::VoipCallController())
{
Init();
}
Core::Core(BelledonneCommunications::Linphone::Native::CoreListener^ coreListener, BelledonneCommunications::Linphone::Native::LpConfig^ config)
Core::Core(BelledonneCommunications::Linphone::Native::CoreListener^ coreListener, BelledonneCommunications::Linphone::Native::Config^ config)
: lc(nullptr), listener(coreListener), config(config),
voipCallController(ref new BelledonneCommunications::Linphone::Native::VoipCallController())
{
......
......@@ -44,7 +44,7 @@ namespace BelledonneCommunications
ref class CallStats;
ref class ChatRoom;
ref class Core;
ref class LpConfig;
ref class Config;
ref class PayloadType;
ref class ProxyConfig;
ref class Transports;
......@@ -61,7 +61,7 @@ namespace BelledonneCommunications
{
public:
Core(CoreListener^ coreListener);
Core(CoreListener^ coreListener, LpConfig^ config);
Core(CoreListener^ coreListener, Config^ config);
virtual ~Core();
......@@ -216,11 +216,11 @@ namespace BelledonneCommunications
}
/// <summary>
/// Gets the LpConfig object to read/write to the config file: useful if you wish to extend the config file with your own sections.
/// Gets the Config object to read/write to the config file: useful if you wish to extend the config file with your own sections.
/// </summary>
property LpConfig^ Config
property BelledonneCommunications::Linphone::Native::Config^ Config
{
LpConfig^ get();
BelledonneCommunications::Linphone::Native::Config^ get();
}
/// <summary>
......@@ -1072,7 +1072,7 @@ namespace BelledonneCommunications
::LinphoneCore *lc;
BelledonneCommunications::Linphone::Native::CoreListener^ listener;
LpConfig^ config;
BelledonneCommunications::Linphone::Native::Config^ config;
BelledonneCommunications::Linphone::Native::VoipCallController^ voipCallController;
static OutputTraceLevel logLevel;
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ChatMessage.h"
#include "ChatRoom.h"
#include "Core.h"
#include "LpConfig.h"
#include "Config.h"
#include "PayloadType.h"
#include "ProxyConfig.h"
#include "Transports.h"
......@@ -143,12 +143,12 @@ Platform::Object^ Utils::CreateCallStats(void *call, int mediaType)
Platform::Object^ Utils::CreateLpConfig(void *config)
{
return ref new LpConfig((::LpConfig *)config);
return ref new Config((::LinphoneConfig *)config);
}
Platform::Object^ Utils::CreateLpConfig(Platform::String^ configPath, Platform::String^ factoryConfigPath)
{
return ref new LpConfig(configPath, factoryConfigPath);
return ref new Config(configPath, factoryConfigPath);
}
Platform::Object^ Utils::CreatePayloadType(void *pt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment