2016-07-14 08:46:01 -04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-07-14 08:46:01 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Files\Storage;
|
|
|
|
|
|
2017-01-06 09:39:01 -05:00
|
|
|
use OCP\Files\Notify\INotifyHandler;
|
|
|
|
|
|
2016-07-14 08:46:01 -04:00
|
|
|
/**
|
|
|
|
|
* Storage backend that support active notifications
|
2016-07-15 07:58:44 -04:00
|
|
|
*
|
|
|
|
|
* @since 9.1.0
|
2016-07-14 08:46:01 -04:00
|
|
|
*/
|
|
|
|
|
interface INotifyStorage {
|
2024-02-14 14:48:27 -05:00
|
|
|
/**
|
|
|
|
|
* @since 9.1.0
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const NOTIFY_ADDED = 1;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 9.1.0
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const NOTIFY_REMOVED = 2;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 9.1.0
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const NOTIFY_MODIFIED = 3;
|
2024-02-14 14:48:27 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 9.1.0
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const NOTIFY_RENAMED = 4;
|
2016-07-14 08:46:01 -04:00
|
|
|
|
2017-01-06 09:39:01 -05:00
|
|
|
/**
|
|
|
|
|
* Start the notification handler for this storage
|
|
|
|
|
*
|
|
|
|
|
* @param $path
|
|
|
|
|
* @return INotifyHandler
|
|
|
|
|
*
|
|
|
|
|
* @since 12.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function notify($path);
|
2016-07-14 08:46:01 -04:00
|
|
|
}
|