2019-07-12 16:21:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\AlbumSources;
|
|
|
|
|
|
|
|
use App\Storage;
|
|
|
|
|
|
|
|
interface IAnalysisQueueSource
|
|
|
|
{
|
2019-07-13 10:15:13 +01:00
|
|
|
/**
|
|
|
|
* Deletes a photo to be analysed from the storage source
|
|
|
|
* @param string $queueToken Queue token holding the photo
|
|
|
|
* @param string $fileName Filename of the photo to download
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function deleteItemFromAnalysisQueue($queueToken, $fileName);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Downloads a photo to be analysed from the storage source to a temporary file
|
|
|
|
* @param string $queueToken Queue token holding the photo
|
|
|
|
* @param string $fileName Filename of the photo to download
|
|
|
|
* @return string Path to the photo that was downloaded
|
|
|
|
*/
|
|
|
|
function fetchItemFromAnalysisQueue($queueToken, $fileName);
|
|
|
|
|
2019-07-12 16:21:30 +01:00
|
|
|
/**
|
|
|
|
* @param Storage $configuration
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
function setConfiguration(Storage $configuration);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uploads a new file to the analysis queue specified by queue token.
|
|
|
|
*
|
|
|
|
* @param string $sourceFilePath Path to the file to upload to the analysis queue
|
|
|
|
* @param string $queueToken Queue token to hold the photo
|
|
|
|
* @param string $overrideFilename Use a specific filename, or false to set a specific name
|
|
|
|
* @return string Path to the file
|
|
|
|
*/
|
|
|
|
function uploadToAnalysisQueue($sourceFilePath, $queueToken, $overrideFilename = null);
|
|
|
|
}
|