diff options
Diffstat (limited to 'lib/private/Metadata/IMetadataManager.php')
-rw-r--r-- | lib/private/Metadata/IMetadataManager.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/private/Metadata/IMetadataManager.php b/lib/private/Metadata/IMetadataManager.php new file mode 100644 index 00000000000..d2d37f15c25 --- /dev/null +++ b/lib/private/Metadata/IMetadataManager.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace OC\Metadata; + +use OCP\Files\File; + +/** + * Interface to manage additional metadata for files + */ +interface IMetadataManager { + /** + * @param class-string<IMetadataProvider> $className + */ + public function registerProvider(string $className): void; + + /** + * Generate the metadata for one file + */ + public function generateMetadata(File $file, bool $checkExisting = false): void; + + /** + * Clear the metadata for one file + */ + public function clearMetadata(int $fileId): void; + + /** @return array<int, FileMetadata> */ + public function fetchMetadataFor(string $group, array $fileIds): array; + + /** + * Get the capabilites as an array of mimetype regex to the type provided + */ + public function getCapabilities(): array; +} |