diff options
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/appframework/iappcontainer.php | 4 | ||||
-rw-r--r-- | lib/public/files/fileinfo.php | 7 | ||||
-rw-r--r-- | lib/public/files/mount/imountpoint.php | 9 | ||||
-rw-r--r-- | lib/public/idbconnection.php | 1 | ||||
-rw-r--r-- | lib/public/igroupmanager.php | 15 | ||||
-rw-r--r-- | lib/public/iuserbackend.php | 27 | ||||
-rw-r--r-- | lib/public/iusersession.php | 9 | ||||
-rw-r--r-- | lib/public/share_backend.php | 12 |
8 files changed, 83 insertions, 1 deletions
diff --git a/lib/public/appframework/iappcontainer.php b/lib/public/appframework/iappcontainer.php index 3621d69a542..cb75bf4026c 100644 --- a/lib/public/appframework/iappcontainer.php +++ b/lib/public/appframework/iappcontainer.php @@ -31,7 +31,7 @@ use OCP\IContainer; * * This container interface provides short cuts for app developers to access predefined app service. */ -interface IAppContainer extends IContainer{ +interface IAppContainer extends IContainer { /** * used to return the appname of the set application @@ -57,11 +57,13 @@ interface IAppContainer extends IContainer{ function registerMiddleWare($middleWare); /** + * @deprecated use IUserSession->isLoggedIn() * @return boolean */ function isLoggedIn(); /** + * @deprecated use IGroupManager->isAdmin($userId) * @return boolean * @deprecated use the groupmanager instead to find out if the user is in * the admin group diff --git a/lib/public/files/fileinfo.php b/lib/public/files/fileinfo.php index 3a407ed67ca..ec68ed475c5 100644 --- a/lib/public/files/fileinfo.php +++ b/lib/public/files/fileinfo.php @@ -169,4 +169,11 @@ interface FileInfo { * @return bool */ public function isMounted(); + + /** + * Get the mountpoint the file belongs to + * + * @return \OCP\Files\Mount\IMountPoint + */ + public function getMountPoint(); } diff --git a/lib/public/files/mount/imountpoint.php b/lib/public/files/mount/imountpoint.php index dac634bae4c..af7819ae160 100644 --- a/lib/public/files/mount/imountpoint.php +++ b/lib/public/files/mount/imountpoint.php @@ -55,4 +55,13 @@ interface IMountPoint { * @param callable $wrapper */ public function wrapStorage($wrapper); + + /** + * Get a mount option + * + * @param string $name Name of the mount option to get + * @param mixed $default Default value for the mount option + * @return mixed + */ + public function getOption($name, $default); } diff --git a/lib/public/idbconnection.php b/lib/public/idbconnection.php index 32310fe755f..0d19b2cc71e 100644 --- a/lib/public/idbconnection.php +++ b/lib/public/idbconnection.php @@ -80,6 +80,7 @@ interface IDBConnection { * Insert a row if a matching row doesn't exists. * @param string $table The table name (will replace *PREFIX*) to perform the replace on. * @param array $input + * @throws \OC\HintException * * The input array if in the form: * diff --git a/lib/public/igroupmanager.php b/lib/public/igroupmanager.php index dc69044c490..8f468574c6b 100644 --- a/lib/public/igroupmanager.php +++ b/lib/public/igroupmanager.php @@ -80,4 +80,19 @@ interface IGroupManager { * @return array an array of display names (value) and user ids (key) */ public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0); + + /** + * Checks if a userId is in the admin group + * @param string $userId + * @return bool if admin + */ + public function isAdmin($userId); + + /** + * Checks if a userId is in a group + * @param string $userId + * @param group $group + * @return bool if in group + */ + public function isInGroup($userId, $group); } diff --git a/lib/public/iuserbackend.php b/lib/public/iuserbackend.php new file mode 100644 index 00000000000..79b5740ee93 --- /dev/null +++ b/lib/public/iuserbackend.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright (c) 2014 Morris Jobke <hey@morrisjobke.de> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +/** + * Public interface of ownCloud for apps to use. + * User Interface version 2 + * + */ + +// use OCP namespace for all classes that are considered public. +// This means that they should be used by apps instead of the internal ownCloud classes +namespace OCP; + +interface IUserBackend { + + /** + * Backend name to be shown in user management + * @return string the name of the backend to be shown + */ + public function getBackendName(); + +} diff --git a/lib/public/iusersession.php b/lib/public/iusersession.php index db4abe150d2..4c5b4d1ba51 100644 --- a/lib/public/iusersession.php +++ b/lib/public/iusersession.php @@ -3,7 +3,9 @@ * ownCloud * * @author Bart Visscher + * @author Bernhard Posselt * @copyright 2013 Bart Visscher bartv@thisnet.nl + * @copyright 2014 Bernhard Posselt <dev@bernhard-posselt.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -62,4 +64,11 @@ interface IUserSession { * @return \OCP\IUser */ public function getUser(); + + /** + * Checks wether the user is logged in + * + * @return bool if logged in + */ + public function isLoggedIn(); } diff --git a/lib/public/share_backend.php b/lib/public/share_backend.php index 6ab234aecf0..1ae63d4c1db 100644 --- a/lib/public/share_backend.php +++ b/lib/public/share_backend.php @@ -65,4 +65,16 @@ interface Share_Backend { */ public function formatItems($items, $format, $parameters = null); + /** + * Check if a given share type is allowd by the back-end + * + * @param int $shareType share type + * @return boolean + * + * The back-end can enable/disable specific share types. Just return true if + * the back-end doesn't provide any specific settings for it and want to allow + * all share types defined by the share API + */ + public function isShareTypeAllowed($shareType); + } |