ekiga r6574 - in trunk: . lib/engine/addressbook/call-history lib/engine/addressbook/evolution lib/engine/addressbook/ldap lib/engine/addressbook/skel



Author: dsandras
Date: Mon Aug 11 20:44:05 2008
New Revision: 6574
URL: http://svn.gnome.org/viewvc/ekiga?rev=6574&view=rev

Log:
Added get_type method giving hints about the type of Book it is. It
can be used by GUI elements to display appropriate icons.


Modified:
   trunk/ChangeLog
   trunk/lib/engine/addressbook/call-history/history-book.cpp
   trunk/lib/engine/addressbook/call-history/history-book.h
   trunk/lib/engine/addressbook/evolution/evolution-book.cpp
   trunk/lib/engine/addressbook/evolution/evolution-book.h
   trunk/lib/engine/addressbook/ldap/ldap-book.cpp
   trunk/lib/engine/addressbook/ldap/ldap-book.h
   trunk/lib/engine/addressbook/skel/book.h

Modified: trunk/lib/engine/addressbook/call-history/history-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-book.cpp	(original)
+++ trunk/lib/engine/addressbook/call-history/history-book.cpp	Mon Aug 11 20:44:05 2008
@@ -164,6 +164,12 @@
   return ""; // nothing special here
 }
 
+const std::string
+History::Book::get_type () const
+{
+  return "history"; 
+}
+
 void
 History::Book::set_search_filter (std::string /*filter*/)
 {

Modified: trunk/lib/engine/addressbook/call-history/history-book.h
==============================================================================
--- trunk/lib/engine/addressbook/call-history/history-book.h	(original)
+++ trunk/lib/engine/addressbook/call-history/history-book.h	Mon Aug 11 20:44:05 2008
@@ -71,6 +71,8 @@
 
     const std::string get_status () const;
 
+    const std::string get_type () const;
+
     void set_search_filter (std::string);
 
     /* more specific api */

Modified: trunk/lib/engine/addressbook/evolution/evolution-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-book.cpp	(original)
+++ trunk/lib/engine/addressbook/evolution/evolution-book.cpp	Mon Aug 11 20:44:05 2008
@@ -276,6 +276,12 @@
   return status;
 }
 
+const std::string
+Evolution::Book::get_type () const
+{
+  return "local";
+}
+
 void
 Evolution::Book::refresh ()
 {

Modified: trunk/lib/engine/addressbook/evolution/evolution-book.h
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-book.h	(original)
+++ trunk/lib/engine/addressbook/evolution/evolution-book.h	Mon Aug 11 20:44:05 2008
@@ -76,6 +76,8 @@
 
     const std::string get_status () const;
 
+    const std::string get_type () const;
+
     void refresh ();
 
     /* those are private, but need to be called from C code */

Modified: trunk/lib/engine/addressbook/ldap/ldap-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/ldap/ldap-book.cpp	(original)
+++ trunk/lib/engine/addressbook/ldap/ldap-book.cpp	Mon Aug 11 20:44:05 2008
@@ -330,6 +330,13 @@
   return status;
 }
 
+const std::string
+OPENLDAP::Book::get_type () const
+{
+  return "remote";
+}
+
+
 void
 OPENLDAP::Book::refresh ()
 {

Modified: trunk/lib/engine/addressbook/ldap/ldap-book.h
==============================================================================
--- trunk/lib/engine/addressbook/ldap/ldap-book.h	(original)
+++ trunk/lib/engine/addressbook/ldap/ldap-book.h	Mon Aug 11 20:44:05 2008
@@ -83,6 +83,8 @@
 
     const std::string get_status () const;
 
+    const std::string get_type () const;
+
     void refresh ();
 
     void remove ();

Modified: trunk/lib/engine/addressbook/skel/book.h
==============================================================================
--- trunk/lib/engine/addressbook/skel/book.h	(original)
+++ trunk/lib/engine/addressbook/skel/book.h	Mon Aug 11 20:44:05 2008
@@ -90,6 +90,17 @@
      */
     virtual const std::string get_status () const = 0;
 
+    
+    /** Get the type of the Book.
+     * The type is a string and could be something like 'local' or
+     * 'remote'. 
+     *
+     * This function is purely virtual and should be implemented by
+     * the descendant of the Ekiga::Book, ie BookImpl or one
+     * of its descendant.
+     */
+    virtual const std::string get_type () const = 0;
+
 
     /*
      * Signals on that object



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