2012-03-30 20:10:16 +04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
|
2014-03-21 18:22:48 +04:00
|
|
|
* Copyright (c) 2014 Robin McCorkell <rmccorkell@karoshi.org.uk>
|
2012-03-30 20:10:16 +04:00
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
2013-03-02 15:12:33 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\StreamWrapper'] = 'files_external/lib/streamwrapper.php';
|
|
|
|
OC::$CLASSPATH['OC\Files\Storage\FTP'] = 'files_external/lib/ftp.php';
|
|
|
|
OC::$CLASSPATH['OC\Files\Storage\DAV'] = 'files_external/lib/webdav.php';
|
2013-10-09 18:54:36 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\OwnCloud'] = 'files_external/lib/owncloud.php';
|
2013-03-02 15:12:33 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\Google'] = 'files_external/lib/google.php';
|
2013-10-22 16:22:03 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\Swift'] = 'files_external/lib/swift.php';
|
2013-03-02 15:12:33 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\SMB'] = 'files_external/lib/smb.php';
|
2014-03-25 17:54:54 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\SMB_OC'] = 'files_external/lib/smb_oc.php';
|
2013-03-02 15:12:33 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\AmazonS3'] = 'files_external/lib/amazons3.php';
|
|
|
|
OC::$CLASSPATH['OC\Files\Storage\Dropbox'] = 'files_external/lib/dropbox.php';
|
|
|
|
OC::$CLASSPATH['OC\Files\Storage\SFTP'] = 'files_external/lib/sftp.php';
|
2013-04-12 17:51:58 +04:00
|
|
|
OC::$CLASSPATH['OC\Files\Storage\iRODS'] = 'files_external/lib/irods.php';
|
2013-03-02 15:12:33 +04:00
|
|
|
OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
|
2012-05-24 20:22:33 +04:00
|
|
|
|
2012-05-24 19:06:03 +04:00
|
|
|
OCP\App::registerAdmin('files_external', 'settings');
|
2012-06-08 19:42:00 +04:00
|
|
|
if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == 'yes') {
|
|
|
|
OCP\App::registerPersonal('files_external', 'personal');
|
|
|
|
}
|
2013-04-19 00:12:53 +04:00
|
|
|
|
|
|
|
// connecting hooks
|
2014-03-19 15:20:48 +04:00
|
|
|
OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OC_Mount_Config', 'initMountPointsHook');
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_login', 'OC\Files\Storage\iRODS', 'login');
|
2014-03-25 17:54:54 +04:00
|
|
|
OCP\Util::connectHook('OC_User', 'post_login', 'OC\Files\Storage\SMB_OC', 'login');
|
2013-04-19 00:12:53 +04:00
|
|
|
|
2013-03-08 21:15:20 +04:00
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\Local', array(
|
|
|
|
'backend' => 'Local',
|
|
|
|
'configuration' => array(
|
|
|
|
'datadir' => 'Location')));
|
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array(
|
|
|
|
'backend' => 'Amazon S3',
|
|
|
|
'configuration' => array(
|
|
|
|
'key' => 'Key',
|
|
|
|
'secret' => '*Secret',
|
2013-06-01 13:28:02 +04:00
|
|
|
'bucket' => 'Bucket'),
|
|
|
|
'has_dependencies' => true));
|
2013-03-08 21:15:20 +04:00
|
|
|
|
2014-04-03 18:57:26 +04:00
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array(
|
|
|
|
'backend' => 'Amazon S3 and compliant',
|
|
|
|
'configuration' => array(
|
|
|
|
'key' => 'Access Key',
|
|
|
|
'secret' => '*Secret Key',
|
|
|
|
'bucket' => 'Bucket',
|
|
|
|
'hostname' => '&Hostname (optional)',
|
|
|
|
'port' => '&Port (optional)',
|
|
|
|
'region' => '&Region (optional)',
|
|
|
|
'use_ssl' => '!Enable SSL',
|
|
|
|
'use_path_style' => '!Enable Path Style'),
|
|
|
|
'has_dependencies' => true));
|
|
|
|
|
2013-03-08 21:15:20 +04:00
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array(
|
|
|
|
'backend' => 'Dropbox',
|
|
|
|
'configuration' => array(
|
|
|
|
'configured' => '#configured',
|
|
|
|
'app_key' => 'App key',
|
2014-04-03 18:57:26 +04:00
|
|
|
'app_secret' => '*App secret',
|
2013-03-08 21:15:20 +04:00
|
|
|
'token' => '#token',
|
|
|
|
'token_secret' => '#token_secret'),
|
2013-06-01 13:28:02 +04:00
|
|
|
'custom' => 'dropbox',
|
|
|
|
'has_dependencies' => true));
|
2013-03-08 21:15:20 +04:00
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\FTP', array(
|
|
|
|
'backend' => 'FTP',
|
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'URL',
|
|
|
|
'user' => 'Username',
|
|
|
|
'password' => '*Password',
|
|
|
|
'root' => '&Root',
|
|
|
|
'secure' => '!Secure ftps://'),
|
|
|
|
'has_dependencies' => true));
|
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\Google', array(
|
|
|
|
'backend' => 'Google Drive',
|
|
|
|
'configuration' => array(
|
|
|
|
'configured' => '#configured',
|
2014-04-03 18:57:26 +04:00
|
|
|
'client_id' => 'Client ID',
|
|
|
|
'client_secret' => '*Client secret',
|
|
|
|
'token' => '#token'),
|
2013-05-25 19:10:20 +04:00
|
|
|
'custom' => 'google',
|
|
|
|
'has_dependencies' => true));
|
2013-03-08 21:15:20 +04:00
|
|
|
|
2014-04-03 18:57:26 +04:00
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\Swift', array(
|
|
|
|
'backend' => 'OpenStack Object Storage',
|
2013-03-08 21:15:20 +04:00
|
|
|
'configuration' => array(
|
2014-04-03 18:57:26 +04:00
|
|
|
'user' => 'Username (required)',
|
|
|
|
'bucket' => 'Bucket (required)',
|
|
|
|
'region' => '&Region (optional for OpenStack Object Storage)',
|
|
|
|
'key' => '*API Key (required for Rackspace Cloud Files)',
|
|
|
|
'tenant' => '&Tenantname (required for OpenStack Object Storage)',
|
|
|
|
'password' => '*Password (required for OpenStack Object Storage)',
|
|
|
|
'service_name' => '&Service Name (required for OpenStack Object Storage)',
|
|
|
|
'url' => '&URL of identity endpoint (required for OpenStack Object Storage)',
|
|
|
|
'timeout' => '&Timeout of HTTP requests in seconds (optional)',
|
|
|
|
),
|
2013-06-01 13:28:02 +04:00
|
|
|
'has_dependencies' => true));
|
2013-03-08 21:15:20 +04:00
|
|
|
|
2014-04-03 18:57:26 +04:00
|
|
|
|
|
|
|
if (!OC_Util::runningOnWindows()) {
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB', array(
|
|
|
|
'backend' => 'SMB / CIFS',
|
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'URL',
|
|
|
|
'user' => 'Username',
|
|
|
|
'password' => '*Password',
|
|
|
|
'share' => 'Share',
|
|
|
|
'root' => '&Root'),
|
|
|
|
'has_dependencies' => true));
|
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB_OC', array(
|
|
|
|
'backend' => 'SMB / CIFS using OC login',
|
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'URL',
|
|
|
|
'username_as_share' => '!Username as share',
|
|
|
|
'share' => '&Share',
|
|
|
|
'root' => '&Root'),
|
|
|
|
'has_dependencies' => true));
|
|
|
|
}
|
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\DAV', array(
|
|
|
|
'backend' => 'WebDAV',
|
2013-03-08 21:15:20 +04:00
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'URL',
|
|
|
|
'user' => 'Username',
|
|
|
|
'password' => '*Password',
|
2014-04-03 18:57:26 +04:00
|
|
|
'root' => '&Root',
|
|
|
|
'secure' => '!Secure https://'),
|
2013-03-08 21:15:20 +04:00
|
|
|
'has_dependencies' => true));
|
|
|
|
|
2014-04-03 18:57:26 +04:00
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\OwnCloud', array(
|
|
|
|
'backend' => 'ownCloud',
|
2013-03-08 21:15:20 +04:00
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'URL',
|
|
|
|
'user' => 'Username',
|
|
|
|
'password' => '*Password',
|
2014-04-03 18:57:26 +04:00
|
|
|
'root' => '&Remote subfolder',
|
|
|
|
'secure' => '!Secure https://')));
|
|
|
|
|
2013-03-08 21:15:20 +04:00
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP', array(
|
|
|
|
'backend' => 'SFTP',
|
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'URL',
|
|
|
|
'user' => 'Username',
|
|
|
|
'password' => '*Password',
|
|
|
|
'root' => '&Root')));
|
2014-04-03 18:57:26 +04:00
|
|
|
|
|
|
|
OC_Mount_Config::registerBackend('\OC\Files\Storage\iRODS', array(
|
|
|
|
'backend' => 'iRODS',
|
|
|
|
'configuration' => array(
|
|
|
|
'host' => 'Host',
|
|
|
|
'port' => 'Port',
|
|
|
|
'use_logon_credentials' => '!Use ownCloud login',
|
|
|
|
'user' => 'Username',
|
|
|
|
'password' => '*Password',
|
|
|
|
'auth_mode' => 'Authentication Mode',
|
|
|
|
'zone' => 'Zone')));
|