2
* Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
3
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
4
* Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
5
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
6
* Author: Guillaume Carmel-Archambault <guillaume.carmel-archambault@savoirfairelinux.com>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or
11
* (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
* Additional permission under GNU GPL version 3 section 7:
24
* If you modify this program, or any covered work, by linking or
25
* combining it with the OpenSSL project's OpenSSL library (or a
26
* modified version of that library), containing parts covered by the
27
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
28
* grants you additional permission to convey the resulting work.
29
* Corresponding Source for a non-source form of such a combination
30
* shall include the source code for the parts of OpenSSL used as well
31
* as that of the covered work.
34
#ifndef CONFIGURATIONMANAGER_H
35
#define CONFIGURATIONMANAGER_H
37
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
38
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
41
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
42
#pragma GCC diagnostic ignored "-Wunused-parameter"
43
#pragma GCC diagnostic ignored "-Weffc++"
44
#include "configurationmanager-glue.h"
45
#pragma GCC diagnostic warning "-Wignored-qualifiers"
46
#pragma GCC diagnostic warning "-Wunused-parameter"
47
#pragma GCC diagnostic warning "-Weffc++"
49
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
50
#pragma GCC diagnostic warning "-Wunused-but-set-variable"
55
class ConfigurationManager
56
: public org::sflphone::SFLphone::ConfigurationManager_adaptor,
57
public DBus::IntrospectableAdaptor,
58
public DBus::ObjectAdaptor {
61
ConfigurationManager(DBus::Connection& connection);
62
std::map< std::string, std::string > getAccountDetails(const std::string& accountID);
63
void setAccountDetails(const std::string& accountID, const std::map< std::string, std::string >& details);
64
std::map<std::string, std::string> getAccountTemplate();
65
std::string addAccount(const std::map< std::string, std::string >& details);
66
void removeAccount(const std::string& accoundID);
67
void deleteAllCredential(const std::string& accountID);
68
std::vector< std::string > getAccountList();
69
void sendRegister(const std::string& accoundID, const bool& enable);
70
void registerAllAccounts(void);
72
std::map< std::string, std::string > getTlsSettingsDefault();
74
std::vector< int32_t > getAudioCodecList();
75
std::vector< std::string > getSupportedTlsMethod();
76
std::vector< std::string > getAudioCodecDetails(const int32_t& payload);
77
std::vector< int32_t > getActiveAudioCodecList(const std::string& accountID);
79
void setActiveAudioCodecList(const std::vector< std::string >& list, const std::string& accountID);
81
std::vector< std::string > getAudioPluginList();
82
void setAudioPlugin(const std::string& audioPlugin);
83
std::vector< std::string > getAudioOutputDeviceList();
84
void setAudioOutputDevice(const int32_t& index);
85
void setAudioInputDevice(const int32_t& index);
86
void setAudioRingtoneDevice(const int32_t& index);
87
std::vector< std::string > getAudioInputDeviceList();
88
std::vector< std::string > getCurrentAudioDevicesIndex();
89
int32_t getAudioDeviceIndex(const std::string& name);
90
std::string getCurrentAudioOutputPlugin();
91
std::string getNoiseSuppressState();
92
void setNoiseSuppressState(const std::string& state);
93
std::string getEchoCancelState();
94
void setEchoCancelState(const std::string& state);
96
std::map<std::string, std::string> getRingtoneList();
98
std::string getAudioManager();
99
void setAudioManager(const std::string& api);
101
int32_t isIax2Enabled();
102
std::string getRecordPath();
103
void setRecordPath(const std::string& recPath);
104
bool getIsAlwaysRecording();
105
void setIsAlwaysRecording(const bool& rec);
107
void setHistoryLimit(const int32_t& days);
108
int32_t getHistoryLimit();
111
void setAccountsOrder(const std::string& order);
113
std::map<std::string, std::string> getHookSettings();
114
void setHookSettings(const std::map<std::string, std::string>& settings);
116
std::vector<std::map<std::string, std::string> > getHistory();
118
std::map<std::string, std::string> getTlsSettings();
119
void setTlsSettings(const std::map< std::string, std::string >& details);
120
std::map< std::string, std::string > getIp2IpDetails();
122
std::vector< std::map< std::string, std::string > > getCredentials(const std::string& accountID);
123
void setCredentials(const std::string& accountID, const std::vector< std::map< std::string, std::string > >& details);
125
std::string getAddrFromInterfaceName(const std::string& interface);
127
std::vector<std::string> getAllIpInterface();
128
std::vector<std::string> getAllIpInterfaceByName();
130
std::map<std::string, std::string> getShortcuts();
131
void setShortcuts(const std::map<std::string, std::string> &shortcutsMap);
134
#endif //CONFIGURATIONMANAGER_H