GODT-1846: remove restart cues, implement restart-less behaviour.

Other: fixed case issue in SSL member function names.
Other: removed 'restart' mention in SMTP and IMAP SSL settings.
GODT-1846: modified gRPC server to introduce ConnectionMode settings.
GODT-1846: implemented connection mode handling in bridge-gui.
GODT-1846: implemented error reporting in bridge-gui for connection mode.
Other: gathered all IMAP/SMTP server settings.
GODT-1846: wired IMAP/SMTP port change errors.
Other: Renamed some error events and signals.
Other: Fixed crash in IMAP restart when not started.
Other: dismiss port error notifications before changing ports.
Other: misc. fixes.
This commit is contained in:
Xavier Michelon
2022-11-20 09:58:20 +01:00
committed by James Houlahan
parent 46c0463e43
commit 1f0312573a
25 changed files with 3249 additions and 4244 deletions

View File

@ -71,7 +71,13 @@ void QMLBackend::init(GRPCConfig const &serviceConfig)
app().grpc().goos(goos_);
app().grpc().logsPath(logsPath_);
app().grpc().licensePath(licensePath_);
bool sslForIMAP = false, sslForSMTP = false;
int imapPort = 0, smtpPort = 0;
app().grpc().mailServerSettings(imapPort, smtpPort, sslForIMAP, sslForSMTP);
this->setIMAPPort(imapPort);
this->setSMTPPort(smtpPort);
this->setUseSSLForIMAP(sslForIMAP);
this->setUseSSLForSMTP(sslForSMTP);
this->retrieveUserList();
}
@ -140,10 +146,14 @@ void QMLBackend::connectGrpcEvents()
connect(client, &GRPCClient::updateVersionChanged, this, &QMLBackend::onVersionChanged);
// mail settings events
connect(client, &GRPCClient::portIssueIMAP, this, &QMLBackend::portIssueIMAP);
connect(client, &GRPCClient::portIssueSMTP, this, &QMLBackend::portIssueSMTP);
connect(client, &GRPCClient::toggleUseSSLFinished, this, &QMLBackend::toggleUseSSLFinished);
connect(client, &GRPCClient::changePortFinished, this, &QMLBackend::changePortFinished);
connect(client, &GRPCClient::imapPortStartupError, this, &QMLBackend::imapPortStartupError);
connect(client, &GRPCClient::smtpPortStartupError, this, &QMLBackend::smtpPortStartupError);
connect(client, &GRPCClient::imapPortChangeError, this, &QMLBackend::imapPortChangeError);
connect(client, &GRPCClient::smtpPortChangeError, this, &QMLBackend::smtpPortChangeError);
connect(client, &GRPCClient::imapConnectionModeChangeError, this, &QMLBackend::imapConnectionModeChangeError);
connect(client, &GRPCClient::smtpConnectionModeChangeError, this, &QMLBackend::smtpConnectionModeChangeError);
connect(client, &GRPCClient::mailServerSettingsChanged, this, &QMLBackend::onMailServerSettingsChanged);
connect(client, &GRPCClient::changeMailServerSettingsFinished, this, &QMLBackend::changeMailServerSettingsFinished);
// keychain events
connect(client, &GRPCClient::changeKeychainFinished, this, &QMLBackend::changeKeychainFinished);
@ -320,36 +330,113 @@ void QMLBackend::setDiskCachePath(QUrl const &path) const
app().grpc().setDiskCachePath(path);
}
//****************************************************************************************************************************************************
/// \param[in] makeItActive Should SSL for SMTP be enabled.
//****************************************************************************************************************************************************
void QMLBackend::toggleUseSSLforSMTP(bool makeItActive)
{
// if call succeed, app will restart. No need to emit a value change signal, because it will trigger a read-back via gRPC that will fail.
emit hideMainWindow();
app().grpc().setUseSSLForSMTP(makeItActive);
}
//****************************************************************************************************************************************************
/// \param[in] makeItActive Should SSL for IMAP be enabled.
/// \return The IMAP port.
//****************************************************************************************************************************************************
void QMLBackend::toggleUseSSLforIMAP(bool makeItActive)
int QMLBackend::imapPort() const
{
// if call succeed, app will restart. No need to emit a value change signal, because it will trigger a read-back via gRPC that will fail.
emit hideMainWindow();
app().grpc().setUseSSLForIMAP(makeItActive);
return imapPort_;
}
//****************************************************************************************************************************************************
/// \param[in] port The IMAP port.
//****************************************************************************************************************************************************
void QMLBackend::setIMAPPort(int port)
{
if (port == imapPort_)
return;
imapPort_ = port;
emit imapPortChanged(port);
}
//****************************************************************************************************************************************************
/// \return The SMTP port.
//****************************************************************************************************************************************************
int QMLBackend::smtpPort() const
{
return smtpPort_;
}
//****************************************************************************************************************************************************
/// \param[in] port The SMTP port.
//****************************************************************************************************************************************************
void QMLBackend::setSMTPPort(int port)
{
if (port == smtpPort_)
return;
smtpPort_ = port;
emit smtpPortChanged(port);
}
//****************************************************************************************************************************************************
/// \return The value for the 'Use SSL for IMAP' property.
//****************************************************************************************************************************************************
bool QMLBackend::useSSLForIMAP() const
{
return useSSLForIMAP_;
}
//****************************************************************************************************************************************************
/// \param[in] value The value for the 'Use SSL for IMAP' property.
//****************************************************************************************************************************************************
void QMLBackend::setUseSSLForIMAP(bool value)
{
if (value == useSSLForIMAP_)
return;
useSSLForIMAP_ = value;
emit useSSLForIMAPChanged(value);
}
//****************************************************************************************************************************************************
/// \return The value for the 'Use SSL for SMTP' property.
//****************************************************************************************************************************************************
bool QMLBackend::useSSLForSMTP() const
{
return useSSLForSMTP_;
}
//****************************************************************************************************************************************************
/// \param[in] value The value for the 'Use SSL for SMTP' property.
//****************************************************************************************************************************************************
void QMLBackend::setUseSSLForSMTP(bool value)
{
if (value == useSSLForSMTP_)
return;
useSSLForSMTP_ = value;
emit useSSLForSMTPChanged(value);
}
//****************************************************************************************************************************************************
/// \param[in] imapPort The IMAP port.
/// \param[in] smtpPort The SMTP port.
/// \param[in] useSSLForIMAP The value for the 'Use SSL for IMAP' property
/// \param[in] useSSLForSMTP The value for the 'Use SSL for SMTP' property
//****************************************************************************************************************************************************
void QMLBackend::changePorts(int imapPort, int smtpPort)
void QMLBackend::setMailServerSettings(int imapPort, int smtpPort, bool useSSLForIMAP, bool useSSLForSMTP)
{
// if call succeed, app will restart. No need to emit a value change signal, because it will trigger a read-back via gRPC that will fail.
emit hideMainWindow();
app().grpc().changePorts(imapPort, smtpPort);
app().grpc().setMailServerSettings(imapPort, smtpPort, useSSLForIMAP, useSSLForSMTP);
}
//****************************************************************************************************************************************************
/// \param[in] useSSLForIMAP The value for the 'Use SSL for IMAP' property
/// \param[in] useSSLForSMTP The value for the 'Use SSL for SMTP' property
//****************************************************************************************************************************************************
void QMLBackend::onMailServerSettingsChanged(int imapPort, int smtpPort, bool useSSLForIMAP, bool useSSLForSMTP)
{
this->setIMAPPort(imapPort);
this->setSMTPPort(smtpPort);
this->setUseSSLForIMAP(useSSLForIMAP);
this->setUseSSLForSMTP(useSSLForSMTP);
}

View File

@ -69,10 +69,10 @@ public: // Qt/QML properties. Note that the NOTIFY-er signal is required even fo
Q_PROPERTY(bool isAllMailVisible READ isAllMailVisible NOTIFY isAllMailVisibleChanged) // _ bool `property:"isAllMailVisible"`
Q_PROPERTY(QString colorSchemeName READ colorSchemeName NOTIFY colorSchemeNameChanged) // _ string `property:"colorSchemeName"`
Q_PROPERTY(QUrl diskCachePath READ diskCachePath NOTIFY diskCachePathChanged) // _ core.QUrl `property:"diskCachePath"`
Q_PROPERTY(bool useSSLforSMTP READ useSSLForSMTP NOTIFY useSSLforSMTPChanged) // _ bool `property:"useSSLforSMTP"`
Q_PROPERTY(bool useSSLforIMAP READ useSSLForIMAP NOTIFY useSSLforIMAPChanged) // _ bool `property:"useSSLforIMAP"`
Q_PROPERTY(int portIMAP READ portIMAP NOTIFY portIMAPChanged) // _ int `property:"portIMAP"`
Q_PROPERTY(int portSMTP READ portSMTP NOTIFY portSMTPChanged) // _ int `property:"portSMTP"`
Q_PROPERTY(bool useSSLForIMAP READ useSSLForIMAP WRITE setUseSSLForIMAP NOTIFY useSSLForIMAPChanged) // _ bool `property:"useSSLForSMTP"`
Q_PROPERTY(bool useSSLForSMTP READ useSSLForSMTP WRITE setUseSSLForSMTP NOTIFY useSSLForSMTPChanged) // _ bool `property:"useSSLForSMTP"`
Q_PROPERTY(int imapPort READ imapPort WRITE setIMAPPort NOTIFY imapPortChanged)
Q_PROPERTY(int smtpPort READ smtpPort WRITE setSMTPPort NOTIFY smtpPortChanged)
Q_PROPERTY(bool isDoHEnabled READ isDoHEnabled NOTIFY isDoHEnabledChanged) // _ bool `property:"isDoHEnabled"`
Q_PROPERTY(bool isFirstGUIStart READ isFirstGUIStart) // _ bool `property:"isFirstGUIStart"`
Q_PROPERTY(bool isAutomaticUpdateOn READ isAutomaticUpdateOn NOTIFY isAutomaticUpdateOnChanged) // _ bool `property:"isAutomaticUpdateOn"`
@ -101,10 +101,14 @@ public: // Qt/QML properties. Note that the NOTIFY-er signal is required even fo
bool isAllMailVisible() const { bool v; app().grpc().isAllMailVisible(v); return v; }
QString colorSchemeName() const { QString name; app().grpc().colorSchemeName(name); return name; }
QUrl diskCachePath() const { QUrl path; app().grpc().diskCachePath(path); return path; }
bool useSSLForSMTP() const{ bool useSSL; app().grpc().useSSLForSMTP(useSSL); return useSSL; }
bool useSSLForIMAP() const{ bool useSSL; app().grpc().useSSLForIMAP(useSSL); return useSSL; }
int portIMAP() const { int port; app().grpc().portIMAP(port); return port; }
int portSMTP() const { int port; app().grpc().portSMTP(port); return port; }
bool useSSLForIMAP() const;
void setUseSSLForIMAP(bool value);
bool useSSLForSMTP() const;
void setUseSSLForSMTP(bool value);
int imapPort() const;
void setIMAPPort(int port);
int smtpPort() const;
void setSMTPPort(int port);
bool isDoHEnabled() const { bool isEnabled; app().grpc().isDoHEnabled(isEnabled); return isEnabled;}
bool isFirstGUIStart() const { bool v; app().grpc().isFirstGUIStart(v); return v; };
bool isAutomaticUpdateOn() const { bool isOn = false; app().grpc().isAutomaticUpdateOn(isOn); return isOn; }
@ -119,8 +123,10 @@ signals: // Signal used by the Qt property system. Many of them are unused but r
void showOnStartupChanged(bool value);
void goosChanged(QString const &value);
void diskCachePathChanged(QUrl const &url);
void useSSLforSMTPChanged(bool value);
void useSSLforIMAPChanged(bool value);
void imapPortChanged(int port);
void smtpPortChanged(int port);
void useSSLForSMTPChanged(bool value);
void useSSLForIMAPChanged(bool value);
void isAutomaticUpdateOnChanged(bool value);
void isBetaEnabledChanged(bool value);
void isAllMailVisibleChanged(bool value);
@ -139,8 +145,6 @@ signals: // Signal used by the Qt property system. Many of them are unused but r
void availableKeychainChanged(QStringList const &keychains);
void hostnameChanged(QString const &hostname);
void isAutostartOnChanged(bool value);
void portIMAPChanged(int port);
void portSMTPChanged(int port);
void usersChanged(UserList* users);
void dockIconVisibleChanged(bool value);
@ -154,9 +158,6 @@ public slots: // slot for signals received from QML -> To be forwarded to Bridge
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 loginAbort(QString const& username){ app().grpc().loginAbort(username);} // _ func(username string) `slot:"loginAbort"`
void toggleUseSSLforSMTP(bool makeItActive); // _ func(makeItActive bool) `slot:"toggleUseSSLforSMTP"`
void toggleUseSSLforIMAP(bool makeItActive); // _ func(makeItActive bool) `slot:"toggleUseSSLforIMAP"`
void changePorts(int imapPort, int smtpPort); // _ func(imapPort, smtpPort int) `slot:"changePorts"`
void toggleDoH(bool active); // _ func(makeItActive bool) `slot:"toggleDoH"`
void toggleAutomaticUpdate(bool makeItActive); // _ func(makeItActive bool) `slot:"toggleAutomaticUpdate"`
void updateCurrentMailClient() { emit currentEmailClientChanged(currentEmailClient()); } // _ func() `slot:"updateCurrentMailClient"`
@ -172,6 +173,10 @@ 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"`
void onResetFinished(); // _ func() `slot:"onResetFinished"`
void onVersionChanged(); // _ func() `slot:"onVersionChanged"`
void setMailServerSettings(int imapPort, int smtpPort, bool useSSLForIMAP, bool useSSLForSMTP); ///< Forwards to connection mode change request from QML to gRPC
public slots: // slot for signals received from gRPC that need transformation instead of simple forwarding
void onMailServerSettingsChanged(int imapPort, int smtpPort, bool useSSLForIMAP, bool useSSLForSMTP); ///< Slot for the ConnectionModeChanged gRPC event.
signals: // Signals received from the Go backend, to be forwarded to QML
void toggleAutostartFinished(); // _ func() `signal:"toggleAutostartFinished"`
@ -199,10 +204,13 @@ signals: // Signals received from the Go backend, to be forwarded to QML
void updateSilentError(); // _ func() `signal:"updateSilentError"`
void updateIsLatestVersion(); // _ func() `signal:"updateIsLatestVersion"`
void checkUpdatesFinished(); // _ func() `signal:"checkUpdatesFinished"`
void toggleUseSSLFinished(); // _ func() `signal:"toggleUseSSLFinished"`
void changePortFinished(); // _ func() `signal:"changePortFinished"`
void portIssueIMAP(); // _ func() `signal:"portIssueIMAP"`
void portIssueSMTP(); // _ func() `signal:"portIssueSMTP"`
void imapPortStartupError();
void smtpPortStartupError();
void imapPortChangeError();
void smtpPortChangeError();
void imapConnectionModeChangeError();
void smtpConnectionModeChangeError();
void changeMailServerSettingsFinished();
void changeKeychainFinished(); // _ func() `signal:"changeKeychainFinished"`
void notifyHasNoKeychain(); // _ func() `signal:"notifyHasNoKeychain"`
void notifyRebuildKeychain(); // _ func() `signal:"notifyRebuildKeychain"`
@ -231,6 +239,10 @@ private: // data members
QString goos_; ///< The cached version of the GOOS variable.
QUrl logsPath_; ///< The logs path. Retrieved from bridge on startup.
QUrl licensePath_; ///< The license path. Retrieved from bridge on startup.
int imapPort_ { 0 }; ///< The cached value for the IMAP port.
int smtpPort_ { 0 }; ///< The cached value for the SMTP port.
bool useSSLForIMAP_ { false }; ///< The cached value for useSSLForIMAP.
bool useSSLForSMTP_ { false }; ///< The cached value for useSSLForSMTP.
friend class AppController;
};

View File

@ -229,20 +229,20 @@ Item {
colorScheme: root.colorScheme
title: qsTr("IMAP")
hostname: Backend.hostname
port: Backend.portIMAP.toString()
port: Backend.imapPort.toString()
username: configuration.currentAddress
password: root.user ? root.user.password : ""
security : Backend.useSSLforIMAP ? "SSL" : "STARTTLS"
security : Backend.useSSLForIMAP ? "SSL" : "STARTTLS"
}
Configuration {
colorScheme: root.colorScheme
title: qsTr("SMTP")
hostname : Backend.hostname
port : Backend.portSMTP.toString()
port : Backend.smtpPort.toString()
username : configuration.currentAddress
password : root.user ? root.user.password : ""
security : Backend.useSSLforSMTP ? "SSL" : "STARTTLS"
security : Backend.useSSLForSMTP ? "SSL" : "STARTTLS"
}
}
}

View File

@ -696,7 +696,7 @@ Window {
}
RowLayout {
Label {colorScheme: root.colorScheme; text: "SMTP using SSL:"}
Toggle {colorScheme: root.colorScheme; checked: root.useSSLforSMTP; onClicked: root.useSSLforSMTP = !root.useSSLforSMTP}
Toggle {colorScheme: root.colorScheme; checked: root.useSSLForSMTP; onClicked: root.useSSLForSMTP = !root.useSSLForSMTP}
}
RowLayout {
Label {colorScheme: root.colorScheme; text: "Local cache:"}
@ -822,9 +822,9 @@ Window {
}
property bool useSSLforSMTP: false
function toggleUseSSLforSMTP(makeItActive){
console.debug("-> SMTP SSL", makeItActive, root.useSSLforSMTP)
property bool useSSLForSMTP: false
function toggleUseSSLForSMTP(makeItActive){
console.debug("-> SMTP SSL", makeItActive, root.useSSLForSMTP)
}
signal toggleUseSSLFinished()
@ -841,8 +841,8 @@ Window {
return true
}
signal changePortFinished()
signal portIssueIMAP()
signal portIssueSMTP()
signal imapPortStartupError()
signal smtpPortStartupError()
function triggerReset() {
console.debug("-> trigger reset")

View File

@ -315,7 +315,7 @@ Item {
PortSettings { // 4
colorScheme: root.colorScheme
notifications: root.notifications
onBack: {
rightContent.showGeneralSettings()
}

View File

@ -36,7 +36,7 @@ SettingsView {
Label {
colorScheme: root.colorScheme
text: qsTr("Changes require reconfiguration of email client. Bridge will automatically restart.")
text: qsTr("Changes require reconfiguration of email client.")
type: Label.Body
color: root.colorScheme.text_weak
Layout.fillWidth: true
@ -80,13 +80,13 @@ SettingsView {
Button {
id: submitButton
colorScheme: root.colorScheme
text: qsTr("Save and restart")
text: qsTr("Save")
onClicked: {
submitButton.loading = true
root.submit()
}
enabled: sslButton.checked !== Backend.useSSLforIMAP
enabled: sslButton.checked !== Backend.useSSLForIMAP
}
Button {
@ -99,20 +99,21 @@ SettingsView {
Connections {
target: Backend
function onToggleUseSSLFinished() {
function onChangeMailServerSettingsFinished() {
submitButton.loading = false
root.back()
}
}
}
function submit(){
submitButton.loading = true
Backend.toggleUseSSLforIMAP(sslButton.checked)
Backend.setMailServerSettings(Backend.imapPort, Backend.smtpPort, sslButton.checked, Backend.useSSLForSMTP)
}
function setDefaultValues(){
sslButton.checked = Backend.useSSLforIMAP
starttlsButton.checked = !Backend.useSSLforIMAP
sslButton.checked = Backend.useSSLForIMAP
starttlsButton.checked = !Backend.useSSLForIMAP
}
onVisibleChanged: {

View File

@ -46,8 +46,12 @@ QtObject {
property var all: [
root.noInternet,
root.portIssueIMAP,
root.portIssueSMTP,
root.imapPortStartupError,
root.smtpPortStartupError,
root.imapPortChangeError,
root.smtpPortChangeError,
root.imapConnectionModeChangeError,
root.smtpConnectionModeChangeError,
root.updateManualReady,
root.updateManualRestartNeeded,
root.updateManualError,
@ -98,8 +102,8 @@ QtObject {
}
}
property Notification portIssueIMAP: Notification {
description: qsTr("The IMAP server could not be started. Please check or change the IMAP port and restart the application.")
property Notification imapPortStartupError: Notification {
description: qsTr("The IMAP server could not be started. Please check or change the IMAP port.")
brief: qsTr("IMAP port error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
@ -108,14 +112,14 @@ QtObject {
Connections {
target: Backend
function onPortIssueIMAP() {
root.portIssueIMAP.active = true
function onImapPortStartupError() {
root.imapPortStartupError.active = true
}
}
}
property Notification portIssueSMTP: Notification {
description: qsTr("The SMTP server could not be started. Please check or change the SMTP port and restart the application.")
property Notification smtpPortStartupError: Notification {
description: qsTr("The SMTP server could not be started. Please check or change the SMTP port.")
brief: qsTr("SMTP port error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
@ -124,8 +128,88 @@ QtObject {
Connections {
target: Backend
function onPortIssueSMTP() {
root.portIssueSMTP.active = true
function onSmtpPortStartupError() {
root.smtpPortStartupError.active = true
}
}
}
property Notification imapPortChangeError: Notification {
description: qsTr("The IMAP port could not be changed.")
brief: qsTr("IMAP port change error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
group: Notifications.Group.Connection
Connections {
target: Backend
function onImapPortChangeError() {
root.imapPortChangeError.active = true
}
}
}
property Notification smtpPortChangeError: Notification {
description: qsTr("The SMTP port could not be changed.")
brief: qsTr("SMTP port change error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
group: Notifications.Group.Connection
Connections {
target: Backend
function onSmtpPortChangeError() {
root.smtpPortChangeError.active = true
}
}
}
property Notification imapConnectionModeChangeError: Notification {
description: qsTr("The IMAP connection mode could not be changed.")
brief: qsTr("IMAP Connection mode change error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
group: Notifications.Group.Connection
Connections {
target: Backend
function onImapConnectionModeChangeError() {
root.imapConnectionModeChangeError.active = true
}
}
action: Action {
text: qsTr("OK")
onTriggered: {
root.imapConnectionModeChangeError.active= false
}
}
}
property Notification smtpConnectionModeChangeError: Notification {
description: qsTr("The SMTP connection mode could not be changed.")
brief: qsTr("SMTP Connection mode change error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
group: Notifications.Group.Connection
Connections {
target: Backend
function onSmtpConnectionModeChangeError() {
root.smtpConnectionModeChangeError.active = true
}
}
action: Action {
text: qsTr("OK")
onTriggered: {
root.smtpConnectionModeChangeError.active= false
}
}
}

View File

@ -27,9 +27,11 @@ SettingsView {
fillHeight: false
property var notifications
property bool _valuesChanged: (
imapField.text*1 !== Backend.portIMAP ||
smtpField.text*1 !== Backend.portSMTP
imapField.text*1 !== Backend.imapPort ||
smtpField.text*1 !== Backend.smtpPort
)
Label {
@ -41,7 +43,7 @@ SettingsView {
Label {
colorScheme: root.colorScheme
text: qsTr("Changes require reconfiguration of your email client. Bridge will automatically restart.")
text: qsTr("Changes require reconfiguration of your email client.")
type: Label.Body
color: root.colorScheme.text_weak
Layout.fillWidth: true
@ -81,7 +83,7 @@ SettingsView {
Button {
id: submitButton
colorScheme: root.colorScheme
text: qsTr("Save and restart")
text: qsTr("Save")
enabled: root._valuesChanged
onClicked: {
// removing error here because we may have set it manually (port occupied)
@ -109,7 +111,13 @@ SettingsView {
return
}
Backend.changePorts(imapField.text, smtpField.text)
// We turn off all port error notification. They well be restored if problems persist
root.notifications.imapPortStartupError.active = false
root.notifications.smtpPortStartupError.active = false
root.notifications.imapPortChangeError.active = false
root.notifications.smtpPortChangeError.active = false
Backend.setMailServerSettings(imapField.text, smtpField.text, Backend.useSSLForIMAP, Backend.useSSLForSMTP)
}
}
@ -123,7 +131,7 @@ SettingsView {
Connections {
target: Backend
function onChangePortFinished() {
function onChangeMailServerSettingsFinished() {
submitButton.loading = false
}
}
@ -148,8 +156,8 @@ SettingsView {
function isPortFree(field) {
var num = field.text*1
if (num === Backend.portIMAP) return true
if (num === Backend.portSMTP) return true
if (num === Backend.imapPort) return true
if (num === Backend.smtpPort) return true
if (!Backend.isPortFree(num)) {
field.error = true
field.errorString = qsTr("Port occupied")
@ -160,8 +168,8 @@ SettingsView {
}
function setDefaultValues(){
imapField.text = Backend.portIMAP
smtpField.text = Backend.portSMTP
imapField.text = Backend.imapPort
smtpField.text = Backend.smtpPort
imapField.error = false
smtpField.error = false
}

View File

@ -36,7 +36,7 @@ SettingsView {
Label {
colorScheme: root.colorScheme
text: qsTr("Changes require reconfiguration of email client. Bridge will automatically restart.")
text: qsTr("Changes require reconfiguration of email client.")
type: Label.Body
color: root.colorScheme.text_weak
Layout.fillWidth: true
@ -80,13 +80,13 @@ SettingsView {
Button {
id: submitButton
colorScheme: root.colorScheme
text: qsTr("Save and restart")
text: qsTr("Save")
onClicked: {
submitButton.loading = true
root.submit()
}
enabled: sslButton.checked !== Backend.useSSLforSMTP
enabled: sslButton.checked !== Backend.useSSLForSMTP
}
Button {
@ -99,20 +99,21 @@ SettingsView {
Connections {
target: Backend
function onToggleUseSSLFinished() {
function onChangeMailServerSettingsFinished() {
submitButton.loading = false
root.back()
}
}
}
function submit(){
function submit() {
submitButton.loading = true
Backend.toggleUseSSLforSMTP(sslButton.checked)
Backend.setMailServerSettings(Backend.imapPort, Backend.smtpPort, Backend.useSSLForIMAP, sslButton.checked)
}
function setDefaultValues(){
sslButton.checked = Backend.useSSLforSMTP
starttlsButton.checked = !Backend.useSSLforSMTP
sslButton.checked = Backend.useSSLForSMTP
starttlsButton.checked = !Backend.useSSLForSMTP
}
onVisibleChanged: {

View File

@ -88,10 +88,10 @@ bridgepp::SPStreamEvent wrapCacheEvent(grpc::DiskCacheEvent *cacheEvent)
/// \param[in] mailSettingsEvent The mail settings event.
/// \return The stream event.
//****************************************************************************************************************************************************
bridgepp::SPStreamEvent wrapMailSettingsEvent(grpc::MailSettingsEvent *mailSettingsEvent)
bridgepp::SPStreamEvent wrapMailServerSettingsEvent(grpc::MailServerSettingsEvent *mailServerSettingsEvent)
{
auto event = newStreamEvent();
event->set_allocated_mailsettings(mailSettingsEvent);
event->set_allocated_mailserversettings(mailServerSettingsEvent);
return event;
}
@ -420,54 +420,45 @@ SPStreamEvent newDiskCachePathChangeFinishedEvent()
return wrapCacheEvent(cacheEvent);
}
SPStreamEvent newChangeMailServerSettingsFinished(); ///< Create a new ChangeMailServerSettingsFinished event.
//****************************************************************************************************************************************************
/// \param[in] errorType The error type.
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newMailSettingsErrorEvent(grpc::MailSettingsErrorType errorType)
SPStreamEvent newMailServerSettingsErrorEvent(grpc::MailServerSettingsErrorType errorType)
{
auto event = new grpc::MailSettingsErrorEvent;
auto event = new grpc::MailServerSettingsErrorEvent;
event->set_type(errorType);
auto mailSettingsEvent = new grpc::MailSettingsEvent;
mailSettingsEvent->set_allocated_error(event);
return wrapMailSettingsEvent(mailSettingsEvent);
auto mailServerSettingsEvent = new grpc::MailServerSettingsEvent;
mailServerSettingsEvent->set_allocated_error(event);
return wrapMailServerSettingsEvent(mailServerSettingsEvent);
}
//****************************************************************************************************************************************************
/// \param[in] settings The settings.
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newMailServerSettingsChanged(grpc::ImapSmtpSettings *settings)
{
auto event = new grpc::MailServerSettingsChangedEvent;
event->set_allocated_settings(settings);
auto mailServerSettingsEvent = new grpc::MailServerSettingsEvent;
mailServerSettingsEvent->set_allocated_mailserversettingschanged(event);
return wrapMailServerSettingsEvent(mailServerSettingsEvent);
}
//****************************************************************************************************************************************************
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newUseSslForImapFinishedEvent()
SPStreamEvent newChangeMailServerSettingsFinished()
{
auto event = new grpc::UseSslForImapFinishedEvent;
auto mailSettingsEvent = new grpc::MailSettingsEvent;
mailSettingsEvent->set_allocated_usesslforimapfinished(event);
return wrapMailSettingsEvent(mailSettingsEvent);
}
//****************************************************************************************************************************************************
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newUseSslForSmtpFinishedEvent()
{
auto event = new grpc::UseSslForSmtpFinishedEvent;
auto mailSettingsEvent = new grpc::MailSettingsEvent;
mailSettingsEvent->set_allocated_usesslforsmtpfinished(event);
return wrapMailSettingsEvent(mailSettingsEvent);
}
//****************************************************************************************************************************************************
/// \return The event.
//****************************************************************************************************************************************************
SPStreamEvent newChangePortsFinishedEvent()
{
auto event = new grpc::ChangePortsFinishedEvent;
auto mailSettingsEvent = new grpc::MailSettingsEvent;
mailSettingsEvent->set_allocated_changeportsfinished(event);
return wrapMailSettingsEvent(mailSettingsEvent);
auto event = new grpc::ChangeMailServerSettingsFinishedEvent;
auto mailServerSettingsEvent = new grpc::MailServerSettingsEvent;
mailServerSettingsEvent->set_allocated_changemailserversettingsfinished(event);
return wrapMailServerSettingsEvent(mailServerSettingsEvent);
}

View File

@ -59,10 +59,9 @@ SPStreamEvent newDiskCachePathChangedEvent(QString const &path); ///< Create a n
SPStreamEvent newDiskCachePathChangeFinishedEvent(); ///< Create a new DiskCachePathChangeFinishedEvent event.
// Mail settings related events
SPStreamEvent newMailSettingsErrorEvent(grpc::MailSettingsErrorType errorType); ///< Create a new MailSettingsErrorEvent event.
SPStreamEvent newUseSslForImapFinishedEvent(); ///< Create a new UseSslForImapFinishedEvent event.
SPStreamEvent newUseSslForSmtpFinishedEvent(); ///< Create a new UseSslForSmtpFinishedEvent event.
SPStreamEvent newChangePortsFinishedEvent(); ///< Create a new ChangePortsFinishedEvent event.
SPStreamEvent newMailServerSettingsErrorEvent(grpc::MailServerSettingsErrorType errorType); ///< Create a new MailSettingsErrorEvent event.
SPStreamEvent newMailServerSettingsChanged(grpc::ImapSmtpSettings settings); ///< Create a new ConnectionModeChanged event.
SPStreamEvent newChangeMailServerSettingsFinished(); ///< Create a new ChangeMailServerSettingsFinished event.
// keychain related events
SPStreamEvent newChangeKeychainFinishedEvent(); ///< Create a new ChangeKeychainFinishedEvent event.

View File

@ -338,56 +338,39 @@ grpc::Status GRPCClient::reportBug(QString const &description, QString const &ad
//****************************************************************************************************************************************************
/// \param[out] outUseSSL The value for the property.
/// \param[out] outIMAPPort The IMAP port.
/// \param[out] outSMTPPort The SMTP port.
/// \param[out] outUseSSLForIMAP The IMAP connection mode.
/// \param[out] outUseSSLForSMTP The SMTP connection mode.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::useSSLForSMTP(bool &outUseSSL)
grpc::Status GRPCClient::mailServerSettings(qint32 &outIMAPPort, qint32 &outSMTPPort, bool &outUseSSLForIMAP, bool &outUseSSLForSMTP)
{
return this->logGRPCCallStatus(this->getBool(&Bridge::Stub::UseSslForSmtp, outUseSSL), __FUNCTION__);
ImapSmtpSettings settings;
Status status = this->logGRPCCallStatus(stub_->MailServerSettings(this->clientContext().get(), empty, &settings), __FUNCTION__);
if (status.ok()) {
outIMAPPort = settings.imapport();
outSMTPPort = settings.smtpport();
outUseSSLForIMAP = settings.usesslforimap();
outUseSSLForSMTP = settings.usesslforsmtp();
}
return status;
}
//****************************************************************************************************************************************************
/// \param[in] useSSL The new value for the property.
/// \param[in] useSSLForIMAP The IMAP connection mode.
/// \param[in] useSSLForSMTP The SMTP connection mode.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::setUseSSLForSMTP(bool useSSL)
grpc::Status GRPCClient::setMailServerSettings(qint32 imapPort, qint32 smtpPort, bool useSSLForIMAP, bool useSSLForSMTP)
{
return this->logGRPCCallStatus(this->setBool(&Bridge::Stub::SetUseSslForSmtp, useSSL), __FUNCTION__);
}
//****************************************************************************************************************************************************
/// \param[out] outPort The port.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::portIMAP(int &outPort)
{
return this->logGRPCCallStatus(this->getInt32(&Bridge::Stub::ImapPort, outPort), __FUNCTION__);
}
//****************************************************************************************************************************************************
/// \param[out] outPort The port.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::portSMTP(int &outPort)
{
return this->logGRPCCallStatus(this->getInt32(&Bridge::Stub::SmtpPort, outPort), __FUNCTION__);
}
//****************************************************************************************************************************************************
/// \param[in] portIMAP The IMAP port.
/// \param[in] portSMTP The SMTP port.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::changePorts(int portIMAP, int portSMTP)
{
ChangePortsRequest request;
request.set_imapport(portIMAP);
request.set_smtpport(portSMTP);
return this->logGRPCCallStatus(stub_->ChangePorts(this->clientContext().get(), request, &empty), __FUNCTION__);
ImapSmtpSettings settings;
settings.set_imapport(imapPort);
settings.set_smtpport(smtpPort);
settings.set_usesslforimap(useSSLForIMAP);
settings.set_usesslforsmtp(useSSLForSMTP);
return this->logGRPCCallStatus(stub_->SetMailServerSettings(this->clientContext().get(), settings, &empty), __FUNCTION__);
}
@ -411,26 +394,6 @@ grpc::Status GRPCClient::setIsDoHEnabled(bool enabled)
}
//****************************************************************************************************************************************************
/// \param[out] outUseSSL The value for the property.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::useSSLForIMAP(bool &outUseSSL)
{
return this->logGRPCCallStatus(this->getBool(&Bridge::Stub::UseSslForImap, outUseSSL), __FUNCTION__);
}
//****************************************************************************************************************************************************
/// \param[in] useSSL The new value for the property.
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
grpc::Status GRPCClient::setUseSSLForIMAP(bool useSSL)
{
return this->logGRPCCallStatus(this->setBool(&Bridge::Stub::SetUseSslForImap, useSSL), __FUNCTION__);
}
//****************************************************************************************************************************************************
/// \return The status for the gRPC call.
//****************************************************************************************************************************************************
@ -875,8 +838,8 @@ grpc::Status GRPCClient::runEventStreamReader()
case grpc::StreamEvent::kCache:
this->processCacheEvent(event.cache());
break;
case grpc::StreamEvent::kMailSettings:
this->processMailSettingsEvent(event.mailsettings());
case grpc::StreamEvent::kMailServerSettings:
this->processMailServerSettingsEvent(event.mailserversettings());
break;
case grpc::StreamEvent::kKeychain:
this->processKeychainEvent(event.keychain());
@ -1347,39 +1310,50 @@ void GRPCClient::processCacheEvent(DiskCacheEvent const &event)
//****************************************************************************************************************************************************
/// \param[in] event The event.
//****************************************************************************************************************************************************
void GRPCClient::processMailSettingsEvent(MailSettingsEvent const &event)
void GRPCClient::processMailServerSettingsEvent(MailServerSettingsEvent const &event)
{
switch (event.event_case())
{
case MailSettingsEvent::kError:
this->logTrace("MailSettings event received: Error.");
case MailServerSettingsEvent::kError:
this->logTrace(QString("MailServerSettings event received: Error %1").arg(qint32(event.error().type())));
switch (event.error().type())
{
case IMAP_PORT_ISSUE:
emit portIssueIMAP();
break;
case SMTP_PORT_ISSUE:
emit portIssueSMTP();
break;
case grpc::IMAP_PORT_STARTUP_ERROR:
emit imapPortStartupError();
return;
case grpc::SMTP_PORT_STARTUP_ERROR:
emit smtpPortStartupError();
return;
case IMAP_PORT_CHANGE_ERROR:
emit imapPortChangeError();
return;
case SMTP_PORT_CHANGE_ERROR:
emit smtpPortChangeError();
return;
case IMAP_CONNECTION_MODE_CHANGE_ERROR:
emit imapConnectionModeChangeError();
return;
case SMTP_CONNECTION_MODE_CHANGE_ERROR:
emit smtpConnectionModeChangeError();
return;
default:
this->logError("Unknown mail settings error event received.");
break;
return;
}
case MailSettingsEvent::kUseSslForSmtpFinished:
this->logTrace("MailSettings event received: UseSslForSmtpFinished.");
emit toggleUseSSLFinished();
break;
case MailSettingsEvent::kUseSslForImapFinished:
this->logTrace("MailSettings event received: UseSslForImapFinished.");
emit toggleUseSSLFinished();
break;
case MailSettingsEvent::kChangePortsFinished:
this->logTrace("MailSettings event received: ChangePortsFinished.");
emit changePortFinished();
break;
case MailServerSettingsEvent::kMailServerSettingsChanged:
{
this->logTrace("MailServerSettings event received: MailServerSettingsChanged.");
ImapSmtpSettings const settings = event.mailserversettingschanged().settings();
emit mailServerSettingsChanged(settings.imapport(), settings.smtpport(), settings.usesslforimap(), settings.usesslforsmtp());
return;
}
case MailServerSettingsEvent::kChangeMailServerSettingsFinished:
this->logTrace("MailServerSettings event received: ChangeMailServerSettingsFinished.");
emit changeMailServerSettingsFinished();
return;
default:
this->logError("Unknown MailSettings event received.");
this->logError("Unknown MailServerSettings event received.");
return;
}
}

View File

@ -116,21 +116,20 @@ signals:
// mail settings related calls
public:
grpc::Status useSSLForSMTP(bool &outUseSSL); ///< Performs the 'useSSLForSMTP' gRPC call
grpc::Status setUseSSLForSMTP(bool useSSL); ///< Performs the 'currentEmailClient' gRPC call.
grpc::Status portIMAP(int &outPort); ///< Performs the 'portImap' gRPC call.
grpc::Status portSMTP(int &outPort); ///< Performs the 'portImap' gRPC call.
grpc::Status changePorts(int portIMAP, int portSMTP); ///< Performs the 'changePorts' gRPC call.
grpc::Status mailServerSettings(qint32 &outIMAPPort, qint32 &outSMTPPort, bool &outUseSSLForIMAP, bool &outUseSSLForSMTP); ///< Performs the 'MailServerSettings' gRPC call.
grpc::Status setMailServerSettings(qint32 imapPort, qint32 smtpPort, bool useSSLForIMAP, bool useSSLForSMTP); ///< Performs the 'SetMailServerSettings' gRPC call.
grpc::Status isDoHEnabled(bool &outEnabled); ///< Performs the 'isDoHEnabled' gRPC call.
grpc::Status setIsDoHEnabled(bool enabled); ///< Performs the 'setIsDoHEnabled' gRPC call.
grpc::Status useSSLForIMAP(bool &outUseSSL); ///< Performs the 'useSSLForSMTP' gRPC call
grpc::Status setUseSSLForIMAP(bool useSSL); ///< Performs the 'currentEmailClient' gRPC call.
signals:
void portIssueIMAP();
void portIssueSMTP();
void toggleUseSSLFinished();
void changePortFinished();
void imapPortStartupError();
void smtpPortStartupError();
void imapPortChangeError();
void smtpPortChangeError();
void imapConnectionModeChangeError();
void smtpConnectionModeChangeError();
void mailServerSettingsChanged(qint32 imapPort, qint32 smtpPort, bool useSSLForIMAP, bool useSSLForSMTP);
void changeMailServerSettingsFinished();
public: // login related calls
grpc::Status login(QString const &username, QString const &password); ///< Performs the 'login' call.
@ -228,7 +227,7 @@ private:
void processLoginEvent(grpc::LoginEvent const &event); ///< Process a 'Login' event.
void processUpdateEvent(grpc::UpdateEvent const &event); ///< Process an 'Update' event.
void processCacheEvent(grpc::DiskCacheEvent const &event); ///< Process a 'Cache' event.
void processMailSettingsEvent(grpc::MailSettingsEvent const &event); ///< Process a 'MailSettings' event.
void processMailServerSettingsEvent(grpc::MailServerSettingsEvent const &event); ///< Process a 'MailSettings' event.
void processKeychainEvent(grpc::KeychainEvent const &event); ///< Process a 'Keychain' event.
void processMailEvent(grpc::MailEvent const &event); ///< Process a 'Mail' event.
void processUserEvent(grpc::UserEvent const &event); ///< Process a 'User' event.

View File

@ -62,14 +62,9 @@ static const char* Bridge_method_names[] = {
"/grpc.Bridge/SetDiskCachePath",
"/grpc.Bridge/SetIsDoHEnabled",
"/grpc.Bridge/IsDoHEnabled",
"/grpc.Bridge/SetUseSslForSmtp",
"/grpc.Bridge/UseSslForSmtp",
"/grpc.Bridge/SetUseSslForImap",
"/grpc.Bridge/UseSslForImap",
"/grpc.Bridge/MailServerSettings",
"/grpc.Bridge/SetMailServerSettings",
"/grpc.Bridge/Hostname",
"/grpc.Bridge/ImapPort",
"/grpc.Bridge/SmtpPort",
"/grpc.Bridge/ChangePorts",
"/grpc.Bridge/IsPortFree",
"/grpc.Bridge/AvailableKeychains",
"/grpc.Bridge/SetCurrentKeychain",
@ -131,26 +126,21 @@ Bridge::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, co
, 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_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_UseSslForSmtp_(Bridge_method_names[41], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetUseSslForImap_(Bridge_method_names[42], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_UseSslForImap_(Bridge_method_names[43], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_Hostname_(Bridge_method_names[44], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ImapPort_(Bridge_method_names[45], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SmtpPort_(Bridge_method_names[46], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ChangePorts_(Bridge_method_names[47], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_IsPortFree_(Bridge_method_names[48], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_AvailableKeychains_(Bridge_method_names[49], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetCurrentKeychain_(Bridge_method_names[50], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_CurrentKeychain_(Bridge_method_names[51], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_GetUserList_(Bridge_method_names[52], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_GetUser_(Bridge_method_names[53], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetUserSplitMode_(Bridge_method_names[54], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_LogoutUser_(Bridge_method_names[55], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_RemoveUser_(Bridge_method_names[56], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ConfigureUserAppleMail_(Bridge_method_names[57], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_RunEventStream_(Bridge_method_names[58], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
, rpcmethod_StopEventStream_(Bridge_method_names[59], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_MailServerSettings_(Bridge_method_names[40], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetMailServerSettings_(Bridge_method_names[41], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_Hostname_(Bridge_method_names[42], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_IsPortFree_(Bridge_method_names[43], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_AvailableKeychains_(Bridge_method_names[44], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetCurrentKeychain_(Bridge_method_names[45], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_CurrentKeychain_(Bridge_method_names[46], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_GetUserList_(Bridge_method_names[47], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_GetUser_(Bridge_method_names[48], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_SetUserSplitMode_(Bridge_method_names[49], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_LogoutUser_(Bridge_method_names[50], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_RemoveUser_(Bridge_method_names[51], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_ConfigureUserAppleMail_(Bridge_method_names[52], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_RunEventStream_(Bridge_method_names[53], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
, rpcmethod_StopEventStream_(Bridge_method_names[54], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
{}
::grpc::Status Bridge::Stub::CheckTokens(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::google::protobuf::StringValue* response) {
@ -1073,94 +1063,48 @@ void Bridge::Stub::async::IsDoHEnabled(::grpc::ClientContext* context, const ::g
return result;
}
::grpc::Status Bridge::Stub::SetUseSslForSmtp(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::google::protobuf::Empty* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SetUseSslForSmtp_, context, request, response);
::grpc::Status Bridge::Stub::MailServerSettings(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::ImapSmtpSettings* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::Empty, ::grpc::ImapSmtpSettings, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_MailServerSettings_, context, request, response);
}
void Bridge::Stub::async::SetUseSslForSmtp(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetUseSslForSmtp_, context, request, response, std::move(f));
void Bridge::Stub::async::MailServerSettings(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::grpc::ImapSmtpSettings* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::Empty, ::grpc::ImapSmtpSettings, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_MailServerSettings_, context, request, response, std::move(f));
}
void Bridge::Stub::async::SetUseSslForSmtp(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetUseSslForSmtp_, context, request, response, reactor);
void Bridge::Stub::async::MailServerSettings(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::grpc::ImapSmtpSettings* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_MailServerSettings_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::PrepareAsyncSetUseSslForSmtpRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SetUseSslForSmtp_, context, request);
::grpc::ClientAsyncResponseReader< ::grpc::ImapSmtpSettings>* Bridge::Stub::PrepareAsyncMailServerSettingsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::grpc::ImapSmtpSettings, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_MailServerSettings_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::AsyncSetUseSslForSmtpRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) {
::grpc::ClientAsyncResponseReader< ::grpc::ImapSmtpSettings>* Bridge::Stub::AsyncMailServerSettingsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncSetUseSslForSmtpRaw(context, request, cq);
this->PrepareAsyncMailServerSettingsRaw(context, request, cq);
result->StartCall();
return result;
}
::grpc::Status Bridge::Stub::UseSslForSmtp(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::BoolValue* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseSslForSmtp_, context, request, response);
::grpc::Status Bridge::Stub::SetMailServerSettings(::grpc::ClientContext* context, const ::grpc::ImapSmtpSettings& request, ::google::protobuf::Empty* response) {
return ::grpc::internal::BlockingUnaryCall< ::grpc::ImapSmtpSettings, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SetMailServerSettings_, context, request, response);
}
void Bridge::Stub::async::UseSslForSmtp(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSslForSmtp_, context, request, response, std::move(f));
void Bridge::Stub::async::SetMailServerSettings(::grpc::ClientContext* context, const ::grpc::ImapSmtpSettings* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::grpc::ImapSmtpSettings, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetMailServerSettings_, context, request, response, std::move(f));
}
void Bridge::Stub::async::UseSslForSmtp(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSslForSmtp_, context, request, response, reactor);
void Bridge::Stub::async::SetMailServerSettings(::grpc::ClientContext* context, const ::grpc::ImapSmtpSettings* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetMailServerSettings_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* Bridge::Stub::PrepareAsyncUseSslForSmtpRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseSslForSmtp_, context, request);
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::PrepareAsyncSetMailServerSettingsRaw(::grpc::ClientContext* context, const ::grpc::ImapSmtpSettings& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::grpc::ImapSmtpSettings, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SetMailServerSettings_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* Bridge::Stub::AsyncUseSslForSmtpRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::AsyncSetMailServerSettingsRaw(::grpc::ClientContext* context, const ::grpc::ImapSmtpSettings& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncUseSslForSmtpRaw(context, request, cq);
result->StartCall();
return result;
}
::grpc::Status Bridge::Stub::SetUseSslForImap(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::google::protobuf::Empty* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SetUseSslForImap_, context, request, response);
}
void Bridge::Stub::async::SetUseSslForImap(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetUseSslForImap_, context, request, response, std::move(f));
}
void Bridge::Stub::async::SetUseSslForImap(::grpc::ClientContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetUseSslForImap_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::PrepareAsyncSetUseSslForImapRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SetUseSslForImap_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::AsyncSetUseSslForImapRaw(::grpc::ClientContext* context, const ::google::protobuf::BoolValue& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncSetUseSslForImapRaw(context, request, cq);
result->StartCall();
return result;
}
::grpc::Status Bridge::Stub::UseSslForImap(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::BoolValue* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseSslForImap_, context, request, response);
}
void Bridge::Stub::async::UseSslForImap(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSslForImap_, context, request, response, std::move(f));
}
void Bridge::Stub::async::UseSslForImap(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSslForImap_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* Bridge::Stub::PrepareAsyncUseSslForImapRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseSslForImap_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* Bridge::Stub::AsyncUseSslForImapRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncUseSslForImapRaw(context, request, cq);
this->PrepareAsyncSetMailServerSettingsRaw(context, request, cq);
result->StartCall();
return result;
}
@ -1188,75 +1132,6 @@ void Bridge::Stub::async::Hostname(::grpc::ClientContext* context, const ::googl
return result;
}
::grpc::Status Bridge::Stub::ImapPort(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Int32Value* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::Empty, ::google::protobuf::Int32Value, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ImapPort_, context, request, response);
}
void Bridge::Stub::async::ImapPort(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Int32Value* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::Empty, ::google::protobuf::Int32Value, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ImapPort_, context, request, response, std::move(f));
}
void Bridge::Stub::async::ImapPort(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Int32Value* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ImapPort_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Int32Value>* Bridge::Stub::PrepareAsyncImapPortRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Int32Value, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ImapPort_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Int32Value>* Bridge::Stub::AsyncImapPortRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncImapPortRaw(context, request, cq);
result->StartCall();
return result;
}
::grpc::Status Bridge::Stub::SmtpPort(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Int32Value* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::Empty, ::google::protobuf::Int32Value, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SmtpPort_, context, request, response);
}
void Bridge::Stub::async::SmtpPort(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Int32Value* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::google::protobuf::Empty, ::google::protobuf::Int32Value, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SmtpPort_, context, request, response, std::move(f));
}
void Bridge::Stub::async::SmtpPort(::grpc::ClientContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Int32Value* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SmtpPort_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Int32Value>* Bridge::Stub::PrepareAsyncSmtpPortRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Int32Value, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SmtpPort_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Int32Value>* Bridge::Stub::AsyncSmtpPortRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncSmtpPortRaw(context, request, cq);
result->StartCall();
return result;
}
::grpc::Status Bridge::Stub::ChangePorts(::grpc::ClientContext* context, const ::grpc::ChangePortsRequest& request, ::google::protobuf::Empty* response) {
return ::grpc::internal::BlockingUnaryCall< ::grpc::ChangePortsRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ChangePorts_, context, request, response);
}
void Bridge::Stub::async::ChangePorts(::grpc::ClientContext* context, const ::grpc::ChangePortsRequest* request, ::google::protobuf::Empty* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::grpc::ChangePortsRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ChangePorts_, context, request, response, std::move(f));
}
void Bridge::Stub::async::ChangePorts(::grpc::ClientContext* context, const ::grpc::ChangePortsRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ChangePorts_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::PrepareAsyncChangePortsRaw(::grpc::ClientContext* context, const ::grpc::ChangePortsRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::grpc::ChangePortsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ChangePorts_, context, request);
}
::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Bridge::Stub::AsyncChangePortsRaw(::grpc::ClientContext* context, const ::grpc::ChangePortsRequest& request, ::grpc::CompletionQueue* cq) {
auto* result =
this->PrepareAsyncChangePortsRaw(context, request, cq);
result->StartCall();
return result;
}
::grpc::Status Bridge::Stub::IsPortFree(::grpc::ClientContext* context, const ::google::protobuf::Int32Value& request, ::google::protobuf::BoolValue* response) {
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::Int32Value, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_IsPortFree_, context, request, response);
}
@ -1930,46 +1805,26 @@ Bridge::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[40],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::grpc::ImapSmtpSettings, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::google::protobuf::BoolValue* req,
::google::protobuf::Empty* resp) {
return service->SetUseSslForSmtp(ctx, req, resp);
const ::google::protobuf::Empty* req,
::grpc::ImapSmtpSettings* resp) {
return service->MailServerSettings(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[41],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::ImapSmtpSettings, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::google::protobuf::Empty* req,
::google::protobuf::BoolValue* resp) {
return service->UseSslForSmtp(ctx, req, resp);
const ::grpc::ImapSmtpSettings* req,
::google::protobuf::Empty* resp) {
return service->SetMailServerSettings(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[42],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::BoolValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::google::protobuf::BoolValue* req,
::google::protobuf::Empty* resp) {
return service->SetUseSslForImap(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[43],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::google::protobuf::Empty* req,
::google::protobuf::BoolValue* resp) {
return service->UseSslForImap(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[44],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
@ -1978,37 +1833,7 @@ Bridge::Service::Service() {
return service->Hostname(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[45],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::Int32Value, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::google::protobuf::Empty* req,
::google::protobuf::Int32Value* resp) {
return service->ImapPort(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[46],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::Int32Value, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::google::protobuf::Empty* req,
::google::protobuf::Int32Value* resp) {
return service->SmtpPort(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[47],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::ChangePortsRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
::grpc::ServerContext* ctx,
const ::grpc::ChangePortsRequest* req,
::google::protobuf::Empty* resp) {
return service->ChangePorts(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[48],
Bridge_method_names[43],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Int32Value, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2018,7 +1843,7 @@ Bridge::Service::Service() {
return service->IsPortFree(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[49],
Bridge_method_names[44],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::grpc::AvailableKeychainsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2028,7 +1853,7 @@ Bridge::Service::Service() {
return service->AvailableKeychains(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[50],
Bridge_method_names[45],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::StringValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2038,7 +1863,7 @@ Bridge::Service::Service() {
return service->SetCurrentKeychain(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[51],
Bridge_method_names[46],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2048,7 +1873,7 @@ Bridge::Service::Service() {
return service->CurrentKeychain(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[52],
Bridge_method_names[47],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::grpc::UserListResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2058,7 +1883,7 @@ Bridge::Service::Service() {
return service->GetUserList(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[53],
Bridge_method_names[48],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::StringValue, ::grpc::User, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2068,7 +1893,7 @@ Bridge::Service::Service() {
return service->GetUser(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[54],
Bridge_method_names[49],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::UserSplitModeRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2078,7 +1903,7 @@ Bridge::Service::Service() {
return service->SetUserSplitMode(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[55],
Bridge_method_names[50],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::StringValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2088,7 +1913,7 @@ Bridge::Service::Service() {
return service->LogoutUser(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[56],
Bridge_method_names[51],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::StringValue, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2098,7 +1923,7 @@ Bridge::Service::Service() {
return service->RemoveUser(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[57],
Bridge_method_names[52],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::ConfigureAppleMailRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2108,7 +1933,7 @@ Bridge::Service::Service() {
return service->ConfigureUserAppleMail(ctx, req, resp);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[58],
Bridge_method_names[53],
::grpc::internal::RpcMethod::SERVER_STREAMING,
new ::grpc::internal::ServerStreamingHandler< Bridge::Service, ::grpc::EventStreamRequest, ::grpc::StreamEvent>(
[](Bridge::Service* service,
@ -2118,7 +1943,7 @@ Bridge::Service::Service() {
return service->RunEventStream(ctx, req, writer);
}, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Bridge_method_names[59],
Bridge_method_names[54],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::Empty, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](Bridge::Service* service,
@ -2412,28 +2237,14 @@ Bridge::Service::~Service() {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::SetUseSslForSmtp(::grpc::ServerContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response) {
::grpc::Status Bridge::Service::MailServerSettings(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ImapSmtpSettings* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::UseSslForSmtp(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::SetUseSslForImap(::grpc::ServerContext* context, const ::google::protobuf::BoolValue* request, ::google::protobuf::Empty* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::UseSslForImap(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::BoolValue* response) {
::grpc::Status Bridge::Service::SetMailServerSettings(::grpc::ServerContext* context, const ::grpc::ImapSmtpSettings* request, ::google::protobuf::Empty* response) {
(void) context;
(void) request;
(void) response;
@ -2447,27 +2258,6 @@ Bridge::Service::~Service() {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::ImapPort(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Int32Value* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::SmtpPort(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Int32Value* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::ChangePorts(::grpc::ServerContext* context, const ::grpc::ChangePortsRequest* request, ::google::protobuf::Empty* response) {
(void) context;
(void) request;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status Bridge::Service::IsPortFree(::grpc::ServerContext* context, const ::google::protobuf::Int32Value* request, ::google::protobuf::BoolValue* response) {
(void) context;
(void) request;

File diff suppressed because it is too large Load Diff