ekiga r6060 - in trunk: . src/endpoints src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6060 - in trunk: . src/endpoints src/gui
- Date: Thu, 13 Mar 2008 21:54:42 +0000 (GMT)
Author: dsandras
Date: Thu Mar 13 21:54:42 2008
New Revision: 6060
URL: http://svn.gnome.org/viewvc/ekiga?rev=6060&view=rev
Log:
Moved more things to the bridge.
Modified:
trunk/ChangeLog
trunk/src/endpoints/h323.cpp
trunk/src/endpoints/h323.h
trunk/src/endpoints/manager.cpp
trunk/src/endpoints/manager.h
trunk/src/endpoints/opal-gmconf-bridge.cpp
trunk/src/endpoints/sip.cpp
trunk/src/endpoints/sip.h
trunk/src/gui/accounts.cpp
Modified: trunk/src/endpoints/h323.cpp
==============================================================================
--- trunk/src/endpoints/h323.cpp (original)
+++ trunk/src/endpoints/h323.cpp Thu Mar 13 21:54:42 2008
@@ -235,21 +235,6 @@
void
-GMH323Endpoint::SetUserNameAndAlias ()
-{
- PString default_local_name;
-
- default_local_name = endpoint.GetDefaultDisplayName ();
-
- if (!default_local_name.IsEmpty ()) {
-
- SetDefaultDisplayName (default_local_name);
- SetLocalUserName (default_local_name);
- }
-}
-
-
-void
GMH323Endpoint::SetUserInputMode ()
{
int mode = 0;
Modified: trunk/src/endpoints/h323.h
==============================================================================
--- trunk/src/endpoints/h323.h (original)
+++ trunk/src/endpoints/h323.h Thu Mar 13 21:54:42 2008
@@ -86,15 +86,6 @@
bool StartListener (PString iface,
WORD port);
-
- /* DESCRIPTION : /
- * BEHAVIOR : Set the local user name following the full
- * name stored by the conf, set the gatekeeper alias,
- * possibly as first alias.
- * PRE : /
- */
- void SetUserNameAndAlias ();
-
/* DESCRIPTION : /
* BEHAVIOR : Adds the User Input Mode following the
Modified: trunk/src/endpoints/manager.cpp
==============================================================================
--- trunk/src/endpoints/manager.cpp (original)
+++ trunk/src/endpoints/manager.cpp Thu Mar 13 21:54:42 2008
@@ -113,21 +113,6 @@
static void
-fullname_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- gpointer data)
-{
- GMManager *endpoint = (GMManager *) data;
-
- if (gm_conf_entry_get_type (entry) == GM_CONF_STRING) {
-
- endpoint->SetUserNameAndAlias ();
- endpoint->UpdatePublishers ();
- }
-}
-
-
-static void
network_interface_changed_nt (G_GNUC_UNUSED gpointer id,
GmConfEntry *entry,
gpointer data)
@@ -295,6 +280,20 @@
return false;
}
+void GMManager::set_fullname (const std::string name)
+{
+ SetDefaultDisplayName (name.c_str ());
+
+ sipEP->SetDefaultDisplayName (name.c_str ());
+ h323EP->SetDefaultDisplayName (name.c_str ());
+ h323EP->SetLocalUserName (name.c_str ());
+}
+
+const std::string GMManager::get_fullname () const
+{
+ return (const char*) GetDefaultDisplayName ();
+}
+
bool
GMManager::populate_menu (Ekiga::Contact &contact,
@@ -1172,28 +1171,6 @@
void
-GMManager::SetUserNameAndAlias ()
-{
- gchar *full_name = NULL;
-
- gnomemeeting_threads_enter ();
- full_name = gm_conf_get_string (PERSONAL_DATA_KEY "full_name");
- gnomemeeting_threads_leave ();
-
- if (full_name)
- SetDefaultDisplayName (full_name);
-
- /* Update the H.323 endpoint user name and alias */
- h323EP->SetUserNameAndAlias ();
-
- /* Update the SIP endpoint user name and alias */
- sipEP->SetUserNameAndAlias ();
-
- g_free (full_name);
-}
-
-
-void
GMManager::Init ()
{
OpalMediaFormatList list;
@@ -1214,9 +1191,6 @@
else
SetTranslationAddress (PString ("0.0.0.0"));
- /* Set the User Name and Alias */
- SetUserNameAndAlias ();
-
/* Create a Zeroconf client */
#ifdef HAVE_AVAHI
CreateZeroconfClient ();
@@ -1235,9 +1209,6 @@
g_free (ip);
/* GMConf notifiers for what we manager */
- gm_conf_notifier_add (PERSONAL_DATA_KEY "full_name",
- fullname_changed_nt, this);
-
gm_conf_notifier_add (PROTOCOLS_KEY "interface",
network_interface_changed_nt, this);
gm_conf_notifier_add (NAT_KEY "public_ip",
Modified: trunk/src/endpoints/manager.h
==============================================================================
--- trunk/src/endpoints/manager.h (original)
+++ trunk/src/endpoints/manager.h Thu Mar 13 21:54:42 2008
@@ -182,6 +182,10 @@
bool send_message (const std::string uri,
const std::string message);
+ /**/
+ void set_fullname (const std::string name);
+ const std::string get_fullname () const;
+
/* DESCRIPTION : /
* BEHAVIOR : Prepare the endpoint to exit by removing all
@@ -443,14 +447,6 @@
*/
void RemoveAccountsEndpoint ();
-
- /* DESCRIPTION : /
- * BEHAVIOR : Updates the user name and alias(es) for all managed
- * endpoints following the preferences.
- * PRE : /
- */
- void SetUserNameAndAlias ();
-
/* DESCRIPTION : /
* BEHAVIOR : Update the audio device volume (playing then recording).
Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp (original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp Thu Mar 13 21:54:42 2008
@@ -71,6 +71,8 @@
keys.push_back (SIP_KEY "dtmf_mode");
keys.push_back (NAT_KEY "binding_timeout");
+ keys.push_back (PERSONAL_DATA_KEY "full_name");
+
load (keys);
}
@@ -226,5 +228,14 @@
manager.GetSIPEndpoint ()->set_nat_binding_delay (gm_conf_entry_get_int (entry));
}
+
+
+ //
+ // Personal Data Key
+ //
+ else if (key == PERSONAL_DATA_KEY "full_name") {
+
+ manager.set_fullname (gm_conf_entry_get_string (entry));
+ }
}
Modified: trunk/src/endpoints/sip.cpp
==============================================================================
--- trunk/src/endpoints/sip.cpp (original)
+++ trunk/src/endpoints/sip.cpp Thu Mar 13 21:54:42 2008
@@ -272,20 +272,6 @@
}
-void
-GMSIPEndpoint::SetUserNameAndAlias ()
-{
- PString default_local_name;
-
- default_local_name = endpoint.GetDefaultDisplayName ();
-
- if (!default_local_name.IsEmpty ()) {
-
- SetDefaultDisplayName (default_local_name);
- }
-}
-
-
void
GMSIPEndpoint::Register (const PString & _aor,
const PString & authUserName,
Modified: trunk/src/endpoints/sip.h
==============================================================================
--- trunk/src/endpoints/sip.h (original)
+++ trunk/src/endpoints/sip.h Thu Mar 13 21:54:42 2008
@@ -100,14 +100,6 @@
/* DESCRIPTION : /
- * BEHAVIOR : Set the local user name following the full
- * name stored by the conf.
- * PRE : /
- */
- void SetUserNameAndAlias ();
-
-
- /* DESCRIPTION : /
* BEHAVIOR : Register the SIP endpoint to the given SIP server.
* PRE : Correct parameters.
*/
Modified: trunk/src/gui/accounts.cpp
==============================================================================
--- trunk/src/gui/accounts.cpp (original)
+++ trunk/src/gui/accounts.cpp Thu Mar 13 21:54:42 2008
@@ -959,12 +959,6 @@
account = gm_aw_get_selected_account (GTK_WIDGET (data));
gnomemeeting_account_set_default (account, TRUE);
-
- /* Update the account */
- gdk_threads_leave ();
- dynamic_cast<GMManager *>(aw->core.get ("opal-component"))->SetUserNameAndAlias ();
- gdk_threads_enter ();
-
gm_account_delete (account);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]