diff --git a/sflphone-common/src/Makefile.am b/sflphone-common/src/Makefile.am index cd1365389762863e8c6ee3da0935eff98e2417f1..adc562ece445ab2c00f0bb01dda8436d70fbed03 100644 --- a/sflphone-common/src/Makefile.am +++ b/sflphone-common/src/Makefile.am @@ -54,7 +54,6 @@ noinst_HEADERS = \ manager.h \ global.h \ eventthread.h \ - user_cfg.h \ account.h \ accountcreator.h \ call.h \ diff --git a/sflphone-common/src/accountcreator.cpp b/sflphone-common/src/accountcreator.cpp index 18ed9b9e794133271317c0553c49601dbe739c55..bb5f388eb3cb184fd2fdfdb19d3d837db9e043f0 100644 --- a/sflphone-common/src/accountcreator.cpp +++ b/sflphone-common/src/accountcreator.cpp @@ -30,7 +30,6 @@ */ #include "accountcreator.h" #include "sip/sipaccount.h" -#include "user_cfg.h" #ifdef USE_IAX #include "iax/iaxaccount.h" diff --git a/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp index fc9d0a83ad32e1e8f7cb5fc021a49a32dbf38710..e629c1c0b9da7be060bba09fa9687b851f398e41 100644 --- a/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp @@ -28,7 +28,6 @@ * as that of the covered work. */ #include "AudioSrtpSession.h" -#include "user_cfg.h" #include "sip/sipcall.h" @@ -39,13 +38,10 @@ #include <openssl/buffer.h> #include <openssl/rand.h> - #include <cstdio> #include <cstring> #include <cerrno> - - namespace sfl { diff --git a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp index 26f31bf04998c9cd7bd524176f4e142969047966..23c79de4fd36959c27b2aca97a021fe427021390 100644 --- a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp @@ -29,7 +29,6 @@ */ #include "AudioZrtpSession.h" #include "ZrtpSessionCallback.h" -#include "user_cfg.h" #include "sip/sipcall.h" #include "sip/sdp.h" diff --git a/sflphone-common/src/audio/codecs/audiocodecfactory.h b/sflphone-common/src/audio/codecs/audiocodecfactory.h index 9ea2511f93256efcfa28625f9f919c3bb591af40..877b2ec55539752ff538be27210c537584f00d0b 100644 --- a/sflphone-common/src/audio/codecs/audiocodecfactory.h +++ b/sflphone-common/src/audio/codecs/audiocodecfactory.h @@ -38,7 +38,6 @@ #include <dirent.h> #include "global.h" -#include "user_cfg.h" #include "audiocodec.h" /** Enable us to keep the handle pointer on the codec dynamicaly loaded so that we could destroy when we dont need it anymore */ diff --git a/sflphone-common/src/config/config.cpp b/sflphone-common/src/config/config.cpp index 58335732fc15a8c171980b4d53b94d927ee34cd7..5a70ef60c330e2bc4d153f030c1df296a7e377d3 100644 --- a/sflphone-common/src/config/config.cpp +++ b/sflphone-common/src/config/config.cpp @@ -464,7 +464,6 @@ ConfigTreeIterator::next() return tk; } - } // end namespace ConfigTree diff --git a/sflphone-common/src/config/config.h b/sflphone-common/src/config/config.h index 84002a2defdfaf4e31749b4a24cd6679cd8f85c7..f3847b2143f72f9076a61cf0a99f14b127d533d2 100644 --- a/sflphone-common/src/config/config.h +++ b/sflphone-common/src/config/config.h @@ -43,6 +43,7 @@ namespace Conf { +static const char * const TRUE_STR = "true"; class ConfigTreeItem; typedef std::map<std::string, ConfigTreeItem> ItemMap; diff --git a/sflphone-common/src/dbus/configurationmanager.cpp b/sflphone-common/src/dbus/configurationmanager.cpp index 94b29a0f2db401734a07e9b56f209a16c1537b73..d43e955fa547aa8ac93bbb22e2b70f354cd611fe 100644 --- a/sflphone-common/src/dbus/configurationmanager.cpp +++ b/sflphone-common/src/dbus/configurationmanager.cpp @@ -30,7 +30,7 @@ * as that of the covered work. */ -#include <global.h> +#include "global.h" #include <configurationmanager.h> #include <sstream> #include "../manager.h" diff --git a/sflphone-common/src/global.h b/sflphone-common/src/global.h index 0362bcb3165f9978a1e2038e4214e3a8a574cbbe..ed021d21494978d950fdebbb972e6232d4422365 100644 --- a/sflphone-common/src/global.h +++ b/sflphone-common/src/global.h @@ -33,7 +33,6 @@ #ifndef __GLOBAL_H__ #define __GLOBAL_H__ -#include <assert.h> #include <stdio.h> #include <libintl.h> #include <locale.h> @@ -50,7 +49,7 @@ #define XDG_DATA_HOME (getenv ("XDG_DATA_HOME")) #define XDG_CONFIG_HOME (getenv ("XDG_CONFIG_HOME")) #define XDG_CACHE_HOME (getenv ("XDG_CACHE_HOME")) -#define ZRTP_ZID_FILENAME "sfl.zid" +const char * const ZRTP_ZID_FILENAME = "sfl.zid"; typedef float float32; typedef short int16; @@ -68,10 +67,6 @@ const FILE_TYPE FILE_WAV = 2; static const SOUND_FORMAT INT16 = 0x2; // TODO shold change these symbols static const SOUND_FORMAT INT32 = 0x8; -#define SUCCESS 0 - -#define ASSERT( expected , value) if( value == expected ) return SUCCESS; \ - else return 1; #define PIDFILE "sfl.pid" #ifdef DATAFORMAT_IS_FLOAT @@ -173,6 +168,8 @@ typedef enum { /** The struct to reflect the order the user wants to use the codecs */ typedef std::vector<AudioCodecType> CodecOrder; - +const char * const IP2IP_PROFILE = "IP2IP"; +const char * const DIR_SEPARATOR_STR = "/"; // Directory separator char +const char DIR_SEPARATOR_CH = '/'; /** Directory separator string */ #endif // __GLOBAL_H__ diff --git a/sflphone-common/src/history/historymanager.h b/sflphone-common/src/history/historymanager.h index 49340a10af0f9fa9cc25a799754ff9e21a41e964..2dc3b345c90d63986c51ef5ca6fe367bdfe21034 100644 --- a/sflphone-common/src/history/historymanager.h +++ b/sflphone-common/src/history/historymanager.h @@ -35,7 +35,6 @@ #include "historyitem.h" #include <global.h> -#include <user_cfg.h> #define DAY_UNIX_TIMESTAMP 86400 // Number of seconds in one day: 60 x 60 x 24 diff --git a/sflphone-common/src/iax/iaxaccount.cpp b/sflphone-common/src/iax/iaxaccount.cpp index 0f23d30483e308bc24a6cb320c46a62d99dd8923..8e02c6e53a953a06cc920b784fc8ce5be493e354 100644 --- a/sflphone-common/src/iax/iaxaccount.cpp +++ b/sflphone-common/src/iax/iaxaccount.cpp @@ -271,7 +271,7 @@ int IAXAccount::registerVoIPLink() _error("IAXAccount: %s", e.what()); } - return SUCCESS; + return 0; } int @@ -281,13 +281,13 @@ IAXAccount::unregisterVoIPLink() _link->sendUnregister (_accountID); _link->terminate(); - return SUCCESS; + return 0; } catch(VoipLinkException &e) { _error("IAXAccount: %s", e.what()); } - return SUCCESS; + return 0; } void diff --git a/sflphone-common/src/iax/iaxvoiplink.cpp b/sflphone-common/src/iax/iaxvoiplink.cpp index 9d14d0eec62b23a2bed247867ecc148c3c830bbf..786ef7ff76543e4cf3d978620e2c44d9d3b5218e 100644 --- a/sflphone-common/src/iax/iaxvoiplink.cpp +++ b/sflphone-common/src/iax/iaxvoiplink.cpp @@ -51,6 +51,12 @@ #define CHK_VALID_CALL if (call == NULL) { _debug("IAX: Call doesn't exists"); \ return false; } +namespace { + const char * const HOOKS = "Hooks"; /** Hooks section */ + const char * const URLHOOK_IAX2_ENABLED = "Hooks.iax2_enabled"; + const char * const URLHOOK_COMMAND = "Hooks.url_command"; +} // end anonymous namespace + IAXVoIPLink::IAXVoIPLink (const AccountID& accountID) : VoIPLink (accountID) , _evThread (NULL) , _regSession (NULL) diff --git a/sflphone-common/src/main.cpp b/sflphone-common/src/main.cpp index 6c9d3083d66c1302f1a2ac1c0fa25983564d888e..ff8fa6261c74dbb1082fe03cc2bcd9984bb02cd2 100644 --- a/sflphone-common/src/main.cpp +++ b/sflphone-common/src/main.cpp @@ -40,7 +40,6 @@ #include <cc++/common.h> #include "global.h" -#include "user_cfg.h" #include "dbus/dbusmanager.h" #include "manager.h" @@ -167,7 +166,7 @@ main (int argc, char **argv) else { fclose (fp); - if (kill (atoi (cOldPid), 0) == SUCCESS) { + if (kill (atoi (cOldPid), 0) == 0) { fprintf (stderr, "There is already a sflphoned daemon running in the system. Starting Failed."); exit (-1); } else { diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index 725538b794ef708f5357f20a0bfe5273ed656d15..b9e33bdb9265afbe1032ac3c7e008006ca23d7dc 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -37,11 +37,9 @@ #include "account.h" #include "dbus/callmanager.h" -#include "user_cfg.h" #include "global.h" #include "sip/sipaccount.h" -//#include "audio/audiolayer.h" #include "audio/alsa/alsalayer.h" #include "audio/pulseaudio/pulselayer.h" #include "audio/sound/tonelist.h" @@ -54,8 +52,8 @@ #include "conference.h" -#include <errno.h> -#include <time.h> +#include <cerrno> +#include <ctime> #include <cstdlib> #include <iostream> #include <fstream> @@ -3752,7 +3750,7 @@ bool ManagerImpl::getConfigBool (const std::string& section, const std::string& name) { try { - return (_config.getConfigTreeItemValue (section, name) == TRUE_STR) ? true + return (_config.getConfigTreeItemValue (section, name) == Conf::TRUE_STR) ? true : false; } catch (Conf::ConfigTreeItemException& e) { throw e; diff --git a/sflphone-common/src/managerimpl_registration.cpp b/sflphone-common/src/managerimpl_registration.cpp index a0c0464eab87967d508978b6abff44fa3946c03a..33dac58f5d4a191b1f3009f9bbc96e156740d30b 100644 --- a/sflphone-common/src/managerimpl_registration.cpp +++ b/sflphone-common/src/managerimpl_registration.cpp @@ -37,7 +37,6 @@ #include "account.h" #include "dbus/callmanager.h" -#include "user_cfg.h" #include "global.h" #include "sip/sipaccount.h" @@ -72,7 +71,7 @@ ManagerImpl::registerAccounts() status = iter->second->registerVoIPLink(); - if (status != SUCCESS) { + if (status != 0) { flag = false; } } @@ -88,9 +87,10 @@ ManagerImpl::registerAccounts() } audioLayerMutexUnlock(); - ASSERT (flag, true); - - return SUCCESS; + if (flag) + return 0; + else + return 1; } //THREAD=Main @@ -114,7 +114,7 @@ ManagerImpl::initRegisterAccounts() if (iter->second->isEnabled()) { status = iter->second->registerVoIPLink(); - if (status != SUCCESS) { + if (status != 0) { flag = false; } } @@ -130,9 +130,10 @@ ManagerImpl::initRegisterAccounts() } audioLayerMutexUnlock(); - ASSERT (flag, true); - - return SUCCESS; + if (flag) + return 0; + else + return 1; } void ManagerImpl::restartPJSIP (void) diff --git a/sflphone-common/src/preferences.cpp b/sflphone-common/src/preferences.cpp index 61dd193604cb8ec0fcd87c7cae937ca513918a00..c63b2bd9b2a989af210693f7184cff718be0b7f7 100644 --- a/sflphone-common/src/preferences.cpp +++ b/sflphone-common/src/preferences.cpp @@ -31,7 +31,17 @@ #include "preferences.h" #include <sstream> #include "global.h" -#include "user_cfg.h" + +const char * const Preferences::DFT_ZONE = "North America"; + +namespace { + static const char * const DFT_PULSE_LENGTH_STR ="250"; /** Default DTMF lenght */ + static const char * const ZRTP_ZIDFILE = "zidFile"; /** The filename used for storing ZIDs */ + static const char * const ALSA_DFT_CARD = "0"; /** Default sound card index */ + static const char * const DFT_FRAME_SIZE = "20"; /** Default frame size in millisecond */ + static const char * const DFT_VOL_SPKR_STR = "100"; /** Default speaker volume */ + static const char * const DFT_VOL_MICRO_STR = "100"; /** Default mic volume */ +} // end anonymous namespace Preferences::Preferences() : _accountOrder ("") , _audioApi (1) // 1 is pulseaudio, 0 alsa diff --git a/sflphone-common/src/preferences.h b/sflphone-common/src/preferences.h index 9ccf1ebc67c81ecfc78b1697536f624c7fa565d4..aa03cb50187da1c0e7f44ec12dacd5b6c1abe9d3 100644 --- a/sflphone-common/src/preferences.h +++ b/sflphone-common/src/preferences.h @@ -104,6 +104,8 @@ class Preferences : public Serializable public: + static const char * const DFT_ZONE; + Preferences(); ~Preferences(); @@ -635,7 +637,6 @@ class ShortcutPreferences : public Serializable std::string _popup; std::string _toggleHold; std::string _togglePickupHangup; - }; #endif diff --git a/sflphone-common/src/sip/sipaccount.cpp b/sflphone-common/src/sip/sipaccount.cpp index 7c77b5ebb6e50ce5805cb60c9d7f0131ffda6ec8..55298e43cc52828ae852827466a16930cef563ad 100644 --- a/sflphone-common/src/sip/sipaccount.cpp +++ b/sflphone-common/src/sip/sipaccount.cpp @@ -32,10 +32,14 @@ #include "sipaccount.h" #include "manager.h" -#include "user_cfg.h" #include <pwd.h> #include <sstream> +namespace { + const char * const DFT_STUN_SERVER = "stun.sflphone.org"; /** Default STUN server address */ + const char *DFT_EXPIRE_VALUE = "600"; /** Default expire value for registration */ +} // end anonymous namespace + Credentials::Credentials() : credentialCount (0) {} Credentials::~Credentials() {} @@ -841,7 +845,7 @@ std::map<std::string, std::string> SIPAccount::getAccountDetails() const if (_accountID == IP2IP_PROFILE) { - registrationStateCode = EMPTY_FIELD; + registrationStateCode = ""; // emtpy field registrationStateDescription = "Direct IP call"; } else { state = getRegistrationState(); @@ -934,7 +938,7 @@ int SIPAccount::initCredential (void) if (cred_info == NULL) { _error ("SipAccount: Error: Failed to set cred_info for account %s", _accountID.c_str()); - return !SUCCESS; + return 1; } pj_bzero (cred_info, sizeof (pjsip_cred_info) * getCredentialCount()); @@ -1000,14 +1004,14 @@ int SIPAccount::initCredential (void) _cred = cred_info; - return SUCCESS; + return 0; } int SIPAccount::registerVoIPLink() { if (_hostname.length() >= PJ_MAX_HOSTNAME) { - return !SUCCESS; + return 1; } // Init set of additional credentials, if supplied by the user @@ -1040,7 +1044,7 @@ int SIPAccount::registerVoIPLink() _error("SIPAccount: %s", e.what()); } - return SUCCESS; + return 0; } int SIPAccount::unregisterVoIPLink() diff --git a/sflphone-common/src/user_cfg.h b/sflphone-common/src/user_cfg.h deleted file mode 100644 index 62018633ffe207920d0a6d94fff80cf26224e52c..0000000000000000000000000000000000000000 --- a/sflphone-common/src/user_cfg.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * Authoe: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Additional permission under GNU GPL version 3 section 7: - * - * If you modify this program, or any covered work, by linking or - * combining it with the OpenSSL project's OpenSSL library (or a - * modified version of that library), containing parts covered by the - * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. - * grants you additional permission to convey the resulting work. - * Corresponding Source for a non-source form of such a combination - * shall include the source code for the parts of OpenSSL used as well - * as that of the covered work. - */ - -#ifndef __USER_CFG_H__ -#define __USER_CFG_H__ - -#define HOMEDIR (getenv ("HOME")) /** Home directory */ - -#define DIR_SEPARATOR_CH '/' /** Directory separator string */ -#define DIR_SEPARATOR_STR "/" /** Directory separator char */ - -#define ACCOUNT_SIP0 "SIP0" /** Account type SIP */ -#define ACCOUNT_IAX0 "IAX0" /** Account type IAX */ - -/** User configuration file fields */ -#define AUDIO "Audio" /** Section Audio */ -#define CODECS "ActiveCodecs" /** List of active codecs */ -#define ALSA_CARD_ID_IN "Alsa.cardID_In" /** Soundcard index to use for capture */ -#define ALSA_CARD_ID_OUT "Alsa.cardID_Out" /** Soundcard index to use for playback */ -#define ALSA_CARD_ID_RING "Alsa.cardID_Ring" /** Soundcard index to use for ringtone */ -#define ALSA_FRAME_SIZE "Alsa.framesize" /** Audio layer frame size */ -#define ALSA_PLUGIN "Alsa.plugin" /** Alsa plugin */ -#define AUDIO_SAMPLE_RATE "Alsa.sampleRate" /** Audio layer sample rate */ -#define PULSE_DEVICE_PLAYBACK "Pulse.devicePlayback" -#define PULSE_DEVICE_RECORD "Pulse.deviceRecord" -#define PULSE_DEVICE_RINGTONE "Pulse.deviceRingtone" -#define RING_CHOICE "Rings.ringChoice" /** Ringtone */ -#define VOLUME_SPKR "Volume.speakers" /** Speaker volume */ -#define VOLUME_MICRO "Volume.micro" /** Mic volume */ -#define RECORD_PATH "Record.path" /** Recording path */ - -#define PREFERENCES "Preferences" /** Section Preferences */ -#define CONFIG_MD5HASH "md5Hash" /** Option to store credential as md5 hash*/ -#define CONFIG_DIALPAD "Dialpad.display" /** Display dialpad preferences */ -#define CONFIG_SEARCHBAR "Searchbar.display" /** Whether or nor display the search bar */ -#define CONFIG_HISTORY_LIMIT "History.limit" /** Set the maximum number of days kept */ -#define CONFIG_HISTORY_ENABLED "History.enabled" /** Is the history enabled or not */ -#define CONFIG_NOTIFY "Notify.all" /** Desktop notification level */ -#define CONFIG_MAIL_NOTIFY "Notify.mails" /** Desktop mail notification level */ -#define ZONE_TONE "Options.zoneToneChoice" /** Country tone */ -#define CONFIG_RINGTONE "Ringtones.enable" /** Ringtones preferences */ -#define CONFIG_START "Start.hidden" /** SFLphone starts in the systm tray or not */ -#define CONFIG_POPUP "Window.popup" /** SFLphone pops up on incoming calls or not */ -#define CONFIG_VOLUME "Volume.display" /** Display the mic and speaker volume controls */ -#define CONFIG_AUDIO "Audio.api" /** Audio manager (ALSA or pulseaudio) */ -#define CONFIG_PA_VOLUME_CTRL "Pulseaudio.volumeCtrl" /** Whether or not PA should modify volume of other applications on the same sink */ -#define CONFIG_SIP_PORT "SIP.portNum" -#define CONFIG_ACCOUNTS_ORDER "Accounts.order" /** To restore account order */ -#define WINDOW_WIDTH "Window.width" -#define WINDOW_HEIGHT "Window.height" -#define WINDOW_POSITION_X "Window.positionX" -#define WINDOW_POSITION_Y "Window.positionY" -#define SHOW_STATUSICON "Statusicon.show" - -#define IP2IP_PROFILE "IP2IP" -#define SIGNALISATION "VoIPLink" /** Section Signalisation */ -#define ZRTP_ZIDFILE "zidFile" /** The filename used for storing ZIDs */ -#define PLAY_DTMF "DTMF.playDtmf" /** Whether or not should play dtmf */ -#define PLAY_TONES "DTMF.playTones" /** Whether or not should play tones */ -#define PULSE_LENGTH "DTMF.pulseLength" /** Length of the DTMF in millisecond */ -#define SEND_DTMF_AS "DTMF.sendDTMFas" /** DTMF send mode */ -#define SYMMETRIC "VoIPLink.symmetric" /** VoIP link type */ - -#define ADDRESSBOOK "Addressbook" /** Address book section */ -#define ADDRESSBOOK_ENABLE "Addressbook.enable" /** Enable address book */ -#define ADDRESSBOOK_MAX_RESULTS "Addressbook.max_results" -#define ADDRESSBOOK_DISPLAY_CONTACT_PHOTO "Addressbook.contact_photo" -#define ADDRESSBOOK_DISPLAY_PHONE_BUSINESS "Addressbook.phone_business" -#define ADDRESSBOOK_DISPLAY_PHONE_HOME "Addressbook.phone_home" -#define ADDRESSBOOK_DISPLAY_PHONE_MOBILE "Addressbook.phone_mobile" -#define ADDRESSBOOK_LIST "Addressbook.list" - -#define HOOKS "Hooks" /** Hooks section */ -#define URLHOOK_SIP_FIELD "Hooks.url_sip_field" -#define URLHOOK_COMMAND "Hooks.url_command" -#define URLHOOK_SIP_ENABLED "Hooks.sip_enabled" -#define URLHOOK_IAX2_ENABLED "Hooks.iax2_enabled" -#define PHONE_NUMBER_HOOK_ENABLED "Hooks.phone_number_enabled" -#define PHONE_NUMBER_HOOK_ADD_PREFIX "Hooks.phone_number_add_prefix" - -#define EMPTY_FIELD "" /** Default value for empty field */ -#define DEFAULT_ACCOUNT_TYPE "SIP" -#define DFT_STUN_SERVER "stun.sflphone.org" /** Default STUN server address */ -#define TRUE_STR "true" /** Default YES value */ -#define FALSE_STR "false" /** Default NO value */ -#define DFT_PULSE_LENGTH_STR "250" /** Default DTMF lenght */ -#define SIP_INFO_STR "0" /** Default DTMF transport mode */ -#define ALSA_DFT_CARD "0" /** Default sound card index */ -#define DFT_VOL_SPKR_STR "100" /** Default speaker volume */ -#define DFT_VOL_MICRO_STR "100" /** Default mic volume */ -#define DFT_RINGTONE "konga.ul" /** Default ringtone */ -#define DFT_ZONE "North America" /** Default geographical zone */ -#define DFT_VOICEMAIL "888" /** Default voicemail number */ -#define DFT_FRAME_SIZE "20" /** Default frame size in millisecond */ -#define DFT_SAMPLE_RATE "44100" /** Default sample rate in HZ */ -#define DFT_NOTIF_LEVEL "2" /** Default desktop notification level : maximum */ -#define DFT_HISTORY_LIMIT "30" /** Default maximum days in history */ -#define DFT_EXPIRE_VALUE "600" /** Default expire value for registration */ -#define DFT_RESOLVE_ONCE FALSE_STR -#define DFT_AUDIO_MANAGER "1" /** Default audio manager */ -#define DFT_SIP_PORT "5060" -#define DFT_STUN_ENABLE FALSE_STR -#define DFT_RECORD_PATH HOMEDIR -#define DFT_WINDOW_WIDTH "240" -#define DFT_WINDOW_HEIGHT "320" -#define DFT_USERAGENT "sflphone" //PROGNAME + "/" + SFLPHONED_VERSION - -#endif // __USER_CFG_H__ diff --git a/sflphone-common/src/voiplink.cpp b/sflphone-common/src/voiplink.cpp index ec5f5054feb463e28460dd6a4587fd448275b795..9e28338fa090e43e5e2af4779151738b4da03fc1 100644 --- a/sflphone-common/src/voiplink.cpp +++ b/sflphone-common/src/voiplink.cpp @@ -31,7 +31,6 @@ * as that of the covered work. */ -#include "user_cfg.h" #include "voiplink.h" #include "manager.h" diff --git a/sflphone-common/test/audiolayertest.h b/sflphone-common/test/audiolayertest.h index 8dffaf703f72d2f64c5ae8f99ec92dabe8291f95..ea454e638126cb6241793ca41b1b51b06bf9af07 100644 --- a/sflphone-common/test/audiolayertest.h +++ b/sflphone-common/test/audiolayertest.h @@ -48,7 +48,6 @@ #include "manager.h" #include "config/config.h" -#include "user_cfg.h" #include "audio/audiolayer.h" #include "audio/alsa/alsalayer.h" diff --git a/sflphone-common/test/configurationtest.cpp b/sflphone-common/test/configurationtest.cpp index e3ff1339dd21484864d768e64ced98d6d483e123..6df6b1ed64dc42b7efddd5143cc0d6b9cc1a9808 100644 --- a/sflphone-common/test/configurationtest.cpp +++ b/sflphone-common/test/configurationtest.cpp @@ -54,7 +54,7 @@ void ConfigurationTest::testDefaultValuePreferences() { _debug ("-------------------- ConfigurationTest::testDefaultValuePreferences --------------------\n"); - CPPUNIT_ASSERT (Manager::instance().preferences.getZoneToneChoice() == DFT_ZONE); + CPPUNIT_ASSERT (Manager::instance().preferences.getZoneToneChoice() == Preferences::DFT_ZONE); } void ConfigurationTest::testDefaultValueSignalisation() diff --git a/sflphone-common/test/configurationtest.h b/sflphone-common/test/configurationtest.h index 84d840674fad87fcaf467925c05a9537a7983464..b83660950f09e7fd73d07f175c64adbb08ac377c 100755 --- a/sflphone-common/test/configurationtest.h +++ b/sflphone-common/test/configurationtest.h @@ -49,7 +49,6 @@ #include "manager.h" #include "audio/audiolayer.h" #include "global.h" -#include "user_cfg.h" #include "config/yamlparser.h" #include "config/yamlemitter.h" #include "config/yamlnode.h" diff --git a/sflphone-common/test/rtptest.h b/sflphone-common/test/rtptest.h index 5fecd6120f2da7c265ea8d723aed6f436cb11cda..146d79e4c0995eb5a1b19c6f222c84797cfb9aba 100644 --- a/sflphone-common/test/rtptest.h +++ b/sflphone-common/test/rtptest.h @@ -58,7 +58,6 @@ #include "sip/sipvoiplink.h" #include "config/config.h" -#include "user_cfg.h" using namespace sfl;