aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/PreviewManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/PreviewManager.php')
-rw-r--r--lib/private/PreviewManager.php54
1 files changed, 0 insertions, 54 deletions
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php
index 6f43687ceea..3a08fa7c3ab 100644
--- a/lib/private/PreviewManager.php
+++ b/lib/private/PreviewManager.php
@@ -17,7 +17,6 @@ use OCP\Files\File;
use OCP\Files\IAppData;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
-use OCP\Files\SimpleFS\ISimpleFile;
use OCP\IBinaryFinder;
use OCP\IConfig;
use OCP\IPreview;
@@ -77,16 +76,6 @@ class PreviewManager implements IPreview {
$this->enablePreviews = $config->getSystemValueBool('enable_previews', true);
}
- /**
- * In order to improve lazy loading a closure can be registered which will be
- * called in case preview providers are actually requested
- *
- * $callable has to return an instance of \OCP\Preview\IProvider or \OCP\Preview\IProviderV2
- *
- * @param string $mimeTypeRegex Regex with the mime types that are supported by this provider
- * @param \Closure $callable
- * @return void
- */
public function registerProvider($mimeTypeRegex, \Closure $callable): void {
if (!$this->enablePreviews) {
return;
@@ -99,9 +88,6 @@ class PreviewManager implements IPreview {
$this->providerListDirty = true;
}
- /**
- * Get all providers
- */
public function getProviders(): array {
if (!$this->enablePreviews) {
return [];
@@ -118,9 +104,6 @@ class PreviewManager implements IPreview {
return $this->providers;
}
- /**
- * Does the manager have any providers
- */
public function hasProviders(): bool {
$this->registerCoreProviders();
return !empty($this->providers);
@@ -142,23 +125,6 @@ class PreviewManager implements IPreview {
return $this->generator;
}
- /**
- * Returns a preview of a file
- *
- * The cache is searched first and if nothing usable was found then a preview is
- * generated by one of the providers
- *
- * @param File $file
- * @param int $width
- * @param int $height
- * @param bool $crop
- * @param string $mode
- * @param string $mimeType
- * @return ISimpleFile
- * @throws NotFoundException
- * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid)
- * @since 11.0.0 - \InvalidArgumentException was added in 12.0.0
- */
public function getPreview(File $file, $width = -1, $height = -1, $crop = false, $mode = IPreview::MODE_FILL, $mimeType = null) {
$this->throwIfPreviewsDisabled();
$previewConcurrency = $this->getGenerator()->getNumConcurrentPreviews('preview_concurrency_all');
@@ -172,28 +138,11 @@ class PreviewManager implements IPreview {
return $preview;
}
- /**
- * Generates previews of a file
- *
- * @param File $file
- * @param array $specifications
- * @param string $mimeType
- * @return ISimpleFile the last preview that was generated
- * @throws NotFoundException
- * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid)
- * @since 19.0.0
- */
public function generatePreviews(File $file, array $specifications, $mimeType = null) {
$this->throwIfPreviewsDisabled();
return $this->getGenerator()->generatePreviews($file, $specifications, $mimeType);
}
- /**
- * returns true if the passed mime type is supported
- *
- * @param string $mimeType
- * @return boolean
- */
public function isMimeSupported($mimeType = '*') {
if (!$this->enablePreviews) {
return false;
@@ -216,9 +165,6 @@ class PreviewManager implements IPreview {
return false;
}
- /**
- * Check if a preview can be generated for a file
- */
public function isAvailable(\OCP\Files\FileInfo $file): bool {
if (!$this->enablePreviews) {
return false;