diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-11-26 11:14:17 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-11-27 17:47:19 +0100 |
commit | dfde04291eae31765b2cb858e1d1260b60d75329 (patch) | |
tree | 2c5e4d74aa1467a8d3b8c169350a5ce5ff66379d /lib/public/share.php | |
parent | a2457b5fb9f1ef9fda82afc4cf7dc712d14488c9 (diff) | |
download | nextcloud-server-dfde04291eae31765b2cb858e1d1260b60d75329.tar.gz nextcloud-server-dfde04291eae31765b2cb858e1d1260b60d75329.zip |
Move share interfaces to own files so they can be autoloaded
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 333e0a26970..b3ece8fab94 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -342,86 +342,3 @@ class Share extends \OC\Share\Constants { return \OC\Share\Share::isResharingAllowed(); } } - -/** - * Interface that apps must implement to share content. - */ -interface Share_Backend { - - /** - * Check if this $itemSource exist for the user - * @param string $itemSource - * @param string $uidOwner Owner of the item - * @return boolean|null Source - * - * Return false if the item does not exist for the user - */ - public function isValidSource($itemSource, $uidOwner); - - /** - * Get a unique name of the item for the specified user - * @param string $itemSource - * @param string|false $shareWith User the item is being shared with - * @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7 - * @return string Target name - * - * This function needs to verify that the user does not already have an item with this name. - * If it does generate a new name e.g. name_# - */ - public function generateTarget($itemSource, $shareWith, $exclude = null); - - /** - * Converts the shared item sources back into the item in the specified format - * @param array $items Shared items - * @param int $format - * @return TODO - * - * The items array is a 3-dimensional array with the item_source as the - * first key and the share id as the second key to an array with the share - * info. - * - * The key/value pairs included in the share info depend on the function originally called: - * If called by getItem(s)Shared: id, item_type, item, item_source, - * share_type, share_with, permissions, stime, file_source - * - * If called by getItem(s)SharedWith: id, item_type, item, item_source, - * item_target, share_type, share_with, permissions, stime, file_source, - * file_target - * - * This function allows the backend to control the output of shared items with custom formats. - * It is only called through calls to the public getItem(s)Shared(With) functions. - */ - public function formatItems($items, $format, $parameters = null); - -} - -/** - * Interface for share backends that share content that is dependent on files. - * Extends the Share_Backend interface. - */ -interface Share_Backend_File_Dependent extends Share_Backend { - - /** - * Get the file path of the item - * @param string $itemSource - * @param string $uidOwner User that is the owner of shared item - * @return string|false - */ - public function getFilePath($itemSource, $uidOwner); - -} - -/** - * Interface for collections of of items implemented by another share backend. - * Extends the Share_Backend interface. - */ -interface Share_Backend_Collection extends Share_Backend { - - /** - * Get the sources of the children of the item - * @param string $itemSource - * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable - */ - public function getChildren($itemSource); - -} |