[ekiga] CallCore: Added methods to get and set codecs.



commit 9d2d608f5f25f9ad75f5eacb160596cae34535f9
Author: Damien Sandras <dsandras seconix com>
Date:   Tue Dec 30 12:28:06 2014 +0100

    CallCore: Added methods to get and set codecs.
    
    This will use the different CallManagers to do so.
    
    It allows the CodecsBox to rely on the CallCore instead of the
    configuration keys content to get a codec description.
    
    This offers more flexibility and the possibility to handle codecs in
    different CallManagers in a uniform way wrt the corresponding
    CallManager feature.

 lib/engine/protocol/call-core.cpp |   25 +++++++++++++++++++++++++
 lib/engine/protocol/call-core.h   |    5 +++++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/protocol/call-core.cpp b/lib/engine/protocol/call-core.cpp
index 81bfdea..52a9565 100644
--- a/lib/engine/protocol/call-core.cpp
+++ b/lib/engine/protocol/call-core.cpp
@@ -147,6 +147,31 @@ bool CallCore::is_supported_uri (const std::string & uri)
 }
 
 
+Ekiga::CodecList
+CallCore::get_codecs () const
+{
+  Ekiga::CodecList codecs;
+  for (std::set<boost::shared_ptr<CallManager> >::iterator iter = managers.begin ();
+       iter != managers.end ();
+       iter++) {
+    codecs.append ((*iter)->get_codecs ());
+  }
+
+  return codecs;
+}
+
+
+void
+CallCore::set_codecs (Ekiga::CodecList & codecs)
+{
+  for (std::set<boost::shared_ptr<CallManager> >::iterator iter = managers.begin ();
+       iter != managers.end ();
+       iter++) {
+    (*iter)->set_codecs (codecs);
+  }
+}
+
+
 void CallCore::add_call (boost::shared_ptr<Call> call, boost::shared_ptr<CallManager> manager)
 {
   Ekiga::FriendOrFoe::Identification id = iff->decide ("call", call->get_remote_uri ());
diff --git a/lib/engine/protocol/call-core.h b/lib/engine/protocol/call-core.h
index 8dbcd83..b62a643 100644
--- a/lib/engine/protocol/call-core.h
+++ b/lib/engine/protocol/call-core.h
@@ -169,6 +169,11 @@ namespace Ekiga
       bool is_supported_uri (const std::string & uri);
 
 
+      /*** Codecs Management ***/
+      void set_codecs (Ekiga::CodecList & codecs);
+      Ekiga::CodecList get_codecs () const;
+
+
       /*** Call Related Signals ***/
 
       /** See call.h for the API


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]