aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Accounts/IAccountManager.php7
-rw-r--r--lib/public/IDBConnection.php13
-rw-r--r--lib/public/IInitialStateService.php8
-rw-r--r--lib/public/Notification/IManager.php2
-rw-r--r--lib/public/Notification/INotifier.php5
-rw-r--r--lib/public/Notification/IPreloadableNotifier.php31
-rw-r--r--lib/public/Profile/IProfileManager.php1
-rw-r--r--lib/public/TaskProcessing/IManager.php1
8 files changed, 61 insertions, 7 deletions
diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php
index 92fc0002674..ae5535ef13b 100644
--- a/lib/public/Accounts/IAccountManager.php
+++ b/lib/public/Accounts/IAccountManager.php
@@ -97,10 +97,16 @@ interface IAccountManager {
/**
* @since 15.0.0
+ * @deprecated 32.0.0
*/
public const PROPERTY_TWITTER = 'twitter';
/**
+ * @since 32.0.0
+ */
+ public const PROPERTY_BLUESKY = 'bluesky';
+
+ /**
* @since 26.0.0
*/
public const PROPERTY_FEDIVERSE = 'fediverse';
@@ -160,6 +166,7 @@ interface IAccountManager {
self::PROPERTY_PRONOUNS,
self::PROPERTY_ROLE,
self::PROPERTY_TWITTER,
+ self::PROPERTY_BLUESKY,
self::PROPERTY_WEBSITE,
];
diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php
index e0fe603ec57..ea9b71d8958 100644
--- a/lib/public/IDBConnection.php
+++ b/lib/public/IDBConnection.php
@@ -45,6 +45,11 @@ interface IDBConnection {
public const PLATFORM_SQLITE = 'sqlite';
/**
+ * @since 32.0.0
+ */
+ public const PLATFORM_MARIADB = 'mariadb';
+
+ /**
* Gets the QueryBuilder for the connection.
*
* @return \OCP\DB\QueryBuilder\IQueryBuilder
@@ -357,11 +362,15 @@ interface IDBConnection {
/**
* Returns the database provider name
+ *
* @link https://github.com/nextcloud/server/issues/30877
+ *
+ * @param bool $strict differentiate between database flavors, e.g. MySQL vs MariaDB
+ * @return self::PLATFORM_MYSQL|self::PLATFORM_ORACLE|self::PLATFORM_POSTGRES|self::PLATFORM_SQLITE|self::PLATFORM_MARIADB
+ * @since 32.0.0 Optional parameter $strict was added
* @since 28.0.0
- * @return self::PLATFORM_MYSQL|self::PLATFORM_ORACLE|self::PLATFORM_POSTGRES|self::PLATFORM_SQLITE
*/
- public function getDatabaseProvider(): string;
+ public function getDatabaseProvider(bool $strict = false): string;
/**
* Get the shard definition by name, if configured
diff --git a/lib/public/IInitialStateService.php b/lib/public/IInitialStateService.php
index 672c086b22d..6c482c2cf20 100644
--- a/lib/public/IInitialStateService.php
+++ b/lib/public/IInitialStateService.php
@@ -11,13 +11,13 @@ use Closure;
/**
* @since 16.0.0
- * @deprecated 21 Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider
+ * @deprecated 21 Use {@see \OCP\AppFramework\Services\IInitialState} or {@see \OCP\AppFramework\Services\InitialStateProvider}
* @see \OCP\AppFramework\Services\IInitialState
*/
interface IInitialStateService {
/**
* Allows an app to provide its initial state to the template system.
- * Use this if you know your initial state sill be used for example if
+ * Use this if you know your initial state still be used for example if
* you are in the render function of you controller.
*
* @since 16.0.0
@@ -26,7 +26,7 @@ interface IInitialStateService {
* @param string $key
* @param bool|int|float|string|array|\JsonSerializable $data
*
- * @deprecated 21 Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider
+ * @deprecated 21 Use {@see \OCP\AppFramework\Services\IInitialState} or {@see \OCP\AppFramework\Services\InitialStateProvider}
* @see \OCP\AppFramework\Services\IInitialState::provideInitialState()
*/
public function provideInitialState(string $appName, string $key, $data): void;
@@ -44,7 +44,7 @@ interface IInitialStateService {
* @param string $key
* @param Closure $closure returns a primitive or an object that implements JsonSerializable
*
- * @deprecated 21 Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider
+ * @deprecated 21 Use {@see \OCP\AppFramework\Services\IInitialState} or {@see \OCP\AppFramework\Services\InitialStateProvider}
* @see \OCP\AppFramework\Services\IInitialState::provideLazyInitialState()
*/
public function provideLazyInitialState(string $appName, string $key, Closure $closure): void;
diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php
index 23664af17cd..207a89344b0 100644
--- a/lib/public/Notification/IManager.php
+++ b/lib/public/Notification/IManager.php
@@ -11,7 +11,7 @@ namespace OCP\Notification;
use OCP\AppFramework\Attribute\Consumable;
#[Consumable(since: '9.0.0')]
-interface IManager extends IApp, INotifier {
+interface IManager extends IApp, IPreloadableNotifier {
/**
* @param string $appClass The service must implement IApp, otherwise a
* \InvalidArgumentException is thrown later
diff --git a/lib/public/Notification/INotifier.php b/lib/public/Notification/INotifier.php
index bdc7207216f..b6851e3dfb3 100644
--- a/lib/public/Notification/INotifier.php
+++ b/lib/public/Notification/INotifier.php
@@ -10,6 +10,11 @@ namespace OCP\Notification;
use OCP\AppFramework\Attribute\Implementable;
+/**
+ * Please consider implementing {@see IPreloadableNotifier} to improve performance. It allows to
+ * preload and cache data for many notifications at once instead of loading the data for each
+ * prepared notification separately.
+ */
#[Implementable(since: '9.0.0')]
interface INotifier {
/**
diff --git a/lib/public/Notification/IPreloadableNotifier.php b/lib/public/Notification/IPreloadableNotifier.php
new file mode 100644
index 00000000000..2bdcd84d254
--- /dev/null
+++ b/lib/public/Notification/IPreloadableNotifier.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\Notification;
+
+use OCP\AppFramework\Attribute\Implementable;
+
+/**
+ * Allow notifier implementations to preload and cache data for many notifications at once to
+ * improve performance by, for example, bundling SQL queries.
+ */
+#[Implementable(since: '32.0.0')]
+interface IPreloadableNotifier extends INotifier {
+ /**
+ * This method provides a way for notifier implementations to preload and cache data for many
+ * notifications. The data is meant to be consumed later in the {@see INotifier::prepare()}
+ * method to improve performance.
+ *
+ * @since 32.0.0
+ *
+ * @param INotification[] $notifications The notifications which are about to be prepared in the next step.
+ * @param string $languageCode The code of the language that should be used to prepare the notification.
+ */
+ public function preloadDataForParsing(array $notifications, string $languageCode): void;
+}
diff --git a/lib/public/Profile/IProfileManager.php b/lib/public/Profile/IProfileManager.php
index f4e90e39d12..aec06fb4c86 100644
--- a/lib/public/Profile/IProfileManager.php
+++ b/lib/public/Profile/IProfileManager.php
@@ -55,6 +55,7 @@ interface IProfileManager {
IAccountManager::PROPERTY_EMAIL => self::VISIBILITY_SHOW_USERS_ONLY,
IAccountManager::PROPERTY_PHONE => self::VISIBILITY_SHOW_USERS_ONLY,
IAccountManager::PROPERTY_TWITTER => self::VISIBILITY_SHOW,
+ IAccountManager::PROPERTY_BLUESKY => self::VISIBILITY_SHOW,
IAccountManager::PROPERTY_WEBSITE => self::VISIBILITY_SHOW,
IAccountManager::PROPERTY_PRONOUNS => self::VISIBILITY_SHOW,
];
diff --git a/lib/public/TaskProcessing/IManager.php b/lib/public/TaskProcessing/IManager.php
index f161030f5f4..723eca8f615 100644
--- a/lib/public/TaskProcessing/IManager.php
+++ b/lib/public/TaskProcessing/IManager.php
@@ -26,6 +26,7 @@ use OCP\TaskProcessing\Exception\ValidationException;
* @since 30.0.0
*/
interface IManager {
+
/**
* @since 30.0.0
*/