Skip to content
Snippets Groups Projects
Unverified Commit 76f82475 authored by Robin Appelman's avatar Robin Appelman
Browse files

Add since


Signed-off-by: default avatarRobin Appelman <robin@icewind.nl>
parent d14ff700
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
namespace OCP\Files\Notify; namespace OCP\Files\Notify;
/**
* Represents a detected change in the storage
*
* @since 12.0.0
*/
interface IChange { interface IChange {
const ADDED = 1; const ADDED = 1;
const REMOVED = 2; const REMOVED = 2;
...@@ -33,6 +38,8 @@ interface IChange { ...@@ -33,6 +38,8 @@ interface IChange {
* Get the type of the change * Get the type of the change
* *
* @return int IChange::ADDED, IChange::REMOVED, IChange::MODIFIED or IChange::RENAMED * @return int IChange::ADDED, IChange::REMOVED, IChange::MODIFIED or IChange::RENAMED
*
* @since 12.0.0
*/ */
public function getType(); public function getType();
...@@ -42,6 +49,8 @@ interface IChange { ...@@ -42,6 +49,8 @@ interface IChange {
* Note, for rename changes this path is the old path for the file * Note, for rename changes this path is the old path for the file
* *
* @return mixed * @return mixed
*
* @since 12.0.0
*/ */
public function getPath(); public function getPath();
} }
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
namespace OCP\Files\Notify; 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 { interface INotifyHandler {
/** /**
* Start listening for update notifications * Start listening for update notifications
...@@ -33,6 +39,8 @@ interface INotifyHandler { ...@@ -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 * 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 * @param callable $callback
*
* @since 12.0.0
*/ */
public function listen(callable $callback); public function listen(callable $callback);
...@@ -40,6 +48,8 @@ interface INotifyHandler { ...@@ -40,6 +48,8 @@ interface INotifyHandler {
* Get all changes detected since the start of the notify process or the last call to getChanges * Get all changes detected since the start of the notify process or the last call to getChanges
* *
* @return IChange[] * @return IChange[]
*
* @since 12.0.0
*/ */
public function getChanges(); public function getChanges();
...@@ -47,6 +57,8 @@ interface INotifyHandler { ...@@ -47,6 +57,8 @@ interface INotifyHandler {
* Stop listening for changes * Stop listening for changes
* *
* Note that any pending changes will be discarded * Note that any pending changes will be discarded
*
* @since 12.0.0
*/ */
public function stop(); public function stop();
} }
...@@ -23,11 +23,18 @@ ...@@ -23,11 +23,18 @@
namespace OCP\Files\Notify; namespace OCP\Files\Notify;
/**
* Represents a detected rename change
*
* @since 12.0.0
*/
interface IRenameChange extends IChange { interface IRenameChange extends IChange {
/** /**
* Get the new path of the renamed file relative to the storage root * Get the new path of the renamed file relative to the storage root
* *
* @return string * @return string
*
* @since 12.0.0
*/ */
public function getTargetPath(); public function getTargetPath();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment