[ekiga] Protocol: Each CallProtocolManager is able to listen on several interfaces.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Protocol: Each CallProtocolManager is able to listen on several interfaces.
- Date: Sun, 11 Jan 2015 13:07:33 +0000 (UTC)
commit 45e04631091c196283f747a4a6341b32509f45c5
Author: Damien Sandras <dsandras seconix com>
Date: Sun Jan 11 13:45:01 2015 +0100
Protocol: Each CallProtocolManager is able to listen on several interfaces.
Moved the InterfaceList from definition from the CallManager to the
CallProtocolManager.
lib/engine/protocol/call-manager.cpp | 14 ++++++++------
lib/engine/protocol/call-manager.h | 9 ++++-----
lib/engine/protocol/call-protocol-manager.h | 14 +++++++-------
3 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/lib/engine/protocol/call-manager.cpp b/lib/engine/protocol/call-manager.cpp
index e655fdf..afa88c7 100644
--- a/lib/engine/protocol/call-manager.cpp
+++ b/lib/engine/protocol/call-manager.cpp
@@ -27,7 +27,7 @@
/*
* call-manager.cpp - description
* ------------------------------------------
- * begin : written in 2008 by Damien Sandras
+ * begin : written in 2008 by Damien Sandras
* copyright : (c) 2008 by Damien Sandras
* description : Implementation of the interface of a call manager
* implementation backend. A call manager handles calls,
@@ -76,13 +76,13 @@ CallManager::const_iterator CallManager::begin () const
CallManager::iterator CallManager::end ()
{
- return managers.end ();
+ return managers.end ();
}
CallManager::const_iterator CallManager::end () const
{
- return managers.end ();
+ return managers.end ();
}
@@ -99,14 +99,16 @@ const std::list<std::string> CallManager::get_protocol_names () const
}
-const CallManager::InterfaceList CallManager::get_interfaces () const
+const CallProtocolManager::InterfaceList CallManager::get_interfaces () const
{
- InterfaceList list;
+ CallProtocolManager::InterfaceList list;
for (CallManager::iterator iter = begin ();
iter != end ();
iter++)
- list.push_back ((*iter)->get_listen_interface ());
+ list.insert (list.begin (),
+ (*iter)->get_interfaces ().begin (),
+ (*iter)->get_interfaces ().end ());
return list;
}
diff --git a/lib/engine/protocol/call-manager.h b/lib/engine/protocol/call-manager.h
index 698e17a..076a69f 100644
--- a/lib/engine/protocol/call-manager.h
+++ b/lib/engine/protocol/call-manager.h
@@ -62,7 +62,6 @@ namespace Ekiga
public:
- typedef std::list<CallProtocolManager::Interface> InterfaceList;
typedef std::set<boost::shared_ptr<CallProtocolManager> >::iterator iterator;
typedef std::set<boost::shared_ptr<CallProtocolManager> >::const_iterator const_iterator;
@@ -92,7 +91,7 @@ namespace Ekiga
const_iterator begin () const;
/** Return iterator to end
- * @return iterator to end
+ * @return iterator to end
*/
iterator end ();
const_iterator end () const;
@@ -159,7 +158,7 @@ namespace Ekiga
* @return the interface on which we are accepting calls. Generally,
* under the form protocol:IP:port.
*/
- const CallManager::InterfaceList get_interfaces () const;
+ const CallProtocolManager::InterfaceList get_interfaces () const;
/*
@@ -169,10 +168,10 @@ namespace Ekiga
/** Enable the given codecs
* @param codecs is a set of the codecs and their descriptions
* when the function returns, the list also contains disabled
- * codecs supported by the CallManager. Unsupported codecs
+ * codecs supported by the CallManager. Unsupported codecs
* have been removed.
*/
- virtual void set_codecs (CodecList & codecs) = 0;
+ virtual void set_codecs (CodecList & codecs) = 0;
/** Return the list of available codecs
* @return a set of the codecs and their descriptions
diff --git a/lib/engine/protocol/call-protocol-manager.h b/lib/engine/protocol/call-protocol-manager.h
index c5b3738..14e61bb 100644
--- a/lib/engine/protocol/call-protocol-manager.h
+++ b/lib/engine/protocol/call-protocol-manager.h
@@ -52,7 +52,6 @@ namespace Ekiga
* @addtogroup calls
* @{:
*/
-
class CallProtocolManager
{
@@ -66,6 +65,7 @@ namespace Ekiga
bool publish;
unsigned port;
};
+ typedef std::list<Interface> InterfaceList;
/* The constructor
@@ -130,12 +130,6 @@ namespace Ekiga
* MISC
*/
- /** Return the listen interface
- * @return the interface on which we are accepting calls. Generally,
- * under the form protocol:IP:port.
- */
- virtual const Interface & get_listen_interface () const = 0;
-
/** Set the DTMF mode to use to send DTMFs
* @param mode is the desired DTMF mode
*/
@@ -150,6 +144,12 @@ namespace Ekiga
* @param port is the port on which we should bind
*/
virtual bool set_listen_port (unsigned port) = 0;
+
+ /**
+ * @return the interface on which we are accepting calls. Generally,
+ * under the form protocol:IP:port.
+ */
+ virtual const InterfaceList & get_interfaces () const = 0;
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]