diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-21 13:21:17 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-21 13:21:17 -0700 |
commit | 408e0022dd9ae9b3915a7a9e64d6a90b1396a8ef (patch) | |
tree | fb8e6fa4a6068a942445fbc5b6fea975afbd9762 /lib/public | |
parent | fa1864971e9a9f9093f9a28dcf163f45652edf22 (diff) | |
parent | 221a650815800e47d6b2c9d7dfe0e9434ebc9edf (diff) | |
download | nextcloud-server-408e0022dd9ae9b3915a7a9e64d6a90b1396a8ef.tar.gz nextcloud-server-408e0022dd9ae9b3915a7a9e64d6a90b1396a8ef.zip |
Merge pull request #5249 from owncloud/activities-api
[OC6] Activities api
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/activity/iconsumer.php | 42 | ||||
-rw-r--r-- | lib/public/activity/imanager.php | 54 | ||||
-rw-r--r-- | lib/public/iservercontainer.php | 7 | ||||
-rw-r--r-- | lib/public/share.php | 1 |
4 files changed, 104 insertions, 0 deletions
diff --git a/lib/public/activity/iconsumer.php b/lib/public/activity/iconsumer.php new file mode 100644 index 00000000000..ca9bd5096b3 --- /dev/null +++ b/lib/public/activity/iconsumer.php @@ -0,0 +1,42 @@ +<?php + /** + * ownCloud + * + * @author Thomas Müller + * @copyright 2013 Thomas Müller deepdiver@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +namespace OCP\Activity; + +interface IConsumer { + /** + * @param $app + * @param $subject + * @param $subjectParams + * @param $message + * @param $messageParams + * @param $file + * @param $link + * @param $affectedUser + * @param $type + * @param $priority + * @return mixed + */ + function receive($app, $subject, $subjectParams, $message, $messageParams, $file, $link, $affectedUser, $type, $priority ); +} + diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php new file mode 100644 index 00000000000..99ac2a1958e --- /dev/null +++ b/lib/public/activity/imanager.php @@ -0,0 +1,54 @@ +<?php + /** + * ownCloud + * + * @author Thomas Müller + * @copyright 2013 Thomas Müller deepdiver@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +namespace OCP\Activity; + +interface IManager { + + /** + * @param $app + * @param $subject + * @param $subjectParams + * @param $message + * @param $messageParams + * @param $file + * @param $link + * @param $affectedUser + * @param $type + * @param $priority + * @return mixed + */ + function publishActivity($app, $subject, $subjectParams, $message, $messageParams, $file, $link, $affectedUser, $type, $priority); + + /** + * In order to improve lazy loading a closure can be registered which will be called in case + * activity consumers are actually requested + * + * $callable has to return an instance of OCA\Activity\IConsumer + * + * @param string $key + * @param \Closure $callable + */ + function registerConsumer(\Closure $callable); + +} diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index 3afb2b6599d..cc9436a75c8 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -133,6 +133,13 @@ interface IServerContainer { function getSession(); /** + * Returns the activity manager + * + * @return \OCP\Activity\IManager + */ + function getActivityManager(); + + /** * Returns the current session * * @return \OCP\IDBConnection diff --git a/lib/public/share.php b/lib/public/share.php index 59150e1964f..dce3c2211b1 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1475,6 +1475,7 @@ class Share { 'id' => $parent, 'token' => $token )); + if ($parentFolder === true) { // Return parent folders to preserve file target paths for potential children return $parentFolders; |