[ekiga] Simplified the Opal::Bank and Opal::Account code



commit bf745b1274df075464590874d2865d26dfcc517f
Author: Julien Puydt <jpuydt free fr>
Date:   Sun Aug 11 19:17:41 2013 +0200

    Simplified the Opal::Bank and Opal::Account code
    
    They don't need the Ekiga::PresenceCore anymore, since they only mind their
    own business.

 lib/engine/components/opal/opal-account.cpp |    4 ----
 lib/engine/components/opal/opal-account.h   |    3 ---
 lib/engine/components/opal/opal-bank.cpp    |   10 ----------
 lib/engine/components/opal/opal-bank.h      |    1 -
 4 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 80c442d..07d8828 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -59,14 +59,12 @@
 #include "sip-endpoint.h"
 
 Opal::Account::Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
-                       boost::shared_ptr<Ekiga::PresenceCore> _presence_core,
                        boost::shared_ptr<Ekiga::NotificationCore> _notification_core,
                        boost::shared_ptr<Ekiga::PersonalDetails> _personal_details,
                        boost::shared_ptr<Ekiga::AudioOutputCore> _audiooutput_core,
                        boost::shared_ptr<CallManager> _call_manager,
                        const std::string & account):
   sip_endpoint(_sip_endpoint),
-  presence_core(_presence_core),
   notification_core(_notification_core),
   personal_details(_personal_details),
   audiooutput_core(_audiooutput_core),
@@ -155,7 +153,6 @@ Opal::Account::Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
 
 
 Opal::Account::Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
-                       boost::shared_ptr<Ekiga::PresenceCore> _presence_core,
                        boost::shared_ptr<Ekiga::NotificationCore> _notification_core,
                        boost::shared_ptr<Ekiga::PersonalDetails> _personal_details,
                        boost::shared_ptr<Ekiga::AudioOutputCore> _audiooutput_core,
@@ -169,7 +166,6 @@ Opal::Account::Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
                         bool _enabled,
                         unsigned _timeout):
   sip_endpoint(_sip_endpoint),
-  presence_core(_presence_core),
   notification_core(_notification_core),
   personal_details(_personal_details),
   audiooutput_core(_audiooutput_core),
diff --git a/lib/engine/components/opal/opal-account.h b/lib/engine/components/opal/opal-account.h
index fe01708..55dd311 100644
--- a/lib/engine/components/opal/opal-account.h
+++ b/lib/engine/components/opal/opal-account.h
@@ -73,7 +73,6 @@ public:
     typedef enum { Processing, Registered, Unregistered, RegistrationFailed, UnregistrationFailed } 
RegistrationState;
 
     Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
-            boost::shared_ptr<Ekiga::PresenceCore> _presence_core,
             boost::shared_ptr<Ekiga::NotificationCore> _notification_core,
             boost::shared_ptr<Ekiga::PersonalDetails> _personal_details,
             boost::shared_ptr<Ekiga::AudioOutputCore> _audiooutput_core,
@@ -81,7 +80,6 @@ public:
             const std::string & account);
 
     Account (boost::shared_ptr<Opal::Sip::EndPoint> _sip_endpoint,
-            boost::shared_ptr<Ekiga::PresenceCore> _presence_core,
             boost::shared_ptr<Ekiga::NotificationCore> _notification_core,
             boost::shared_ptr<Ekiga::PersonalDetails> _personal_details,
             boost::shared_ptr<Ekiga::AudioOutputCore> _audiooutput_core,
@@ -230,7 +228,6 @@ private:
                                  std::string status);
 
     boost::shared_ptr<Opal::Sip::EndPoint> sip_endpoint;
-    boost::weak_ptr<Ekiga::PresenceCore> presence_core;
     boost::weak_ptr<Ekiga::NotificationCore> notification_core;
     boost::weak_ptr<Ekiga::PersonalDetails> personal_details;
     boost::weak_ptr<Ekiga::AudioOutputCore> audiooutput_core;
diff --git a/lib/engine/components/opal/opal-bank.cpp b/lib/engine/components/opal/opal-bank.cpp
index a085e32..35d66c1 100644
--- a/lib/engine/components/opal/opal-bank.cpp
+++ b/lib/engine/components/opal/opal-bank.cpp
@@ -52,16 +52,11 @@
 
 Opal::Bank::Bank (Ekiga::ServiceCore& core):
   sip_endpoint(core.get<Opal::Sip::EndPoint> ("opal-sip-endpoint")),
-  presence_core(core.get<Ekiga::PresenceCore> ("presence-core")),
   notification_core(core.get<Ekiga::NotificationCore> ("notification-core")),
   personal_details(core.get<Ekiga::PersonalDetails> ("personal-details")),
   audiooutput_core(core.get<Ekiga::AudioOutputCore> ("audiooutput-core")),
   opal_component(core.get<CallManager> ("opal-component"))
 {
-  boost::shared_ptr<Ekiga::PresenceCore> pcore = presence_core.lock ();
-  if ( !pcore)
-    return;
-
   GSList *accounts = gm_conf_get_string_list (PROTOCOLS_KEY "accounts_list");
   GSList *accounts_iter = accounts;
 
@@ -69,7 +64,6 @@ Opal::Bank::Bank (Ekiga::ServiceCore& core):
 
     boost::shared_ptr<Account> account
       = boost::shared_ptr<Account> (new Account (sip_endpoint,
-                                                pcore,
                                                 notification_core,
                                                 personal_details,
                                                 audiooutput_core,
@@ -278,12 +272,8 @@ void Opal::Bank::add (Account::Type acc_type,
                       bool enabled,
                       unsigned timeout)
 {
-  boost::shared_ptr<Ekiga::PresenceCore> pcore = presence_core.lock ();
-  if ( !pcore)
-    return;
   AccountPtr account
     = AccountPtr(new Opal::Account (sip_endpoint,
-                                   pcore,
                                    notification_core,
                                    personal_details,
                                    audiooutput_core,
diff --git a/lib/engine/components/opal/opal-bank.h b/lib/engine/components/opal/opal-bank.h
index 61be537..854e005 100644
--- a/lib/engine/components/opal/opal-bank.h
+++ b/lib/engine/components/opal/opal-bank.h
@@ -109,7 +109,6 @@ public:
 
 private:
     boost::shared_ptr<Opal::Sip::EndPoint> sip_endpoint;
-    boost::weak_ptr<Ekiga::PresenceCore> presence_core;
     boost::shared_ptr<Ekiga::NotificationCore> notification_core;
     boost::shared_ptr<Ekiga::PersonalDetails> personal_details;
     boost::shared_ptr<Ekiga::AudioOutputCore> audiooutput_core;


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