1
0

IProvider.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCP\Preview;
  8. /**
  9. * Interface IProvider
  10. *
  11. * @since 8.1.0
  12. * @deprecated 17.0.0 use IProviderV2 instead
  13. */
  14. interface IProvider {
  15. /**
  16. * @return string Regex with the mimetypes that are supported by this provider
  17. * @since 8.1.0
  18. */
  19. public function getMimeType();
  20. /**
  21. * Check if a preview can be generated for $path
  22. *
  23. * @param \OCP\Files\FileInfo $file
  24. * @return bool
  25. * @since 8.1.0
  26. */
  27. public function isAvailable(\OCP\Files\FileInfo $file);
  28. /**
  29. * get thumbnail for file at path $path
  30. *
  31. * @param string $path Path of file
  32. * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
  33. * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
  34. * @param bool $scalingup Disable/Enable upscaling of previews
  35. * @param \OC\Files\View $fileview fileview object of user folder
  36. * @return bool|\OCP\IImage false if no preview was generated
  37. * @since 8.1.0
  38. */
  39. public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview);
  40. }