2017-09-16 07:42:46 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2019-12-03 13:57:53 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-12-03 13:57:53 -05:00
|
|
|
*/
|
2017-09-16 07:42:46 -04:00
|
|
|
namespace OCP\Contacts\ContactsMenu;
|
|
|
|
|
|
|
|
|
|
use OCP\IUser;
|
|
|
|
|
|
2017-10-01 03:15:30 -04:00
|
|
|
/**
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2017-09-16 07:42:46 -04:00
|
|
|
interface IContactsStore {
|
|
|
|
|
/**
|
|
|
|
|
* @param IUser $user
|
2022-03-22 07:39:23 -04:00
|
|
|
* @param string|null $filter
|
|
|
|
|
* @param int|null $limit added 19.0.2
|
|
|
|
|
* @param int|null $offset added 19.0.2
|
2017-09-16 07:42:46 -04:00
|
|
|
* @return IEntry[]
|
2017-10-01 03:15:30 -04:00
|
|
|
* @since 13.0.0
|
2017-09-16 07:42:46 -04:00
|
|
|
*/
|
2022-03-22 07:39:23 -04:00
|
|
|
public function getContacts(IUser $user, ?string $filter, ?int $limit = null, ?int $offset = null): array;
|
2017-09-16 07:42:46 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief finds a contact by specifying the property to search on ($shareType) and the value ($shareWith)
|
2017-10-01 03:15:30 -04:00
|
|
|
* @since 13.0.0
|
2017-09-16 07:42:46 -04:00
|
|
|
*/
|
2022-03-22 07:39:23 -04:00
|
|
|
public function findOne(IUser $user, int $shareType, string $shareWith): ?IEntry;
|
2017-10-01 03:15:30 -04:00
|
|
|
}
|