diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-01 16:17:45 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-01 16:17:45 +0100 |
commit | b4853f3fce696b8b89f0dd898b25d7fde93e1a92 (patch) | |
tree | 187da1e729be33aa2975f6f4462adea0e717111b /lib/public | |
parent | a2e13aea1513de2667a70d224396ed641a5dd179 (diff) | |
parent | 6dc793338acb3cd17716b5dc886885d0fb2d6181 (diff) | |
download | nextcloud-server-b4853f3fce696b8b89f0dd898b25d7fde93e1a92.tar.gz nextcloud-server-b4853f3fce696b8b89f0dd898b25d7fde93e1a92.zip |
Merge pull request #21967 from owncloud/comments-webdav
Comments WebDAV adjustements
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/comments/icommentsmanager.php | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/lib/public/comments/icommentsmanager.php b/lib/public/comments/icommentsmanager.php index b8fb3ca7f5d..f5b290bf8b2 100644 --- a/lib/public/comments/icommentsmanager.php +++ b/lib/public/comments/icommentsmanager.php @@ -115,10 +115,12 @@ interface ICommentsManager { /** * @param $objectType string the object type, e.g. 'files' * @param $objectId string the id of the object + * @param \DateTime $notOlderThan optional, timestamp of the oldest comments + * that may be returned * @return Int * @since 9.0.0 */ - public function getNumberOfCommentsForObject($objectType, $objectId); + public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null); /** * creates a new comment and returns it. At this point of time, it is not @@ -188,4 +190,48 @@ interface ICommentsManager { */ public function deleteCommentsAtObject($objectType, $objectId); + /** + * sets the read marker for a given file to the specified date for the + * provided user + * + * @param string $objectType + * @param string $objectId + * @param \DateTime $dateTime + * @param \OCP\IUser $user + * @since 9.0.0 + */ + public function setReadMark($objectType, $objectId, \DateTime $dateTime, \OCP\IUser $user); + + /** + * returns the read marker for a given file to the specified date for the + * provided user. It returns null, when the marker is not present, i.e. + * no comments were marked as read. + * + * @param string $objectType + * @param string $objectId + * @param \OCP\IUser $user + * @return \DateTime|null + * @since 9.0.0 + */ + public function getReadMark($objectType, $objectId, \OCP\IUser $user); + + /** + * deletes the read markers for the specified user + * + * @param \OCP\IUser $user + * @return bool + * @since 9.0.0 + */ + public function deleteReadMarksFromUser(\OCP\IUser $user); + + /** + * deletes the read markers on the specified object + * + * @param string $objectType + * @param string $objectId + * @return bool + * @since 9.0.0 + */ + public function deleteReadMarksOnObject($objectType, $objectId); + } |