[Svn] r3452 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Wed Mar 31 17:57:20 CEST 2010


Author: thomasb
Date: 2010-03-31 10:57:20 -0500 (Wed, 31 Mar 2010)
New Revision: 3452

Modified:
   trunk/roundcubemail/program/include/rcube_addressbook.php
   trunk/roundcubemail/program/include/rcube_contacts.php
Log:
Complete address book interface class with group functions

Modified: trunk/roundcubemail/program/include/rcube_addressbook.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_addressbook.php	2010-03-31 15:45:02 UTC (rev 3451)
+++ trunk/roundcubemail/program/include/rcube_addressbook.php	2010-03-31 15:57:20 UTC (rev 3452)
@@ -179,5 +179,67 @@
       /* empty for read-only address books */
     }
 
+    /**
+     * Create a contact group with the given name
+     *
+     * @param string The group name
+     * @return False on error, array with record props in success
+     */
+    function create_group($name)
+    {
+      /* empty for address books don't supporting groups */
+      return false;
+    }
+    
+    /**
+     * Delete the given group and all linked group members
+     *
+     * @param string Group identifier
+     * @return boolean True on success, false if no data was changed
+     */
+    function delete_group($gid)
+    {
+      /* empty for address books don't supporting groups */
+      return false;
+    }
+    
+    /**
+     * Rename a specific contact group
+     *
+     * @param string Group identifier
+     * @param string New name to set for this group
+     * @return boolean New name on success, false if no data was changed
+     */
+    function rename_group($gid, $newname)
+    {
+      /* empty for address books don't supporting groups */
+      return false;
+    }
+    
+    /**
+     * Add the given contact records the a certain group
+     *
+     * @param string  Group identifier
+     * @param array   List of contact identifiers to be added
+     * @return int    Number of contacts added 
+     */
+    function add_to_group($group_id, $ids)
+    {
+      /* empty for address books don't supporting groups */
+      return 0;
+    }
+    
+    /**
+     * Remove the given contact records from a certain group
+     *
+     * @param string  Group identifier
+     * @param array   List of contact identifiers to be removed
+     * @return int    Number of deleted group members
+     */
+    function remove_from_group($group_id, $ids)
+    {
+      /* empty for address books don't supporting groups */
+      return 0;
+    }
 }
  
\ No newline at end of file

Modified: trunk/roundcubemail/program/include/rcube_contacts.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_contacts.php	2010-03-31 15:45:02 UTC (rev 3451)
+++ trunk/roundcubemail/program/include/rcube_contacts.php	2010-03-31 15:57:20 UTC (rev 3452)
@@ -499,6 +499,7 @@
    *
    * @param string  Group identifier
    * @param array   List of contact identifiers to be added
+   * @return int    Number of contacts added 
    */
   function add_to_group($group_id, $ids)
   {
@@ -534,6 +535,7 @@
    *
    * @param string  Group identifier
    * @param array   List of contact identifiers to be removed
+   * @return int    Number of deleted group members
    */
   function remove_from_group($group_id, $ids)
   {

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list