| 1 | /* |
|---|
| 2 | * WengoPhone, a voice over Internet phone |
|---|
| 3 | * Copyright (C) 2004-2006 Wengo |
|---|
| 4 | * |
|---|
| 5 | * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | * it under the terms of the GNU General Public License as published by |
|---|
| 7 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | * (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * This program is distributed in the hope that it will be useful, |
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | * GNU General Public License for more details. |
|---|
| 14 | * |
|---|
| 15 | * You should have received a copy of the GNU General Public License |
|---|
| 16 | * along with this program; if not, write to the Free Software |
|---|
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef OWCONFIG_H |
|---|
| 21 | #define OWCONFIG_H |
|---|
| 22 | |
|---|
| 23 | #include <settings/CascadingSettings.h> |
|---|
| 24 | |
|---|
| 25 | #include <util/String.h> |
|---|
| 26 | #include <util/StringList.h> |
|---|
| 27 | |
|---|
| 28 | /** |
|---|
| 29 | * Stores the configuration options of WengoPhone. |
|---|
| 30 | * |
|---|
| 31 | * Tries to make it impossible to make a mistake. |
|---|
| 32 | * |
|---|
| 33 | * @see CascadingSettings |
|---|
| 34 | * @ingroup model |
|---|
| 35 | * @author Tanguy Krotoff |
|---|
| 36 | * @author Philippe Bernery |
|---|
| 37 | */ |
|---|
| 38 | class Config : public CascadingSettings { |
|---|
| 39 | public: |
|---|
| 40 | |
|---|
| 41 | static const std::string CONFIG_VERSION_KEY; |
|---|
| 42 | int getConfigVersion() const; |
|---|
| 43 | |
|---|
| 44 | Config(const std::string & name); |
|---|
| 45 | |
|---|
| 46 | ~Config(); |
|---|
| 47 | |
|---|
| 48 | /** |
|---|
| 49 | * Gets the name associated with the Config. |
|---|
| 50 | * |
|---|
| 51 | * @return Config name |
|---|
| 52 | */ |
|---|
| 53 | std::string getName() const; |
|---|
| 54 | |
|---|
| 55 | /** True if SSL connection to SSO is available. */ |
|---|
| 56 | static const std::string NETWORK_SSO_SSL_KEY; |
|---|
| 57 | bool getNetworkSSOSSL() const; |
|---|
| 58 | |
|---|
| 59 | /** |
|---|
| 60 | * Type of NAT. |
|---|
| 61 | * |
|---|
| 62 | * @see EnumNatType::NatType |
|---|
| 63 | */ |
|---|
| 64 | static const std::string NETWORK_NAT_TYPE_KEY; |
|---|
| 65 | std::string getNetworkNatType() const; |
|---|
| 66 | |
|---|
| 67 | /** Client SIP Port to use. */ |
|---|
| 68 | static const std::string NETWORK_SIP_LOCAL_PORT_KEY; |
|---|
| 69 | int getNetworkSipLocalPort() const; |
|---|
| 70 | |
|---|
| 71 | /** True if tunnel is SSL. */ |
|---|
| 72 | static const std::string NETWORK_TUNNEL_SSL_KEY; |
|---|
| 73 | bool getNetworkTunnelSSL() const; |
|---|
| 74 | |
|---|
| 75 | /** Tunnel server. Empty if no tunnel is needed */ |
|---|
| 76 | static const std::string NETWORK_TUNNEL_SERVER_KEY; |
|---|
| 77 | std::string getNetworkTunnelServer() const; |
|---|
| 78 | |
|---|
| 79 | /** True if HTTP tunnel needed. */ |
|---|
| 80 | static const std::string NETWORK_TUNNEL_NEEDED_KEY; |
|---|
| 81 | bool getNetWorkTunnelNeeded() const; |
|---|
| 82 | |
|---|
| 83 | /** Tunnel server port. */ |
|---|
| 84 | static const std::string NETWORK_TUNNEL_PORT_KEY; |
|---|
| 85 | int getNetworkTunnelPort() const; |
|---|
| 86 | |
|---|
| 87 | /** Is proxy detected ?. */ |
|---|
| 88 | static const std::string NETWORK_PROXY_DETECTED_KEY; |
|---|
| 89 | bool getNetworkProxyDetected() const; |
|---|
| 90 | |
|---|
| 91 | /** Proxy server. Empty if no proxy */ |
|---|
| 92 | static const std::string NETWORK_PROXY_SERVER_KEY; |
|---|
| 93 | std::string getNetworkProxyServer() const; |
|---|
| 94 | |
|---|
| 95 | /** Proxy server port. */ |
|---|
| 96 | static const std::string NETWORK_PROXY_PORT_KEY; |
|---|
| 97 | int getNetworkProxyPort() const; |
|---|
| 98 | |
|---|
| 99 | /** Proxy login. Empty if not needed */ |
|---|
| 100 | static const std::string NETWORK_PROXY_LOGIN_KEY; |
|---|
| 101 | std::string getNetworkProxyLogin() const; |
|---|
| 102 | |
|---|
| 103 | /** Proxy Password. Empty if not needed */ |
|---|
| 104 | static const std::string NETWORK_PROXY_PASSWORD_KEY; |
|---|
| 105 | std::string getNetworkProxyPassword() const; |
|---|
| 106 | |
|---|
| 107 | /** Stun server. */ |
|---|
| 108 | static const std::string NETWORK_STUN_SERVER_KEY; |
|---|
| 109 | std::string getNetworkStunServer() const; |
|---|
| 110 | |
|---|
| 111 | /** |
|---|
| 112 | * @name PhApi configuration Methods |
|---|
| 113 | * @{ |
|---|
| 114 | */ |
|---|
| 115 | |
|---|
| 116 | /** Path to codecs. */ |
|---|
| 117 | static const std::string CODEC_PLUGIN_PATH_KEY; |
|---|
| 118 | std::string getCodecPluginPath() const; |
|---|
| 119 | |
|---|
| 120 | /** Path to PhApi plugins (e.g SFP plugin). */ |
|---|
| 121 | static const std::string PHAPI_PLUGIN_PATH_KEY; |
|---|
| 122 | std::string getPhApiPluginPath() const; |
|---|
| 123 | |
|---|
| 124 | /** |
|---|
| 125 | * @} |
|---|
| 126 | */ |
|---|
| 127 | |
|---|
| 128 | /** |
|---|
| 129 | * @name Audio Methods |
|---|
| 130 | * @{ |
|---|
| 131 | */ |
|---|
| 132 | |
|---|
| 133 | /** audio codec list */ |
|---|
| 134 | static const std::string AUDIO_CODEC_LIST_KEY; |
|---|
| 135 | StringList getAudioCodecList() const; |
|---|
| 136 | |
|---|
| 137 | /** Playback audio device name. */ |
|---|
| 138 | static const std::string AUDIO_OUTPUT_DEVICEID_KEY; |
|---|
| 139 | StringList getAudioOutputDeviceId() const; |
|---|
| 140 | |
|---|
| 141 | /** Record audio device name. */ |
|---|
| 142 | static const std::string AUDIO_INPUT_DEVICEID_KEY; |
|---|
| 143 | StringList getAudioInputDeviceId() const; |
|---|
| 144 | |
|---|
| 145 | /** Ringer audio device name. */ |
|---|
| 146 | static const std::string AUDIO_RINGER_DEVICEID_KEY; |
|---|
| 147 | StringList getAudioRingerDeviceId() const; |
|---|
| 148 | |
|---|
| 149 | /** Ringing/incoming call/ringtone audio file name. */ |
|---|
| 150 | static const std::string AUDIO_INCOMINGCALL_FILE_KEY; |
|---|
| 151 | std::string getAudioIncomingCallFile() const; |
|---|
| 152 | |
|---|
| 153 | /** Ringing/incoming call/ringtone audio file name. */ |
|---|
| 154 | static const std::string AUDIO_OUTGOINGCALL_FILE_KEY; |
|---|
| 155 | std::string getAudioOutgoingCallFile() const; |
|---|
| 156 | |
|---|
| 157 | /** Ringing/double call/ringtone audio file name. */ |
|---|
| 158 | static const std::string AUDIO_DOUBLECALL_FILE_KEY; |
|---|
| 159 | std::string getAudioDoubleCallFile() const; |
|---|
| 160 | |
|---|
| 161 | /** Call closed audio file name. */ |
|---|
| 162 | static const std::string AUDIO_CALLCLOSED_FILE_KEY; |
|---|
| 163 | std::string getAudioCallClosedFile() const; |
|---|
| 164 | |
|---|
| 165 | /** Incoming chat audio file name. */ |
|---|
| 166 | static const std::string AUDIO_INCOMINGCHAT_FILE_KEY; |
|---|
| 167 | std::string getAudioIncomingChatFile() const; |
|---|
| 168 | |
|---|
| 169 | /** IM account connected audio file name. */ |
|---|
| 170 | static const std::string AUDIO_IMACCOUNTCONNECTED_FILE_KEY; |
|---|
| 171 | std::string getAudioIMAccountConnectedFile() const; |
|---|
| 172 | |
|---|
| 173 | /** IM account disconnected audio file name. */ |
|---|
| 174 | static const std::string AUDIO_IMACCOUNTDISCONNECTED_FILE_KEY; |
|---|
| 175 | std::string getAudioIMAccountDisconnectedFile() const; |
|---|
| 176 | |
|---|
| 177 | /** Contact online audio file name. */ |
|---|
| 178 | static const std::string AUDIO_CONTACTONLINE_FILE_KEY; |
|---|
| 179 | std::string getAudioContactOnlineFile() const; |
|---|
| 180 | |
|---|
| 181 | /** Audio smileys directory. */ |
|---|
| 182 | static const std::string AUDIO_SMILEYS_DIR_KEY; |
|---|
| 183 | std::string getAudioSmileysDir() const; |
|---|
| 184 | |
|---|
| 185 | /** AEC (echo canceller) enable or not. */ |
|---|
| 186 | static const std::string AUDIO_AEC_KEY; |
|---|
| 187 | bool getAudioAEC() const; |
|---|
| 188 | |
|---|
| 189 | /** Half duplex mode enable or not. */ |
|---|
| 190 | static const std::string AUDIO_HALFDUPLEX_KEY; |
|---|
| 191 | bool getAudioHalfDuplex() const; |
|---|
| 192 | |
|---|
| 193 | /** Ringing enable or not. */ |
|---|
| 194 | static const std::string AUDIO_ENABLE_RINGING_KEY; |
|---|
| 195 | bool getAudioRingingEnable() const; |
|---|
| 196 | |
|---|
| 197 | /** @} */ |
|---|
| 198 | |
|---|
| 199 | /** |
|---|
| 200 | * @name Wengo Specific Methods |
|---|
| 201 | * @{ |
|---|
| 202 | */ |
|---|
| 203 | |
|---|
| 204 | /** Wengo server hostname. */ |
|---|
| 205 | static const std::string WENGO_SERVER_HOSTNAME_KEY; |
|---|
| 206 | std::string getWengoServerHostname() const; |
|---|
| 207 | |
|---|
| 208 | /** Wengo SSO path on the server. */ |
|---|
| 209 | static const std::string WENGO_SSO_PATH_KEY; |
|---|
| 210 | std::string getWengoSSOPath() const; |
|---|
| 211 | |
|---|
| 212 | /** Wengo SMS path on the server. */ |
|---|
| 213 | static const std::string WENGO_SMS_PATH_KEY; |
|---|
| 214 | std::string getWengoSMSPath() const; |
|---|
| 215 | |
|---|
| 216 | /** Wengo info web service path on the server. */ |
|---|
| 217 | static const std::string WENGO_INFO_PATH_KEY; |
|---|
| 218 | std::string getWengoInfoPath() const; |
|---|
| 219 | |
|---|
| 220 | /** Wengo subscription web service path on the server. */ |
|---|
| 221 | static const std::string WENGO_SUBSCRIBE_PATH_KEY; |
|---|
| 222 | std::string getWengoSubscribePath() const; |
|---|
| 223 | |
|---|
| 224 | /** WengoPhone update path on the Wengo server. */ |
|---|
| 225 | static const std::string WENGO_SOFTUPDATE_PATH_KEY; |
|---|
| 226 | std::string getWengoSoftUpdatePath() const; |
|---|
| 227 | |
|---|
| 228 | /** |
|---|
| 229 | * Wengo cirpack web service path on the server. |
|---|
| 230 | * FIXME no cirpack information please! |
|---|
| 231 | */ |
|---|
| 232 | static const std::string WENGO_CIRPACK_PATH_KEY; |
|---|
| 233 | std::string getWengoCirpackPath() const; |
|---|
| 234 | |
|---|
| 235 | /** Wengo directory web service path on the server. */ |
|---|
| 236 | static const std::string WENGO_DIRECTORY_PATH_KEY; |
|---|
| 237 | std::string getWengoDirectoryPath() const; |
|---|
| 238 | |
|---|
| 239 | /** Wengo realm. */ |
|---|
| 240 | static const std::string WENGO_REALM_KEY; |
|---|
| 241 | std::string getWengoRealm() const; |
|---|
| 242 | |
|---|
| 243 | static const std::string WENGO_AUDIOTESTCALL_KEY; |
|---|
| 244 | std::string getWengoAudioTestCall() const; |
|---|
| 245 | |
|---|
| 246 | static const std::string WENGO_VIDEOTESTCALL_KEY; |
|---|
| 247 | std::string getWengoVideoTestCall() const; |
|---|
| 248 | |
|---|
| 249 | /** @} */ |
|---|
| 250 | |
|---|
| 251 | /** |
|---|
| 252 | * @name Sip Methods |
|---|
| 253 | * @{ |
|---|
| 254 | */ |
|---|
| 255 | static const std::string SIP_REGISTER_SERVER; |
|---|
| 256 | std::string getSipRegisterServer() const; |
|---|
| 257 | |
|---|
| 258 | static const std::string SIP_REGISTER_PORT; |
|---|
| 259 | int getSipRegisterPort() const; |
|---|
| 260 | |
|---|
| 261 | static const std::string SIP_PROXY_SERVER; |
|---|
| 262 | std::string getSipProxyServer() const; |
|---|
| 263 | |
|---|
| 264 | static const std::string SIP_PROXY_PORT; |
|---|
| 265 | int getSipProxyPort() const; |
|---|
| 266 | |
|---|
| 267 | static const std::string SIP_REALM; |
|---|
| 268 | std::string getSipRealm() const; |
|---|
| 269 | |
|---|
| 270 | static const std::string SIP_SIMPLE_SUPPORT; |
|---|
| 271 | bool getSipSimpleSupport() const; |
|---|
| 272 | |
|---|
| 273 | static const std::string SIP_AUDIOTESTCALL_KEY; |
|---|
| 274 | std::string getSipAudioTestCall() const; |
|---|
| 275 | |
|---|
| 276 | static const std::string SIP_VIDEOTESTCALL_KEY; |
|---|
| 277 | std::string getSipVideoTestCall() const; |
|---|
| 278 | |
|---|
| 279 | /** @} */ |
|---|
| 280 | |
|---|
| 281 | /** |
|---|
| 282 | * @name Sip Options |
|---|
| 283 | * @{ |
|---|
| 284 | */ |
|---|
| 285 | static const std::string SIP_REGISTER_TIMEOUT; |
|---|
| 286 | int getSipRegisterTimeOut() const; |
|---|
| 287 | |
|---|
| 288 | static const std::string SIP_PUBLISH_TIMEOUT; |
|---|
| 289 | int getSipPublishTimeOut() const; |
|---|
| 290 | |
|---|
| 291 | static const std::string SIP_USE_OPTIONS; |
|---|
| 292 | bool getSipUseOptions() const; |
|---|
| 293 | |
|---|
| 294 | static const std::string SIP_P2P_PRESENCE; |
|---|
| 295 | bool getSipP2pPresence() const; |
|---|
| 296 | |
|---|
| 297 | static const std::string SIP_CHAT_WITHOUT_PRESENCE; |
|---|
| 298 | bool getSipChatWithoutPresence() const; |
|---|
| 299 | /** @} */ |
|---|
| 300 | |
|---|
| 301 | /** |
|---|
| 302 | * @name Profile Methods |
|---|
| 303 | * @{ |
|---|
| 304 | */ |
|---|
| 305 | |
|---|
| 306 | /** Gets the name of the last used UserProfile. */ |
|---|
| 307 | static const std::string PROFILE_LAST_USED_NAME_KEY; |
|---|
| 308 | std::string getProfileLastUsedName() const; |
|---|
| 309 | |
|---|
| 310 | /** Profile all widget enabled. */ |
|---|
| 311 | static const std::string PROFILE_ALL_KEY; |
|---|
| 312 | bool getProfileAll() const; |
|---|
| 313 | |
|---|
| 314 | /** Profile window width. */ |
|---|
| 315 | static const std::string PROFILE_WIDTH_KEY; |
|---|
| 316 | int getProfileWidth() const; |
|---|
| 317 | |
|---|
| 318 | /** Profile window height. */ |
|---|
| 319 | static const std::string PROFILE_HEIGHT_KEY; |
|---|
| 320 | int getProfileHeight() const; |
|---|
| 321 | |
|---|
| 322 | /** Profile window position X. */ |
|---|
| 323 | static const std::string PROFILE_POSX_KEY; |
|---|
| 324 | int getProfilePosX() const; |
|---|
| 325 | |
|---|
| 326 | /** Profile window position Y. */ |
|---|
| 327 | static const std::string PROFILE_POSY_KEY; |
|---|
| 328 | int getProfilePoxY() const; |
|---|
| 329 | |
|---|
| 330 | /** @} */ |
|---|
| 331 | |
|---|
| 332 | /** |
|---|
| 333 | * @name Call Forwarding Methods |
|---|
| 334 | * @{ |
|---|
| 335 | */ |
|---|
| 336 | |
|---|
| 337 | /** Call forward mode. */ |
|---|
| 338 | static const std::string CALL_FORWARD_MODE_KEY; |
|---|
| 339 | std::string getCallForwardMode() const; |
|---|
| 340 | |
|---|
| 341 | /** Forward call phone number 1. */ |
|---|
| 342 | static const std::string CALL_FORWARD_PHONENUMBER1_KEY; |
|---|
| 343 | std::string getCallForwardPhoneNumber1() const; |
|---|
| 344 | |
|---|
| 345 | /** Forward call phone number 2. */ |
|---|
| 346 | static const std::string CALL_FORWARD_PHONENUMBER2_KEY; |
|---|
| 347 | std::string getCallForwardPhoneNumber2() const; |
|---|
| 348 | |
|---|
| 349 | /** Forward call phone number 3. */ |
|---|
| 350 | static const std::string CALL_FORWARD_PHONENUMBER3_KEY; |
|---|
| 351 | std::string getCallForwardPhoneNumber3() const; |
|---|
| 352 | |
|---|
| 353 | /** Active voice mail. */ |
|---|
| 354 | static const std::string VOICE_MAIL_ACTIVE_KEY; |
|---|
| 355 | bool getVoiceMailActive() const; |
|---|
| 356 | |
|---|
| 357 | /** @} */ |
|---|
| 358 | |
|---|
| 359 | /** |
|---|
| 360 | * @name General Settings Methods |
|---|
| 361 | * @{ |
|---|
| 362 | */ |
|---|
| 363 | |
|---|
| 364 | /** Automatically start WengoPhone when computer starts. */ |
|---|
| 365 | static const std::string GENERAL_AUTOSTART_KEY; |
|---|
| 366 | bool getGeneralAutoStart() const; |
|---|
| 367 | |
|---|
| 368 | /** Start in background mode. */ |
|---|
| 369 | static const std::string GENERAL_STARTBACKGROUNDMODE_KEY; |
|---|
| 370 | bool getGeneralStartBackgroundMode() const; |
|---|
| 371 | |
|---|
| 372 | /** Start a free call if applicable. */ |
|---|
| 373 | static const std::string GENERAL_CLICK_START_FREECALL_KEY; |
|---|
| 374 | bool getGeneralClickStartFreeCall() const; |
|---|
| 375 | |
|---|
| 376 | /** Start a chat-only when applicable. */ |
|---|
| 377 | static const std::string GENERAL_CLICK_START_CHAT_KEY; |
|---|
| 378 | bool getGeneralClickStartChat() const; |
|---|
| 379 | |
|---|
| 380 | /** Call cell phone or land line if contact not available. */ |
|---|
| 381 | static const std::string GENERAL_CLICK_CALL_CELLPHONE_KEY; |
|---|
| 382 | bool getGeneralClickCallCellPhone() const; |
|---|
| 383 | |
|---|
| 384 | /** Show me as away when I am inactive for. */ |
|---|
| 385 | static const std::string GENERAL_AWAY_TIMER_KEY; |
|---|
| 386 | static const int NO_AWAY_TIMER = -1; |
|---|
| 387 | int getGeneralAwayTimer() const; |
|---|
| 388 | |
|---|
| 389 | /** Show / Hide groups in the contacts list. */ |
|---|
| 390 | static const std::string GENERAL_SHOW_GROUPS_KEY; |
|---|
| 391 | bool getShowGroups() const; |
|---|
| 392 | |
|---|
| 393 | /** Show / Hide offline contacts in the contacts list. */ |
|---|
| 394 | static const std::string GENERAL_SHOW_OFFLINE_CONTACTS_KEY; |
|---|
| 395 | bool getShowOfflineContacts() const; |
|---|
| 396 | |
|---|
| 397 | /** |
|---|
| 398 | * The protocol used to create hyperlinks: For example in |
|---|
| 399 | * 'wengo://someone', 'wengo' is the protocol. |
|---|
| 400 | */ |
|---|
| 401 | static const std::string GENERAL_HYPERLINKPROTOCOL_KEY; |
|---|
| 402 | std::string getHyperlinkProtocol() const; |
|---|
| 403 | |
|---|
| 404 | /** The toolbar mode. See config.xml for possible values. */ |
|---|
| 405 | static const std::string GENERAL_TOOLBARMODE_KEY; |
|---|
| 406 | std::string getToolBarMode() const; |
|---|
| 407 | |
|---|
| 408 | /** @} */ |
|---|
| 409 | |
|---|
| 410 | /** |
|---|
| 411 | * @name Appearance Methods |
|---|
| 412 | * @{ |
|---|
| 413 | */ |
|---|
| 414 | static const std::string APPEARANCE_CHATTHEME_KEY; |
|---|
| 415 | std::string getChatTheme() const; |
|---|
| 416 | /** @} */ |
|---|
| 417 | |
|---|
| 418 | /** ISO 639 code of the current language for translating WengoPhone. */ |
|---|
| 419 | static const std::string LANGUAGE_KEY; |
|---|
| 420 | static const std::string LANGUAGE_AUTODETECT_KEYVALUE; |
|---|
| 421 | std::string getLanguage() const; |
|---|
| 422 | |
|---|
| 423 | /** |
|---|
| 424 | * @name Notification Settings Methods |
|---|
| 425 | * @{ |
|---|
| 426 | */ |
|---|
| 427 | |
|---|
| 428 | /** Shows toaster for incoming calls. */ |
|---|
| 429 | static const std::string NOTIFICATION_SHOW_TOASTER_ON_INCOMING_CALL_KEY; |
|---|
| 430 | bool getNotificationShowToasterOnIncomingCall() const; |
|---|
| 431 | |
|---|
| 432 | /** Shows toaster for incoming chats. */ |
|---|
| 433 | static const std::string NOTIFICATION_SHOW_TOASTER_ON_INCOMING_CHAT_KEY; |
|---|
| 434 | bool getNotificationShowToasterOnIncomingChat() const; |
|---|
| 435 | |
|---|
| 436 | /** Shows toaster when a contact is turning online. */ |
|---|
| 437 | static const std::string NOTIFICATION_SHOW_TOASTER_ON_CONTACT_ONLINE_KEY; |
|---|
| 438 | bool getNotificationShowToasterOnContactOnline() const; |
|---|
| 439 | |
|---|
| 440 | /** Do not show any toaster or window when in do not disturb mode. */ |
|---|
| 441 | static const std::string NOTIFICATION_DONOTDISTURB_NO_WINDOW_KEY; |
|---|
| 442 | bool getNotificationDoNotDisturbNoWindow() const; |
|---|
| 443 | |
|---|
| 444 | /** Switch off audio notifications when in do not disturb mode mode. */ |
|---|
| 445 | static const std::string NOTIFICATION_DONOTDISTURB_NO_AUDIO_KEY; |
|---|
| 446 | bool getNotificationDoNotDisturbNoAudio() const; |
|---|
| 447 | |
|---|
| 448 | /** Do not show any call toaster when in away mode. */ |
|---|
| 449 | static const std::string NOTIFICATION_AWAY_NO_WINDOW_KEY; |
|---|
| 450 | bool getNotificationAwayNoWindow() const; |
|---|
| 451 | |
|---|
| 452 | /** Switch off audio notifications when in away mode. */ |
|---|
| 453 | static const std::string NOTIFICATION_AWAY_NO_AUDIO_KEY; |
|---|
| 454 | bool getNotificationAwayNoAudio() const; |
|---|
| 455 | |
|---|
| 456 | /** @} */ |
|---|
| 457 | |
|---|
| 458 | /** |
|---|
| 459 | * @name Privacy Methods |
|---|
| 460 | * @{ |
|---|
| 461 | */ |
|---|
| 462 | |
|---|
| 463 | /** Allow calls from: anyone. */ |
|---|
| 464 | static const std::string PRIVACY_ALLOW_CALL_FROM_ANYONE_KEY; |
|---|
| 465 | bool getPrivacyAllowCallFromAnyone() const; |
|---|
| 466 | |
|---|
| 467 | /** Allow calls from: only people from my contact list. */ |
|---|
| 468 | static const std::string PRIVACY_ALLOW_CALL_ONLY_FROM_CONTACT_LIST_KEY; |
|---|
| 469 | bool getPrivacyAllowCallOnlyFromContactList() const; |
|---|
| 470 | |
|---|
| 471 | /** Allow chats from: anyone. */ |
|---|
| 472 | static const std::string PRIVACY_ALLOW_CHAT_FROM_ANYONE_KEY; |
|---|
| 473 | bool getPrivacyAllowChatsFromAnyone() const; |
|---|
| 474 | |
|---|
| 475 | /** Allow chats from: only people from my contact list. */ |
|---|
| 476 | static const std::string PRIVACY_ALLOW_CHAT_ONLY_FROM_CONTACT_LIST_KEY; |
|---|
| 477 | bool getPrivacyAllowChatOnlyFromContactList() const; |
|---|
| 478 | |
|---|
| 479 | /** When I sign into Wengo: always sign in as invisible. */ |
|---|
| 480 | static const std::string PRIVACY_SIGN_AS_INVISIBLE_KEY; |
|---|
| 481 | bool getPrivacySignAsInvisible() const; |
|---|
| 482 | |
|---|
| 483 | /** @} */ |
|---|
| 484 | |
|---|
| 485 | /** |
|---|
| 486 | * @name Video Methods |
|---|
| 487 | * @{ |
|---|
| 488 | */ |
|---|
| 489 | |
|---|
| 490 | static const std::string VIDEO_ENABLE_KEY; |
|---|
| 491 | bool getVideoEnable() const; |
|---|
| 492 | |
|---|
| 493 | static const std::string VIDEO_WEBCAM_DEVICE_KEY; |
|---|
| 494 | std::string getVideoWebcamDevice() const; |
|---|
| 495 | |
|---|
| 496 | static const std::string VIDEO_QUALITY_KEY; |
|---|
| 497 | std::string getVideoQuality() const; |
|---|
| 498 | |
|---|
| 499 | static const std::string VIDEO_ENABLE_XVIDEO_KEY; |
|---|
| 500 | bool getXVideoEnable() const; |
|---|
| 501 | |
|---|
| 502 | static const std::string VIDEO_ENABLE_FLIP_KEY; |
|---|
| 503 | bool getVideoFlipEnable() const; |
|---|
| 504 | |
|---|
| 505 | /** @} */ |
|---|
| 506 | |
|---|
| 507 | /** |
|---|
| 508 | * @name Path Methods |
|---|
| 509 | * @{ |
|---|
| 510 | */ |
|---|
| 511 | |
|---|
| 512 | /** |
|---|
| 513 | * Location of configuration files on the hard disk. |
|---|
| 514 | * This is not stored in the config file. |
|---|
| 515 | */ |
|---|
| 516 | static void setConfigDir(const std::string&); |
|---|
| 517 | static std::string getConfigDir(); |
|---|
| 518 | |
|---|
| 519 | /** Last location where a chat history has benn saved */ |
|---|
| 520 | static const std::string LAST_CHAT_HISTORY_SAVE_DIR_KEY; |
|---|
| 521 | std::string getLastChatHistorySaveDir() const; |
|---|
| 522 | |
|---|
| 523 | static const std::string APPLICATION_ICON_PATH; |
|---|
| 524 | std::string getApplicationIconPath() const; |
|---|
| 525 | |
|---|
| 526 | /** @} */ |
|---|
| 527 | |
|---|
| 528 | /** |
|---|
| 529 | * @name Other Methods |
|---|
| 530 | * @{ |
|---|
| 531 | */ |
|---|
| 532 | |
|---|
| 533 | /** Enables Internet Explorer ActiveX support (relevant only under Windows). */ |
|---|
| 534 | static const std::string IEACTIVEX_ENABLE_KEY; |
|---|
| 535 | bool getIEActiveXEnable() const; |
|---|
| 536 | |
|---|
| 537 | /** |
|---|
| 538 | * Returns the authorized domains that can pass commands to the softphone. |
|---|
| 539 | * @see CommandServer |
|---|
| 540 | */ |
|---|
| 541 | static const std::string CMDSERVER_AUTHORIZEDDOMAINS_KEY; |
|---|
| 542 | StringList getCmdServerAuthorizedDomains() const; |
|---|
| 543 | |
|---|
| 544 | /** @} */ |
|---|
| 545 | |
|---|
| 546 | /** |
|---|
| 547 | * @name File Transfer Options |
|---|
| 548 | * @{ |
|---|
| 549 | */ |
|---|
| 550 | |
|---|
| 551 | /** Download folder. */ |
|---|
| 552 | static const std::string FILETRANSFER_DOWNLOAD_FOLDER_KEY; |
|---|
| 553 | std::string getFileTransferDownloadFolder() const; |
|---|
| 554 | |
|---|
| 555 | /** Path to the last uploaded file. */ |
|---|
| 556 | static const std::string FILETRANSFER_LASTUPLOADEDFILE_FOLDER_KEY; |
|---|
| 557 | std::string getLastUploadedFileFolder() const; |
|---|
| 558 | |
|---|
| 559 | /** @} */ |
|---|
| 560 | |
|---|
| 561 | /** |
|---|
| 562 | * @name Linux Options |
|---|
| 563 | * @{ |
|---|
| 564 | */ |
|---|
| 565 | |
|---|
| 566 | /** Prefered browser. */ |
|---|
| 567 | static const std::string LINUX_PREFERED_BROWSER_KEY; |
|---|
| 568 | std::string getLinuxPreferedBrowser() const; |
|---|
| 569 | |
|---|
| 570 | /** @} */ |
|---|
| 571 | |
|---|
| 572 | /** |
|---|
| 573 | * @name Security Options |
|---|
| 574 | * @{ |
|---|
| 575 | */ |
|---|
| 576 | |
|---|
| 577 | /** Call encryption mode. */ |
|---|
| 578 | static const std::string CALL_ENCRYPTION_MODE_KEY; |
|---|
| 579 | bool getCallEncryptionMode() const; |
|---|
| 580 | |
|---|
| 581 | /** @} */ |
|---|
| 582 | |
|---|
| 583 | |
|---|
| 584 | /** |
|---|
| 585 | * @name Urls |
|---|
| 586 | * @{ |
|---|
| 587 | */ |
|---|
| 588 | static const std::string URL_ACCOUNTCREATION_KEY; |
|---|
| 589 | std::string getAccountCreationUrl() const; |
|---|
| 590 | |
|---|
| 591 | static const std::string URL_FORUM_KEY; |
|---|
| 592 | std::string getForumUrl() const; |
|---|
| 593 | |
|---|
| 594 | static const std::string URL_CALLOUT_KEY; |
|---|
| 595 | std::string getCalloutUrl() const; |
|---|
| 596 | |
|---|
| 597 | static const std::string URL_SMS_KEY; |
|---|
| 598 | std::string getSmsUrl() const; |
|---|
| 599 | |
|---|
| 600 | static const std::string URL_VOICEMAIL_KEY; |
|---|
| 601 | std::string getVoiceMailUrl() const; |
|---|
| 602 | |
|---|
| 603 | static const std::string URL_EXTERNALDIRECTORY_KEY; |
|---|
| 604 | std::string getExternalDirectoryUrl() const; |
|---|
| 605 | |
|---|
| 606 | static const std::string URL_INTERNALDIRECTORY_KEY; |
|---|
| 607 | std::string getInternalDirectoryUrl() const; |
|---|
| 608 | |
|---|
| 609 | static const std::string URL_FAQ_KEY; |
|---|
| 610 | std::string getFaqUrl() const; |
|---|
| 611 | |
|---|
| 612 | static const std::string URL_ACCOUNT_KEY; |
|---|
| 613 | std::string getAccountUrl() const; |
|---|
| 614 | |
|---|
| 615 | static const std::string URL_BUYWENGOS_KEY; |
|---|
| 616 | std::string getBuyWengosUrl() const; |
|---|
| 617 | |
|---|
| 618 | static const std::string URL_DOWNLOAD_KEY; |
|---|
| 619 | std::string getDownloadUrl() const; |
|---|
| 620 | |
|---|
| 621 | static const std::string URL_PHONENUMBER_KEY; |
|---|
| 622 | std::string getPhoneNumberUrl() const; |
|---|
| 623 | |
|---|
| 624 | static const std::string URL_WIKI_KEY; |
|---|
| 625 | std::string getWikiUrl() const; |
|---|
| 626 | |
|---|
| 627 | static const std::string URL_LOSTPASSWORD_KEY; |
|---|
| 628 | std::string getLostPasswordUrl() const; |
|---|
| 629 | |
|---|
| 630 | static const std::string URL_LAUNCHPAD_KEY; |
|---|
| 631 | std::string getLaunchpadUrl() const; |
|---|
| 632 | |
|---|
| 633 | static const std::string URL_HOME_HTTP_KEY; |
|---|
| 634 | std::string getHttpHomeUrl() const; |
|---|
| 635 | |
|---|
| 636 | static const std::string URL_HOME_HTTPS_KEY; |
|---|
| 637 | std::string getHttpsHomeUrl() const; |
|---|
| 638 | |
|---|
| 639 | static const std::string URL_COMPANYWEBSITE_KEY; |
|---|
| 640 | std::string getCompanyWebSiteUrl() const; |
|---|
| 641 | |
|---|
| 642 | /** @} */ |
|---|
| 643 | |
|---|
| 644 | /** |
|---|
| 645 | * @name Feature Methods |
|---|
| 646 | * @{ |
|---|
| 647 | */ |
|---|
| 648 | static const std::string FEATURE_SMS_KEY; |
|---|
| 649 | bool getSmsFeatureEnabled() const; |
|---|
| 650 | |
|---|
| 651 | static const std::string FEATURE_AUDIOCONFERENCE_KEY; |
|---|
| 652 | bool getAudioConferenceFeatureEnabled() const; |
|---|
| 653 | |
|---|
| 654 | static const std::string SIP_USE_TYPING_STATE; |
|---|
| 655 | bool getSipUseTypingState() const; |
|---|
| 656 | /** @} */ |
|---|
| 657 | |
|---|
| 658 | private: |
|---|
| 659 | |
|---|
| 660 | /** Name of this configuration. */ |
|---|
| 661 | std::string _name; |
|---|
| 662 | |
|---|
| 663 | static std::string _configDir; |
|---|
| 664 | }; |
|---|
| 665 | |
|---|
| 666 | #endif //OWCONFIG_H |
|---|