[ekiga/gnome-2-26] Even more sugar-coating for the addressbook stack



commit b8aac5470320e75ef127fbc4bffaa8a2a6efdbf6
Author: Julien Puydt <jpuydt src gnome org>
Date:   Tue Mar 24 21:08:12 2009 +0000

    Even more sugar-coating for the addressbook stack
    
    svn path=/trunk/; revision=7812
---
 lib/engine/addressbook/book-impl.h                 |    4 +-
 lib/engine/addressbook/book.h                      |    8 +++---
 lib/engine/addressbook/contact-core.cpp            |   10 ++++----
 lib/engine/addressbook/contact-core.h              |   24 ++++++++++----------
 lib/engine/addressbook/source-impl.h               |    4 +-
 lib/engine/addressbook/source.h                    |   14 +++++-----
 .../components/call-history/history-book.cpp       |    4 +-
 lib/engine/components/call-history/history-book.h  |    2 +
 .../components/call-history/history-contact.cpp    |    2 +-
 .../components/call-history/history-contact.h      |    2 +
 .../components/call-history/history-source.cpp     |    2 +-
 .../components/call-history/history-source.h       |    4 +-
 lib/engine/components/evolution/evolution-book.cpp |    4 +-
 lib/engine/components/evolution/evolution-book.h   |    2 +
 .../components/evolution/evolution-contact.cpp     |    2 +-
 .../components/evolution/evolution-contact.h       |    2 +
 .../components/evolution/evolution-source.cpp      |    2 +-
 lib/engine/components/kab/kab-book.cpp             |    2 +-
 lib/engine/components/kab/kab-source.cpp           |    2 +-
 lib/engine/components/ldap/ldap-book.cpp           |    8 +++---
 lib/engine/components/ldap/ldap-book.h             |    4 ++-
 lib/engine/components/ldap/ldap-contact.cpp        |    2 +-
 lib/engine/components/ldap/ldap-contact.h          |    2 +
 lib/engine/components/ldap/ldap-source.cpp         |    6 ++--
 lib/engine/components/ldap/ldap-source.h           |    2 +-
 25 files changed, 66 insertions(+), 54 deletions(-)

diff --git a/lib/engine/addressbook/book-impl.h b/lib/engine/addressbook/book-impl.h
index 7396a2d..42a510d 100644
--- a/lib/engine/addressbook/book-impl.h
+++ b/lib/engine/addressbook/book-impl.h
@@ -94,7 +94,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_contacts (sigc::slot1<bool, gmref_ptr<Contact> > visitor);
+    void visit_contacts (sigc::slot1<bool, ContactPtr > visitor);
 
   protected:
 
@@ -161,7 +161,7 @@ Ekiga::BookImpl<ContactType>::~BookImpl ()
 
 template<typename ContactType>
 void
-Ekiga::BookImpl<ContactType>::visit_contacts (sigc::slot1<bool, gmref_ptr<Contact> > visitor)
+Ekiga::BookImpl<ContactType>::visit_contacts (sigc::slot1<bool, ContactPtr > visitor)
 {
   RefLister<ContactType>::visit_objects (visitor);
 }
diff --git a/lib/engine/addressbook/book.h b/lib/engine/addressbook/book.h
index ace008d..7445d8c 100644
--- a/lib/engine/addressbook/book.h
+++ b/lib/engine/addressbook/book.h
@@ -63,7 +63,7 @@ namespace Ekiga {
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    virtual void visit_contacts (sigc::slot1<bool, gmref_ptr<Contact> >) = 0;
+    virtual void visit_contacts (sigc::slot1<bool, ContactPtr>) = 0;
 
 
     /** Create the menu for that book and its actions.
@@ -118,17 +118,17 @@ namespace Ekiga {
 
     /** This signal is emitted when a Contact has been added to the Book.
      */
-    sigc::signal1<void, gmref_ptr<Contact> > contact_added;
+    sigc::signal1<void, ContactPtr > contact_added;
 
 
     /** This signal is emitted when a Contact has been removed from the Book.
      */
-    sigc::signal1<void, gmref_ptr<Contact> > contact_removed;
+    sigc::signal1<void, ContactPtr > contact_removed;
 
 
     /** This signal is emitted when a Contact has been updated in the Book.
      */
-    sigc::signal1<void, gmref_ptr<Contact> > contact_updated;
+    sigc::signal1<void, ContactPtr > contact_updated;
 
 
     /** This chain allows the Book to present forms to the user
diff --git a/lib/engine/addressbook/contact-core.cpp b/lib/engine/addressbook/contact-core.cpp
index 0524c76..d0d405b 100644
--- a/lib/engine/addressbook/contact-core.cpp
+++ b/lib/engine/addressbook/contact-core.cpp
@@ -58,7 +58,7 @@ Ekiga::ContactCore::populate_menu (MenuBuilder &builder)
   builder.add_action ("search", _("_Find"), sigc::ptr_fun (on_search));
   populated = true;
 
-  for (std::list<gmref_ptr<Source> >::const_iterator iter = sources.begin ();
+  for (std::list<SourcePtr >::const_iterator iter = sources.begin ();
        iter != sources.end ();
        ++iter) {
 
@@ -71,7 +71,7 @@ Ekiga::ContactCore::populate_menu (MenuBuilder &builder)
 }
 
 void
-Ekiga::ContactCore::add_source (gmref_ptr<Source> source)
+Ekiga::ContactCore::add_source (SourcePtr source)
 {
   sources.push_back (source);
   source_added.emit (source);
@@ -85,11 +85,11 @@ Ekiga::ContactCore::add_source (gmref_ptr<Source> source)
 }
 
 void
-Ekiga::ContactCore::visit_sources (sigc::slot1<bool, gmref_ptr<Source> > visitor)
+Ekiga::ContactCore::visit_sources (sigc::slot1<bool, SourcePtr > visitor)
 {
   bool go_on = true;
 
-  for (std::list<gmref_ptr<Source> >::iterator iter = sources.begin ();
+  for (std::list<SourcePtr >::iterator iter = sources.begin ();
        iter != sources.end () && go_on;
        ++iter)
     go_on = visitor (*iter);
@@ -103,7 +103,7 @@ Ekiga::ContactCore::add_contact_decorator (gmref_ptr<ContactDecorator> decorator
 
 
 bool
-Ekiga::ContactCore::populate_contact_menu (gmref_ptr<Contact> contact,
+Ekiga::ContactCore::populate_contact_menu (ContactPtr contact,
 					   const std::string uri,
 					   MenuBuilder &builder)
 {
diff --git a/lib/engine/addressbook/contact-core.h b/lib/engine/addressbook/contact-core.h
index 0bbb938..da44ba2 100644
--- a/lib/engine/addressbook/contact-core.h
+++ b/lib/engine/addressbook/contact-core.h
@@ -55,7 +55,7 @@ namespace Ekiga
     virtual ~ContactDecorator ()
     {}
 
-    virtual bool populate_menu (gmref_ptr<Contact> /*contact*/,
+    virtual bool populate_menu (ContactPtr /*contact*/,
 				const std::string /*uri*/,
 				MenuBuilder& /*builder*/) = 0;
   };
@@ -100,7 +100,7 @@ namespace Ekiga
     /** Adds a source to the ContactCore service.
      * @param The source to be added.
      */
-    void add_source (gmref_ptr<Source> source);
+    void add_source (SourcePtr source);
 
 
     /** Triggers a callback for all Ekiga::Source sources of the
@@ -108,47 +108,47 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_sources (sigc::slot1<bool, gmref_ptr<Source> > visitor);
+    void visit_sources (sigc::slot1<bool, SourcePtr > visitor);
 
 
     /** This signal is emitted when a Ekiga::Source has been
      * added to the ContactCore Service.
      */
-    sigc::signal1<void, gmref_ptr<Source> > source_added;
+    sigc::signal1<void, SourcePtr > source_added;
 
     /** This signal is emitted when a book has been added to one of
      * the sources
      */
-    sigc::signal2<void, gmref_ptr<Source>, gmref_ptr<Book> > book_added;
+    sigc::signal2<void, SourcePtr, BookPtr > book_added;
 
     /** This signal is emitted when a book has been removed from one of
      * the sources
      */
-    sigc::signal2<void, gmref_ptr<Source>, gmref_ptr<Book> > book_removed;
+    sigc::signal2<void, SourcePtr, BookPtr > book_removed;
 
     /** This signal is emitted when a book has been updated in one of
      * the sources
      */
-    sigc::signal2<void, gmref_ptr<Source>, gmref_ptr<Book> > book_updated;
+    sigc::signal2<void, SourcePtr, BookPtr > book_updated;
 
     /** This signal is emitted when a contact has been added to one of
      * the book of one of the sources
      */
-    sigc::signal3<void, gmref_ptr<Source>, gmref_ptr<Book>, gmref_ptr<Contact> > contact_added;
+    sigc::signal3<void, SourcePtr, BookPtr, ContactPtr > contact_added;
 
     /** This signal is emitted when a contact has been removed from one of
      * the book of one of the sources
      */
-    sigc::signal3<void, gmref_ptr<Source>, gmref_ptr<Book>, gmref_ptr<Contact> > contact_removed;
+    sigc::signal3<void, SourcePtr, BookPtr, ContactPtr > contact_removed;
 
     /** This signal is emitted when a contact has been updated in one of
      * the book of one of the sources
      */
-    sigc::signal3<void, gmref_ptr<Source>, gmref_ptr<Book>, gmref_ptr<Contact> > contact_updated;
+    sigc::signal3<void, SourcePtr, BookPtr, ContactPtr > contact_updated;
 
   private:
 
-    std::list<gmref_ptr<Source> > sources;
+    std::list<SourcePtr > sources;
 
     /*** Contact Helpers ***/
 
@@ -161,7 +161,7 @@ namespace Ekiga
      * @param The uri for which actions could be made available.
      * @param A MenuBuilder object to populate.
      */
-    bool populate_contact_menu (gmref_ptr<Contact> contact,
+    bool populate_contact_menu (ContactPtr contact,
 				const std::string uri,
                                 MenuBuilder &builder);
 
diff --git a/lib/engine/addressbook/source-impl.h b/lib/engine/addressbook/source-impl.h
index feb5da2..4aa613e 100644
--- a/lib/engine/addressbook/source-impl.h
+++ b/lib/engine/addressbook/source-impl.h
@@ -100,7 +100,7 @@ namespace Ekiga
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    void visit_books (sigc::slot1<bool, gmref_ptr<Book> > visitor);
+    void visit_books (sigc::slot1<bool, BookPtr > visitor);
 
   protected:
 
@@ -196,7 +196,7 @@ Ekiga::SourceImpl<BookType>::~SourceImpl ()
 
 template<typename BookType>
 void
-Ekiga::SourceImpl<BookType>::visit_books (sigc::slot1<bool, gmref_ptr<Book> > visitor)
+Ekiga::SourceImpl<BookType>::visit_books (sigc::slot1<bool, BookPtr > visitor)
 {
   RefLister<BookType>::visit_objects (visitor);
 }
diff --git a/lib/engine/addressbook/source.h b/lib/engine/addressbook/source.h
index 208d406..660617a 100644
--- a/lib/engine/addressbook/source.h
+++ b/lib/engine/addressbook/source.h
@@ -57,7 +57,7 @@ namespace Ekiga {
      * @param The callback (the return value means "go on" and allows
      *  stopping the visit)
      */
-    virtual void visit_books (sigc::slot1<bool, gmref_ptr<Book> >) = 0;
+    virtual void visit_books (sigc::slot1<bool, BookPtr >) = 0;
 
 
     /** Create the menu for that source and its actions.
@@ -70,32 +70,32 @@ namespace Ekiga {
 
     /** This signal is emitted when a Book has been added to the Source.
      */
-    sigc::signal1<void, gmref_ptr<Book> > book_added;
+    sigc::signal1<void, BookPtr > book_added;
     
     
     /** This signal is emitted when a Book has been updated in the Source.
      */
-    sigc::signal1<void, gmref_ptr<Book> > book_updated;
+    sigc::signal1<void, BookPtr > book_updated;
     
     
     /** This signal is emitted when a Book has been removed in the Source.
      */
-    sigc::signal1<void, gmref_ptr<Book> > book_removed;
+    sigc::signal1<void, BookPtr > book_removed;
 
     /** This signal is emitted when a Contact has been added to a book in
      *  this source.
      */
-    sigc::signal2<void, gmref_ptr<Book>, gmref_ptr<Contact> > contact_added;
+    sigc::signal2<void, BookPtr, ContactPtr > contact_added;
 
     /** This signal is emitted when a Contact has been removed from a book in
      *  this source.
      */
-    sigc::signal2<void, gmref_ptr<Book>, gmref_ptr<Contact> > contact_removed;
+    sigc::signal2<void, BookPtr, ContactPtr > contact_removed;
 
     /** This signal is emitted when a Contact has been updated in a book in
      *  this source
      */
-    sigc::signal2<void, gmref_ptr<Book>, gmref_ptr<Contact> > contact_updated;
+    sigc::signal2<void, BookPtr, ContactPtr > contact_updated;
 
     /** This chain allows the Source to present forms to the user
      */
diff --git a/lib/engine/components/call-history/history-book.cpp b/lib/engine/components/call-history/history-book.cpp
index f52f795..55dda92 100644
--- a/lib/engine/components/call-history/history-book.cpp
+++ b/lib/engine/components/call-history/history-book.cpp
@@ -104,7 +104,7 @@ History::Book::get_name () const
 void
 History::Book::add (xmlNodePtr node)
 {
-  add_contact (gmref_ptr<Contact>(new Contact (core, doc, node)));
+  add_contact (ContactPtr (new Contact (core, doc, node)));
 }
 
 void
@@ -119,7 +119,7 @@ History::Book::add (const std::string & name,
 
     xmlNodePtr root = xmlDocGetRootElement (doc.get ());
 
-    gmref_ptr<Contact> contact(new Contact (core, doc, name, uri,
+    ContactPtr contact(new Contact (core, doc, name, uri,
 					    call_start, call_duration, c_t));
 
     xmlAddChild (root, contact->get_node ());
diff --git a/lib/engine/components/call-history/history-book.h b/lib/engine/components/call-history/history-book.h
index 8c471b3..dbbd240 100644
--- a/lib/engine/components/call-history/history-book.h
+++ b/lib/engine/components/call-history/history-book.h
@@ -108,6 +108,8 @@ namespace History
     std::tr1::shared_ptr<xmlDoc> doc;
   };
 
+  typedef gmref_ptr<Book> BookPtr;
+
 /**
  * @}
  */
diff --git a/lib/engine/components/call-history/history-contact.cpp b/lib/engine/components/call-history/history-contact.cpp
index 1829a1c..c7cacd0 100644
--- a/lib/engine/components/call-history/history-contact.cpp
+++ b/lib/engine/components/call-history/history-contact.cpp
@@ -172,7 +172,7 @@ bool
 History::Contact::populate_menu (Ekiga::MenuBuilder &builder)
 {
   gmref_ptr<Ekiga::ContactCore> contact_core = core.get ("contact-core");
-  return contact_core->populate_contact_menu (gmref_ptr<Contact>(this),
+  return contact_core->populate_contact_menu (ContactPtr (this),
 					      uri, builder);
 }
 
diff --git a/lib/engine/components/call-history/history-contact.h b/lib/engine/components/call-history/history-contact.h
index efeffd1..cd33502 100644
--- a/lib/engine/components/call-history/history-contact.h
+++ b/lib/engine/components/call-history/history-contact.h
@@ -110,6 +110,8 @@ namespace History
     call_type m_type;
   };
 
+  typedef gmref_ptr<Contact> ContactPtr;
+
 /**
  * @}
  */
diff --git a/lib/engine/components/call-history/history-source.cpp b/lib/engine/components/call-history/history-source.cpp
index 00601d6..124dadc 100644
--- a/lib/engine/components/call-history/history-source.cpp
+++ b/lib/engine/components/call-history/history-source.cpp
@@ -63,7 +63,7 @@ History::Source::populate_menu (Ekiga::MenuBuilder &)
   return false;
 }
 
-gmref_ptr<History::Book>
+History::BookPtr
 History::Source::get_book () const
 {
   return book;
diff --git a/lib/engine/components/call-history/history-source.h b/lib/engine/components/call-history/history-source.h
index 92d6c87..f5aa26a 100644
--- a/lib/engine/components/call-history/history-source.h
+++ b/lib/engine/components/call-history/history-source.h
@@ -70,12 +70,12 @@ namespace History
 
     const std::set<std::string> existing_groups () const;
 
-    gmref_ptr<Book> get_book () const;
+    BookPtr get_book () const;
 
   private:
 
     Ekiga::ServiceCore &core;
-    gmref_ptr<Book> book;
+    BookPtr book;
 
   };
 
diff --git a/lib/engine/components/evolution/evolution-book.cpp b/lib/engine/components/evolution/evolution-book.cpp
index 5abd1d8..7017a84 100644
--- a/lib/engine/components/evolution/evolution-book.cpp
+++ b/lib/engine/components/evolution/evolution-book.cpp
@@ -65,8 +65,8 @@ Evolution::Book::on_view_contacts_added (GList *econtacts)
 
     if (e_contact_get_const (econtact, E_CONTACT_FULL_NAME) != NULL) {
 
-      gmref_ptr<Contact> contact(new Evolution::Contact (services, book,
-							 econtact));
+      ContactPtr contact(new Evolution::Contact (services, book,
+						 econtact));
 
       add_contact (contact);
       nbr++;
diff --git a/lib/engine/components/evolution/evolution-book.h b/lib/engine/components/evolution/evolution-book.h
index 3d24e53..d3f147e 100644
--- a/lib/engine/components/evolution/evolution-book.h
+++ b/lib/engine/components/evolution/evolution-book.h
@@ -104,6 +104,8 @@ namespace Evolution
     std::string search_filter;
   };
 
+  typedef gmref_ptr<Book> BookPtr;
+
 /**
  * @}
  */
diff --git a/lib/engine/components/evolution/evolution-contact.cpp b/lib/engine/components/evolution/evolution-contact.cpp
index d98323c..ef18fcf 100644
--- a/lib/engine/components/evolution/evolution-contact.cpp
+++ b/lib/engine/components/evolution/evolution-contact.cpp
@@ -217,7 +217,7 @@ Evolution::Contact::populate_menu (Ekiga::MenuBuilder &builder)
       std::string attr_value = get_attribute_value (attr_type);
       if ( !attr_value.empty ()) {
 
-	if (core->populate_contact_menu (gmref_ptr<Contact>(this),
+	if (core->populate_contact_menu (ContactPtr(this),
 					 attr_value, tmp_builder)) {
 
 	  builder.add_ghost ("", get_attribute_name_from_type (attr_type));
diff --git a/lib/engine/components/evolution/evolution-contact.h b/lib/engine/components/evolution/evolution-contact.h
index 92dd18f..ce50e35 100644
--- a/lib/engine/components/evolution/evolution-contact.h
+++ b/lib/engine/components/evolution/evolution-contact.h
@@ -113,6 +113,8 @@ namespace Evolution
 				   Ekiga::Form &result);
   };
 
+  typedef gmref_ptr<Contact> ContactPtr;
+
 /**
  * @}
  */
diff --git a/lib/engine/components/evolution/evolution-source.cpp b/lib/engine/components/evolution/evolution-source.cpp
index 7dda3bc..76470fb 100644
--- a/lib/engine/components/evolution/evolution-source.cpp
+++ b/lib/engine/components/evolution/evolution-source.cpp
@@ -80,7 +80,7 @@ Evolution::Source::add_group (ESourceGroup *group)
     ebook = e_book_new (s, NULL);
     g_object_unref (s);
 
-    gmref_ptr<Book> book (new Evolution::Book (services, ebook));
+    BookPtr book (new Evolution::Book (services, ebook));
 
     g_object_unref (ebook);
 
diff --git a/lib/engine/components/kab/kab-book.cpp b/lib/engine/components/kab/kab-book.cpp
index 4312ab8..ce117dc 100644
--- a/lib/engine/components/kab/kab-book.cpp
+++ b/lib/engine/components/kab/kab-book.cpp
@@ -52,7 +52,7 @@ KAB::Book::Book (Ekiga::ContactCore &_core): core(_core)
        iter != kab->end ();
        iter++) {
 
-    add_contact (gmref_ptr<Contact> (new Contact (core, &(*iter))));
+    add_contact (ContactPtr (new Contact (core, &(*iter))));
   }
 }
 
diff --git a/lib/engine/components/kab/kab-source.cpp b/lib/engine/components/kab/kab-source.cpp
index 9e2dccf..8675a68 100644
--- a/lib/engine/components/kab/kab-source.cpp
+++ b/lib/engine/components/kab/kab-source.cpp
@@ -41,7 +41,7 @@
 
 KAB::Source::Source (Ekiga::ContactCore &_core): core(_core)
 {
-  add_book (gmref_ptr<Book>(new KAB::Book (core)));
+  add_book (BookPtr(new KAB::Book (core)));
 }
 
 KAB::Source::~Source ()
diff --git a/lib/engine/components/ldap/ldap-book.cpp b/lib/engine/components/ldap/ldap-book.cpp
index 3833442..2f47549 100644
--- a/lib/engine/components/ldap/ldap-book.cpp
+++ b/lib/engine/components/ldap/ldap-book.cpp
@@ -74,10 +74,10 @@ fix_to_utf8 (const std::string str)
 }
 
 /* parses a message to construct a nice contact */
-gmref_ptr<OPENLDAP::Contact>
+OPENLDAP::ContactPtr
 OPENLDAP::Book::parse_result (LDAPMessage* message)
 {
-  gmref_ptr<Contact> result;
+  ContactPtr result;
   BerElement *ber = NULL;
   struct berval bv, *bvals;
   std::string username;
@@ -110,7 +110,7 @@ OPENLDAP::Book::parse_result (LDAPMessage* message)
 
   if (!username.empty () && !call_addresses.empty()) {
 
-    result = gmref_ptr<Contact>(new Contact (core, fix_to_utf8 (username), call_addresses));
+    result = ContactPtr(new Contact (core, fix_to_utf8 (username), call_addresses));
   }
 
   return result;
@@ -890,7 +890,7 @@ OPENLDAP::Book::refresh_result ()
 
     if (ldap_msgtype (msg_result) == LDAP_RES_SEARCH_ENTRY) {
 
-      gmref_ptr<Contact> contact = parse_result (msg_result);
+      ContactPtr contact = parse_result (msg_result);
       if (contact) {
 	add_contact (contact);
         nbr++;
diff --git a/lib/engine/components/ldap/ldap-book.h b/lib/engine/components/ldap/ldap-book.h
index 0d6a154..a2602a6 100644
--- a/lib/engine/components/ldap/ldap-book.h
+++ b/lib/engine/components/ldap/ldap-book.h
@@ -126,7 +126,7 @@ namespace OPENLDAP
     void refresh_bound ();
     void refresh_result ();
 
-    gmref_ptr<Contact> parse_result(struct ldapmsg *);
+    ContactPtr parse_result(struct ldapmsg *);
 
     void parse_uri();
 
@@ -152,6 +152,8 @@ namespace OPENLDAP
     std::string search_filter;
   };
 
+  typedef gmref_ptr<Book> BookPtr;
+
 /**
  * @}
  */
diff --git a/lib/engine/components/ldap/ldap-contact.cpp b/lib/engine/components/ldap/ldap-contact.cpp
index feee150..8142a02 100644
--- a/lib/engine/components/ldap/ldap-contact.cpp
+++ b/lib/engine/components/ldap/ldap-contact.cpp
@@ -80,7 +80,7 @@ OPENLDAP::Contact::populate_menu (Ekiga::MenuBuilder &builder)
 	 = uris.begin ();
        iter != uris.end ();
        iter++) {
-    if (contact_core->populate_contact_menu (gmref_ptr<Contact>(this),
+    if (contact_core->populate_contact_menu (ContactPtr(this),
 					     iter->second, tmp_builder)) {
       builder.add_ghost ("", iter->first);
       tmp_builder.populate_menu (builder);
diff --git a/lib/engine/components/ldap/ldap-contact.h b/lib/engine/components/ldap/ldap-contact.h
index 5ab4468..7d98a0f 100644
--- a/lib/engine/components/ldap/ldap-contact.h
+++ b/lib/engine/components/ldap/ldap-contact.h
@@ -76,6 +76,8 @@ namespace OPENLDAP
     std::map<std::string, std::string> uris;
   };
 
+  typedef gmref_ptr<Contact> ContactPtr;
+
 /**
  * @}
  */
diff --git a/lib/engine/components/ldap/ldap-source.cpp b/lib/engine/components/ldap/ldap-source.cpp
index e0929cf..689c522 100644
--- a/lib/engine/components/ldap/ldap-source.cpp
+++ b/lib/engine/components/ldap/ldap-source.cpp
@@ -95,7 +95,7 @@ OPENLDAP::Source::~Source ()
 void
 OPENLDAP::Source::add (xmlNodePtr node)
 {
-  common_add (gmref_ptr<Book>(new Book (core, doc, node)));
+  common_add (BookPtr(new Book (core, doc, node)));
 }
 
 void
@@ -104,7 +104,7 @@ OPENLDAP::Source::add ()
   xmlNodePtr root;
 
   root = xmlDocGetRootElement (doc.get ());
-  gmref_ptr<Book> book (new Book (core, doc, bookinfo));
+  BookPtr book (new Book (core, doc, bookinfo));
 
   xmlAddChild (root, book->get_node ());
 
@@ -112,7 +112,7 @@ OPENLDAP::Source::add ()
 }
 
 void
-OPENLDAP::Source::common_add (gmref_ptr<Book> book)
+OPENLDAP::Source::common_add (BookPtr book)
 {
   book->trigger_saving.connect (sigc::mem_fun (this, &OPENLDAP::Source::save));
   add_book (book);
diff --git a/lib/engine/components/ldap/ldap-source.h b/lib/engine/components/ldap/ldap-source.h
index b86e646..ea6fab2 100644
--- a/lib/engine/components/ldap/ldap-source.h
+++ b/lib/engine/components/ldap/ldap-source.h
@@ -84,7 +84,7 @@ namespace OPENLDAP
 
     void add ();
 
-    void common_add (gmref_ptr<Book> book);
+    void common_add (BookPtr book);
 
     void save ();
 



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