[ekiga/ds-gsettings3] Ported H.323 settings from the bridge to GSettings.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gsettings3] Ported H.323 settings from the bridge to GSettings.
- Date: Sat, 12 Oct 2013 12:34:49 +0000 (UTC)
commit 0b90e132ceae4c38679ba6a5a40d59c564a398f2
Author: Damien Sandras <dsandras beip be>
Date: Sat Oct 12 14:34:02 2013 +0200
Ported H.323 settings from the bridge to GSettings.
lib/engine/components/opal/h323-endpoint.cpp | 48 ++++++++++++++++--
lib/engine/components/opal/opal-gmconf-bridge.cpp | 58 ---------------------
2 files changed, 44 insertions(+), 62 deletions(-)
---
diff --git a/lib/engine/components/opal/h323-endpoint.cpp b/lib/engine/components/opal/h323-endpoint.cpp
index ba52c73..fbdc249 100644
--- a/lib/engine/components/opal/h323-endpoint.cpp
+++ b/lib/engine/components/opal/h323-endpoint.cpp
@@ -159,17 +159,19 @@ Opal::H323::EndPoint::set_dtmf_mode (unsigned mode)
{
case 0:
SetSendUserInputMode (OpalConnection::SendUserInputAsString);
+ PTRACE (4, "Opal::H323::EndPoint\tSet DTMF Mode to String");
break;
case 1:
SetSendUserInputMode (OpalConnection::SendUserInputAsTone);
- break;
- case 2:
- SetSendUserInputMode (OpalConnection::SendUserInputAsInlineRFC2833);
+ PTRACE (4, "Opal::H323::EndPoint\tSet DTMF Mode to Tone");
break;
case 3:
SetSendUserInputMode (OpalConnection::SendUserInputAsQ931);
+ PTRACE (4, "Opal::H323::EndPoint\tSet DTMF Mode to Q931");
break;
default:
+ SetSendUserInputMode (OpalConnection::SendUserInputAsInlineRFC2833);
+ PTRACE (4, "Opal::H323::EndPoint\tSet DTMF Mode to RFC2833");
break;
}
}
@@ -235,7 +237,9 @@ Opal::H323::EndPoint::get_listen_interface () const
void
Opal::H323::EndPoint::set_forward_uri (const std::string& uri)
{
- forward_uri = uri;
+ if (!uri.empty ())
+ forward_uri = uri;
+ PTRACE (4, "Opal::H323::EndPoint\tSet Forward URI to " << uri);
}
@@ -455,14 +459,50 @@ void
Opal::H323::EndPoint::setup (const std::string setting)
{
if (setting.empty () || setting == "listen-port") {
+
int listen_port = settings->get_int ("listen-port");
set_listen_port (listen_port);
}
if (setting.empty () || setting == "maximum-video-tx-bitrate") {
+
int maximum_video_tx_bitrate = video_codecs_settings->get_int ("maximum-video-tx-bitrate");
// maximum_video_tx_bitrate is the max video bitrate specified by the user
// add to it 10% (approx.) accounting for audio,
// and multiply it by 10 as needed by SetInitialBandwidth
set_initial_bandwidth (maximum_video_tx_bitrate * 11);
}
+ if (setting.empty () || setting == "enable-h245-tunneling") {
+
+ DisableH245Tunneling (!settings->get_bool ("enable-h245-tunneling"));
+ PTRACE (4, "Opal::H323::EndPoint\tH.245 Tunneling: " << settings->get_bool ("enable-h245-tunneling"));
+ }
+ if (setting.empty () || setting == "enable-early-h245") {
+
+ DisableH245inSetup (!settings->get_bool ("enable-early-h245"));
+ PTRACE (4, "Opal::H323::EndPoint\tEarly H.245: " << settings->get_bool ("enable-early-h245"));
+ }
+ if (setting.empty () || setting == "enable-fast-start") {
+
+ DisableFastStart (!settings->get_bool ("enable-fast-start"));
+ PTRACE (4, "Opal::H323::EndPoint\tFast Start: " << settings->get_bool ("enable-fast-start"));
+ }
+ if (setting.empty () || setting == "dtmf-mode") {
+
+ set_dtmf_mode (settings->get_int ("dtmf-mode"));
+ }
+ if (setting.empty () || setting == "forward-host") {
+
+ set_forward_uri (settings->get_string ("forward-host"));
+ }
+ if (setting.empty () || setting == "video-role") {
+
+ CallManager::VideoOptions options;
+ manager.get_video_options (options);
+ options.extended_video_roles = settings->get_int ("video-role");
+ manager.set_video_options (options);
+ }
+ if (setting.empty () || setting == "enable-h239") {
+ SetDefaultH239Control(settings->get_bool ("enable-h239"));
+ PTRACE (4, "Opal::H323::EndPoint\tH.239 Control: " << settings->get_bool ("enable-h239"));
+ }
}
diff --git a/lib/engine/components/opal/opal-gmconf-bridge.cpp
b/lib/engine/components/opal/opal-gmconf-bridge.cpp
index f7de010..b33dcb1 100644
--- a/lib/engine/components/opal/opal-gmconf-bridge.cpp
+++ b/lib/engine/components/opal/opal-gmconf-bridge.cpp
@@ -47,10 +47,6 @@
#include "sip-endpoint.h"
-#ifdef HAVE_H323
-#include "h323-endpoint.h"
-#endif
-
using namespace Opal;
ConfBridge::ConfBridge (Opal::CallManager& _core): manager(_core)
@@ -90,14 +86,6 @@ ConfBridge::ConfBridge (Opal::CallManager& _core): manager(_core)
keys.push_back (CALL_OPTIONS_KEY "no_answer_timeout");
keys.push_back (CALL_OPTIONS_KEY "auto_answer");
- keys.push_back (H323_KEY "enable_h245_tunneling");
- keys.push_back (H323_KEY "enable_early_h245");
- keys.push_back (H323_KEY "enable_fast_start");
- keys.push_back (H323_KEY "dtmf_mode");
- keys.push_back (H323_KEY "forward_host");
- keys.push_back (H323_KEY "enable_h239");
- keys.push_back (H323_KEY "video_role");
-
keys.push_back (NAT_KEY "stun_server");
keys.push_back (NAT_KEY "enable_stun");
@@ -251,52 +239,6 @@ ConfBridge::on_property_changed (std::string key,
}
//
- // H.323 keys
- //
-#ifdef HAVE_H323
- else if (key.find (H323_KEY) != string::npos) {
-
- boost::shared_ptr<Opal::H323::EndPoint> h323_manager = boost::dynamic_pointer_cast<Opal::H323::EndPoint>
(manager.get_protocol_manager ("h323"));
- if (h323_manager) {
-
- if (key == H323_KEY "enable_h245_tunneling") {
-
- h323_manager->DisableH245Tunneling (!gm_conf_entry_get_bool (entry));
- }
- else if (key == H323_KEY "enable_early_h245") {
-
- h323_manager->DisableH245inSetup (!gm_conf_entry_get_bool (entry));
- }
- else if (key == H323_KEY "enable_fast_start") {
-
- h323_manager->DisableFastStart (!gm_conf_entry_get_bool (entry));
- }
- else if (key == H323_KEY "dtmf_mode") {
-
- h323_manager->set_dtmf_mode (gm_conf_entry_get_int (entry));
- }
- else if (key == H323_KEY "forward_host") {
-
- gchar* str = gm_conf_entry_get_string (entry);
- if (str != NULL)
- h323_manager->set_forward_uri (str);
- g_free (str);
- }
- else if (key == H323_KEY "video_role") {
- CallManager::VideoOptions options;
- manager.get_video_options (options);
- options.extended_video_roles = gm_conf_entry_get_int (entry);
- manager.set_video_options (options);
- }
- else if (key == H323_KEY "enable_h239") {
- h323_manager->SetDefaultH239Control(gm_conf_entry_get_bool (entry));
- }
- }
- }
-#endif
-
-
- //
// Personal Data Key
//
else if (key == PERSONAL_DATA_KEY "full_name") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]