Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Metadata/IMetadataManager.php')
-rw-r--r--lib/private/Metadata/IMetadataManager.php35
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;
+}