diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-31 15:57:20 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-31 15:57:20 +0000 |
| commit | 2eb4bea4701d9e80eacf212bb312b4356abeb76b (patch) | |
| tree | 2946d91943b3185c41bd5ab4525ed8ca365d8f3c /roundcubemail | |
| parent | 96f1848ec1d5d4e19ab9d1049ccbc2b84ccfd9f9 (diff) | |
Complete address book interface class with group functions
git-svn-id: https://svn.roundcube.net/trunk@3452 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/program/include/rcube_addressbook.php | 62 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_contacts.php | 2 |
2 files changed, 64 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_addressbook.php b/roundcubemail/program/include/rcube_addressbook.php index ff525bc11..b9f9f29ed 100644 --- a/roundcubemail/program/include/rcube_addressbook.php +++ b/roundcubemail/program/include/rcube_addressbook.php @@ -179,5 +179,67 @@ abstract class rcube_addressbook /* 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 diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php index 2964cde49..070e00ffd 100644 --- a/roundcubemail/program/include/rcube_contacts.php +++ b/roundcubemail/program/include/rcube_contacts.php @@ -499,6 +499,7 @@ class rcube_contacts extends rcube_addressbook * * @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 @@ class rcube_contacts extends rcube_addressbook * * @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) { |
