5
* @author Thomas Müller
6
* @copyright 2012 Thomas Müller thomas.mueller@tmit.eu
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
* License as published by the Free Software Foundation; either
11
* version 3 of the License, or any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
18
* You should have received a copy of the GNU Affero General Public
19
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
24
* Public interface of ownCloud for apps to use.
25
* IAddressBook interface
28
// use OCP namespace for all classes that are considered public.
29
// This means that they should be used by apps instead of the internal ownCloud classes
31
interface IAddressBook {
34
* @return string defining the technical unique key
36
public function getKey();
39
* In comparison to getKey() this function returns a human readable (maybe translated) name
42
public function getDisplayName();
45
* @param string $pattern which should match within the $searchProperties
46
* @param array $searchProperties defines the properties within the query pattern should match
47
* @param array $options - for future use. One should always have options!
48
* @return array of contacts which are arrays of key-value-pairs
50
public function search($pattern, $searchProperties, $options);
53
// array('id' => 0, 'FN' => 'Thomas Müller', 'EMAIL' => 'a@b.c', 'GEO' => '37.386013;-122.082932'),
54
// array('id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => array('d@e.f', 'g@h.i')),
58
* @param array $properties this array if key-value-pairs defines a contact
59
* @return array representing the contact just created or updated
61
public function createOrUpdate($properties);
63
// return array('id' => 0, 'FN' => 'Thomas Müller', 'EMAIL' => 'a@b.c',
64
// 'PHOTO' => 'VALUE=uri:http://www.abc.com/pub/photos/jqpublic.gif',
65
// 'ADR' => ';;123 Main Street;Any Town;CA;91921-1234'
71
public function getPermissions();
74
* @param object $id the unique identifier to a contact
75
* @return bool successful or not
77
public function delete($id);