2014-06-18 00:06:56 +04:00
|
|
|
<?php
|
2015-03-26 13:44:34 +03:00
|
|
|
/**
|
|
|
|
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
*
|
2016-01-12 17:02:16 +03:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
2015-03-26 13:44:34 +03:00
|
|
|
* @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/>
|
|
|
|
*
|
|
|
|
*/
|
2014-06-18 00:06:56 +04:00
|
|
|
namespace OCP\Files\ObjectStore;
|
|
|
|
|
2015-04-16 18:00:08 +03:00
|
|
|
/**
|
|
|
|
* Interface IObjectStore
|
|
|
|
*
|
|
|
|
* @package OCP\Files\ObjectStore
|
|
|
|
* @since 7.0.0
|
|
|
|
*/
|
2014-06-18 00:06:56 +04:00
|
|
|
interface IObjectStore {
|
|
|
|
|
2014-06-18 17:20:26 +04:00
|
|
|
/**
|
|
|
|
* @return string the container or bucket name where objects are stored
|
2015-04-16 18:00:08 +03:00
|
|
|
* @since 7.0.0
|
2014-06-18 17:20:26 +04:00
|
|
|
*/
|
|
|
|
function getStorageId();
|
|
|
|
|
2014-06-18 00:06:56 +04:00
|
|
|
/**
|
|
|
|
* @param string $urn the unified resource name used to identify the object
|
2014-06-20 14:27:47 +04:00
|
|
|
* @return resource stream with the read data
|
2015-04-16 18:00:08 +03:00
|
|
|
* @throws \Exception when something goes wrong, message will be logged
|
|
|
|
* @since 7.0.0
|
2014-06-18 00:06:56 +04:00
|
|
|
*/
|
2014-06-20 14:27:47 +04:00
|
|
|
function readObject($urn);
|
2014-06-18 17:20:26 +04:00
|
|
|
|
2014-06-18 00:06:56 +04:00
|
|
|
/**
|
|
|
|
* @param string $urn the unified resource name used to identify the object
|
2014-06-20 14:27:47 +04:00
|
|
|
* @param resource $stream stream with the data to write
|
2015-04-16 18:00:08 +03:00
|
|
|
* @throws \Exception when something goes wrong, message will be logged
|
|
|
|
* @since 7.0.0
|
2014-06-18 00:06:56 +04:00
|
|
|
*/
|
2014-06-20 14:27:47 +04:00
|
|
|
function writeObject($urn, $stream);
|
2014-06-18 00:06:56 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $urn the unified resource name used to identify the object
|
|
|
|
* @return void
|
2015-04-16 18:00:08 +03:00
|
|
|
* @throws \Exception when something goes wrong, message will be logged
|
|
|
|
* @since 7.0.0
|
2014-06-18 00:06:56 +04:00
|
|
|
*/
|
|
|
|
function deleteObject($urn);
|
|
|
|
|
2015-04-16 18:00:08 +03:00
|
|
|
}
|