summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/appinfo/app.php2
-rw-r--r--apps/files/appinfo/routes.php5
-rw-r--r--apps/files/lib/capabilities.php24
3 files changed, 30 insertions, 1 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index da17a7f2ccd..6535a9b7baa 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 043782a9c04..fcd5f4b2608 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 00000000000..90a5e2f4eb9
--- /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