2017-08-31 16:47:02 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2017-08-31 16:47:02 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-08-31 16:47:02 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Collaboration\Collaborators;
|
|
|
|
|
|
2017-09-05 16:14:15 -04:00
|
|
|
/**
|
|
|
|
|
* Interface ISearchResult
|
|
|
|
|
*
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2017-08-31 16:47:02 -04:00
|
|
|
interface ISearchResult {
|
|
|
|
|
/**
|
2017-09-06 10:09:29 -04:00
|
|
|
* @param SearchResultType $type
|
2017-08-31 16:47:02 -04:00
|
|
|
* @param array $matches
|
|
|
|
|
* @param array|null $exactMatches
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2024-03-28 11:13:19 -04:00
|
|
|
public function addResultSet(SearchResultType $type, array $matches, ?array $exactMatches = null);
|
2017-08-31 16:47:02 -04:00
|
|
|
|
|
|
|
|
/**
|
2017-09-06 10:09:29 -04:00
|
|
|
* @param SearchResultType $type
|
2017-08-31 16:47:02 -04:00
|
|
|
* @param string $collaboratorId
|
|
|
|
|
* @return bool
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2017-09-06 10:09:29 -04:00
|
|
|
public function hasResult(SearchResultType $type, $collaboratorId);
|
2017-08-31 16:47:02 -04:00
|
|
|
|
2021-04-13 16:49:42 -04:00
|
|
|
/**
|
|
|
|
|
* Removes all result where $collaborationId exactly matches shareWith of
|
|
|
|
|
* any of wide and exact result matches of the given type.
|
|
|
|
|
*
|
|
|
|
|
* @since 22.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function removeCollaboratorResult(SearchResultType $type, string $collaboratorId): bool;
|
|
|
|
|
|
2017-08-31 16:47:02 -04:00
|
|
|
/**
|
2017-09-06 10:09:29 -04:00
|
|
|
* @param SearchResultType $type
|
2017-08-31 16:47:02 -04:00
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2017-09-06 10:09:29 -04:00
|
|
|
public function unsetResult(SearchResultType $type);
|
2017-08-31 16:47:02 -04:00
|
|
|
|
|
|
|
|
/**
|
2017-09-06 10:09:29 -04:00
|
|
|
* @param SearchResultType $type
|
2017-08-31 16:47:02 -04:00
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2017-09-06 10:09:29 -04:00
|
|
|
public function markExactIdMatch(SearchResultType $type);
|
2017-08-31 16:47:02 -04:00
|
|
|
|
|
|
|
|
/**
|
2017-09-06 10:09:29 -04:00
|
|
|
* @param SearchResultType $type
|
2017-08-31 16:47:02 -04:00
|
|
|
* @return bool
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
2017-09-06 10:09:29 -04:00
|
|
|
public function hasExactIdMatch(SearchResultType $type);
|
2017-08-31 16:47:02 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return array
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function asArray();
|
|
|
|
|
}
|