1
0

GODT-1982: updated gRPC and GUI for disk cache.

Other: modified bridge-gui-tester for new cache related gRPC interface.
Other: bridge-gui-tester has buttons for cache related errors.
This commit is contained in:
Xavier Michelon
2022-10-27 18:59:42 +02:00
committed by James Houlahan
parent 93d9ae32fc
commit d9762010fa
27 changed files with 2662 additions and 3947 deletions

View File

@ -47,7 +47,7 @@ void GRPCQtProxy::connectSignals()
connect(this, &GRPCQtProxy::changePortsReceived, &settingsTab, &SettingsTab::changePorts); connect(this, &GRPCQtProxy::changePortsReceived, &settingsTab, &SettingsTab::changePorts);
connect(this, &GRPCQtProxy::setUseSSLForSMTPReceived, &settingsTab, &SettingsTab::setUseSSLForSMTP); connect(this, &GRPCQtProxy::setUseSSLForSMTPReceived, &settingsTab, &SettingsTab::setUseSSLForSMTP);
connect(this, &GRPCQtProxy::setIsDoHEnabledReceived, &settingsTab, &SettingsTab::setIsDoHEnabled); connect(this, &GRPCQtProxy::setIsDoHEnabledReceived, &settingsTab, &SettingsTab::setIsDoHEnabled);
connect(this, &GRPCQtProxy::changeLocalCacheReceived, &settingsTab, &SettingsTab::changeLocalCache); connect(this, &GRPCQtProxy::setDiskCachePathReceived, &settingsTab, &SettingsTab::setDiskCachePath);
connect(this, &GRPCQtProxy::setIsAutomaticUpdateOnReceived, &settingsTab, &SettingsTab::setIsAutomaticUpdateOn); connect(this, &GRPCQtProxy::setIsAutomaticUpdateOnReceived, &settingsTab, &SettingsTab::setIsAutomaticUpdateOn);
connect(this, &GRPCQtProxy::setUserSplitModeReceived, &usersTab, &UsersTab::setUserSplitMode); connect(this, &GRPCQtProxy::setUserSplitModeReceived, &usersTab, &UsersTab::setUserSplitMode);
connect(this, &GRPCQtProxy::removeUserReceived, &usersTab, &UsersTab::removeUser); connect(this, &GRPCQtProxy::removeUserReceived, &usersTab, &UsersTab::removeUser);
@ -164,12 +164,11 @@ void GRPCQtProxy::setIsDoHEnabled(bool enabled)
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] enabled is cache on disk enabled? /// \param[in] path The disk cache path.
/// \param[in] path The path for the cache on disk.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
void GRPCQtProxy::changeLocalCache(bool enabled, QString const &path) void GRPCQtProxy::setDiskCachePath(QString const &path)
{ {
emit changeLocalCacheReceived(enabled, path); emit setDiskCachePathReceived(path);
} }

View File

@ -50,7 +50,7 @@ public: // member functions.
void changePorts(qint32 imapPort, qint32 smtpPort); ///< Forwards a ChangePorts call via a Qt signal. void changePorts(qint32 imapPort, qint32 smtpPort); ///< Forwards a ChangePorts call via a Qt signal.
void setUseSSLForSMTP(bool use); ///< Forwards a SetUseSSLForSMTP call via a Qt signal. void setUseSSLForSMTP(bool use); ///< Forwards a SetUseSSLForSMTP call via a Qt signal.
void setIsDoHEnabled(bool enabled); ///< Forwards a setIsDoHEnabled call via a Qt signal. void setIsDoHEnabled(bool enabled); ///< Forwards a setIsDoHEnabled call via a Qt signal.
void changeLocalCache(bool enabled, QString const &path); ///< Forwards a ChangeLocalPath call via a Qt signal. void setDiskCachePath(QString const &path); ///< Forwards a setDiskCachePath call via a Qt signal.
void setIsAutomaticUpdateOn(bool on); ///< Forwards a SetIsAutomaticUpdateOn call via a Qt signal. void setIsAutomaticUpdateOn(bool on); ///< Forwards a SetIsAutomaticUpdateOn call via a Qt signal.
void setUserSplitMode(QString const &userID, bool makeItActive); ///< Forwards a setUserSplitMode call via a Qt signal. void setUserSplitMode(QString const &userID, bool makeItActive); ///< Forwards a setUserSplitMode call via a Qt signal.
void logoutUser(QString const &userID); ///< Forwards a logoutUser call via a Qt signal. void logoutUser(QString const &userID); ///< Forwards a logoutUser call via a Qt signal.
@ -70,7 +70,7 @@ signals:
void changePortsReceived(qint32 imapPort, qint32 smtpPort); ///< Signal for the ChangePorts gRPC call. void changePortsReceived(qint32 imapPort, qint32 smtpPort); ///< Signal for the ChangePorts gRPC call.
void setUseSSLForSMTPReceived(bool use); ///< Signal for the SetUseSSLForSMTP gRPC call. void setUseSSLForSMTPReceived(bool use); ///< Signal for the SetUseSSLForSMTP gRPC call.
void setIsDoHEnabledReceived(bool enabled); ///< Signal for the SetIsDoHEnabled gRPC call. void setIsDoHEnabledReceived(bool enabled); ///< Signal for the SetIsDoHEnabled gRPC call.
void changeLocalCacheReceived(bool enabled, QString const &path); ///< Signal for the ChangeLocalPath gRPC call. void setDiskCachePathReceived(QString const &path); ///< Signal for the setDiskCachePath gRPC call.
void setIsAutomaticUpdateOnReceived(bool on); ///< Signal for the SetIsAutomaticUpdateOn gRPC call. void setIsAutomaticUpdateOnReceived(bool on); ///< Signal for the SetIsAutomaticUpdateOn gRPC call.
void setUserSplitModeReceived(QString const &userID, bool makeItActive); ///< Signal for the SetUserSplitModeReceived gRPC call. void setUserSplitModeReceived(QString const &userID, bool makeItActive); ///< Signal for the SetUserSplitModeReceived gRPC call.
void logoutUserReceived(QString const &userID); ///< Signal for the LogoutUserReceived gRPC call. void logoutUserReceived(QString const &userID); ///< Signal for the LogoutUserReceived gRPC call.

View File

@ -573,19 +573,6 @@ Status GRPCService::IsAutomaticUpdateOn(ServerContext *, Empty const *, BoolValu
return Status::OK; return Status::OK;
} }
//****************************************************************************************************************************************************
/// \param[in] response The response.
/// \return The status for the call
//****************************************************************************************************************************************************
Status GRPCService::IsCacheOnDiskEnabled(ServerContext *, Empty const *, BoolValue *response)
{
app().log().debug(__FUNCTION__);
response->set_value(app().mainWindow().settingsTab().isCacheOnDiskEnabled());
return Status::OK;
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] response The response. /// \param[in] response The response.
/// \return The status for the call /// \return The status for the call
@ -599,23 +586,25 @@ Status GRPCService::DiskCachePath(ServerContext *, Empty const *, StringValue *r
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] request The request. /// \param[in] path The path.
/// \return The status for the call. /// \return The status for the call.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
Status GRPCService::ChangeLocalCache(ServerContext *, ChangeLocalCacheRequest const *request, Empty *) Status GRPCService::SetDiskCachePath(ServerContext *, StringValue const *path, Empty *)
{ {
app().log().debug(__FUNCTION__); app().log().debug(__FUNCTION__);
SettingsTab &tab = app().mainWindow().settingsTab(); SettingsTab &tab = app().mainWindow().settingsTab();
QString const path = QString::fromStdString(request->diskcachepath()); QString const qPath = QString::fromStdString(path->value());
// we mimic the behaviour of Bridge // we mimic the behaviour of Bridge
if (!tab.nextCacheChangeWillSucceed()) if (!tab.nextCacheChangeWillSucceed())
qtProxy_.sendDelayedEvent(newCacheErrorEvent(grpc::CacheErrorType(tab.cacheError()))); qtProxy_.sendDelayedEvent(newDiskCacheErrorEvent(grpc::DiskCacheErrorType(tab.cacheError())));
else else
qtProxy_.sendDelayedEvent(newCacheLocationChangeSuccessEvent()); {
qtProxy_.sendDelayedEvent(newDiskCachePathChanged(path)); qtProxy_.setDiskCachePath(qPath);
qtProxy_.sendDelayedEvent(newIsCacheOnDiskEnabledChanged(request->enablediskcache())); qtProxy_.sendDelayedEvent(newDiskCachePathChangedEvent(qPath));
qtProxy_.sendDelayedEvent(newChangeLocalCacheFinishedEvent()); }
qtProxy_.sendDelayedEvent(newDiskCachePathChangeFinishedEvent());
return Status::OK; return Status::OK;
} }

View File

@ -76,9 +76,8 @@ public: // member functions.
grpc::Status InstallUpdate(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::Empty *) override; grpc::Status InstallUpdate(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::Empty *) override;
grpc::Status SetIsAutomaticUpdateOn(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override; grpc::Status SetIsAutomaticUpdateOn(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override;
grpc::Status IsAutomaticUpdateOn(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override; grpc::Status IsAutomaticUpdateOn(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override;
grpc::Status IsCacheOnDiskEnabled(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override;
grpc::Status DiskCachePath(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override; grpc::Status DiskCachePath(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override;
grpc::Status ChangeLocalCache(::grpc::ServerContext *, ::grpc::ChangeLocalCacheRequest const *request, ::google::protobuf::Empty *) override; grpc::Status SetDiskCachePath(::grpc::ServerContext *, ::google::protobuf::StringValue const*, ::google::protobuf::Empty *r) override;
grpc::Status SetIsDoHEnabled(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override; grpc::Status SetIsDoHEnabled(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override;
grpc::Status IsDoHEnabled(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override; grpc::Status IsDoHEnabled(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override;
grpc::Status SetUseSslForSmtp(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override; grpc::Status SetUseSslForSmtp(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override;

View File

@ -44,6 +44,10 @@ SettingsTab::SettingsTab(QWidget *parent)
connect(ui_.buttonInternetOff, &QPushButton::clicked, []() { app().grpc().sendEvent(newInternetStatusEvent(false)); }); connect(ui_.buttonInternetOff, &QPushButton::clicked, []() { app().grpc().sendEvent(newInternetStatusEvent(false)); });
connect(ui_.buttonShowMainWindow, &QPushButton::clicked, []() { app().grpc().sendEvent(newShowMainWindowEvent()); }); connect(ui_.buttonShowMainWindow, &QPushButton::clicked, []() { app().grpc().sendEvent(newShowMainWindowEvent()); });
connect(ui_.buttonAPICertIssue, &QPushButton::clicked, []() {app().grpc().sendEvent(newApiCertIssueEvent()); }); connect(ui_.buttonAPICertIssue, &QPushButton::clicked, []() {app().grpc().sendEvent(newApiCertIssueEvent()); });
connect(ui_.buttonDiskCacheUnavailable, &QPushButton::clicked,[]() {app().grpc().sendEvent(
newDiskCacheErrorEvent(grpc::DiskCacheErrorType::DISK_CACHE_UNAVAILABLE_ERROR)); });
connect(ui_.buttonDiskFull, &QPushButton::clicked,[]() {app().grpc().sendEvent(
newDiskCacheErrorEvent(grpc::DiskCacheErrorType::DISK_FULL_ERROR)); });
connect(ui_.buttonNoActiveKeyForRecipient, &QPushButton::clicked, [&]() {app().grpc().sendEvent( connect(ui_.buttonNoActiveKeyForRecipient, &QPushButton::clicked, [&]() {app().grpc().sendEvent(
newNoActiveKeyForRecipientEvent(ui_.editNoActiveKeyForRecipient->text())); }); newNoActiveKeyForRecipientEvent(ui_.editNoActiveKeyForRecipient->text())); });
connect(ui_.checkNextCacheChangeWillSucceed, &QCheckBox::toggled, this, &SettingsTab::updateGUIState); connect(ui_.checkNextCacheChangeWillSucceed, &QCheckBox::toggled, this, &SettingsTab::updateGUIState);
@ -403,21 +407,10 @@ bool SettingsTab::isPortFree() const
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \return true iff cache on disk is enabled.
//****************************************************************************************************************************************************
bool SettingsTab::isCacheOnDiskEnabled() const
{
return ui_.checkCacheOnDiskEnabled->isChecked();
}
//****************************************************************************************************************************************************
/// \param[in] enabled Is the cache on disk enabled?
/// \param[in] path The path of the local cache. /// \param[in] path The path of the local cache.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
void SettingsTab::changeLocalCache(bool enabled, QString const &path) void SettingsTab::setDiskCachePath(const QString &path)
{ {
ui_.checkCacheOnDiskEnabled->setChecked(enabled);
ui_.editDiskCachePath->setText(path); ui_.editDiskCachePath->setText(path);
} }
@ -523,7 +516,6 @@ void SettingsTab::resetUI()
ui_.checkDoHEnabled->setChecked(true); ui_.checkDoHEnabled->setChecked(true);
ui_.checkIsPortFree->setChecked(true); ui_.checkIsPortFree->setChecked(true);
ui_.checkCacheOnDiskEnabled->setChecked(true);
QString const cacheDir = QDir(tmpDir).absoluteFilePath("cache"); QString const cacheDir = QDir(tmpDir).absoluteFilePath("cache");
QDir().mkpath(cacheDir); QDir().mkpath(cacheDir);
ui_.editDiskCachePath->setText(QDir::toNativeSeparators(cacheDir)); ui_.editDiskCachePath->setText(QDir::toNativeSeparators(cacheDir));

View File

@ -62,13 +62,12 @@ public: // member functions.
bool useSSLForIMAP() const; ///< Get the value for the 'Use SSL for IMAP' check box. bool useSSLForIMAP() const; ///< Get the value for the 'Use SSL for IMAP' check box.
bool isDoHEnabled() const; ///< Get the value for the 'DoH Enabled' check box. bool isDoHEnabled() const; ///< Get the value for the 'DoH Enabled' check box.
bool isPortFree() const; ///< Get the value for the "Is Port Free" check box. bool isPortFree() const; ///< Get the value for the "Is Port Free" check box.
bool isCacheOnDiskEnabled() const; ///< get the value for the 'Cache On Disk Enabled' check box.
QString diskCachePath() const; ///< Get the value for the 'Disk Cache Path' edit. QString diskCachePath() const; ///< Get the value for the 'Disk Cache Path' edit.
bool nextCacheChangeWillSucceed() const; ///< Get the value for the 'Next Cache Change will succeed' edit. bool nextCacheChangeWillSucceed() const; ///< Get the value for the 'Next Cache Change will succeed' edit.
qint32 cacheError() const; ///< Return the index of the selected cache error. qint32 cacheError() const; ///< Return the index of the selected cache error.
bool isAutomaticUpdateOn() const; ///<Get the value for the 'Automatic Update' check box. bool isAutomaticUpdateOn() const; ///<Get the value for the 'Automatic Update' check box.
public: // slots public slots:
void updateGUIState(); ///< Update the GUI state. void updateGUIState(); ///< Update the GUI state.
void setIsStreaming(bool isStreaming); ///< Set the isStreamingEvents value. void setIsStreaming(bool isStreaming); ///< Set the isStreamingEvents value.
void setClientPlatform(QString const &clientPlatform); ///< Set the client platform. void setClientPlatform(QString const &clientPlatform); ///< Set the client platform.
@ -82,7 +81,7 @@ public: // slots
void setUseSSLForSMTP(bool use); ///< Set the value for the 'Use SSL for SMTP' check box. void setUseSSLForSMTP(bool use); ///< Set the value for the 'Use SSL for SMTP' check box.
void setUseSSLForIMAP(bool use); ///< Set the value for the 'Use SSL for IMAP' check box. void setUseSSLForIMAP(bool use); ///< Set the value for the 'Use SSL for IMAP' check box.
void setIsDoHEnabled(bool enabled); ///< Set the value for the 'DoH Enabled' check box. void setIsDoHEnabled(bool enabled); ///< Set the value for the 'DoH Enabled' check box.
void changeLocalCache(bool enabled, QString const &path); ///< Set the value for the 'Cache On Disk Enabled' check box. void setDiskCachePath(QString const &path); ///< Set the value for the 'Cache On Disk Enabled' check box.
void setIsAutomaticUpdateOn(bool on); ///< Set the value for the 'Automatic Update' check box. void setIsAutomaticUpdateOn(bool on); ///< Set the value for the 'Automatic Update' check box.
private: // member functions. private: // member functions.

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1066</width> <width>1127</width>
<height>808</height> <height>808</height>
</rect> </rect>
</property> </property>
@ -211,7 +211,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0,0,0,1"> <layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0,0,0,1,0">
<item> <item>
<widget class="QLabel" name="labelMAP"> <widget class="QLabel" name="labelMAP">
<property name="text"> <property name="text">
@ -355,13 +355,6 @@
<string>Cache</string> <string>Cache</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QCheckBox" name="checkCacheOnDiskEnabled">
<property name="text">
<string>Cache On Disk Enabled</string>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="horizontalLayout_10">
<item> <item>
@ -733,6 +726,37 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QPushButton" name="buttonDiskCacheUnavailable">
<property name="text">
<string>Disk Cache Unavailable</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonDiskFull">
<property name="text">
<string>Disk Full</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_12"> <layout class="QHBoxLayout" name="horizontalLayout_12">
<item> <item>
@ -796,12 +820,12 @@
<widget class="QComboBox" name="comboCacheError"> <widget class="QComboBox" name="comboCacheError">
<item> <item>
<property name="text"> <property name="text">
<string>Cache Unavailable</string> <string>Disk Cache Unavailable</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Can't Move Cache</string> <string>Can't Move Disk Cache</string>
</property> </property>
</item> </item>
<item> <item>
@ -851,7 +875,6 @@
<tabstop>editReleaseNotesLink</tabstop> <tabstop>editReleaseNotesLink</tabstop>
<tabstop>editDependencyLicenseLink</tabstop> <tabstop>editDependencyLicenseLink</tabstop>
<tabstop>editLandingPageLink</tabstop> <tabstop>editLandingPageLink</tabstop>
<tabstop>checkCacheOnDiskEnabled</tabstop>
<tabstop>editDiskCachePath</tabstop> <tabstop>editDiskCachePath</tabstop>
<tabstop>editOSType</tabstop> <tabstop>editOSType</tabstop>
<tabstop>editOSVersion</tabstop> <tabstop>editOSVersion</tabstop>

View File

@ -104,12 +104,11 @@ void QMLBackend::connectGrpcEvents()
connect(client, &GRPCClient::showMainWindow, this, &QMLBackend::showMainWindow); connect(client, &GRPCClient::showMainWindow, this, &QMLBackend::showMainWindow);
// cache events // cache events
connect(client, &GRPCClient::diskCachePathChanged, this, &QMLBackend::diskCachePathChanged); connect(client, &GRPCClient::diskCacheUnavailable, this, &QMLBackend::diskCacheUnavailable); // _ func() `signal:"cacheUnavailable"`
connect(client, &GRPCClient::cacheUnavailable, this, &QMLBackend::cacheUnavailable); // _ func() `signal:"cacheUnavailable"` connect(client, &GRPCClient::cantMoveDiskCache, this, &QMLBackend::cantMoveDiskCache);
connect(client, &GRPCClient::cacheCantMove, this, &QMLBackend::cacheCantMove);
connect(client, &GRPCClient::diskFull, this, &QMLBackend::diskFull); connect(client, &GRPCClient::diskFull, this, &QMLBackend::diskFull);
connect(client, &GRPCClient::cacheLocationChangeSuccess, this, &QMLBackend::cacheLocationChangeSuccess); connect(client, &GRPCClient::diskCachePathChanged, this, &QMLBackend::diskCachePathChanged);
connect(client, &GRPCClient::changeLocalCacheFinished, this, &QMLBackend::onChangeLocalCacheFinished); connect(client, &GRPCClient::diskCachePathChangeFinished, this, &QMLBackend::diskCachePathChangeFinished);
// login events // login events
connect(client, &GRPCClient::loginUsernamePasswordError, this, &QMLBackend::loginUsernamePasswordError); connect(client, &GRPCClient::loginUsernamePasswordError, this, &QMLBackend::loginUsernamePasswordError);
@ -219,6 +218,24 @@ bool QMLBackend::isPortFree(int port)
} }
//****************************************************************************************************************************************************
/// \return true the native local file path of the given URL.
//****************************************************************************************************************************************************
QString QMLBackend::nativePath(QUrl const &url)
{
return QDir::toNativeSeparators(url.toLocalFile());
}
//****************************************************************************************************************************************************
/// \return true iff the two URL point to the same local file or folder.
//****************************************************************************************************************************************************
bool QMLBackend::areSameFileOrFolder(QUrl const &lhs, QUrl const &rhs)
{
return QFileInfo(lhs.toLocalFile()) == QFileInfo(rhs.toLocalFile());
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
// //
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
@ -295,6 +312,13 @@ void QMLBackend::changeColorScheme(QString const &scheme)
emit colorSchemeNameChanged(this->colorSchemeName()); emit colorSchemeNameChanged(this->colorSchemeName());
} }
//****************************************************************************************************************************************************
/// \param[in] path The path of the disk cache.
//****************************************************************************************************************************************************
void QMLBackend::setDiskCachePath(QUrl const &path) const
{
app().grpc().setDiskCachePath(path);
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] makeItActive Should SSL for SMTP be enabled. /// \param[in] makeItActive Should SSL for SMTP be enabled.
@ -404,14 +428,3 @@ void QMLBackend::onVersionChanged()
emit releaseNotesLinkChanged(releaseNotesLink()); emit releaseNotesLinkChanged(releaseNotesLink());
emit landingPageLinkChanged(landingPageLink()); emit landingPageLinkChanged(landingPageLink());
} }
//****************************************************************************************************************************************************
///
//****************************************************************************************************************************************************
void QMLBackend::onChangeLocalCacheFinished(bool willRestart)
{
if (willRestart)
emit hideMainWindow();
emit changeLocalCacheFinished();
}

View File

@ -48,6 +48,8 @@ public: // member functions.
// invokable methods can be called from QML. They generally return a value, which slots cannot do. // invokable methods can be called from QML. They generally return a value, which slots cannot do.
Q_INVOKABLE static QPoint getCursorPos(); // _ func() *core.QPoint `slot:"getCursorPos"` Q_INVOKABLE static QPoint getCursorPos(); // _ func() *core.QPoint `slot:"getCursorPos"`
Q_INVOKABLE static bool isPortFree(int port); // _ func(port int) bool `slot:"isPortFree"` Q_INVOKABLE static bool isPortFree(int port); // _ func(port int) bool `slot:"isPortFree"`
Q_INVOKABLE static QString nativePath(QUrl const &url);
Q_INVOKABLE static bool areSameFileOrFolder(QUrl const &lhs, QUrl const &rhs);
public: // Qt/QML properties. Note that the NOTIFY-er signal is required even for read-only properties (QML warning otherwise) public: // Qt/QML properties. Note that the NOTIFY-er signal is required even for read-only properties (QML warning otherwise)
Q_PROPERTY(bool showOnStartup READ showOnStartup NOTIFY showOnStartupChanged) // _ bool `property:showOnStartup` Q_PROPERTY(bool showOnStartup READ showOnStartup NOTIFY showOnStartupChanged) // _ bool `property:showOnStartup`
@ -112,7 +114,7 @@ public: // Qt/QML properties. Note that the NOTIFY-er signal is required even fo
bool dockIconVisible() const { return getDockIconVisibleState(); }; bool dockIconVisible() const { return getDockIconVisibleState(); };
void setDockIconVisible(bool visible) { setDockIconVisibleState(visible); emit dockIconVisibleChanged(visible); } void setDockIconVisible(bool visible) { setDockIconVisibleState(visible); emit dockIconVisibleChanged(visible); }
signals: // Signal used by the Qt property system. Many of them are unused but required to avoir warning from the QML engine. signals: // Signal used by the Qt property system. Many of them are unused but required to avoid warning from the QML engine.
void showSplashScreenChanged(bool value); void showSplashScreenChanged(bool value);
void showOnStartupChanged(bool value); void showOnStartupChanged(bool value);
void goosChanged(QString const &value); void goosChanged(QString const &value);
@ -147,6 +149,7 @@ public slots: // slot for signals received from QML -> To be forwarded to Bridge
void toggleBeta(bool active); // _ func(makeItActive bool) `slot:"toggleBeta"` void toggleBeta(bool active); // _ func(makeItActive bool) `slot:"toggleBeta"`
void changeIsAllMailVisible(bool isVisible); // _ func(isVisible bool) `slot:"changeIsAllMailVisible"` void changeIsAllMailVisible(bool isVisible); // _ func(isVisible bool) `slot:"changeIsAllMailVisible"`
void changeColorScheme(QString const &scheme); // _ func(string) `slot:"changeColorScheme"` void changeColorScheme(QString const &scheme); // _ func(string) `slot:"changeColorScheme"`
void setDiskCachePath(QUrl const& path) const;
void login(QString const& username, QString const& password) { app().grpc().login(username, password);} // _ func(username, password string) `slot:"login"` void login(QString const& username, QString const& password) { app().grpc().login(username, password);} // _ func(username, password string) `slot:"login"`
void login2FA(QString const& username, QString const& code) { app().grpc().login2FA(username, code);} // _ func(username, code string) `slot:"login2FA"` void login2FA(QString const& username, QString const& code) { app().grpc().login2FA(username, code);} // _ func(username, code string) `slot:"login2FA"`
void login2Password(QString const& username, QString const& password) { app().grpc().login2Passwords(username, password);} // _ func(username, password string) `slot:"login2Password"` void login2Password(QString const& username, QString const& password) { app().grpc().login2Passwords(username, password);} // _ func(username, password string) `slot:"login2Password"`
@ -169,15 +172,13 @@ public slots: // slot for signals received from QML -> To be forwarded to Bridge
app().grpc().reportBug(description, address, emailClient, includeLogs); } // _ func(description, address, emailClient string, includeLogs bool) `slot:"reportBug"` app().grpc().reportBug(description, address, emailClient, includeLogs); } // _ func(description, address, emailClient string, includeLogs bool) `slot:"reportBug"`
void onResetFinished(); // _ func() `slot:"onResetFinished"` void onResetFinished(); // _ func() `slot:"onResetFinished"`
void onVersionChanged(); // _ func() `slot:"onVersionChanged"` void onVersionChanged(); // _ func() `slot:"onVersionChanged"`
void onChangeLocalCacheFinished(bool willRestart);
signals: // Signals received from the Go backend, to be forwarded to QML signals: // Signals received from the Go backend, to be forwarded to QML
void toggleAutostartFinished(); // _ func() `signal:"toggleAutostartFinished"` void toggleAutostartFinished(); // _ func() `signal:"toggleAutostartFinished"`
void cacheUnavailable(); // _ func() `signal:"cacheUnavailable"` void diskCacheUnavailable(); // _ func() `signal:"cacheUnavailable"`
void cacheCantMove(); // _ func() `signal:"cacheCantMove"` void cantMoveDiskCache(); // _ func() `signal:"cacheCantMove"`
void cacheLocationChangeSuccess(); // _ func() `signal:"cacheLocationChangeSuccess"` void diskCachePathChangeFinished(); // _ func() `signal:"cacheLocationChangeSuccess"`
void diskFull(); // _ func() `signal:"diskFull"` void diskFull(); // _ func() `signal:"diskFull"`
void changeLocalCacheFinished(); // _ func() `signal:"changeLocalCacheFinished"`
void loginUsernamePasswordError(QString const &errorMsg); // _ func(errorMsg string) `signal:"loginUsernamePasswordError"` void loginUsernamePasswordError(QString const &errorMsg); // _ func(errorMsg string) `signal:"loginUsernamePasswordError"`
void loginFreeUserError(); // _ func() `signal:"loginFreeUserError"` void loginFreeUserError(); // _ func() `signal:"loginFreeUserError"`
void loginConnectionError(QString const &errorMsg); // _ func(errorMsg string) `signal:"loginConnectionError"` void loginConnectionError(QString const &errorMsg); // _ func(errorMsg string) `signal:"loginConnectionError"`

View File

@ -55,7 +55,7 @@ QtObject {
Connections { Connections {
target: Backend target: Backend
function onCacheUnavailable() { function onDiskCacheUnavailable() {
mainWindow.showAndRise() mainWindow.showAndRise()
} }
function onColorSchemeNameChanged(scheme) { root.setColorScheme() } function onColorSchemeNameChanged(scheme) { root.setColorScheme() }

View File

@ -29,8 +29,12 @@ SettingsView {
fillHeight: false fillHeight: false
property var notifications property var notifications
property bool _diskCacheEnabled: true property url diskCachePath: pathDialog.shortcuts.home
property url _diskCachePath: pathDialog.shortcuts.home
function refresh() {
diskCacheSetting.description = Backend.nativePath(root.diskCachePath)
submitButton.enabled = !Backend.areSameFileOrFolder(Backend.diskCachePath, root.diskCachePath)
}
Label { Label {
colorScheme: root.colorScheme colorScheme: root.colorScheme
@ -49,26 +53,12 @@ SettingsView {
} }
SettingsItem { SettingsItem {
colorScheme: root.colorScheme id: diskCacheSetting
text: qsTr("Enable local cache")
description: qsTr("Recommended for optimal performance.")
type: SettingsItem.Toggle
checked: root._diskCacheEnabled
onClicked: root._diskCacheEnabled = !root._diskCacheEnabled
Layout.fillWidth: true
}
SettingsItem {
colorScheme: root.colorScheme colorScheme: root.colorScheme
text: qsTr("Current cache location") text: qsTr("Current cache location")
actionText: qsTr("Change location") actionText: qsTr("Change location")
description: Backend.goos === "windows" ?
root._diskCachePath.toString().replace("file:///", "").replace(new RegExp("/", 'g'), "\\") + "\\" :
root._diskCachePath.toString().replace("file://", "") + "/"
descriptionWrap: Text.WrapAnywhere descriptionWrap: Text.WrapAnywhere
type: SettingsItem.Button type: SettingsItem.Button
enabled: root._diskCacheEnabled
onClicked: { onClicked: {
pathDialog.open() pathDialog.open()
} }
@ -78,8 +68,11 @@ SettingsView {
FolderDialog { FolderDialog {
id: pathDialog id: pathDialog
title: qsTr("Select cache location") title: qsTr("Select cache location")
currentFolder: root._diskCachePath currentFolder: root.diskCachePath
onAccepted: root._diskCachePath = pathDialog.selectedFolder onAccepted: {
root.diskCachePath = pathDialog.selectedFolder
root.refresh()
}
} }
} }
@ -89,11 +82,7 @@ SettingsView {
Button { Button {
id: submitButton id: submitButton
colorScheme: root.colorScheme colorScheme: root.colorScheme
text: qsTr("Save and restart") text: qsTr("Save")
enabled: (
Backend.diskCachePath != root._diskCachePath ||
Backend.isDiskCacheEnabled != root._diskCacheEnabled
)
onClicked: { onClicked: {
root.submit() root.submit()
} }
@ -109,7 +98,7 @@ SettingsView {
Connections { Connections {
target: Backend target: Backend
function onChangeLocalCacheFinished() { function onDiskCachePathChangeFinished() {
submitButton.loading = false submitButton.loading = false
root.setDefaultValues() root.setDefaultValues()
} }
@ -120,25 +109,14 @@ SettingsView {
root.setDefaultValues() root.setDefaultValues()
} }
function submit(){ function submit() {
if (!root._diskCacheEnabled && Backend.isDiskCacheEnabled) {
root.notifications.askDisableLocalCache()
return
}
if (root._diskCacheEnabled && !Backend.isDiskCacheEnabled) {
root.notifications.askEnableLocalCache(root._diskCachePath)
return
}
// Not asking, only changing path
submitButton.loading = true submitButton.loading = true
Backend.changeLocalCache(Backend.isDiskCacheEnabled, root._diskCachePath) Backend.setDiskCachePath(root.diskCachePath)
} }
function setDefaultValues(){ function setDefaultValues(){
root._diskCacheEnabled = Backend.isDiskCacheEnabled root.diskCachePath = Backend.diskCachePath
root._diskCachePath = Backend.diskCachePath root.refresh();
} }
onVisibleChanged: { onVisibleChanged: {

View File

@ -94,16 +94,6 @@ Item {
notification: root.notifications.enableSplitMode notification: root.notifications.enableSplitMode
} }
NotificationDialog {
colorScheme: root.colorScheme
notification: root.notifications.disableLocalCache
}
NotificationDialog {
colorScheme: root.colorScheme
notification: root.notifications.enableLocalCache
}
NotificationDialog { NotificationDialog {
colorScheme: root.colorScheme colorScheme: root.colorScheme
notification: root.notifications.resetBridge notification: root.notifications.resetBridge

View File

@ -29,8 +29,6 @@ QtObject {
signal askEnableBeta() signal askEnableBeta()
signal askEnableSplitMode(var user) signal askEnableSplitMode(var user)
signal askDisableLocalCache()
signal askEnableLocalCache(var path)
signal askResetBridge() signal askResetBridge()
signal askChangeAllMailVisibility(var isVisibleNow) signal askChangeAllMailVisibility(var isVisibleNow)
signal askDeleteAccount(var user) signal askDeleteAccount(var user)
@ -70,8 +68,6 @@ QtObject {
root.diskFull, root.diskFull,
root.cacheLocationChangeSuccess, root.cacheLocationChangeSuccess,
root.enableSplitMode, root.enableSplitMode,
root.disableLocalCache,
root.enableLocalCache,
root.resetBridge, root.resetBridge,
root.changeAllMailVisibility, root.changeAllMailVisibility,
root.deleteAccount, root.deleteAccount,
@ -558,7 +554,7 @@ QtObject {
Connections { Connections {
target: Backend target: Backend
function onCacheUnavailable() { function onDiskCacheUnavailable() {
root.cacheUnavailable.active = true root.cacheUnavailable.active = true
} }
} }
@ -591,7 +587,7 @@ QtObject {
Connections { Connections {
target: Backend target: Backend
function onCacheCantMove() { function onCantMoveDiskCache() {
root.cacheCantMove.active = true root.cacheCantMove.active = true
} }
} }
@ -622,8 +618,8 @@ QtObject {
Connections { Connections {
target: Backend target: Backend
function onCacheLocationChangeSuccess() { function onDiskCachePathChanged() {
console.log("notify location changed succesfully") console.log("notify location changed successfully")
root.cacheLocationChangeSuccess.active = true root.cacheLocationChangeSuccess.active = true
} }
} }
@ -736,99 +732,6 @@ QtObject {
] ]
} }
property Notification disableLocalCache: Notification {
title: qsTr("Disable local cache?")
brief: title
description: qsTr("This action will clear your local cache, including locally stored messages. Bridge will restart.")
icon: "/qml/icons/ic-question-circle.svg"
type: Notification.NotificationType.Warning
group: Notifications.Group.Configuration | Notifications.Group.Dialogs
Connections {
target: root
function onAskDisableLocalCache() {
root.disableLocalCache.active = true
}
}
Connections {
target: Backend
function onChangeLocalCacheFinished() {
root.disableLocalCache.active = false
disableLocalCache_disable.loading = false
disableLocalCache_cancel.enabled = true
}
}
action: [
Action {
id: disableLocalCache_cancel
text: qsTr("Cancel")
onTriggered: {
root.disableLocalCache.active = false
}
},
Action {
id: disableLocalCache_disable
text: qsTr("Disable and restart")
onTriggered: {
disableLocalCache_disable.loading = true
disableLocalCache_cancel.enabled = false
Backend.changeLocalCache(false, Backend.diskCachePath)
}
}
]
}
property Notification enableLocalCache: Notification {
title: qsTr("Enable local cache")
brief: title
description: qsTr("Bridge will restart.")
icon: "/qml/icons/ic-question-circle.svg"
type: Notification.NotificationType.Warning
group: Notifications.Group.Configuration | Notifications.Group.Dialogs
property url path
Connections {
target: root
function onAskEnableLocalCache(path) {
root.enableLocalCache.active = true
root.enableLocalCache.path = path
}
}
Connections {
target: Backend
function onChangeLocalCacheFinished() {
root.enableLocalCache.active = false
enableLocalCache_enable.loading = false
enableLocalCache_cancel.enabled = true
}
}
action: [
Action {
id: enableLocalCache_enable
text: qsTr("Enable and restart")
onTriggered: {
enableLocalCache_enable.loading = true
enableLocalCache_cancel.enabled = false
Backend.changeLocalCache(true, root.enableLocalCache.path)
}
},
Action {
id: enableLocalCache_cancel
text: qsTr("Cancel")
onTriggered: {
root.enableLocalCache.active = false
}
}
]
}
property Notification resetBridge: Notification { property Notification resetBridge: Notification {
title: qsTr("Reset Bridge?") title: qsTr("Reset Bridge?")
brief: title brief: title

View File

@ -76,7 +76,7 @@ bridgepp::SPStreamEvent wrapUpdateEvent(grpc::UpdateEvent *updateEvent)
/// \param[in] cacheEvent The cache event. /// \param[in] cacheEvent The cache event.
/// \return The stream event. /// \return The stream event.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
bridgepp::SPStreamEvent wrapCacheEvent(grpc::CacheEvent *cacheEvent) bridgepp::SPStreamEvent wrapCacheEvent(grpc::DiskCacheEvent *cacheEvent)
{ {
auto event = newStreamEvent(); auto event = newStreamEvent();
event->set_allocated_cache(cacheEvent); event->set_allocated_cache(cacheEvent);
@ -385,50 +385,38 @@ SPStreamEvent newUpdateCheckFinished()
/// \param[in] errorType The error type. /// \param[in] errorType The error type.
/// \return The event. /// \return The event.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
SPStreamEvent newCacheErrorEvent(grpc::CacheErrorType errorType) SPStreamEvent newDiskCacheErrorEvent(grpc::DiskCacheErrorType errorType)
{ {
auto event = new grpc::CacheErrorEvent; auto event = new grpc::DiskCacheErrorEvent;
event->set_type(errorType); event->set_type(errorType);
auto cacheEvent = new grpc::CacheEvent; auto cacheEvent = new grpc::DiskCacheEvent;
cacheEvent->set_allocated_error(event); cacheEvent->set_allocated_error(event);
return wrapCacheEvent(cacheEvent); return wrapCacheEvent(cacheEvent);
} }
//****************************************************************************************************************************************************
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newCacheLocationChangeSuccessEvent()
{
auto event = new grpc::CacheLocationChangeSuccessEvent;
auto cacheEvent = new grpc::CacheEvent;
cacheEvent->set_allocated_locationchangedsuccess(event);
return wrapCacheEvent(cacheEvent);
}
//****************************************************************************************************************************************************
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newChangeLocalCacheFinishedEvent()
{
auto event = new grpc::ChangeLocalCacheFinishedEvent;
auto cacheEvent = new grpc::CacheEvent;
cacheEvent->set_allocated_changelocalcachefinished(event);
return wrapCacheEvent(cacheEvent);
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] path The path of the cache. /// \param[in] path The path of the cache.
/// \return The event. /// \return The event.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
SPStreamEvent newDiskCachePathChanged(QString const &path) SPStreamEvent newDiskCachePathChangedEvent(QString const &path)
{ {
auto event = new grpc::DiskCachePathChanged; auto event = new grpc::DiskCachePathChangedEvent;
event->set_path(path.toStdString()); event->set_path(path.toStdString());
auto cacheEvent = new grpc::CacheEvent; auto cacheEvent = new grpc::DiskCacheEvent;
cacheEvent->set_allocated_diskcachepathchanged(event); cacheEvent->set_allocated_pathchanged(event);
return wrapCacheEvent(cacheEvent);
}
//****************************************************************************************************************************************************
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newDiskCachePathChangeFinishedEvent()
{
auto event = new grpc::DiskCachePathChangeFinishedEvent;
auto cacheEvent = new grpc::DiskCacheEvent;
cacheEvent->set_allocated_pathchangefinished(event);
return wrapCacheEvent(cacheEvent); return wrapCacheEvent(cacheEvent);
} }

View File

@ -54,10 +54,9 @@ SPStreamEvent newUpdateIsLatestVersion(); ///< Create a new UpdateIsLatestVersio
SPStreamEvent newUpdateCheckFinished(); ///< Create a new UpdateCheckFinished event. SPStreamEvent newUpdateCheckFinished(); ///< Create a new UpdateCheckFinished event.
// Cache on disk related events // Cache on disk related events
SPStreamEvent newCacheErrorEvent(grpc::CacheErrorType errorType); ///< Create a new CacheErrorEvent event. SPStreamEvent newDiskCacheErrorEvent(grpc::DiskCacheErrorType errorType); ///< Create a new DiskCacheErrorEvent event.
SPStreamEvent newCacheLocationChangeSuccessEvent(); ///< Create a new CacheLocationChangeSuccessEvent event. SPStreamEvent newDiskCachePathChangedEvent(QString const &path); ///< Create a new DiskCachePathChanged event.
SPStreamEvent newChangeLocalCacheFinishedEvent(); ///< Create a new ChangeLocalCacheFinishedEvent event. SPStreamEvent newDiskCachePathChangeFinishedEvent(); ///< Create a new DiskCachePathChangeFinishedEvent event.
SPStreamEvent newDiskCachePathChanged(QString const &path); ///< Create a new DiskCachePathChanged event.
// Mail settings related events // Mail settings related events
SPStreamEvent newMailSettingsErrorEvent(grpc::MailSettingsErrorType errorType); ///< Create a new MailSettingsErrorEvent event. SPStreamEvent newMailSettingsErrorEvent(grpc::MailSettingsErrorType errorType); ///< Create a new MailSettingsErrorEvent event.

View File

@ -605,6 +605,16 @@ grpc::Status GRPCClient::diskCachePath(QUrl &outPath)
} }
//****************************************************************************************************************************************************
/// \param[out] path The value for the property.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::setDiskCachePath(QUrl const &path)
{
return this->logGRPCCallStatus(this->setString(&Bridge::Stub::SetDiskCachePath, path.toLocalFile()), __FUNCTION__);
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] username The username. /// \param[in] username The username.
/// \param[in] password The password. /// \param[in] password The password.
@ -1290,23 +1300,23 @@ void GRPCClient::processUpdateEvent(UpdateEvent const &event)
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] event The event. /// \param[in] event The event.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
void GRPCClient::processCacheEvent(CacheEvent const &event) void GRPCClient::processCacheEvent(DiskCacheEvent const &event)
{ {
switch (event.event_case()) switch (event.event_case())
{ {
case CacheEvent::kError: case DiskCacheEvent::kError:
{ {
switch (event.error().type()) switch (event.error().type())
{ {
case CACHE_UNAVAILABLE_ERROR: case DISK_CACHE_UNAVAILABLE_ERROR:
this->logError("Cache error received: cacheUnavailable."); this->logError("Cache error received: diskCacheUnavailable.");
emit cacheUnavailable(); emit diskCacheUnavailable();
break; break;
case CACHE_CANT_MOVE_ERROR: case CANT_MOVE_DISK_CACHE_ERROR:
this->logError("Cache error received: cacheCantMove."); this->logError("Cache error received: cantMoveDiskCache.");
emit cacheCantMove(); emit cantMoveDiskCache();
break; break;
case DISK_FULL: case DISK_FULL_ERROR:
this->logError("Cache error received: diskFull."); this->logError("Cache error received: diskFull.");
emit diskFull(); emit diskFull();
break; break;
@ -1317,21 +1327,17 @@ void GRPCClient::processCacheEvent(CacheEvent const &event)
break; break;
} }
case CacheEvent::kLocationChangedSuccess: case DiskCacheEvent::kPathChanged:
this->logTrace("Cache event received: LocationChangedSuccess.");
emit cacheLocationChangeSuccess();
break;
case CacheEvent::kChangeLocalCacheFinished:
emit changeLocalCacheFinished(event.changelocalcachefinished().willrestart());
this->logTrace("Cache event received: ChangeLocalCacheFinished.");
break;
case CacheEvent::kDiskCachePathChanged:
this->logTrace("Cache event received: DiskCachePathChanged."); this->logTrace("Cache event received: DiskCachePathChanged.");
emit diskCachePathChanged(QUrl::fromLocalFile(QString::fromStdString(event.diskcachepathchanged().path()))); emit diskCachePathChanged(QUrl::fromLocalFile(QString::fromStdString(event.pathchanged().path())));
break; break;
case DiskCacheEvent::kPathChangeFinished:
this->logTrace("Cache event received: diskCachePathChangeFinished.");
emit diskCachePathChangeFinished();
break;
default: default:
this->logError("Unknown Cache event received."); this->logError("Unknown Cache event received.");
} }

View File

@ -105,15 +105,14 @@ signals: // app related signals
// cache related calls // cache related calls
public: public:
grpc::Status diskCachePath(QUrl &outPath); ///< Performs the 'diskCachePath' call. grpc::Status diskCachePath(QUrl &outPath); ///< Performs the 'diskCachePath' call.
signals: grpc::Status setDiskCachePath(QUrl const &path); ///< Performs the 'setDiskCachePath' call
void isCacheOnDiskEnabledChanged(bool enabled);
void diskCachePathChanged(QUrl const &outPath);
void cacheUnavailable(); // _ func() `signal:"cacheUnavailable"`
void cacheCantMove(); // _ func() `signal:"cacheCantMove"`
void cacheLocationChangeSuccess(); // _ func() `signal:"cacheLocationChangeSuccess"`
void diskFull(); // _ func() `signal:"diskFull"`
void changeLocalCacheFinished(bool willRestart); // _ func() `signal:"changeLocalCacheFinished"`
signals:
void diskCacheUnavailable();
void cantMoveDiskCache();
void diskFull();
void diskCachePathChanged(QUrl const &path);
void diskCachePathChangeFinished();
// mail settings related calls // mail settings related calls
public: public:
@ -183,7 +182,6 @@ signals:
void userDisconnected(QString const &username); void userDisconnected(QString const &username);
void userChanged(QString const &userID); void userChanged(QString const &userID);
public: // keychain related calls public: // keychain related calls
grpc::Status availableKeychains(QStringList &outKeychains); grpc::Status availableKeychains(QStringList &outKeychains);
grpc::Status currentKeychain(QString &outKeychain); grpc::Status currentKeychain(QString &outKeychain);
@ -229,7 +227,7 @@ private:
void processAppEvent(grpc::AppEvent const &event); ///< Process an 'App' event. void processAppEvent(grpc::AppEvent const &event); ///< Process an 'App' event.
void processLoginEvent(grpc::LoginEvent const &event); ///< Process a 'Login' event. void processLoginEvent(grpc::LoginEvent const &event); ///< Process a 'Login' event.
void processUpdateEvent(grpc::UpdateEvent const &event); ///< Process an 'Update' event. void processUpdateEvent(grpc::UpdateEvent const &event); ///< Process an 'Update' event.
void processCacheEvent(grpc::CacheEvent const &event); ///< Process a 'Cache' event. void processCacheEvent(grpc::DiskCacheEvent const &event); ///< Process a 'Cache' event.
void processMailSettingsEvent(grpc::MailSettingsEvent const &event); ///< Process a 'MailSettings' event. void processMailSettingsEvent(grpc::MailSettingsEvent const &event); ///< Process a 'MailSettings' event.
void processKeychainEvent(grpc::KeychainEvent const &event); ///< Process a 'Keychain' event. void processKeychainEvent(grpc::KeychainEvent const &event); ///< Process a 'Keychain' event.
void processMailEvent(grpc::MailEvent const &event); ///< Process a 'Mail' event. void processMailEvent(grpc::MailEvent const &event); ///< Process a 'Mail' event.

View File

@ -59,7 +59,7 @@ static const char* Bridge_method_names[] = {
"/grpc.Bridge/SetIsAutomaticUpdateOn", "/grpc.Bridge/SetIsAutomaticUpdateOn",
"/grpc.Bridge/IsAutomaticUpdateOn", "/grpc.Bridge/IsAutomaticUpdateOn",
"/grpc.Bridge/DiskCachePath", "/grpc.Bridge/DiskCachePath",
"/grpc.Bridge/ChangeLocalCache", "/grpc.Bridge/SetDiskCachePath",
"/grpc.Bridge/SetIsDoHEnabled", "/grpc.Bridge/SetIsDoHEnabled",
"/grpc.Bridge/IsDoHEnabled", "/grpc.Bridge/IsDoHEnabled",
"/grpc.Bridge/SetUseSslForSmtp", "/grpc.Bridge/SetUseSslForSmtp",
@ -128,7 +128,7 @@ Bridge::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, co
, rpcmethod_SetIsAutomaticUpdateOn_(Bridge_method_names[34], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_SetIsAutomaticUpdateOn_(Bridge_method_names[34], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_IsAutomaticUpdateOn_(Bridge_method_names[35], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_IsAutomaticUpdateOn_(Bridge_method_names[35], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_DiskCachePath_(Bridge_method_names[36], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_DiskCachePath_(Bridge_method_names[36], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ChangeLocalCache_(Bridge_method_names[37], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_SetDiskCachePath_(Bridge_method_names[37], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetIsDoHEnabled_(Bridge_method_names[38], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_SetIsDoHEnabled_(Bridge_method_names[38], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_IsDoHEnabled_(Bridge_method_names[39], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_IsDoHEnabled_(Bridge_method_names[39], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetUseSslForSmtp_(Bridge_method_names[40], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_SetUseSslForSmtp_(Bridge_method_names[40], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
@ -1004,25 +1004,25 @@ void Bridge::Stub::async::DiskCachePath(::grpc::ClientContext* context, const ::
return result; return result;
} }
::grpc::Status Bridge::Stub::ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::google::protobuf::Empty* response) { ::grpc::Status Bridge::Stub::SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::google::protobuf::Empty* response) {
return ::grpc::internal::BlockingUnaryCall< ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ChangeLocalCache_, context, request, response); return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::StringValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SetDiskCachePath_, context, request, response);
} }
void Bridge::Stub::async::ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)> f) { void Bridge::Stub::async::SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ChangeLocalCache_, context, request, response, std::move(f)); ::grpc::internal::CallbackUnaryCall< ::google::protobuf::StringValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetDiskCachePath_, context, request, response, std::move(f));
} }
void Bridge::Stub::async::ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) { void Bridge::Stub::async::SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ChangeLocalCache_, context, request, response, reactor); ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetDiskCachePath_, context, request, response, reactor);
} }
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::PrepareAsyncChangeLocalCacheRaw(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) { ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::PrepareAsyncSetDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::grpc::ChangeLocalCacheRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ChangeLocalCache_, context, request); return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SetDiskCachePath_, context, request);
} }
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::AsyncChangeLocalCacheRaw(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) { ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::AsyncSetDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
auto* result = auto* result =
this->PrepareAsyncChangeLocalCacheRaw(context, request, cq); this->PrepareAsyncSetDiskCachePathRaw(context, request, cq);
result->StartCall(); result->StartCall();
return result; return result;
} }
@ -1900,12 +1900,12 @@ Bridge::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[37], Bridge_method_names[37],
::grpc::internal::RpcMethod::NORMAL_RPC, ::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::StringValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service, [](Bridge::Service* service,
::grpc::ServerContext* ctx, ::grpc::ServerContext* ctx,
const ::grpc::ChangeLocalCacheRequest* req, const ::google::protobuf::StringValue* req,
::google::protobuf::Empty* resp) { ::google::protobuf::Empty* resp) {
return service->ChangeLocalCache(ctx, req, resp); return service->SetDiskCachePath(ctx, req, resp);
}, this))); }, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[38], Bridge_method_names[38],
@ -2391,7 +2391,7 @@ Bridge::Service::~Service() {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
::grpc::Status Bridge::Service::ChangeLocalCache(::grpc::ServerContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response) { ::grpc::Status Bridge::Service::SetDiskCachePath(::grpc::ServerContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response) {
(void) context; (void) context;
(void) request; (void) request;
(void) response; (void) response;

View File

@ -320,12 +320,12 @@ class Bridge final {
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>> PrepareAsyncDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>> PrepareAsyncDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>>(PrepareAsyncDiskCachePathRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>>(PrepareAsyncDiskCachePathRaw(context, request, cq));
} }
virtual ::grpc::Status ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::google::protobuf::Empty* response) = 0; virtual ::grpc::Status SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::google::protobuf::Empty* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncSetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncChangeLocalCacheRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncSetDiskCachePathRaw(context, request, cq));
} }
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncSetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncChangeLocalCacheRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncSetDiskCachePathRaw(context, request, cq));
} }
// mail // mail
virtual ::grpc::Status SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::google::protobuf::Empty* response) = 0; virtual ::grpc::Status SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::google::protobuf::Empty* response) = 0;
@ -570,8 +570,8 @@ class Bridge final {
// cache // cache
virtual void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, std::function<void(::grpc::Status)>) = 0; virtual void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, std::function<void(::grpc::Status)>) = 0;
virtual void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, ::grpc::ClientUnaryReactor* reactor) = 0;
virtual void ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) = 0; virtual void SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) = 0;
virtual void ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0;
// mail // mail
virtual void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) = 0; virtual void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) = 0;
virtual void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0;
@ -699,8 +699,8 @@ class Bridge final {
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* PrepareAsyncIsAutomaticUpdateOnRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* PrepareAsyncIsAutomaticUpdateOnRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>* AsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>* AsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>* PrepareAsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::StringValue>* PrepareAsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncChangeLocalCacheRaw(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncSetDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncChangeLocalCacheRaw(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncSetDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* AsyncIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* AsyncIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) = 0;
@ -1009,12 +1009,12 @@ class Bridge final {
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>> PrepareAsyncDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>> PrepareAsyncDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>>(PrepareAsyncDiskCachePathRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>>(PrepareAsyncDiskCachePathRaw(context, request, cq));
} }
::grpc::Status ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::google::protobuf::Empty* response) override; ::grpc::Status SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::google::protobuf::Empty* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncSetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncChangeLocalCacheRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncSetDiskCachePathRaw(context, request, cq));
} }
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncSetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncChangeLocalCacheRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncSetDiskCachePathRaw(context, request, cq));
} }
::grpc::Status SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::google::protobuf::Empty* response) override; ::grpc::Status SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::google::protobuf::Empty* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncSetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncSetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) {
@ -1249,8 +1249,8 @@ class Bridge final {
void IsAutomaticUpdateOn(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) override; void IsAutomaticUpdateOn(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) override;
void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, std::function<void(::grpc::Status)>) override; void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, std::function<void(::grpc::Status)>) override;
void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, ::grpc::ClientUnaryReactor* reactor) override; void DiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response, ::grpc::ClientUnaryReactor* reactor) override;
void ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) override; void SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) override;
void ChangeLocalCache(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; void SetDiskCachePath(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override;
void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) override; void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)>) override;
void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; void SetIsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override;
void IsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, std::function<void(::grpc::Status)>) override; void IsDoHEnabled(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, std::function<void(::grpc::Status)>) override;
@ -1379,8 +1379,8 @@ class Bridge final {
::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* PrepareAsyncIsAutomaticUpdateOnRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* PrepareAsyncIsAutomaticUpdateOnRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>* AsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>* AsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>* PrepareAsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>* PrepareAsyncDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncChangeLocalCacheRaw(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncSetDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncChangeLocalCacheRaw(::grpc::ClientContext* context, const ::grpc::ChangeLocalCacheRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncSetDiskCachePathRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncSetIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* AsyncIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* AsyncIsDoHEnabledRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) override;
@ -1463,7 +1463,7 @@ class Bridge final {
const ::grpc::internal::RpcMethod rpcmethod_SetIsAutomaticUpdateOn_; const ::grpc::internal::RpcMethod rpcmethod_SetIsAutomaticUpdateOn_;
const ::grpc::internal::RpcMethod rpcmethod_IsAutomaticUpdateOn_; const ::grpc::internal::RpcMethod rpcmethod_IsAutomaticUpdateOn_;
const ::grpc::internal::RpcMethod rpcmethod_DiskCachePath_; const ::grpc::internal::RpcMethod rpcmethod_DiskCachePath_;
const ::grpc::internal::RpcMethod rpcmethod_ChangeLocalCache_; const ::grpc::internal::RpcMethod rpcmethod_SetDiskCachePath_;
const ::grpc::internal::RpcMethod rpcmethod_SetIsDoHEnabled_; const ::grpc::internal::RpcMethod rpcmethod_SetIsDoHEnabled_;
const ::grpc::internal::RpcMethod rpcmethod_IsDoHEnabled_; const ::grpc::internal::RpcMethod rpcmethod_IsDoHEnabled_;
const ::grpc::internal::RpcMethod rpcmethod_SetUseSslForSmtp_; const ::grpc::internal::RpcMethod rpcmethod_SetUseSslForSmtp_;
@ -1535,7 +1535,7 @@ class Bridge final {
virtual ::grpc::Status IsAutomaticUpdateOn(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response); virtual ::grpc::Status IsAutomaticUpdateOn(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response);
// cache // cache
virtual ::grpc::Status DiskCachePath(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response); virtual ::grpc::Status DiskCachePath(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::StringValue* response);
virtual ::grpc::Status ChangeLocalCache(::grpc::ServerContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response); virtual ::grpc::Status SetDiskCachePath(::grpc::ServerContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response);
// mail // mail
virtual ::grpc::Status SetIsDoHEnabled(::grpc::ServerContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response); virtual ::grpc::Status SetIsDoHEnabled(::grpc::ServerContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response);
virtual ::grpc::Status IsDoHEnabled(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response); virtual ::grpc::Status IsDoHEnabled(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response);
@ -2305,22 +2305,22 @@ class Bridge final {
} }
}; };
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_ChangeLocalCache : public BaseClass { class WithAsyncMethod_SetDiskCachePath : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithAsyncMethod_ChangeLocalCache() { WithAsyncMethod_SetDiskCachePath() {
::grpc::Service::MarkMethodAsync(37); ::grpc::Service::MarkMethodAsync(37);
} }
~WithAsyncMethod_ChangeLocalCache() override { ~WithAsyncMethod_SetDiskCachePath() override {
BaseClassMustBeDerivedFromService(this); BaseClassMustBeDerivedFromService(this);
} }
// disable synchronous version of this method // disable synchronous version of this method
::grpc::Status ChangeLocalCache(::grpc::ServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { ::grpc::Status SetDiskCachePath(::grpc::ServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) override {
abort(); abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
void RequestChangeLocalCache(::grpc::ServerContext* context, ::grpc::ChangeLocalCacheRequest* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { void RequestSetDiskCachePath(::grpc::ServerContext* context, ::google::protobuf::StringValue* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag);
} }
}; };
@ -2764,7 +2764,7 @@ class Bridge final {
::grpc::Service::RequestAsyncUnary(59, context, request, response, new_call_cq, notification_cq, tag); ::grpc::Service::RequestAsyncUnary(59, context, request, response, new_call_cq, notification_cq, tag);
} }
}; };
typedef WithAsyncMethod_CheckTokens<WithAsyncMethod_AddLogEntry<WithAsyncMethod_GuiReady<WithAsyncMethod_Quit<WithAsyncMethod_Restart<WithAsyncMethod_ShowOnStartup<WithAsyncMethod_ShowSplashScreen<WithAsyncMethod_IsFirstGuiStart<WithAsyncMethod_SetIsAutostartOn<WithAsyncMethod_IsAutostartOn<WithAsyncMethod_SetIsBetaEnabled<WithAsyncMethod_IsBetaEnabled<WithAsyncMethod_SetIsAllMailVisible<WithAsyncMethod_IsAllMailVisible<WithAsyncMethod_GoOs<WithAsyncMethod_TriggerReset<WithAsyncMethod_Version<WithAsyncMethod_LogsPath<WithAsyncMethod_LicensePath<WithAsyncMethod_ReleaseNotesPageLink<WithAsyncMethod_DependencyLicensesLink<WithAsyncMethod_LandingPageLink<WithAsyncMethod_SetColorSchemeName<WithAsyncMethod_ColorSchemeName<WithAsyncMethod_CurrentEmailClient<WithAsyncMethod_ReportBug<WithAsyncMethod_ForceLauncher<WithAsyncMethod_SetMainExecutable<WithAsyncMethod_Login<WithAsyncMethod_Login2FA<WithAsyncMethod_Login2Passwords<WithAsyncMethod_LoginAbort<WithAsyncMethod_CheckUpdate<WithAsyncMethod_InstallUpdate<WithAsyncMethod_SetIsAutomaticUpdateOn<WithAsyncMethod_IsAutomaticUpdateOn<WithAsyncMethod_DiskCachePath<WithAsyncMethod_ChangeLocalCache<WithAsyncMethod_SetIsDoHEnabled<WithAsyncMethod_IsDoHEnabled<WithAsyncMethod_SetUseSslForSmtp<WithAsyncMethod_UseSslForSmtp<WithAsyncMethod_SetUseSslForImap<WithAsyncMethod_UseSslForImap<WithAsyncMethod_Hostname<WithAsyncMethod_ImapPort<WithAsyncMethod_SmtpPort<WithAsyncMethod_ChangePorts<WithAsyncMethod_IsPortFree<WithAsyncMethod_AvailableKeychains<WithAsyncMethod_SetCurrentKeychain<WithAsyncMethod_CurrentKeychain<WithAsyncMethod_GetUserList<WithAsyncMethod_GetUser<WithAsyncMethod_SetUserSplitMode<WithAsyncMethod_LogoutUser<WithAsyncMethod_RemoveUser<WithAsyncMethod_ConfigureUserAppleMail<WithAsyncMethod_RunEventStream<WithAsyncMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService; typedef WithAsyncMethod_CheckTokens<WithAsyncMethod_AddLogEntry<WithAsyncMethod_GuiReady<WithAsyncMethod_Quit<WithAsyncMethod_Restart<WithAsyncMethod_ShowOnStartup<WithAsyncMethod_ShowSplashScreen<WithAsyncMethod_IsFirstGuiStart<WithAsyncMethod_SetIsAutostartOn<WithAsyncMethod_IsAutostartOn<WithAsyncMethod_SetIsBetaEnabled<WithAsyncMethod_IsBetaEnabled<WithAsyncMethod_SetIsAllMailVisible<WithAsyncMethod_IsAllMailVisible<WithAsyncMethod_GoOs<WithAsyncMethod_TriggerReset<WithAsyncMethod_Version<WithAsyncMethod_LogsPath<WithAsyncMethod_LicensePath<WithAsyncMethod_ReleaseNotesPageLink<WithAsyncMethod_DependencyLicensesLink<WithAsyncMethod_LandingPageLink<WithAsyncMethod_SetColorSchemeName<WithAsyncMethod_ColorSchemeName<WithAsyncMethod_CurrentEmailClient<WithAsyncMethod_ReportBug<WithAsyncMethod_ForceLauncher<WithAsyncMethod_SetMainExecutable<WithAsyncMethod_Login<WithAsyncMethod_Login2FA<WithAsyncMethod_Login2Passwords<WithAsyncMethod_LoginAbort<WithAsyncMethod_CheckUpdate<WithAsyncMethod_InstallUpdate<WithAsyncMethod_SetIsAutomaticUpdateOn<WithAsyncMethod_IsAutomaticUpdateOn<WithAsyncMethod_DiskCachePath<WithAsyncMethod_SetDiskCachePath<WithAsyncMethod_SetIsDoHEnabled<WithAsyncMethod_IsDoHEnabled<WithAsyncMethod_SetUseSslForSmtp<WithAsyncMethod_UseSslForSmtp<WithAsyncMethod_SetUseSslForImap<WithAsyncMethod_UseSslForImap<WithAsyncMethod_Hostname<WithAsyncMethod_ImapPort<WithAsyncMethod_SmtpPort<WithAsyncMethod_ChangePorts<WithAsyncMethod_IsPortFree<WithAsyncMethod_AvailableKeychains<WithAsyncMethod_SetCurrentKeychain<WithAsyncMethod_CurrentKeychain<WithAsyncMethod_GetUserList<WithAsyncMethod_GetUser<WithAsyncMethod_SetUserSplitMode<WithAsyncMethod_LogoutUser<WithAsyncMethod_RemoveUser<WithAsyncMethod_ConfigureUserAppleMail<WithAsyncMethod_RunEventStream<WithAsyncMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AsyncService;
template <class BaseClass> template <class BaseClass>
class WithCallbackMethod_CheckTokens : public BaseClass { class WithCallbackMethod_CheckTokens : public BaseClass {
private: private:
@ -3765,31 +3765,31 @@ class Bridge final {
::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::google::protobuf::StringValue* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::google::protobuf::StringValue* /*response*/) { return nullptr; }
}; };
template <class BaseClass> template <class BaseClass>
class WithCallbackMethod_ChangeLocalCache : public BaseClass { class WithCallbackMethod_SetDiskCachePath : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithCallbackMethod_ChangeLocalCache() { WithCallbackMethod_SetDiskCachePath() {
::grpc::Service::MarkMethodCallback(37, ::grpc::Service::MarkMethodCallback(37,
new ::grpc::internal::CallbackUnaryHandler< ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty>( new ::grpc::internal::CallbackUnaryHandler< ::google::protobuf::StringValue, ::google::protobuf::Empty>(
[this]( [this](
::grpc::CallbackServerContext* context, const ::grpc::ChangeLocalCacheRequest* request, ::google::protobuf::Empty* response) { return this->ChangeLocalCache(context, request, response); }));} ::grpc::CallbackServerContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::Empty* response) { return this->SetDiskCachePath(context, request, response); }));}
void SetMessageAllocatorFor_ChangeLocalCache( void SetMessageAllocatorFor_SetDiskCachePath(
::grpc::MessageAllocator< ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty>* allocator) { ::grpc::MessageAllocator< ::google::protobuf::StringValue, ::google::protobuf::Empty>* allocator) {
::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(37); ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(37);
static_cast<::grpc::internal::CallbackUnaryHandler< ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty>*>(handler) static_cast<::grpc::internal::CallbackUnaryHandler< ::google::protobuf::StringValue, ::google::protobuf::Empty>*>(handler)
->SetMessageAllocator(allocator); ->SetMessageAllocator(allocator);
} }
~WithCallbackMethod_ChangeLocalCache() override { ~WithCallbackMethod_SetDiskCachePath() override {
BaseClassMustBeDerivedFromService(this); BaseClassMustBeDerivedFromService(this);
} }
// disable synchronous version of this method // disable synchronous version of this method
::grpc::Status ChangeLocalCache(::grpc::ServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { ::grpc::Status SetDiskCachePath(::grpc::ServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) override {
abort(); abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
virtual ::grpc::ServerUnaryReactor* ChangeLocalCache( virtual ::grpc::ServerUnaryReactor* SetDiskCachePath(
::grpc::CallbackServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; }
}; };
template <class BaseClass> template <class BaseClass>
class WithCallbackMethod_SetIsDoHEnabled : public BaseClass { class WithCallbackMethod_SetIsDoHEnabled : public BaseClass {
@ -4380,7 +4380,7 @@ class Bridge final {
virtual ::grpc::ServerUnaryReactor* StopEventStream( virtual ::grpc::ServerUnaryReactor* StopEventStream(
::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::google::protobuf::Empty* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; }
}; };
typedef WithCallbackMethod_CheckTokens<WithCallbackMethod_AddLogEntry<WithCallbackMethod_GuiReady<WithCallbackMethod_Quit<WithCallbackMethod_Restart<WithCallbackMethod_ShowOnStartup<WithCallbackMethod_ShowSplashScreen<WithCallbackMethod_IsFirstGuiStart<WithCallbackMethod_SetIsAutostartOn<WithCallbackMethod_IsAutostartOn<WithCallbackMethod_SetIsBetaEnabled<WithCallbackMethod_IsBetaEnabled<WithCallbackMethod_SetIsAllMailVisible<WithCallbackMethod_IsAllMailVisible<WithCallbackMethod_GoOs<WithCallbackMethod_TriggerReset<WithCallbackMethod_Version<WithCallbackMethod_LogsPath<WithCallbackMethod_LicensePath<WithCallbackMethod_ReleaseNotesPageLink<WithCallbackMethod_DependencyLicensesLink<WithCallbackMethod_LandingPageLink<WithCallbackMethod_SetColorSchemeName<WithCallbackMethod_ColorSchemeName<WithCallbackMethod_CurrentEmailClient<WithCallbackMethod_ReportBug<WithCallbackMethod_ForceLauncher<WithCallbackMethod_SetMainExecutable<WithCallbackMethod_Login<WithCallbackMethod_Login2FA<WithCallbackMethod_Login2Passwords<WithCallbackMethod_LoginAbort<WithCallbackMethod_CheckUpdate<WithCallbackMethod_InstallUpdate<WithCallbackMethod_SetIsAutomaticUpdateOn<WithCallbackMethod_IsAutomaticUpdateOn<WithCallbackMethod_DiskCachePath<WithCallbackMethod_ChangeLocalCache<WithCallbackMethod_SetIsDoHEnabled<WithCallbackMethod_IsDoHEnabled<WithCallbackMethod_SetUseSslForSmtp<WithCallbackMethod_UseSslForSmtp<WithCallbackMethod_SetUseSslForImap<WithCallbackMethod_UseSslForImap<WithCallbackMethod_Hostname<WithCallbackMethod_ImapPort<WithCallbackMethod_SmtpPort<WithCallbackMethod_ChangePorts<WithCallbackMethod_IsPortFree<WithCallbackMethod_AvailableKeychains<WithCallbackMethod_SetCurrentKeychain<WithCallbackMethod_CurrentKeychain<WithCallbackMethod_GetUserList<WithCallbackMethod_GetUser<WithCallbackMethod_SetUserSplitMode<WithCallbackMethod_LogoutUser<WithCallbackMethod_RemoveUser<WithCallbackMethod_ConfigureUserAppleMail<WithCallbackMethod_RunEventStream<WithCallbackMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService; typedef WithCallbackMethod_CheckTokens<WithCallbackMethod_AddLogEntry<WithCallbackMethod_GuiReady<WithCallbackMethod_Quit<WithCallbackMethod_Restart<WithCallbackMethod_ShowOnStartup<WithCallbackMethod_ShowSplashScreen<WithCallbackMethod_IsFirstGuiStart<WithCallbackMethod_SetIsAutostartOn<WithCallbackMethod_IsAutostartOn<WithCallbackMethod_SetIsBetaEnabled<WithCallbackMethod_IsBetaEnabled<WithCallbackMethod_SetIsAllMailVisible<WithCallbackMethod_IsAllMailVisible<WithCallbackMethod_GoOs<WithCallbackMethod_TriggerReset<WithCallbackMethod_Version<WithCallbackMethod_LogsPath<WithCallbackMethod_LicensePath<WithCallbackMethod_ReleaseNotesPageLink<WithCallbackMethod_DependencyLicensesLink<WithCallbackMethod_LandingPageLink<WithCallbackMethod_SetColorSchemeName<WithCallbackMethod_ColorSchemeName<WithCallbackMethod_CurrentEmailClient<WithCallbackMethod_ReportBug<WithCallbackMethod_ForceLauncher<WithCallbackMethod_SetMainExecutable<WithCallbackMethod_Login<WithCallbackMethod_Login2FA<WithCallbackMethod_Login2Passwords<WithCallbackMethod_LoginAbort<WithCallbackMethod_CheckUpdate<WithCallbackMethod_InstallUpdate<WithCallbackMethod_SetIsAutomaticUpdateOn<WithCallbackMethod_IsAutomaticUpdateOn<WithCallbackMethod_DiskCachePath<WithCallbackMethod_SetDiskCachePath<WithCallbackMethod_SetIsDoHEnabled<WithCallbackMethod_IsDoHEnabled<WithCallbackMethod_SetUseSslForSmtp<WithCallbackMethod_UseSslForSmtp<WithCallbackMethod_SetUseSslForImap<WithCallbackMethod_UseSslForImap<WithCallbackMethod_Hostname<WithCallbackMethod_ImapPort<WithCallbackMethod_SmtpPort<WithCallbackMethod_ChangePorts<WithCallbackMethod_IsPortFree<WithCallbackMethod_AvailableKeychains<WithCallbackMethod_SetCurrentKeychain<WithCallbackMethod_CurrentKeychain<WithCallbackMethod_GetUserList<WithCallbackMethod_GetUser<WithCallbackMethod_SetUserSplitMode<WithCallbackMethod_LogoutUser<WithCallbackMethod_RemoveUser<WithCallbackMethod_ConfigureUserAppleMail<WithCallbackMethod_RunEventStream<WithCallbackMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > CallbackService;
typedef CallbackService ExperimentalCallbackService; typedef CallbackService ExperimentalCallbackService;
template <class BaseClass> template <class BaseClass>
class WithGenericMethod_CheckTokens : public BaseClass { class WithGenericMethod_CheckTokens : public BaseClass {
@ -5012,18 +5012,18 @@ class Bridge final {
} }
}; };
template <class BaseClass> template <class BaseClass>
class WithGenericMethod_ChangeLocalCache : public BaseClass { class WithGenericMethod_SetDiskCachePath : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithGenericMethod_ChangeLocalCache() { WithGenericMethod_SetDiskCachePath() {
::grpc::Service::MarkMethodGeneric(37); ::grpc::Service::MarkMethodGeneric(37);
} }
~WithGenericMethod_ChangeLocalCache() override { ~WithGenericMethod_SetDiskCachePath() override {
BaseClassMustBeDerivedFromService(this); BaseClassMustBeDerivedFromService(this);
} }
// disable synchronous version of this method // disable synchronous version of this method
::grpc::Status ChangeLocalCache(::grpc::ServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { ::grpc::Status SetDiskCachePath(::grpc::ServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) override {
abort(); abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
@ -6143,22 +6143,22 @@ class Bridge final {
} }
}; };
template <class BaseClass> template <class BaseClass>
class WithRawMethod_ChangeLocalCache : public BaseClass { class WithRawMethod_SetDiskCachePath : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawMethod_ChangeLocalCache() { WithRawMethod_SetDiskCachePath() {
::grpc::Service::MarkMethodRaw(37); ::grpc::Service::MarkMethodRaw(37);
} }
~WithRawMethod_ChangeLocalCache() override { ~WithRawMethod_SetDiskCachePath() override {
BaseClassMustBeDerivedFromService(this); BaseClassMustBeDerivedFromService(this);
} }
// disable synchronous version of this method // disable synchronous version of this method
::grpc::Status ChangeLocalCache(::grpc::ServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { ::grpc::Status SetDiskCachePath(::grpc::ServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) override {
abort(); abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
void RequestChangeLocalCache(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { void RequestSetDiskCachePath(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag); ::grpc::Service::RequestAsyncUnary(37, context, request, response, new_call_cq, notification_cq, tag);
} }
}; };
@ -7417,25 +7417,25 @@ class Bridge final {
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
}; };
template <class BaseClass> template <class BaseClass>
class WithRawCallbackMethod_ChangeLocalCache : public BaseClass { class WithRawCallbackMethod_SetDiskCachePath : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawCallbackMethod_ChangeLocalCache() { WithRawCallbackMethod_SetDiskCachePath() {
::grpc::Service::MarkMethodRawCallback(37, ::grpc::Service::MarkMethodRawCallback(37,
new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this]( [this](
::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ChangeLocalCache(context, request, response); })); ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SetDiskCachePath(context, request, response); }));
} }
~WithRawCallbackMethod_ChangeLocalCache() override { ~WithRawCallbackMethod_SetDiskCachePath() override {
BaseClassMustBeDerivedFromService(this); BaseClassMustBeDerivedFromService(this);
} }
// disable synchronous version of this method // disable synchronous version of this method
::grpc::Status ChangeLocalCache(::grpc::ServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { ::grpc::Status SetDiskCachePath(::grpc::ServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) override {
abort(); abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
virtual ::grpc::ServerUnaryReactor* ChangeLocalCache( virtual ::grpc::ServerUnaryReactor* SetDiskCachePath(
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
}; };
template <class BaseClass> template <class BaseClass>
@ -8922,31 +8922,31 @@ class Bridge final {
virtual ::grpc::Status StreamedDiskCachePath(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::google::protobuf::Empty,::google::protobuf::StringValue>* server_unary_streamer) = 0; virtual ::grpc::Status StreamedDiskCachePath(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::google::protobuf::Empty,::google::protobuf::StringValue>* server_unary_streamer) = 0;
}; };
template <class BaseClass> template <class BaseClass>
class WithStreamedUnaryMethod_ChangeLocalCache : public BaseClass { class WithStreamedUnaryMethod_SetDiskCachePath : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithStreamedUnaryMethod_ChangeLocalCache() { WithStreamedUnaryMethod_SetDiskCachePath() {
::grpc::Service::MarkMethodStreamed(37, ::grpc::Service::MarkMethodStreamed(37,
new ::grpc::internal::StreamedUnaryHandler< new ::grpc::internal::StreamedUnaryHandler<
::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty>( ::google::protobuf::StringValue, ::google::protobuf::Empty>(
[this](::grpc::ServerContext* context, [this](::grpc::ServerContext* context,
::grpc::ServerUnaryStreamer< ::grpc::ServerUnaryStreamer<
::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty>* streamer) { ::google::protobuf::StringValue, ::google::protobuf::Empty>* streamer) {
return this->StreamedChangeLocalCache(context, return this->StreamedSetDiskCachePath(context,
streamer); streamer);
})); }));
} }
~WithStreamedUnaryMethod_ChangeLocalCache() override { ~WithStreamedUnaryMethod_SetDiskCachePath() override {
BaseClassMustBeDerivedFromService(this); BaseClassMustBeDerivedFromService(this);
} }
// disable regular version of this method // disable regular version of this method
::grpc::Status ChangeLocalCache(::grpc::ServerContext* /*context*/, const ::grpc::ChangeLocalCacheRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { ::grpc::Status SetDiskCachePath(::grpc::ServerContext* /*context*/, const ::google::protobuf::StringValue* /*request*/, ::google::protobuf::Empty* /*response*/) override {
abort(); abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
// replace default version of method with streamed unary // replace default version of method with streamed unary
virtual ::grpc::Status StreamedChangeLocalCache(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::ChangeLocalCacheRequest,::google::protobuf::Empty>* server_unary_streamer) = 0; virtual ::grpc::Status StreamedSetDiskCachePath(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::google::protobuf::StringValue,::google::protobuf::Empty>* server_unary_streamer) = 0;
}; };
template <class BaseClass> template <class BaseClass>
class WithStreamedUnaryMethod_SetIsDoHEnabled : public BaseClass { class WithStreamedUnaryMethod_SetIsDoHEnabled : public BaseClass {
@ -9515,7 +9515,7 @@ class Bridge final {
// replace default version of method with streamed unary // replace default version of method with streamed unary
virtual ::grpc::Status StreamedStopEventStream(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::google::protobuf::Empty,::google::protobuf::Empty>* server_unary_streamer) = 0; virtual ::grpc::Status StreamedStopEventStream(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::google::protobuf::Empty,::google::protobuf::Empty>* server_unary_streamer) = 0;
}; };
typedef WithStreamedUnaryMethod_CheckTokens<WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_SetIsAllMailVisible<WithStreamedUnaryMethod_IsAllMailVisible<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_SetMainExecutable<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_ChangeLocalCache<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_SetUseSslForImap<WithStreamedUnaryMethod_UseSslForImap<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService; typedef WithStreamedUnaryMethod_CheckTokens<WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_SetIsAllMailVisible<WithStreamedUnaryMethod_IsAllMailVisible<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_SetMainExecutable<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_SetDiskCachePath<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_SetUseSslForImap<WithStreamedUnaryMethod_UseSslForImap<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedUnaryService;
template <class BaseClass> template <class BaseClass>
class WithSplitStreamingMethod_RunEventStream : public BaseClass { class WithSplitStreamingMethod_RunEventStream : public BaseClass {
private: private:
@ -9544,7 +9544,7 @@ class Bridge final {
virtual ::grpc::Status StreamedRunEventStream(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::grpc::EventStreamRequest,::grpc::StreamEvent>* server_split_streamer) = 0; virtual ::grpc::Status StreamedRunEventStream(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::grpc::EventStreamRequest,::grpc::StreamEvent>* server_split_streamer) = 0;
}; };
typedef WithSplitStreamingMethod_RunEventStream<Service > SplitStreamedService; typedef WithSplitStreamingMethod_RunEventStream<Service > SplitStreamedService;
typedef WithStreamedUnaryMethod_CheckTokens<WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_SetIsAllMailVisible<WithStreamedUnaryMethod_IsAllMailVisible<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_SetMainExecutable<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_ChangeLocalCache<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_SetUseSslForImap<WithStreamedUnaryMethod_UseSslForImap<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithSplitStreamingMethod_RunEventStream<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService; typedef WithStreamedUnaryMethod_CheckTokens<WithStreamedUnaryMethod_AddLogEntry<WithStreamedUnaryMethod_GuiReady<WithStreamedUnaryMethod_Quit<WithStreamedUnaryMethod_Restart<WithStreamedUnaryMethod_ShowOnStartup<WithStreamedUnaryMethod_ShowSplashScreen<WithStreamedUnaryMethod_IsFirstGuiStart<WithStreamedUnaryMethod_SetIsAutostartOn<WithStreamedUnaryMethod_IsAutostartOn<WithStreamedUnaryMethod_SetIsBetaEnabled<WithStreamedUnaryMethod_IsBetaEnabled<WithStreamedUnaryMethod_SetIsAllMailVisible<WithStreamedUnaryMethod_IsAllMailVisible<WithStreamedUnaryMethod_GoOs<WithStreamedUnaryMethod_TriggerReset<WithStreamedUnaryMethod_Version<WithStreamedUnaryMethod_LogsPath<WithStreamedUnaryMethod_LicensePath<WithStreamedUnaryMethod_ReleaseNotesPageLink<WithStreamedUnaryMethod_DependencyLicensesLink<WithStreamedUnaryMethod_LandingPageLink<WithStreamedUnaryMethod_SetColorSchemeName<WithStreamedUnaryMethod_ColorSchemeName<WithStreamedUnaryMethod_CurrentEmailClient<WithStreamedUnaryMethod_ReportBug<WithStreamedUnaryMethod_ForceLauncher<WithStreamedUnaryMethod_SetMainExecutable<WithStreamedUnaryMethod_Login<WithStreamedUnaryMethod_Login2FA<WithStreamedUnaryMethod_Login2Passwords<WithStreamedUnaryMethod_LoginAbort<WithStreamedUnaryMethod_CheckUpdate<WithStreamedUnaryMethod_InstallUpdate<WithStreamedUnaryMethod_SetIsAutomaticUpdateOn<WithStreamedUnaryMethod_IsAutomaticUpdateOn<WithStreamedUnaryMethod_DiskCachePath<WithStreamedUnaryMethod_SetDiskCachePath<WithStreamedUnaryMethod_SetIsDoHEnabled<WithStreamedUnaryMethod_IsDoHEnabled<WithStreamedUnaryMethod_SetUseSslForSmtp<WithStreamedUnaryMethod_UseSslForSmtp<WithStreamedUnaryMethod_SetUseSslForImap<WithStreamedUnaryMethod_UseSslForImap<WithStreamedUnaryMethod_Hostname<WithStreamedUnaryMethod_ImapPort<WithStreamedUnaryMethod_SmtpPort<WithStreamedUnaryMethod_ChangePorts<WithStreamedUnaryMethod_IsPortFree<WithStreamedUnaryMethod_AvailableKeychains<WithStreamedUnaryMethod_SetCurrentKeychain<WithStreamedUnaryMethod_CurrentKeychain<WithStreamedUnaryMethod_GetUserList<WithStreamedUnaryMethod_GetUser<WithStreamedUnaryMethod_SetUserSplitMode<WithStreamedUnaryMethod_LogoutUser<WithStreamedUnaryMethod_RemoveUser<WithStreamedUnaryMethod_ConfigureUserAppleMail<WithSplitStreamingMethod_RunEventStream<WithStreamedUnaryMethod_StopEventStream<Service > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > StreamedService;
}; };
} // namespace grpc } // namespace grpc

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -73,7 +73,7 @@ service Bridge {
// cache // cache
rpc DiskCachePath(google.protobuf.Empty) returns (google.protobuf.StringValue); rpc DiskCachePath(google.protobuf.Empty) returns (google.protobuf.StringValue);
rpc ChangeLocalCache(ChangeLocalCacheRequest) returns (google.protobuf.Empty); rpc SetDiskCachePath(google.protobuf.StringValue) returns (google.protobuf.Empty);
// mail // mail
rpc SetIsDoHEnabled(google.protobuf.BoolValue) returns (google.protobuf.Empty); rpc SetIsDoHEnabled(google.protobuf.BoolValue) returns (google.protobuf.Empty);
@ -157,13 +157,6 @@ message LoginAbortRequest {
string username = 1; string username = 1;
} }
//**********************************************************
// Cache on disk related message
//**********************************************************
message ChangeLocalCacheRequest {
string diskCachePath = 2;
}
//********************************************************** //**********************************************************
// Port related message // Port related message
//********************************************************** //**********************************************************
@ -222,7 +215,7 @@ message StreamEvent {
AppEvent app = 1; AppEvent app = 1;
LoginEvent login = 2; LoginEvent login = 2;
UpdateEvent update = 3; UpdateEvent update = 3;
CacheEvent cache = 4; DiskCacheEvent cache = 4;
MailSettingsEvent mailSettings = 5; MailSettingsEvent mailSettings = 5;
KeychainEvent keychain = 6; KeychainEvent keychain = 6;
MailEvent mail = 7; MailEvent mail = 7;
@ -338,38 +331,35 @@ message UpdateCheckFinished {}
message UpdateVersionChanged {} message UpdateVersionChanged {}
//********************************************************** //**********************************************************
// Cache on disk related events // Cache on disk related events
//********************************************************** //**********************************************************
message CacheEvent { message DiskCacheEvent {
oneof event { oneof event {
CacheErrorEvent error = 1; DiskCacheErrorEvent error = 1;
CacheLocationChangeSuccessEvent locationChangedSuccess = 2; DiskCachePathChangedEvent pathChanged = 2;
ChangeLocalCacheFinishedEvent changeLocalCacheFinished = 3; DiskCachePathChangeFinishedEvent pathChangeFinished = 3;
DiskCachePathChanged diskCachePathChanged = 5;
} }
} }
enum CacheErrorType { enum DiskCacheErrorType {
CACHE_UNAVAILABLE_ERROR = 0; DISK_CACHE_UNAVAILABLE_ERROR = 0;
CACHE_CANT_MOVE_ERROR = 1; CANT_MOVE_DISK_CACHE_ERROR = 1;
DISK_FULL = 2; DISK_FULL_ERROR = 2;
}; };
message CacheErrorEvent { message DiskCacheErrorEvent {
CacheErrorType type = 1; DiskCacheErrorType type = 1;
} }
message CacheLocationChangeSuccessEvent {}; message DiskCachePathChangedEvent {
message ChangeLocalCacheFinishedEvent {
bool willRestart = 1;
};
message DiskCachePathChanged {
string path = 1; string path = 1;
} }
message DiskCachePathChangeFinishedEvent {}
//********************************************************** //**********************************************************
// Mail settings related events // Mail settings related events

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4 // - protoc v3.21.3
// source: bridge.proto // source: bridge.proto
package grpc package grpc
@ -66,7 +66,7 @@ type BridgeClient interface {
IsAutomaticUpdateOn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) IsAutomaticUpdateOn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
// cache // cache
DiskCachePath(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) DiskCachePath(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
ChangeLocalCache(ctx context.Context, in *ChangeLocalCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) SetDiskCachePath(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
// mail // mail
SetIsDoHEnabled(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) SetIsDoHEnabled(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
IsDoHEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) IsDoHEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
@ -436,9 +436,9 @@ func (c *bridgeClient) DiskCachePath(ctx context.Context, in *emptypb.Empty, opt
return out, nil return out, nil
} }
func (c *bridgeClient) ChangeLocalCache(ctx context.Context, in *ChangeLocalCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *bridgeClient) SetDiskCachePath(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.Bridge/ChangeLocalCache", in, out, opts...) err := c.cc.Invoke(ctx, "/grpc.Bridge/SetDiskCachePath", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -711,7 +711,7 @@ type BridgeServer interface {
IsAutomaticUpdateOn(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error) IsAutomaticUpdateOn(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
// cache // cache
DiskCachePath(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) DiskCachePath(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
ChangeLocalCache(context.Context, *ChangeLocalCacheRequest) (*emptypb.Empty, error) SetDiskCachePath(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
// mail // mail
SetIsDoHEnabled(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error) SetIsDoHEnabled(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error)
IsDoHEnabled(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error) IsDoHEnabled(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
@ -856,8 +856,8 @@ func (UnimplementedBridgeServer) IsAutomaticUpdateOn(context.Context, *emptypb.E
func (UnimplementedBridgeServer) DiskCachePath(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) { func (UnimplementedBridgeServer) DiskCachePath(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method DiskCachePath not implemented") return nil, status.Errorf(codes.Unimplemented, "method DiskCachePath not implemented")
} }
func (UnimplementedBridgeServer) ChangeLocalCache(context.Context, *ChangeLocalCacheRequest) (*emptypb.Empty, error) { func (UnimplementedBridgeServer) SetDiskCachePath(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ChangeLocalCache not implemented") return nil, status.Errorf(codes.Unimplemented, "method SetDiskCachePath not implemented")
} }
func (UnimplementedBridgeServer) SetIsDoHEnabled(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error) { func (UnimplementedBridgeServer) SetIsDoHEnabled(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetIsDoHEnabled not implemented") return nil, status.Errorf(codes.Unimplemented, "method SetIsDoHEnabled not implemented")
@ -1604,20 +1604,20 @@ func _Bridge_DiskCachePath_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Bridge_ChangeLocalCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Bridge_SetDiskCachePath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ChangeLocalCacheRequest) in := new(wrapperspb.StringValue)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(BridgeServer).ChangeLocalCache(ctx, in) return srv.(BridgeServer).SetDiskCachePath(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.Bridge/ChangeLocalCache", FullMethod: "/grpc.Bridge/SetDiskCachePath",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).ChangeLocalCache(ctx, req.(*ChangeLocalCacheRequest)) return srv.(BridgeServer).SetDiskCachePath(ctx, req.(*wrapperspb.StringValue))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -2177,8 +2177,8 @@ var Bridge_ServiceDesc = grpc.ServiceDesc{
Handler: _Bridge_DiskCachePath_Handler, Handler: _Bridge_DiskCachePath_Handler,
}, },
{ {
MethodName: "ChangeLocalCache", MethodName: "SetDiskCachePath",
Handler: _Bridge_ChangeLocalCache_Handler, Handler: _Bridge_SetDiskCachePath_Handler,
}, },
{ {
MethodName: "SetIsDoHEnabled", MethodName: "SetIsDoHEnabled",

View File

@ -97,22 +97,16 @@ func NewUpdateVersionChangedEvent() *StreamEvent {
return updateEvent(&UpdateEvent{Event: &UpdateEvent_VersionChanged{VersionChanged: &UpdateVersionChanged{}}}) return updateEvent(&UpdateEvent{Event: &UpdateEvent_VersionChanged{VersionChanged: &UpdateVersionChanged{}}})
} }
func NewCacheErrorEvent(err CacheErrorType) *StreamEvent { func NewDiskCacheErrorEvent(err DiskCacheErrorType) *StreamEvent {
return cacheEvent(&CacheEvent{Event: &CacheEvent_Error{Error: &CacheErrorEvent{Type: err}}}) return cacheEvent(&DiskCacheEvent{Event: &DiskCacheEvent_Error{Error: &DiskCacheErrorEvent{Type: err}}})
} }
func NewCacheLocationChangeSuccessEvent() *StreamEvent { func NewDiskCachePathChangedEvent(path string) *StreamEvent {
return cacheEvent(&CacheEvent{Event: &CacheEvent_LocationChangedSuccess{LocationChangedSuccess: &CacheLocationChangeSuccessEvent{}}}) return cacheEvent(&DiskCacheEvent{Event: &DiskCacheEvent_PathChanged{PathChanged: &DiskCachePathChangedEvent{Path: path}}})
} }
func NewCacheChangeLocalCacheFinishedEvent(willRestart bool) *StreamEvent { func NewDiskCachePathChangeFinishedEvent() *StreamEvent {
return cacheEvent(&CacheEvent{Event: &CacheEvent_ChangeLocalCacheFinished{ return cacheEvent(&DiskCacheEvent{Event: &DiskCacheEvent_PathChangeFinished{PathChangeFinished: &DiskCachePathChangeFinishedEvent{}}})
ChangeLocalCacheFinished: &ChangeLocalCacheFinishedEvent{WillRestart: willRestart},
}})
}
func NewDiskCachePathChanged(path string) *StreamEvent {
return cacheEvent(&CacheEvent{Event: &CacheEvent_DiskCachePathChanged{DiskCachePathChanged: &DiskCachePathChanged{Path: path}}})
} }
func NewMailSettingsErrorEvent(err MailSettingsErrorType) *StreamEvent { func NewMailSettingsErrorEvent(err MailSettingsErrorType) *StreamEvent {
@ -185,7 +179,7 @@ func updateEvent(event *UpdateEvent) *StreamEvent {
return &StreamEvent{Event: &StreamEvent_Update{Update: event}} return &StreamEvent{Event: &StreamEvent_Update{Update: event}}
} }
func cacheEvent(event *CacheEvent) *StreamEvent { func cacheEvent(event *DiskCacheEvent) *StreamEvent {
return &StreamEvent{Event: &StreamEvent_Cache{Cache: event}} return &StreamEvent{Event: &StreamEvent_Cache{Cache: event}}
} }

View File

@ -249,7 +249,7 @@ func (s *Service) LicensePath(ctx context.Context, _ *emptypb.Empty) (*wrappersp
return wrapperspb.String(s.bridge.GetLicenseFilePath()), nil return wrapperspb.String(s.bridge.GetLicenseFilePath()), nil
} }
func (s *Service) DependencyLicensesLink(ctx context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error) { func (s *Service) DependencyLicensesLink(_ context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error) {
return wrapperspb.String(s.bridge.GetDependencyLicensesLink()), nil return wrapperspb.String(s.bridge.GetDependencyLicensesLink()), nil
} }
@ -257,7 +257,7 @@ func (s *Service) ReleaseNotesPageLink(ctx context.Context, _ *emptypb.Empty) (*
return wrapperspb.String(s.newVersionInfo.ReleaseNotesPage), nil return wrapperspb.String(s.newVersionInfo.ReleaseNotesPage), nil
} }
func (s *Service) LandingPageLink(ctx context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error) { func (s *Service) LandingPageLink(_ context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error) {
return wrapperspb.String(s.newVersionInfo.LandingPage), nil return wrapperspb.String(s.newVersionInfo.LandingPage), nil
} }
@ -535,30 +535,30 @@ func (s *Service) DiskCachePath(ctx context.Context, _ *emptypb.Empty) (*wrapper
return wrapperspb.String(s.bridge.GetGluonDir()), nil return wrapperspb.String(s.bridge.GetGluonDir()), nil
} }
func (s *Service) ChangeLocalCache(ctx context.Context, change *ChangeLocalCacheRequest) (*emptypb.Empty, error) { func (s *Service) SetDiskCachePath(ctx context.Context, newPath *wrapperspb.StringValue) (*emptypb.Empty, error) {
s.log.WithField("diskCachePath", change.DiskCachePath).Debug("DiskCachePath") s.log.WithField("path", newPath.Value).Debug("setDiskCachePath")
defer func() { go func() {
_ = s.SendEvent(NewCacheChangeLocalCacheFinishedEvent(false)) defer func() {
}() _ = s.SendEvent(NewDiskCachePathChangeFinishedEvent())
}()
path := change.DiskCachePath path := newPath.Value
//goland:noinspection GoBoolExpressions //goland:noinspection GoBoolExpressions
if (runtime.GOOS == "windows") && (path[0] == '/') { if (runtime.GOOS == "windows") && (path[0] == '/') {
path = path[1:] path = path[1:]
}
if path != s.bridge.GetGluonDir() {
if err := s.bridge.SetGluonDir(ctx, path); err != nil {
s.log.WithError(err).Error("The local cache location could not be changed.")
_ = s.SendEvent(NewCacheErrorEvent(CacheErrorType_CACHE_CANT_MOVE_ERROR))
return &emptypb.Empty{}, nil
} }
_ = s.SendEvent(NewDiskCachePathChanged(s.bridge.GetGluonDir())) if path != s.bridge.GetGluonDir() {
} if err := s.bridge.SetGluonDir(context.Background(), path); err != nil {
s.log.WithError(err).Error("The local cache location could not be changed.")
_ = s.SendEvent(NewDiskCacheErrorEvent(DiskCacheErrorType_CANT_MOVE_DISK_CACHE_ERROR))
return
}
_ = s.SendEvent(NewCacheLocationChangeSuccessEvent()) _ = s.SendEvent(NewDiskCachePathChangedEvent(s.bridge.GetGluonDir()))
}
}()
return &emptypb.Empty{}, nil return &emptypb.Empty{}, nil
} }

View File

@ -75,7 +75,7 @@ func (s *Service) RunEventStream(request *EventStreamRequest, server Bridge_RunE
} }
// StopEventStream stops the event stream. // StopEventStream stops the event stream.
func (s *Service) StopEventStream(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { func (s *Service) StopEventStream(_ context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) {
if s.eventStreamCh == nil { if s.eventStreamCh == nil {
return nil, status.Errorf(codes.NotFound, "The service is not streaming") return nil, status.Errorf(codes.NotFound, "The service is not streaming")
} }
@ -127,10 +127,10 @@ func (s *Service) StartEventTest() error { //nolint:funlen
NewUpdateCheckFinishedEvent(), NewUpdateCheckFinishedEvent(),
// cache // cache
NewCacheErrorEvent(CacheErrorType_CACHE_UNAVAILABLE_ERROR),
NewCacheLocationChangeSuccessEvent(), NewDiskCacheErrorEvent(DiskCacheErrorType_CANT_MOVE_DISK_CACHE_ERROR),
NewCacheChangeLocalCacheFinishedEvent(true), NewDiskCachePathChangedEvent("/dummy/path/"),
NewDiskCachePathChanged("/dummy/path"), NewDiskCachePathChangeFinishedEvent(),
// mail settings // mail settings
NewMailSettingsErrorEvent(MailSettingsErrorType_IMAP_PORT_ISSUE), NewMailSettingsErrorEvent(MailSettingsErrorType_IMAP_PORT_ISSUE),