aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Contacts/ContactsMenu/IContactsStore.php
blob: ceb68d998493638fa3de8dfb2081288b3f1d5bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCP\Contacts\ContactsMenu;

use OCP\IUser;

/**
 * @since 13.0.0
 */
interface IContactsStore {
	/**
	 * @param IUser $user
	 * @param string|null $filter
	 * @param int|null $limit added 19.0.2
	 * @param int|null $offset added 19.0.2
	 * @return IEntry[]
	 * @since 13.0.0
	 */
	public function getContacts(IUser $user, ?string $filter, ?int $limit = null, ?int $offset = null): array;

	/**
	 * @brief finds a contact by specifying the property to search on ($shareType) and the value ($shareWith)
	 * @since 13.0.0
	 */
	public function findOne(IUser $user, int $shareType, string $shareWith): ?IEntry;
}