ekiga r7812 - in trunk/lib/engine: addressbook components/call-history components/evolution components/kab components/ldap
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7812 - in trunk/lib/engine: addressbook components/call-history components/evolution components/kab components/ldap
- Date: Tue, 24 Mar 2009 21:08:13 +0000 (UTC)
Author: jpuydt
Date: Tue Mar 24 21:08:12 2009
New Revision: 7812
URL: http://svn.gnome.org/viewvc/ekiga?rev=7812&view=rev
Log:
Even more sugar-coating for the addressbook stack
Modified:
trunk/lib/engine/addressbook/book-impl.h
trunk/lib/engine/addressbook/book.h
trunk/lib/engine/addressbook/contact-core.cpp
trunk/lib/engine/addressbook/contact-core.h
trunk/lib/engine/addressbook/source-impl.h
trunk/lib/engine/addressbook/source.h
trunk/lib/engine/components/call-history/history-book.cpp
trunk/lib/engine/components/call-history/history-book.h
trunk/lib/engine/components/call-history/history-contact.cpp
trunk/lib/engine/components/call-history/history-contact.h
trunk/lib/engine/components/call-history/history-source.cpp
trunk/lib/engine/components/call-history/history-source.h
trunk/lib/engine/components/evolution/evolution-book.cpp
trunk/lib/engine/components/evolution/evolution-book.h
trunk/lib/engine/components/evolution/evolution-contact.cpp
trunk/lib/engine/components/evolution/evolution-contact.h
trunk/lib/engine/components/evolution/evolution-source.cpp
trunk/lib/engine/components/kab/kab-book.cpp
trunk/lib/engine/components/kab/kab-source.cpp
trunk/lib/engine/components/ldap/ldap-book.cpp
trunk/lib/engine/components/ldap/ldap-book.h
trunk/lib/engine/components/ldap/ldap-contact.cpp
trunk/lib/engine/components/ldap/ldap-contact.h
trunk/lib/engine/components/ldap/ldap-source.cpp
trunk/lib/engine/components/ldap/ldap-source.h
Modified: trunk/lib/engine/addressbook/book-impl.h
==============================================================================
--- trunk/lib/engine/addressbook/book-impl.h (original)
+++ trunk/lib/engine/addressbook/book-impl.h Tue Mar 24 21:08:12 2009
@@ -94,7 +94,7 @@
* @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 @@
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);
}
Modified: trunk/lib/engine/addressbook/book.h
==============================================================================
--- trunk/lib/engine/addressbook/book.h (original)
+++ trunk/lib/engine/addressbook/book.h Tue Mar 24 21:08:12 2009
@@ -63,7 +63,7 @@
* @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 @@
/** 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
Modified: trunk/lib/engine/addressbook/contact-core.cpp
==============================================================================
--- trunk/lib/engine/addressbook/contact-core.cpp (original)
+++ trunk/lib/engine/addressbook/contact-core.cpp Tue Mar 24 21:08:12 2009
@@ -58,7 +58,7 @@
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 @@
}
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 @@
}
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 @@
bool
-Ekiga::ContactCore::populate_contact_menu (gmref_ptr<Contact> contact,
+Ekiga::ContactCore::populate_contact_menu (ContactPtr contact,
const std::string uri,
MenuBuilder &builder)
{
Modified: trunk/lib/engine/addressbook/contact-core.h
==============================================================================
--- trunk/lib/engine/addressbook/contact-core.h (original)
+++ trunk/lib/engine/addressbook/contact-core.h Tue Mar 24 21:08:12 2009
@@ -55,7 +55,7 @@
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 @@
/** 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 @@
* @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 @@
* @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);
Modified: trunk/lib/engine/addressbook/source-impl.h
==============================================================================
--- trunk/lib/engine/addressbook/source-impl.h (original)
+++ trunk/lib/engine/addressbook/source-impl.h Tue Mar 24 21:08:12 2009
@@ -100,7 +100,7 @@
* @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 @@
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);
}
Modified: trunk/lib/engine/addressbook/source.h
==============================================================================
--- trunk/lib/engine/addressbook/source.h (original)
+++ trunk/lib/engine/addressbook/source.h Tue Mar 24 21:08:12 2009
@@ -57,7 +57,7 @@
* @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 @@
/** 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
*/
Modified: trunk/lib/engine/components/call-history/history-book.cpp
==============================================================================
--- trunk/lib/engine/components/call-history/history-book.cpp (original)
+++ trunk/lib/engine/components/call-history/history-book.cpp Tue Mar 24 21:08:12 2009
@@ -104,7 +104,7 @@
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 @@
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 ());
Modified: trunk/lib/engine/components/call-history/history-book.h
==============================================================================
--- trunk/lib/engine/components/call-history/history-book.h (original)
+++ trunk/lib/engine/components/call-history/history-book.h Tue Mar 24 21:08:12 2009
@@ -108,6 +108,8 @@
std::tr1::shared_ptr<xmlDoc> doc;
};
+ typedef gmref_ptr<Book> BookPtr;
+
/**
* @}
*/
Modified: trunk/lib/engine/components/call-history/history-contact.cpp
==============================================================================
--- trunk/lib/engine/components/call-history/history-contact.cpp (original)
+++ trunk/lib/engine/components/call-history/history-contact.cpp Tue Mar 24 21:08:12 2009
@@ -172,7 +172,7 @@
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);
}
Modified: trunk/lib/engine/components/call-history/history-contact.h
==============================================================================
--- trunk/lib/engine/components/call-history/history-contact.h (original)
+++ trunk/lib/engine/components/call-history/history-contact.h Tue Mar 24 21:08:12 2009
@@ -110,6 +110,8 @@
call_type m_type;
};
+ typedef gmref_ptr<Contact> ContactPtr;
+
/**
* @}
*/
Modified: trunk/lib/engine/components/call-history/history-source.cpp
==============================================================================
--- trunk/lib/engine/components/call-history/history-source.cpp (original)
+++ trunk/lib/engine/components/call-history/history-source.cpp Tue Mar 24 21:08:12 2009
@@ -63,7 +63,7 @@
return false;
}
-gmref_ptr<History::Book>
+History::BookPtr
History::Source::get_book () const
{
return book;
Modified: trunk/lib/engine/components/call-history/history-source.h
==============================================================================
--- trunk/lib/engine/components/call-history/history-source.h (original)
+++ trunk/lib/engine/components/call-history/history-source.h Tue Mar 24 21:08:12 2009
@@ -70,12 +70,12 @@
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;
};
Modified: trunk/lib/engine/components/evolution/evolution-book.cpp
==============================================================================
--- trunk/lib/engine/components/evolution/evolution-book.cpp (original)
+++ trunk/lib/engine/components/evolution/evolution-book.cpp Tue Mar 24 21:08:12 2009
@@ -65,8 +65,8 @@
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++;
Modified: trunk/lib/engine/components/evolution/evolution-book.h
==============================================================================
--- trunk/lib/engine/components/evolution/evolution-book.h (original)
+++ trunk/lib/engine/components/evolution/evolution-book.h Tue Mar 24 21:08:12 2009
@@ -104,6 +104,8 @@
std::string search_filter;
};
+ typedef gmref_ptr<Book> BookPtr;
+
/**
* @}
*/
Modified: trunk/lib/engine/components/evolution/evolution-contact.cpp
==============================================================================
--- trunk/lib/engine/components/evolution/evolution-contact.cpp (original)
+++ trunk/lib/engine/components/evolution/evolution-contact.cpp Tue Mar 24 21:08:12 2009
@@ -217,7 +217,7 @@
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));
Modified: trunk/lib/engine/components/evolution/evolution-contact.h
==============================================================================
--- trunk/lib/engine/components/evolution/evolution-contact.h (original)
+++ trunk/lib/engine/components/evolution/evolution-contact.h Tue Mar 24 21:08:12 2009
@@ -113,6 +113,8 @@
Ekiga::Form &result);
};
+ typedef gmref_ptr<Contact> ContactPtr;
+
/**
* @}
*/
Modified: trunk/lib/engine/components/evolution/evolution-source.cpp
==============================================================================
--- trunk/lib/engine/components/evolution/evolution-source.cpp (original)
+++ trunk/lib/engine/components/evolution/evolution-source.cpp Tue Mar 24 21:08:12 2009
@@ -80,7 +80,7 @@
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);
Modified: trunk/lib/engine/components/kab/kab-book.cpp
==============================================================================
--- trunk/lib/engine/components/kab/kab-book.cpp (original)
+++ trunk/lib/engine/components/kab/kab-book.cpp Tue Mar 24 21:08:12 2009
@@ -52,7 +52,7 @@
iter != kab->end ();
iter++) {
- add_contact (gmref_ptr<Contact> (new Contact (core, &(*iter))));
+ add_contact (ContactPtr (new Contact (core, &(*iter))));
}
}
Modified: trunk/lib/engine/components/kab/kab-source.cpp
==============================================================================
--- trunk/lib/engine/components/kab/kab-source.cpp (original)
+++ trunk/lib/engine/components/kab/kab-source.cpp Tue Mar 24 21:08:12 2009
@@ -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 ()
Modified: trunk/lib/engine/components/ldap/ldap-book.cpp
==============================================================================
--- trunk/lib/engine/components/ldap/ldap-book.cpp (original)
+++ trunk/lib/engine/components/ldap/ldap-book.cpp Tue Mar 24 21:08:12 2009
@@ -74,10 +74,10 @@
}
/* 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 @@
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 @@
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++;
Modified: trunk/lib/engine/components/ldap/ldap-book.h
==============================================================================
--- trunk/lib/engine/components/ldap/ldap-book.h (original)
+++ trunk/lib/engine/components/ldap/ldap-book.h Tue Mar 24 21:08:12 2009
@@ -126,7 +126,7 @@
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 @@
std::string search_filter;
};
+ typedef gmref_ptr<Book> BookPtr;
+
/**
* @}
*/
Modified: trunk/lib/engine/components/ldap/ldap-contact.cpp
==============================================================================
--- trunk/lib/engine/components/ldap/ldap-contact.cpp (original)
+++ trunk/lib/engine/components/ldap/ldap-contact.cpp Tue Mar 24 21:08:12 2009
@@ -80,7 +80,7 @@
= 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);
Modified: trunk/lib/engine/components/ldap/ldap-contact.h
==============================================================================
--- trunk/lib/engine/components/ldap/ldap-contact.h (original)
+++ trunk/lib/engine/components/ldap/ldap-contact.h Tue Mar 24 21:08:12 2009
@@ -76,6 +76,8 @@
std::map<std::string, std::string> uris;
};
+ typedef gmref_ptr<Contact> ContactPtr;
+
/**
* @}
*/
Modified: trunk/lib/engine/components/ldap/ldap-source.cpp
==============================================================================
--- trunk/lib/engine/components/ldap/ldap-source.cpp (original)
+++ trunk/lib/engine/components/ldap/ldap-source.cpp Tue Mar 24 21:08:12 2009
@@ -95,7 +95,7 @@
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 @@
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 @@
}
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);
Modified: trunk/lib/engine/components/ldap/ldap-source.h
==============================================================================
--- trunk/lib/engine/components/ldap/ldap-source.h (original)
+++ trunk/lib/engine/components/ldap/ldap-source.h Tue Mar 24 21:08:12 2009
@@ -84,7 +84,7 @@
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]