diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php index da17a7f2ccd26d5dbb2a7479999b60510eedbd36..6535a9b7baa39023f8ed10278898aea778d8fd4e 100644 --- a/apps/files/appinfo/app.php +++ b/apps/files/appinfo/app.php @@ -1,4 +1,6 @@ <?php +OC::$CLASSPATH['OCA\Files\Capabilities'] = 'apps/files/lib/capabilities.php'; + $l = OC_L10N::get('files'); OCP\App::registerAdmin('files', 'admin'); diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index 043782a9c04c5cdb5cb9958b0b848ba6f8994f93..fcd5f4b2608d9d51b45edce8ff1faac4eef1c03d 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -8,4 +8,7 @@ $this->create('download', 'download{file}') ->requirements(array('file' => '.*')) - ->actionInclude('files/download.php'); \ No newline at end of file + ->actionInclude('files/download.php'); + +// Register with the capabilities API +OC_API::register('get', '/cloud/capabilities', array('OCA\Files\Capabilities', 'getCapabilities'), 'files', OC_API::USER_AUTH); \ No newline at end of file diff --git a/apps/files/lib/capabilities.php b/apps/files/lib/capabilities.php new file mode 100644 index 0000000000000000000000000000000000000000..90a5e2f4eb900a8650b9819c02c43bcdf6c521bf --- /dev/null +++ b/apps/files/lib/capabilities.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright (c) 2013 Tom Needham <tom@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCA\Files; + +class Capabilities { + + public static function getCapabilities() { + return new \OC_OCS_Result(array( + 'capabilities' => array( + 'files' => array( + 'bigfilechunking' => true, + 'undelete' => true, + ), + ), + )); + } + +} \ No newline at end of file diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index f83109a18eaa7c0b49b2a1bab6650fca846781ae..3c100b4957dd0a6bdc6955b99f77db198e571588 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -7,6 +7,7 @@ OC::$CLASSPATH['OCA\Encryption\Keymanager'] = 'apps/files_encryption/lib/keymana OC::$CLASSPATH['OCA\Encryption\Stream'] = 'apps/files_encryption/lib/stream.php'; OC::$CLASSPATH['OCA\Encryption\Proxy'] = 'apps/files_encryption/lib/proxy.php'; OC::$CLASSPATH['OCA\Encryption\Session'] = 'apps/files_encryption/lib/session.php'; +OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'apps/files_encryption/lib/capabilities.php'; OC_FileProxy::register( new OCA\Encryption\Proxy() ); diff --git a/apps/files_encryption/appinfo/routes.php b/apps/files_encryption/appinfo/routes.php new file mode 100644 index 0000000000000000000000000000000000000000..ab83432a4b2d5a84188c862dbdc61a1faf30ea9a --- /dev/null +++ b/apps/files_encryption/appinfo/routes.php @@ -0,0 +1,9 @@ +<?php +/** + * Copyright (c) 2013, Tom Needham <tom@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + */ + +// Register with the capabilities API +OC_API::register('get', '/cloud/capabilities', array('OCA\Encryption\Capabilities', 'getCapabilities'), 'files_encryption', OC_API::USER_AUTH); \ No newline at end of file diff --git a/apps/files_encryption/lib/capabilities.php b/apps/files_encryption/lib/capabilities.php new file mode 100644 index 0000000000000000000000000000000000000000..72baddcd0495f2197592b8f53cde23bfaca54507 --- /dev/null +++ b/apps/files_encryption/lib/capabilities.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright (c) 2013 Tom Needham <tom@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCA\Encryption; + +class Capabilities { + + public static function getCapabilities() { + return new \OC_OCS_Result(array( + 'capabilities' => array( + 'files' => array( + 'encryption' => true, + ), + ), + )); + } + +} \ No newline at end of file