diff options
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); + } |