diff options
Diffstat (limited to 'lib/public')
25 files changed, 490 insertions, 83 deletions
diff --git a/lib/public/Activity/IManager.php b/lib/public/Activity/IManager.php index 2fe38ddb8d8..f5b495807c5 100644 --- a/lib/public/Activity/IManager.php +++ b/lib/public/Activity/IManager.php @@ -64,6 +64,7 @@ interface IManager { * - setSubject() * * @param IEvent $event + * @throws \BadMethodCallException if required values have not been set * @since 8.2.0 */ public function publish(IEvent $event); diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php index 057a964ce0a..72c99777124 100644 --- a/lib/public/App/IAppManager.php +++ b/lib/public/App/IAppManager.php @@ -62,6 +62,15 @@ interface IAppManager { public function enableApp($appId); /** + * Whether a list of types contains a protected app type + * + * @param string[] $types + * @return bool + * @since 12.0.0 + */ + public function hasProtectedAppType($types); + + /** * Enable an app only for specific groups * * @param string $appId diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php index aa3d9cdde37..611791a4364 100644 --- a/lib/public/AppFramework/Db/Mapper.php +++ b/lib/public/AppFramework/Db/Mapper.php @@ -28,7 +28,6 @@ namespace OCP\AppFramework\Db; use OCP\IDBConnection; -use OCP\IDb; /** @@ -229,11 +228,7 @@ abstract class Mapper { * @since 7.0.0 */ protected function execute($sql, array $params=[], $limit=null, $offset=null){ - if ($this->db instanceof IDb) { - $query = $this->db->prepareQuery($sql, $limit, $offset); - } else { - $query = $this->db->prepare($sql, $limit, $offset); - } + $query = $this->db->prepare($sql, $limit, $offset); if ($this->isAssocArray($params)) { foreach ($params as $key => $param) { @@ -251,15 +246,6 @@ abstract class Mapper { $result = $query->execute(); - // this is only for backwards compatibility reasons and can be removed - // in owncloud 10. IDb returns a StatementWrapper from execute, PDO, - // Doctrine and IDbConnection don't so this needs to be done in order - // to stay backwards compatible for the things that rely on the - // StatementWrapper being returned - if ($result instanceof \OC_DB_StatementWrapper) { - return $result; - } - return $query; } diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 8591d6abc68..051e68f3144 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -43,11 +43,11 @@ use OCP\AppFramework\Http; class Response { /** - * Headers - defaults to ['Cache-Control' => 'no-cache, must-revalidate'] + * Headers - defaults to ['Cache-Control' => 'no-cache, no-store, must-revalidate'] * @var array */ private $headers = array( - 'Cache-Control' => 'no-cache, must-revalidate' + 'Cache-Control' => 'no-cache, no-store, must-revalidate' ); diff --git a/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php new file mode 100644 index 00000000000..9f9e38103f7 --- /dev/null +++ b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php @@ -0,0 +1,34 @@ +<?php + +/** + * @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2016 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Authentication\Exceptions; + +use Exception; + +/** + * @since 12 + */ +class CredentialsUnavailableException extends Exception { + +} diff --git a/lib/public/Authentication/LoginCredentials/ICredentials.php b/lib/public/Authentication/LoginCredentials/ICredentials.php new file mode 100644 index 00000000000..c5ef9574398 --- /dev/null +++ b/lib/public/Authentication/LoginCredentials/ICredentials.php @@ -0,0 +1,58 @@ +<?php + +/** + * @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2016 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Authentication\LoginCredentials; + +/** + * @since 12 + */ +interface ICredentials { + + /** + * Get the user UID + * + * @since 12 + * + * @return string + */ + public function getUID(); + + /** + * Get the login name the users used to login + * + * @since 12 + * + * @return string + */ + public function getLoginName(); + + /** + * Get the password + * + * @since 12 + * + * @return string + */ + public function getPassword(); +} diff --git a/lib/public/Authentication/LoginCredentials/IStore.php b/lib/public/Authentication/LoginCredentials/IStore.php new file mode 100644 index 00000000000..4787b16d982 --- /dev/null +++ b/lib/public/Authentication/LoginCredentials/IStore.php @@ -0,0 +1,44 @@ +<?php + +/** + * @copyright 2016 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2016 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Authentication\LoginCredentials; + +use OCP\Authentication\Exceptions\CredentialsUnavailableException; + +/** + * @since 12 + */ +interface IStore { + + /** + * Get login credentials of the currently logged in user + * + * @since 12 + * + * @throws CredentialsUnavailableException + * @return ICredentials the login credentials of the current user + */ + public function getLoginCredentials(); + +} diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php new file mode 100644 index 00000000000..76e728b6ab0 --- /dev/null +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php @@ -0,0 +1,38 @@ +<?php + +/** + * @author Cornelius Kölbel <cornelius.koelbel@netknights.it> + * @copyright Copyright (c) 2016, ownCloud GmbH. + * + * @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\Authentication\TwoFactorAuth; + +use Exception; + +/** + * Two Factor Authentication failed + * + * It defines an Exception a 2FA app can + * throw in case of an error. The 2FA Controller will catch this exception and + * display this error. + * + * @since 12 + */ +class TwoFactorException extends Exception { + +} diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 8164c738ca5..c123875b803 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -305,6 +305,27 @@ interface IExpressionBuilder { */ public function notIn($x, $y, $type = null); + + /** + * Creates a bitwise AND comparison + * + * @param string|ILiteral $x The field or value to check + * @param int $y Bitmap that must be set + * @return IQueryFunction + * @since 12.0.0 + */ + public function bitwiseAnd($x, $y); + + /** + * Creates a bitwise OR comparison + * + * @param string|ILiteral $x The field or value to check + * @param int $y Bitmap that must be set + * @return IQueryFunction + * @since 12.0.0 + */ + public function bitwiseOr($x, $y); + /** * Quotes a given input parameter. * diff --git a/lib/public/Encryption/Keys/IStorage.php b/lib/public/Encryption/Keys/IStorage.php index e17de04316b..c96d1573b38 100644 --- a/lib/public/Encryption/Keys/IStorage.php +++ b/lib/public/Encryption/Keys/IStorage.php @@ -170,4 +170,14 @@ interface IStorage { */ public function copyKeys($source, $target); + /** + * backup keys of a given encryption module + * + * @param string $encryptionModuleId + * @param string $purpose + * @param string $uid + * @return bool + * @since 12.0.0 + */ + public function backupUserKeys($encryptionModuleId, $purpose, $uid); } diff --git a/lib/public/Files/Cache/IScanner.php b/lib/public/Files/Cache/IScanner.php index 60282996232..8aa4dc04aa9 100644 --- a/lib/public/Files/Cache/IScanner.php +++ b/lib/public/Files/Cache/IScanner.php @@ -32,6 +32,7 @@ interface IScanner { const SCAN_RECURSIVE = true; const SCAN_SHALLOW = false; + const REUSE_NONE = 0; const REUSE_ETAG = 1; const REUSE_SIZE = 2; diff --git a/lib/public/Files/Notify/IChange.php b/lib/public/Files/Notify/IChange.php new file mode 100644 index 00000000000..1e6aaa8abe0 --- /dev/null +++ b/lib/public/Files/Notify/IChange.php @@ -0,0 +1,56 @@ +<?php +/** + * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> + * + * @author Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Files\Notify; + +/** + * Represents a detected change in the storage + * + * @since 12.0.0 + */ +interface IChange { + const ADDED = 1; + const REMOVED = 2; + const MODIFIED = 3; + const RENAMED = 4; + + /** + * Get the type of the change + * + * @return int IChange::ADDED, IChange::REMOVED, IChange::MODIFIED or IChange::RENAMED + * + * @since 12.0.0 + */ + public function getType(); + + /** + * Get the path of the file that was changed relative to the root of the storage + * + * Note, for rename changes this path is the old path for the file + * + * @return mixed + * + * @since 12.0.0 + */ + public function getPath(); +} diff --git a/lib/public/Files/Notify/INotifyHandler.php b/lib/public/Files/Notify/INotifyHandler.php new file mode 100644 index 00000000000..7e0e6a610d8 --- /dev/null +++ b/lib/public/Files/Notify/INotifyHandler.php @@ -0,0 +1,64 @@ +<?php +/** + * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> + * + * @author Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Files\Notify; + +/** + * Provides access to detected changes in the storage by either actively listening + * or getting the list of changes that happened in the background + * + * @since 12.0.0 + */ +interface INotifyHandler { + /** + * Start listening for update notifications + * + * The provided callback will be called for every incoming notification with the following parameters + * - IChange|IRenameChange $change + * + * Note that this call is blocking and will not exit on it's own, to stop listening for notifications return `false` from the callback + * + * @param callable $callback + * + * @since 12.0.0 + */ + public function listen(callable $callback); + + /** + * Get all changes detected since the start of the notify process or the last call to getChanges + * + * @return IChange[] + * + * @since 12.0.0 + */ + public function getChanges(); + + /** + * Stop listening for changes + * + * Note that any pending changes will be discarded + * + * @since 12.0.0 + */ + public function stop(); +} diff --git a/lib/public/Files/Notify/IRenameChange.php b/lib/public/Files/Notify/IRenameChange.php new file mode 100644 index 00000000000..c95499a7e74 --- /dev/null +++ b/lib/public/Files/Notify/IRenameChange.php @@ -0,0 +1,40 @@ +<?php +/** + * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> + * + * @author Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Files\Notify; + +/** + * Represents a detected rename change + * + * @since 12.0.0 + */ +interface IRenameChange extends IChange { + /** + * Get the new path of the renamed file relative to the storage root + * + * @return string + * + * @since 12.0.0 + */ + public function getTargetPath(); +} diff --git a/lib/public/Files/Storage/INotifyStorage.php b/lib/public/Files/Storage/INotifyStorage.php index e99124abdfd..c6fdd44724f 100644 --- a/lib/public/Files/Storage/INotifyStorage.php +++ b/lib/public/Files/Storage/INotifyStorage.php @@ -23,6 +23,8 @@ namespace OCP\Files\Storage; +use OCP\Files\Notify\INotifyHandler; + /** * Storage backend that support active notifications * @@ -48,6 +50,17 @@ interface INotifyStorage { * @param callable $callback * * @since 9.1.0 + * @deprecated 12.0.0 use INotifyStorage::notify()->listen() instead */ public function listen($path, callable $callback); + + /** + * Start the notification handler for this storage + * + * @param $path + * @return INotifyHandler + * + * @since 12.0.0 + */ + public function notify($path); } diff --git a/lib/public/Files/Storage/IStorage.php b/lib/public/Files/Storage/IStorage.php index b806dc3b7d1..27b8f1d0697 100644 --- a/lib/public/Files/Storage/IStorage.php +++ b/lib/public/Files/Storage/IStorage.php @@ -383,7 +383,7 @@ interface IStorage { public function verifyPath($path, $fileName); /** - * @param \OCP\Files\Storage $sourceStorage + * @param \OCP\Files\Storage|\OCP\Files\Storage\IStorage $sourceStorage * @param string $sourceInternalPath * @param string $targetInternalPath * @return bool @@ -392,7 +392,7 @@ interface IStorage { public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath); /** - * @param \OCP\Files\Storage $sourceStorage + * @param \OCP\Files\Storage|\OCP\Files\Storage\IStorage $sourceStorage * @param string $sourceInternalPath * @param string $targetInternalPath * @return bool diff --git a/lib/public/GroupInterface.php b/lib/public/GroupInterface.php index 6f456f51fd7..97837e50b16 100644 --- a/lib/public/GroupInterface.php +++ b/lib/public/GroupInterface.php @@ -41,6 +41,18 @@ namespace OCP; interface GroupInterface { /** + * actions that user backends can define + */ + const CREATE_GROUP = 0x00000001; + const DELETE_GROUP = 0x00000010; + const ADD_TO_GROUP = 0x00000100; + const REMOVE_FROM_GOUP = 0x00001000; // oops + const REMOVE_FROM_GROUP = 0x00001000; + //OBSOLETE const GET_DISPLAYNAME = 0x00010000; + const COUNT_USERS = 0x00100000; + const GROUP_DETAILS = 0x01000000; + + /** * Check if backend implements actions * @param int $actions bitwise-or'ed actions * @return boolean diff --git a/lib/public/IAppConfig.php b/lib/public/IAppConfig.php index 01aca47ad81..4a92a224840 100644 --- a/lib/public/IAppConfig.php +++ b/lib/public/IAppConfig.php @@ -87,6 +87,15 @@ interface IAppConfig { public function getValues($app, $key); /** + * get all values of the app or and filters out sensitive data + * + * @param string $app + * @return array + * @since 12.0.0 + */ + public function getFilteredValues($app); + + /** * sets a value in the appconfig * @param string $app app * @param string $key key diff --git a/lib/public/IDb.php b/lib/public/IDb.php deleted file mode 100644 index bb04cf540fa..00000000000 --- a/lib/public/IDb.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @author Morris Jobke <hey@morrisjobke.de> - * - * @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; - - -/** - * Small Facade for being able to inject the database connection for tests - * @since 7.0.0 - extends IDBConnection was added in 8.1.0 - */ -interface IDb extends IDBConnection { - - - /** - * Used to abstract the owncloud database access away - * @param string $sql the sql query with ? placeholder for params - * @param int $limit the maximum number of rows - * @param int $offset from which row we want to start - * @return \OC_DB_StatementWrapper prepared SQL query - * @since 7.0.0 - */ - public function prepareQuery($sql, $limit=null, $offset=null); - - - /** - * Used to get the id of the just inserted element - * @param string $tableName the name of the table where we inserted the item - * @return int the id of the inserted element - * @since 7.0.0 - */ - public function getInsertId($tableName); - - -} diff --git a/lib/public/IGroup.php b/lib/public/IGroup.php index d5fcbcc5cd9..0cc62e9a8ed 100644 --- a/lib/public/IGroup.php +++ b/lib/public/IGroup.php @@ -4,6 +4,7 @@ * * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> + * @author Vincent Petry <PVince81@owncloud.com> * * @license AGPL-3.0 * @@ -37,6 +38,14 @@ interface IGroup { public function getGID(); /** + * Returns the group display name + * + * @return string + * @since 9.2 + */ + public function getDisplayName(); + + /** * get all users in the group * * @return \OCP\IUser[] diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php index a1a03fee3e1..207539b1170 100644 --- a/lib/public/IPreview.php +++ b/lib/public/IPreview.php @@ -86,7 +86,7 @@ interface IPreview { * @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly * @return \OCP\IImage * @since 6.0.0 - * @deprecated 9.2.0 Use getPreview + * @deprecated 11 Use getPreview */ public function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false); diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php index 354e39bd8f9..87628be01f7 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -192,14 +192,6 @@ interface IServerContainer { public function getCredentialsManager(); /** - * Returns an instance of the db facade - * @deprecated 8.1.0 use getDatabaseConnection, will be removed in ownCloud 10 - * @return \OCP\IDb - * @since 7.0.0 - */ - public function getDb(); - - /** * Returns the app config manager * * @return \OCP\IAppConfig diff --git a/lib/public/RichObjectStrings/Definitions.php b/lib/public/RichObjectStrings/Definitions.php index fbde439c47a..f1208ae0f2c 100644 --- a/lib/public/RichObjectStrings/Definitions.php +++ b/lib/public/RichObjectStrings/Definitions.php @@ -152,6 +152,31 @@ class Definitions { ], ], ], + 'call' => [ + 'author' => 'Nextcloud', + 'app' => 'spreed', + 'since' => '11.0.2', + 'parameters' => [ + 'id' => [ + 'since' => '11.0.2', + 'required' => true, + 'description' => 'The id used to identify the call on the instance', + 'example' => '42', + ], + 'name' => [ + 'since' => '11.0.2', + 'required' => true, + 'description' => 'The display name of the call which should be used in the visual representation', + 'example' => 'Company call', + ], + 'call-type' => [ + 'since' => '11.0.2', + 'required' => true, + 'description' => 'The type of the call: one2one, group or public', + 'example' => 'one2one', + ], + ], + ], 'email' => [ 'author' => 'Nextcloud', 'app' => 'sharebymail', @@ -191,7 +216,7 @@ class Definitions { 'path' => [ 'since' => '11.0.0', 'required' => true, - 'description' => 'The full path of the file for the user', + 'description' => 'The full path of the file for the user, should not start with a slash', 'example' => 'path/to/file.txt', ], 'link' => [ diff --git a/lib/public/Settings/IIconSection.php b/lib/public/Settings/IIconSection.php new file mode 100644 index 00000000000..089b9b094e9 --- /dev/null +++ b/lib/public/Settings/IIconSection.php @@ -0,0 +1,38 @@ +<?php +/** + * @copyright Copyright (c) 2017, Joas Schilling <coding@schilljs.com> + * + * @author Joas Schilling <coding@schilljs.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Settings; + +/** + * @since 12 + */ +interface IIconSection extends ISection { + /** + * returns the relative path to an 16*16 icon describing the section. + * e.g. '/core/img/places/files.svg' + * + * @returns string + * @since 12 + */ + public function getIcon(); +} diff --git a/lib/public/Settings/ISection.php b/lib/public/Settings/ISection.php index 5edf5de0ca4..3c08b74bdc9 100644 --- a/lib/public/Settings/ISection.php +++ b/lib/public/Settings/ISection.php @@ -24,6 +24,7 @@ namespace OCP\Settings; /** + * @deprecated 12 Use IIconSection instead * @since 9.1 */ interface ISection { |