blue-twilight/app/AlbumSources/IAnalysisQueueSource.php

40 lines
1.3 KiB
PHP

<?php
namespace App\AlbumSources;
use App\Storage;
interface IAnalysisQueueSource
{
/**
* 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);
/**
* @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);
}