diff --git a/src/gui/macOS/fileprovider.h b/src/gui/macOS/fileprovider.h index e9d89b7a5b..30bfaf791c 100644 --- a/src/gui/macOS/fileprovider.h +++ b/src/gui/macOS/fileprovider.h @@ -39,6 +39,9 @@ public: static bool fileProviderAvailable(); +public slots: + void sendMessageToDomain(const QString &domainIdentifier, const QString &message); + private slots: void configureXPC(); diff --git a/src/gui/macOS/fileprovider_mac.mm b/src/gui/macOS/fileprovider_mac.mm index 5303d9fa71..5ba8f93892 100644 --- a/src/gui/macOS/fileprovider_mac.mm +++ b/src/gui/macOS/fileprovider_mac.mm @@ -12,13 +12,15 @@ * for more details. */ -#import + +#include "fileprovider.h" #include -#include "configfile.h" +#include "libsync/configfile.h" +#include "gui/macOS/fileprovidersocketcontroller.h" -#include "fileprovider.h" +#import namespace OCC { @@ -95,5 +97,16 @@ void FileProvider::configureXPC() } } +void FileProvider::sendMessageToDomain(const QString &domainIdentifier, const QString &message) +{ + const auto domainSocketController = _socketServer->socketControllerForDomain(domainIdentifier); + if (!domainSocketController) { + qCWarning(lcMacFileProvider) << "Could not find socket controller for domain identifier" << domainIdentifier; + return; + } + + domainSocketController->sendMessage(message); +} + } // namespace Mac } // namespace OCC