From 1b59003d6df7ddf97ff71cc651b4fc064f8ebc17 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Fri, 20 Sep 2013 16:37:52 +0200 Subject: adding basic interfaces for the activities api --- lib/public/activity/iconsumer.php | 29 +++++++++++++++++++++++++++ lib/public/activity/imanager.php | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 lib/public/activity/iconsumer.php create mode 100644 lib/public/activity/imanager.php (limited to 'lib/public/activity') diff --git a/lib/public/activity/iconsumer.php b/lib/public/activity/iconsumer.php new file mode 100644 index 00000000000..4b82bc01b05 --- /dev/null +++ b/lib/public/activity/iconsumer.php @@ -0,0 +1,29 @@ +. + * + */ + + +namespace OCP\Activity; + +interface IConsumer { + function receive($app, $subject, $message, $file, $link); +} + diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php new file mode 100644 index 00000000000..da7e9d4b662 --- /dev/null +++ b/lib/public/activity/imanager.php @@ -0,0 +1,41 @@ +. + * + */ + + +namespace OCP\Activity; + +interface IManager { + + function publishActivity($app, $subject, $message, $file, $link); + + /** + * 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); + +} -- cgit v1.2.3