diff options
Diffstat (limited to 'lib/public/encryption')
-rw-r--r-- | lib/public/encryption/exceptions/genericencryptionexception.php | 34 | ||||
-rw-r--r-- | lib/public/encryption/ifile.php | 36 | ||||
-rw-r--r-- | lib/public/encryption/imanager.php | 4 | ||||
-rw-r--r-- | lib/public/encryption/keys/istorage.php | 16 |
4 files changed, 87 insertions, 3 deletions
diff --git a/lib/public/encryption/exceptions/genericencryptionexception.php b/lib/public/encryption/exceptions/genericencryptionexception.php new file mode 100644 index 00000000000..b7addd3b0c1 --- /dev/null +++ b/lib/public/encryption/exceptions/genericencryptionexception.php @@ -0,0 +1,34 @@ +<?php + /** + * @author Clark Tomlinson <clark@owncloud.com> + * @since 2/25/15, 9:30 AM + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCP\Encryption\Exceptions; + + +class GenericEncryptionException extends \Exception { + + public function __construct($message = "", $code = 0, \Exception $previous = null) { + if (empty($message)) { + $message = 'Unspecified encryption exception'; + } + parent::__construct($message, $code, $previous); + } + +} diff --git a/lib/public/encryption/ifile.php b/lib/public/encryption/ifile.php new file mode 100644 index 00000000000..464f41509d2 --- /dev/null +++ b/lib/public/encryption/ifile.php @@ -0,0 +1,36 @@ +<?php + +/** + * ownCloud + * + * @copyright (C) 2015 ownCloud, Inc. + * + * @author Bjoern Schiessle <schiessle@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\Encryption; + +interface IFile { + + /** + * get list of users with access to the file + * + * @param string $path to the file + * @return array + */ + public function getAccessList($path); + +} diff --git a/lib/public/encryption/imanager.php b/lib/public/encryption/imanager.php index 9a12e401593..2691604ac37 100644 --- a/lib/public/encryption/imanager.php +++ b/lib/public/encryption/imanager.php @@ -22,9 +22,7 @@ */ namespace OCP\Encryption; -// -// TODO: move exceptions to OCP -// + use OC\Encryption\Exceptions\ModuleDoesNotExistsException; use OC\Encryption\Exceptions\ModuleAlreadyExistsException; diff --git a/lib/public/encryption/keys/istorage.php b/lib/public/encryption/keys/istorage.php index 4c2b01f4ad0..2d1672face5 100644 --- a/lib/public/encryption/keys/istorage.php +++ b/lib/public/encryption/keys/istorage.php @@ -122,4 +122,20 @@ interface IStorage { */ public function deleteSystemUserKey($keyId); + /** + * copy keys if a file was renamed + * + * @param string $source + * @param string $target + */ + public function renameKeys($source, $target); + + /** + * move keys if a file was renamed + * + * @param string $source + * @param string $target + */ + public function copyKeys($source, $target); + } |