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>
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
|
|
|
* @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;
|
|
|
|
|
|
|
|
interface IObjectStore {
|
|
|
|
|
2014-06-18 17:20:26 +04:00
|
|
|
/**
|
|
|
|
* @return string the container or bucket name where objects are stored
|
|
|
|
*/
|
|
|
|
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
|
2014-06-18 00:06:56 +04:00
|
|
|
* @throws Exception when something goes wrong, message will be logged
|
|
|
|
*/
|
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
|
2014-06-18 00:06:56 +04:00
|
|
|
* @throws Exception when something goes wrong, message will be logged
|
|
|
|
*/
|
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
|
|
|
|
* @throws Exception when something goes wrong, message will be logged
|
|
|
|
*/
|
|
|
|
function deleteObject($urn);
|
|
|
|
|
|
|
|
}
|