2014-06-18 00:06:56 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|