[ekiga/jp-opal-roster: 24/33] Opal::Account: added the get_groups method



commit 71c71f400e99dd79439ec66f364204338f979088
Author: Julien Puydt <jpuydt free fr>
Date:   Sat Oct 26 18:07:14 2013 +0200

    Opal::Account: added the get_groups method

 lib/engine/components/opal/opal-account.cpp |   15 +++++++++++++++
 lib/engine/components/opal/opal-account.h   |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 1b650f3..926c2d2 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -155,6 +155,21 @@ Opal::Account::Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
 }
 
 
+std::set<std::string>
+Opal::Account::get_groups () const
+{
+  std::set<std::string> result;
+
+  for (const_iterator iter = begin (); iter != end (); ++iter) {
+
+    std::set<std::string> groups = (*iter)->get_groups ();
+    result.insert (groups.begin (), groups.end ());
+  }
+
+  return result;
+}
+
+
 const std::string
 Opal::Account::get_name () const
 {
diff --git a/lib/engine/components/opal/opal-account.h b/lib/engine/components/opal/opal-account.h
index 6cb1a65..d8df408 100644
--- a/lib/engine/components/opal/opal-account.h
+++ b/lib/engine/components/opal/opal-account.h
@@ -102,6 +102,8 @@ public:
 
     Type get_type () const;
 
+    std::set<std::string> get_groups () const;
+
     /** Returns the protocol name of the Opal::Account.
      * This function is purely virtual and should be implemented by the
      * Ekiga::Account descendant.


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