Add since

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-01-10 13:33:38 +01:00
parent d14ff70050
commit 76f8247516
No known key found for this signature in database
GPG Key ID: 50F2B59C6DEBBCFE
3 changed files with 28 additions and 0 deletions

View File

@ -23,6 +23,11 @@
namespace OCP\Files\Notify;
/**
* Represents a detected change in the storage
*
* @since 12.0.0
*/
interface IChange {
const ADDED = 1;
const REMOVED = 2;
@ -33,6 +38,8 @@ interface IChange {
* Get the type of the change
*
* @return int IChange::ADDED, IChange::REMOVED, IChange::MODIFIED or IChange::RENAMED
*
* @since 12.0.0
*/
public function getType();
@ -42,6 +49,8 @@ interface IChange {
* Note, for rename changes this path is the old path for the file
*
* @return mixed
*
* @since 12.0.0
*/
public function getPath();
}

View File

@ -23,6 +23,12 @@
namespace OCP\Files\Notify;
/**
* Provides access to detected changes in the storage by either actively listening
* or getting the list of changes that happened in the background
*
* @since 12.0.0
*/
interface INotifyHandler {
/**
* Start listening for update notifications
@ -33,6 +39,8 @@ interface INotifyHandler {
* Note that this call is blocking and will not exit on it's own, to stop listening for notifications return `false` from the callback
*
* @param callable $callback
*
* @since 12.0.0
*/
public function listen(callable $callback);
@ -40,6 +48,8 @@ interface INotifyHandler {
* Get all changes detected since the start of the notify process or the last call to getChanges
*
* @return IChange[]
*
* @since 12.0.0
*/
public function getChanges();
@ -47,6 +57,8 @@ interface INotifyHandler {
* Stop listening for changes
*
* Note that any pending changes will be discarded
*
* @since 12.0.0
*/
public function stop();
}

View File

@ -23,11 +23,18 @@
namespace OCP\Files\Notify;
/**
* Represents a detected rename change
*
* @since 12.0.0
*/
interface IRenameChange extends IChange {
/**
* Get the new path of the renamed file relative to the storage root
*
* @return string
*
* @since 12.0.0
*/
public function getTargetPath();
}