aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Trash/ITrashManager.php
blob: 4a2eaead11ba4b0bfb0076ebffb58e4055f24f76 (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
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
 * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCA\Files_Trashbin\Trash;

use OCP\IUser;

interface ITrashManager extends ITrashBackend {
	/**
	 * Add a backend for the trashbin
	 *
	 * @param string $storageType
	 * @param ITrashBackend $backend
	 * @since 15.0.0
	 */
	public function registerBackend(string $storageType, ITrashBackend $backend);

	/**
	 * List all trash items in the root of the trashbin
	 *
	 * @param IUser $user
	 * @return ITrashItem[]
	 * @since 15.0.0
	 */
	public function listTrashRoot(IUser $user): array;

	/**
	 * Temporally prevent files from being moved to the trash
	 *
	 * @since 15.0.0
	 */
	public function pauseTrash();

	/**
	 * @since 15.0.0
	 */
	public function resumeTrash();
}