forked from Silverfish/proton-bridge
GODT-1924: gRPC identity validation with tokens.
This commit is contained in:
@ -34,8 +34,6 @@ namespace
|
||||
|
||||
|
||||
Empty empty; // re-used across client calls.
|
||||
|
||||
|
||||
int const maxConnectionTimeSecs = 60; ///< Amount of time after which we consider connection attempts to the server have failed.
|
||||
|
||||
|
||||
@ -47,7 +45,7 @@ int const maxConnectionTimeSecs = 60; ///< Amount of time after which we conside
|
||||
//****************************************************************************************************************************************************
|
||||
void GRPCClient::removeServiceConfigFile()
|
||||
{
|
||||
QString const path = serviceConfigPath();
|
||||
QString const path = grpcServerConfigPath();
|
||||
if (!QFile(path).exists())
|
||||
return;
|
||||
if (!QFile().remove(path))
|
||||
@ -61,7 +59,7 @@ void GRPCClient::removeServiceConfigFile()
|
||||
//****************************************************************************************************************************************************
|
||||
GRPCConfig GRPCClient::waitAndRetrieveServiceConfig(qint64 timeoutMs)
|
||||
{
|
||||
QString const path = serviceConfigPath();
|
||||
QString const path = grpcServerConfigPath();
|
||||
QFile file(path);
|
||||
|
||||
QElapsedTimer timer;
|
||||
@ -107,6 +105,7 @@ bool GRPCClient::connectToServer(GRPCConfig const &config, QString &outError)
|
||||
{
|
||||
try
|
||||
{
|
||||
serverToken_ = config.token.toStdString();
|
||||
SslCredentialsOptions opts;
|
||||
opts.pem_root_certs += config.cert.toStdString();
|
||||
|
||||
@ -138,6 +137,24 @@ bool GRPCClient::connectToServer(GRPCConfig const &config, QString &outError)
|
||||
|
||||
if (log_)
|
||||
log_->debug("Successfully connected to gRPC server.");
|
||||
|
||||
QString const clientToken = QUuid::createUuid().toString();
|
||||
QString clientConfigPath = createClientConfigFile(clientToken);
|
||||
if (clientConfigPath.isEmpty())
|
||||
throw Exception("gRPC client config could not be saved.");
|
||||
|
||||
QString returnedClientToken;
|
||||
grpc::Status status = this->checkTokens(QDir::toNativeSeparators(clientConfigPath), returnedClientToken);
|
||||
QFile(clientConfigPath).remove();
|
||||
if (clientToken != returnedClientToken)
|
||||
throw Exception("gRPC server returned an invalid token");
|
||||
|
||||
|
||||
if (!status.ok())
|
||||
throw Exception(QString::fromStdString(status.error_message()));
|
||||
|
||||
log_->debug("gRPC token was validated");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception const &e)
|
||||
@ -148,6 +165,24 @@ bool GRPCClient::connectToServer(GRPCConfig const &config, QString &outError)
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] clientConfigPath The path to the gRPC client config path.-
|
||||
/// \param[in] serverToken The token obtained from the server config file.
|
||||
/// \param[out] outReturnedClientToken The client token returned by the server.
|
||||
/// \return The status code for the call.
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::checkTokens(QString const &clientConfigPath, QString &outReturnedClientToken)
|
||||
{
|
||||
google::protobuf::StringValue request;
|
||||
request.set_value(clientConfigPath.toStdString());
|
||||
google::protobuf::StringValue response;
|
||||
Status status = stub_->CheckTokens(this->clientContext().get(), request, &response);
|
||||
if (status.ok())
|
||||
outReturnedClientToken = QString::fromStdString(response.value());
|
||||
return this->logGRPCCallStatus(status, __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] level The level of the log entry.
|
||||
/// \param[in] package The package (component) that triggered the entry.
|
||||
@ -156,12 +191,11 @@ bool GRPCClient::connectToServer(GRPCConfig const &config, QString &outError)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::addLogEntry(Log::Level level, QString const &package, QString const &message)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
AddLogEntryRequest request;
|
||||
request.set_level(logLevelToGRPC(level));
|
||||
request.set_package(package.toStdString());
|
||||
request.set_message(message.toStdString());
|
||||
return stub_->AddLogEntry(&ctx, request, &empty);
|
||||
return stub_->AddLogEntry(this->clientContext().get(), request, &empty);
|
||||
}
|
||||
|
||||
|
||||
@ -170,8 +204,7 @@ grpc::Status GRPCClient::addLogEntry(Log::Level level, QString const &package, Q
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::guiReady()
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
return this->logGRPCCallStatus(stub_->GuiReady(&ctx, empty, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->GuiReady(this->clientContext().get(), empty, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -284,7 +317,6 @@ grpc::Status GRPCClient::currentEmailClient(QString &outName)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::reportBug(QString const &description, QString const &address, QString const &emailClient, bool includeLogs)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
ReportBugRequest request;
|
||||
request.set_ostype(QSysInfo::productType().toStdString());
|
||||
request.set_osversion(QSysInfo::prettyProductName().toStdString());
|
||||
@ -292,7 +324,7 @@ grpc::Status GRPCClient::reportBug(QString const &description, QString const &ad
|
||||
request.set_address(address.toStdString());
|
||||
request.set_emailclient(emailClient.toStdString());
|
||||
request.set_includelogs(includeLogs);
|
||||
return this->logGRPCCallStatus(stub_->ReportBug(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->ReportBug(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -302,9 +334,7 @@ grpc::Status GRPCClient::reportBug(QString const &description, QString const &ad
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::useSSLForSMTP(bool &outUseSSL)
|
||||
{
|
||||
Status status = this->getBool(&Bridge::Stub::UseSslForSmtp, outUseSSL);
|
||||
return this->logGRPCCallStatus(status, __FUNCTION__);
|
||||
|
||||
return this->logGRPCCallStatus(this->getBool(&Bridge::Stub::UseSslForSmtp, outUseSSL), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -345,11 +375,10 @@ grpc::Status GRPCClient::portSMTP(int &outPort)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::changePorts(int portIMAP, int portSMTP)
|
||||
{
|
||||
ClientContext ctx;
|
||||
ChangePortsRequest request;
|
||||
request.set_imapport(portIMAP);
|
||||
request.set_smtpport(portSMTP);
|
||||
return this->logGRPCCallStatus(stub_->ChangePorts(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->ChangePorts(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -378,9 +407,8 @@ grpc::Status GRPCClient::setIsDoHEnabled(bool enabled)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::quit()
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
// quitting will shut down the gRPC service, to we may get an 'Unavailable' response for the call
|
||||
return this->logGRPCCallStatus(stub_->Quit(&ctx, empty, &empty), __FUNCTION__, { StatusCode::UNAVAILABLE });
|
||||
return this->logGRPCCallStatus(stub_->Quit(this->clientContext().get(), empty, &empty), __FUNCTION__, { StatusCode::UNAVAILABLE });
|
||||
}
|
||||
|
||||
|
||||
@ -389,9 +417,8 @@ grpc::Status GRPCClient::quit()
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::restart()
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
// restarting will shut down the gRPC service, to we may get an 'Unavailable' response for the call
|
||||
return this->logGRPCCallStatus(stub_->Restart(&ctx, empty, &empty), __FUNCTION__, { StatusCode::UNAVAILABLE });
|
||||
return this->logGRPCCallStatus(stub_->Restart(this->clientContext().get(), empty, &empty), __FUNCTION__, { StatusCode::UNAVAILABLE });
|
||||
}
|
||||
|
||||
|
||||
@ -400,8 +427,7 @@ grpc::Status GRPCClient::restart()
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::triggerReset()
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
return this->logGRPCCallStatus(stub_->TriggerReset(&ctx, empty, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->TriggerReset(this->clientContext().get(), empty, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -410,10 +436,7 @@ grpc::Status GRPCClient::triggerReset()
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::forceLauncher(QString const &launcher)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
StringValue s;
|
||||
s.set_value(launcher.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->ForceLauncher(&ctx, s, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(this->setString(&Bridge::Stub::ForceLauncher, launcher), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -422,10 +445,7 @@ grpc::Status GRPCClient::forceLauncher(QString const &launcher)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::setMainExecutable(QString const &exe)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
StringValue s;
|
||||
s.set_value(exe.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->SetMainExecutable(&ctx, s, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(this->setString(&Bridge::Stub::SetMainExecutable, exe), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -436,11 +456,10 @@ grpc::Status GRPCClient::setMainExecutable(QString const &exe)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::isPortFree(qint32 port, bool &outFree)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
Int32Value p;
|
||||
p.set_value(port);
|
||||
BoolValue isFree;
|
||||
Status result = stub_->IsPortFree(&ctx, p, &isFree);
|
||||
Status result = stub_->IsPortFree(this->clientContext().get(), p, &isFree);
|
||||
if (result.ok())
|
||||
outFree = isFree.value();
|
||||
return this->logGRPCCallStatus(result, __FUNCTION__);
|
||||
@ -574,11 +593,10 @@ grpc::Status GRPCClient::diskCachePath(QUrl &outPath)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::changeLocalCache(bool enabled, QUrl const &path)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
ChangeLocalCacheRequest request;
|
||||
request.set_enablediskcache(enabled);
|
||||
request.set_diskcachepath(path.path(QUrl::FullyDecoded).toStdString());
|
||||
return this->logGRPCCallStatus(stub_->ChangeLocalCache(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->ChangeLocalCache(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -589,11 +607,10 @@ grpc::Status GRPCClient::changeLocalCache(bool enabled, QUrl const &path)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::login(QString const &username, QString const &password)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
LoginRequest request;
|
||||
request.set_username(username.toStdString());
|
||||
request.set_password(password.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->Login(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->Login(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -604,11 +621,10 @@ grpc::Status GRPCClient::login(QString const &username, QString const &password)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::login2FA(QString const &username, QString const &code)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
LoginRequest request;
|
||||
request.set_username(username.toStdString());
|
||||
request.set_password(code.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->Login2FA(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->Login2FA(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -619,11 +635,10 @@ grpc::Status GRPCClient::login2FA(QString const &username, QString const &code)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::login2Passwords(QString const &username, QString const &password)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
LoginRequest request;
|
||||
request.set_username(username.toStdString());
|
||||
request.set_password(password.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->Login2Passwords(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->Login2Passwords(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -633,10 +648,9 @@ grpc::Status GRPCClient::login2Passwords(QString const &username, QString const
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::loginAbort(QString const &username)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
LoginAbortRequest request;
|
||||
request.set_username(username.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->LoginAbort(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->LoginAbort(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -703,11 +717,10 @@ grpc::Status GRPCClient::removeUser(QString const &userID)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::configureAppleMail(QString const &userID, QString const &address)
|
||||
{
|
||||
ClientContext ctx;
|
||||
ConfigureAppleMailRequest request;
|
||||
request.set_userid(userID.toStdString());
|
||||
request.set_address(address.toStdString());
|
||||
return this->logGRPCCallStatus(stub_->ConfigureUserAppleMail(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->ConfigureUserAppleMail(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -718,12 +731,11 @@ grpc::Status GRPCClient::configureAppleMail(QString const &userID, QString const
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::setUserSplitMode(QString const &userID, bool active)
|
||||
{
|
||||
ClientContext ctx;
|
||||
UserSplitModeRequest request;
|
||||
request.set_userid(userID.toStdString());
|
||||
request.set_active(active);
|
||||
|
||||
return this->logGRPCCallStatus(stub_->SetUserSplitMode(&ctx, request, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->SetUserSplitMode(this->clientContext().get(), request, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -735,9 +747,8 @@ grpc::Status GRPCClient::getUserList(QList<SPUser> &outUsers)
|
||||
{
|
||||
outUsers.clear();
|
||||
|
||||
ClientContext ctx;
|
||||
UserListResponse response;
|
||||
Status status = stub_->GetUserList(&ctx, empty, &response);
|
||||
Status status = stub_->GetUserList(this->clientContext().get(), empty, &response);
|
||||
if (!status.ok())
|
||||
return this->logGRPCCallStatus(status, __FUNCTION__);
|
||||
|
||||
@ -755,11 +766,10 @@ grpc::Status GRPCClient::getUserList(QList<SPUser> &outUsers)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::getUser(QString const &userID, SPUser &outUser)
|
||||
{
|
||||
ClientContext ctx;
|
||||
StringValue s;
|
||||
s.set_value(userID.toStdString());
|
||||
grpc::User grpcUser;
|
||||
Status status = stub_->GetUser(&ctx, s, &grpcUser);
|
||||
Status status = stub_->GetUser(this->clientContext().get(), s, &grpcUser);
|
||||
|
||||
if (status.ok())
|
||||
outUser = parseGRPCUser(grpcUser);
|
||||
@ -775,9 +785,8 @@ grpc::Status GRPCClient::getUser(QString const &userID, SPUser &outUser)
|
||||
grpc::Status GRPCClient::availableKeychains(QStringList &outKeychains)
|
||||
{
|
||||
outKeychains.clear();
|
||||
ClientContext ctx;
|
||||
AvailableKeychainsResponse response;
|
||||
Status status = stub_->AvailableKeychains(&ctx, empty, &response);
|
||||
Status status = stub_->AvailableKeychains(this->clientContext().get(), empty, &response);
|
||||
if (!status.ok())
|
||||
return this->logGRPCCallStatus(status, __FUNCTION__);
|
||||
|
||||
@ -827,7 +836,7 @@ grpc::Status GRPCClient::runEventStreamReader()
|
||||
QMutexLocker locker(&eventStreamMutex_);
|
||||
if (eventStreamContext_)
|
||||
return Status(grpc::ALREADY_EXISTS, "event stream is already active.");
|
||||
eventStreamContext_ = std::make_unique<ClientContext>();
|
||||
eventStreamContext_ = this->clientContext();
|
||||
}
|
||||
|
||||
EventStreamRequest request;
|
||||
@ -883,8 +892,7 @@ grpc::Status GRPCClient::stopEventStreamReader()
|
||||
{
|
||||
if (!this->isEventStreamActive())
|
||||
return Status::OK;
|
||||
grpc::ClientContext ctx;
|
||||
return this->logGRPCCallStatus(stub_->StopEventStream(&ctx, empty, &empty), __FUNCTION__);
|
||||
return this->logGRPCCallStatus(stub_->StopEventStream(this->clientContext().get(), empty, &empty), __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@ -931,8 +939,7 @@ grpc::Status GRPCClient::logGRPCCallStatus(Status const &status, QString const &
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::simpleMethod(SimpleMethod method)
|
||||
{
|
||||
ClientContext ctx;
|
||||
return ((*stub_).*method)(&ctx, empty, &empty);
|
||||
return ((*stub_).*method)(this->clientContext().get(), empty, &empty);
|
||||
}
|
||||
|
||||
|
||||
@ -943,10 +950,9 @@ grpc::Status GRPCClient::simpleMethod(SimpleMethod method)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::setBool(BoolSetter setter, bool value)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
BoolValue v;
|
||||
v.set_value(value);
|
||||
return ((*stub_).*setter)(&ctx, v, &empty);
|
||||
return ((*stub_).*setter)(this->clientContext().get(), v, &empty);
|
||||
}
|
||||
|
||||
|
||||
@ -957,9 +963,8 @@ grpc::Status GRPCClient::setBool(BoolSetter setter, bool value)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::getBool(BoolGetter getter, bool &outValue)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
BoolValue v;
|
||||
Status result = ((*stub_).*getter)(&ctx, empty, &v);
|
||||
Status result = ((*stub_).*getter)(this->clientContext().get(), empty, &v);
|
||||
if (result.ok())
|
||||
outValue = v.value();
|
||||
return result;
|
||||
@ -973,10 +978,9 @@ grpc::Status GRPCClient::getBool(BoolGetter getter, bool &outValue)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::setInt32(Int32Setter setter, int value)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
Int32Value i;
|
||||
i.set_value(value);
|
||||
return ((*stub_).*setter)(&ctx, i, &empty);
|
||||
return ((*stub_).*setter)(this->clientContext().get(), i, &empty);
|
||||
}
|
||||
|
||||
|
||||
@ -987,9 +991,8 @@ grpc::Status GRPCClient::setInt32(Int32Setter setter, int value)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::getInt32(Int32Getter getter, int &outValue)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
Int32Value i;
|
||||
Status result = ((*stub_).*getter)(&ctx, empty, &i);
|
||||
Status result = ((*stub_).*getter)(this->clientContext().get(), empty, &i);
|
||||
if (result.ok())
|
||||
outValue = i.value();
|
||||
return result;
|
||||
@ -1003,10 +1006,9 @@ grpc::Status GRPCClient::getInt32(Int32Getter getter, int &outValue)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::setString(StringSetter setter, QString const &value)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
StringValue s;
|
||||
s.set_value(value.toStdString());
|
||||
return ((*stub_).*setter)(&ctx, s, &empty);
|
||||
return ((*stub_).*setter)(this->clientContext().get(), s, &empty);
|
||||
}
|
||||
|
||||
|
||||
@ -1017,9 +1019,8 @@ grpc::Status GRPCClient::setString(StringSetter setter, QString const &value)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::getString(StringGetter getter, QString &outValue)
|
||||
{
|
||||
grpc::ClientContext ctx;
|
||||
StringValue v;
|
||||
Status result = ((*stub_).*getter)(&ctx, empty, &v);
|
||||
Status result = ((*stub_).*getter)(this->clientContext().get(), empty, &v);
|
||||
if (result.ok())
|
||||
outValue = QString::fromStdString(v.value());
|
||||
return result;
|
||||
@ -1063,10 +1064,9 @@ grpc::Status GRPCClient::getURL(StringGetter getter, QUrl &outValue)
|
||||
//****************************************************************************************************************************************************
|
||||
grpc::Status GRPCClient::methodWithStringParam(StringParamMethod method, QString const &str)
|
||||
{
|
||||
ClientContext ctx;
|
||||
StringValue s;
|
||||
s.set_value(str.toStdString());
|
||||
return ((*stub_).*method)(&ctx, s, &empty);
|
||||
return ((*stub_).*method)(this->clientContext().get(), s, &empty);
|
||||
}
|
||||
|
||||
|
||||
@ -1436,4 +1436,15 @@ void GRPCClient::processUserEvent(UserEvent const &event)
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return The context with the server token in the metadata
|
||||
//****************************************************************************************************************************************************
|
||||
UPClientContext GRPCClient::clientContext() const
|
||||
{
|
||||
auto ctx = std::make_unique<grpc::ClientContext>();
|
||||
ctx->AddMetadata("server-token", serverToken_);
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
} // namespace bridgepp
|
||||
|
||||
@ -39,6 +39,7 @@ typedef grpc::Status (grpc::Bridge::Stub::*Int32Getter)(grpc::ClientContext *, c
|
||||
typedef grpc::Status (grpc::Bridge::Stub::*StringGetter)(grpc::ClientContext *, const google::protobuf::Empty &, google::protobuf::StringValue *);
|
||||
typedef grpc::Status (grpc::Bridge::Stub::*StringSetter)(grpc::ClientContext *, const google::protobuf::StringValue &, google::protobuf::Empty *);
|
||||
typedef grpc::Status (grpc::Bridge::Stub::*StringParamMethod)(grpc::ClientContext *, const google::protobuf::StringValue &, google::protobuf::Empty *);
|
||||
typedef std::unique_ptr<grpc::ClientContext> UPClientContext;
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
@ -61,6 +62,7 @@ public: // member functions.
|
||||
void setLog(Log *log); ///< Set the log for the client.
|
||||
bool connectToServer(GRPCConfig const &config, QString &outError); ///< Establish connection to the gRPC server.
|
||||
|
||||
grpc::Status checkTokens(QString const &clientConfigPath, QString &outReturnedClientToken); ///< Performs a token check.
|
||||
grpc::Status addLogEntry(Log::Level level, QString const &package, QString const &message); ///< Performs the "AddLogEntry" gRPC call.
|
||||
grpc::Status guiReady(); ///< performs the "GuiReady" gRPC call.
|
||||
grpc::Status isFirstGUIStart(bool &outIsFirst); ///< performs the "IsFirstGUIStart" gRPC call.
|
||||
@ -228,13 +230,15 @@ private:
|
||||
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.
|
||||
UPClientContext clientContext() const; ///< Returns a client context with the server token set in metadata.
|
||||
|
||||
private: // data members.
|
||||
Log *log_ { nullptr }; ///< The log for the GRPC client.
|
||||
std::string serverToken_; ///< The token to for communications with the gRPC server
|
||||
std::shared_ptr<grpc::Channel> channel_ { nullptr }; ///< The gRPC channel.
|
||||
std::shared_ptr<grpc::Bridge::Stub> stub_ { nullptr }; ///< The gRPC stub (a.k.a. client).
|
||||
mutable QMutex eventStreamMutex_; ///< The event stream mutex.
|
||||
std::unique_ptr<grpc::ClientContext> eventStreamContext_; /// the client context for the gRPC event stream. Access protected by eventStreamMutex_.
|
||||
UPClientContext eventStreamContext_; /// the client context for the gRPC event stream. Access protected by eventStreamMutex_.
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -109,10 +109,10 @@ bool GRPCConfig::save(QString const &path, QString *outError)
|
||||
{
|
||||
try
|
||||
{
|
||||
QJsonObject const object;
|
||||
object[keyPort] = port;
|
||||
object[keyCert] = cert;
|
||||
object[keyToken] = token;
|
||||
QJsonObject object;
|
||||
object.insert(keyPort, port);
|
||||
object.insert(keyCert, cert);
|
||||
object.insert(keyToken, token);
|
||||
|
||||
QFile file(path);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
|
||||
#include "GRPCUtils.h"
|
||||
#include "GRPCConfig.h"
|
||||
#include "../Exception/Exception.h"
|
||||
#include "../BridgeUtils.h"
|
||||
|
||||
@ -29,6 +30,24 @@ namespace
|
||||
{
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return the gRPC server config file name
|
||||
//****************************************************************************************************************************************************
|
||||
QString grpcServerConfigFilename()
|
||||
{
|
||||
return "grpcServerConfig.json";
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return the gRPC client config file name
|
||||
//****************************************************************************************************************************************************
|
||||
QString grpcClientConfigBaseFilename()
|
||||
{
|
||||
return "grpcClientConfig_%1.json";
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return The server certificate file name
|
||||
//****************************************************************************************************************************************************
|
||||
@ -38,14 +57,6 @@ QString serverCertificateFilename()
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return the service config file name
|
||||
//****************************************************************************************************************************************************
|
||||
QString serviceConfigFilename()
|
||||
{
|
||||
return "grpcServiceConfig.json";
|
||||
}
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
//
|
||||
//****************************************************************************************************************************************************
|
||||
@ -61,9 +72,18 @@ QString serverKeyFilename()
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return The absolute path of the service config path.
|
||||
//****************************************************************************************************************************************************
|
||||
QString serviceConfigPath()
|
||||
QString grpcServerConfigPath()
|
||||
{
|
||||
return QDir(userConfigDir()).absoluteFilePath(serviceConfigFilename());
|
||||
return QDir(userConfigDir()).absoluteFilePath(grpcServerConfigFilename());
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \return The absolute path of the service config path.
|
||||
//****************************************************************************************************************************************************
|
||||
QString grpcClientConfigBasePath()
|
||||
{
|
||||
return QDir(userConfigDir()).absoluteFilePath(grpcClientConfigBaseFilename());
|
||||
}
|
||||
|
||||
|
||||
@ -81,10 +101,36 @@ QString serverCertificatePath()
|
||||
//****************************************************************************************************************************************************
|
||||
QString serverKeyPath()
|
||||
{
|
||||
|
||||
return QDir(userConfigDir()).absoluteFilePath(serverKeyFilename());
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] token The token to put in the file.
|
||||
/// \return The path of the created file.
|
||||
/// \return A null string if the file could not be saved..
|
||||
//****************************************************************************************************************************************************
|
||||
QString createClientConfigFile(QString const &token)
|
||||
{
|
||||
QString const basePath = grpcClientConfigBasePath();
|
||||
QString path, error;
|
||||
for (qint32 i = 0; i < 1000; ++i) // we try a decent amount of times
|
||||
{
|
||||
path = basePath.arg(i);
|
||||
if (!QFileInfo(path).exists())
|
||||
{
|
||||
GRPCConfig config;
|
||||
config.token = token;
|
||||
if (!config.save(path))
|
||||
return QString();
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] level The Log::Level.
|
||||
|
||||
@ -31,9 +31,11 @@ namespace bridgepp
|
||||
|
||||
typedef std::shared_ptr<grpc::StreamEvent> SPStreamEvent; ///< Type definition for shared pointer to grpc::StreamEvent.
|
||||
|
||||
QString serviceConfigPath(); ///< Return the path of the service config file.
|
||||
QString grpcServerConfigPath(); ///< Return the path of the gRPC server config file.
|
||||
QString grpcClientConfigBasePath(); ///< Return the path of the gRPC client config file.
|
||||
QString serverCertificatePath(); ///< Return the path of the server certificate.
|
||||
QString serverKeyPath(); ///< Return the path of the server key.
|
||||
QString createClientConfigFile(QString const &token); ///< Create the client config file the server will retrieve and return its path.
|
||||
grpc::LogLevel logLevelToGRPC(Log::Level level); ///< Convert a Log::Level to gRPC enum value.
|
||||
Log::Level logLevelFromGRPC(grpc::LogLevel level); ///< Convert a grpc::LogLevel to a Log::Level.
|
||||
void userToGRPC(User const &user, grpc::User &outGRPCUser); ///< Convert a bridgepp::User to a grpc::User.
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
namespace grpc {
|
||||
|
||||
static const char* Bridge_method_names[] = {
|
||||
"/grpc.Bridge/CheckTokens",
|
||||
"/grpc.Bridge/AddLogEntry",
|
||||
"/grpc.Bridge/GuiReady",
|
||||
"/grpc.Bridge/Quit",
|
||||
@ -89,66 +90,90 @@ std::unique_ptr< Bridge::Stub> Bridge::NewStub(const std::shared_ptr< ::grpc::Ch
|
||||
}
|
||||
|
||||
Bridge::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
|
||||
: channel_(channel), rpcmethod_AddLogEntry_(Bridge_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GuiReady_(Bridge_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Quit_(Bridge_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Restart_(Bridge_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ShowOnStartup_(Bridge_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ShowSplashScreen_(Bridge_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsFirstGuiStart_(Bridge_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsAutostartOn_(Bridge_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsAutostartOn_(Bridge_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsBetaEnabled_(Bridge_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsBetaEnabled_(Bridge_method_names[10], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsAllMailVisible_(Bridge_method_names[11], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsAllMailVisible_(Bridge_method_names[12], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GoOs_(Bridge_method_names[13], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_TriggerReset_(Bridge_method_names[14], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Version_(Bridge_method_names[15], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LogsPath_(Bridge_method_names[16], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LicensePath_(Bridge_method_names[17], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ReleaseNotesPageLink_(Bridge_method_names[18], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_DependencyLicensesLink_(Bridge_method_names[19], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LandingPageLink_(Bridge_method_names[20], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetColorSchemeName_(Bridge_method_names[21], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ColorSchemeName_(Bridge_method_names[22], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_CurrentEmailClient_(Bridge_method_names[23], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ReportBug_(Bridge_method_names[24], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ForceLauncher_(Bridge_method_names[25], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetMainExecutable_(Bridge_method_names[26], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Login_(Bridge_method_names[27], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Login2FA_(Bridge_method_names[28], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Login2Passwords_(Bridge_method_names[29], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LoginAbort_(Bridge_method_names[30], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_CheckUpdate_(Bridge_method_names[31], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_InstallUpdate_(Bridge_method_names[32], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsAutomaticUpdateOn_(Bridge_method_names[33], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsAutomaticUpdateOn_(Bridge_method_names[34], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsCacheOnDiskEnabled_(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_ChangeLocalCache_(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_Hostname_(Bridge_method_names[42], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ImapPort_(Bridge_method_names[43], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SmtpPort_(Bridge_method_names[44], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ChangePorts_(Bridge_method_names[45], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsPortFree_(Bridge_method_names[46], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_AvailableKeychains_(Bridge_method_names[47], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetCurrentKeychain_(Bridge_method_names[48], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_CurrentKeychain_(Bridge_method_names[49], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetUserList_(Bridge_method_names[50], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetUser_(Bridge_method_names[51], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetUserSplitMode_(Bridge_method_names[52], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LogoutUser_(Bridge_method_names[53], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_RemoveUser_(Bridge_method_names[54], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ConfigureUserAppleMail_(Bridge_method_names[55], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_RunEventStream_(Bridge_method_names[56], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_StopEventStream_(Bridge_method_names[57], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
: channel_(channel), rpcmethod_CheckTokens_(Bridge_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_AddLogEntry_(Bridge_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GuiReady_(Bridge_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Quit_(Bridge_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Restart_(Bridge_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ShowOnStartup_(Bridge_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ShowSplashScreen_(Bridge_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsFirstGuiStart_(Bridge_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsAutostartOn_(Bridge_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsAutostartOn_(Bridge_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsBetaEnabled_(Bridge_method_names[10], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsBetaEnabled_(Bridge_method_names[11], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsAllMailVisible_(Bridge_method_names[12], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsAllMailVisible_(Bridge_method_names[13], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GoOs_(Bridge_method_names[14], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_TriggerReset_(Bridge_method_names[15], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Version_(Bridge_method_names[16], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LogsPath_(Bridge_method_names[17], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LicensePath_(Bridge_method_names[18], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ReleaseNotesPageLink_(Bridge_method_names[19], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_DependencyLicensesLink_(Bridge_method_names[20], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LandingPageLink_(Bridge_method_names[21], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetColorSchemeName_(Bridge_method_names[22], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ColorSchemeName_(Bridge_method_names[23], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_CurrentEmailClient_(Bridge_method_names[24], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ReportBug_(Bridge_method_names[25], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ForceLauncher_(Bridge_method_names[26], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetMainExecutable_(Bridge_method_names[27], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Login_(Bridge_method_names[28], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Login2FA_(Bridge_method_names[29], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Login2Passwords_(Bridge_method_names[30], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LoginAbort_(Bridge_method_names[31], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_CheckUpdate_(Bridge_method_names[32], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_InstallUpdate_(Bridge_method_names[33], 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_IsCacheOnDiskEnabled_(Bridge_method_names[36], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_DiskCachePath_(Bridge_method_names[37], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ChangeLocalCache_(Bridge_method_names[38], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetIsDoHEnabled_(Bridge_method_names[39], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsDoHEnabled_(Bridge_method_names[40], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetUseSslForSmtp_(Bridge_method_names[41], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_UseSslForSmtp_(Bridge_method_names[42], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_Hostname_(Bridge_method_names[43], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ImapPort_(Bridge_method_names[44], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SmtpPort_(Bridge_method_names[45], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ChangePorts_(Bridge_method_names[46], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_IsPortFree_(Bridge_method_names[47], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_AvailableKeychains_(Bridge_method_names[48], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetCurrentKeychain_(Bridge_method_names[49], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_CurrentKeychain_(Bridge_method_names[50], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetUserList_(Bridge_method_names[51], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_GetUser_(Bridge_method_names[52], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_SetUserSplitMode_(Bridge_method_names[53], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_LogoutUser_(Bridge_method_names[54], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_RemoveUser_(Bridge_method_names[55], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_ConfigureUserAppleMail_(Bridge_method_names[56], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
|
||||
, rpcmethod_RunEventStream_(Bridge_method_names[57], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
|
||||
, rpcmethod_StopEventStream_(Bridge_method_names[58], 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) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::google::protobuf::StringValue, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CheckTokens_, context, request, response);
|
||||
}
|
||||
|
||||
void Bridge::Stub::async::CheckTokens(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::StringValue* response, std::function<void(::grpc::Status)> f) {
|
||||
::grpc::internal::CallbackUnaryCall< ::google::protobuf::StringValue, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CheckTokens_, context, request, response, std::move(f));
|
||||
}
|
||||
|
||||
void Bridge::Stub::async::CheckTokens(::grpc::ClientContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::StringValue* response, ::grpc::ClientUnaryReactor* reactor) {
|
||||
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CheckTokens_, context, request, response, reactor);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>* Bridge::Stub::PrepareAsyncCheckTokensRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
|
||||
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::StringValue, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CheckTokens_, context, request);
|
||||
}
|
||||
|
||||
::grpc::ClientAsyncResponseReader< ::google::protobuf::StringValue>* Bridge::Stub::AsyncCheckTokensRaw(::grpc::ClientContext* context, const ::google::protobuf::StringValue& request, ::grpc::CompletionQueue* cq) {
|
||||
auto* result =
|
||||
this->PrepareAsyncCheckTokensRaw(context, request, cq);
|
||||
result->StartCall();
|
||||
return result;
|
||||
}
|
||||
|
||||
::grpc::Status Bridge::Stub::AddLogEntry(::grpc::ClientContext* context, const ::grpc::AddLogEntryRequest& request, ::google::protobuf::Empty* response) {
|
||||
return ::grpc::internal::BlockingUnaryCall< ::grpc::AddLogEntryRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AddLogEntry_, context, request, response);
|
||||
}
|
||||
@ -1480,6 +1505,16 @@ Bridge::Service::Service() {
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[0],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::google::protobuf::StringValue, ::google::protobuf::StringValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::google::protobuf::StringValue* req,
|
||||
::google::protobuf::StringValue* resp) {
|
||||
return service->CheckTokens(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[1],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::AddLogEntryRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
::grpc::ServerContext* ctx,
|
||||
@ -1487,16 +1522,6 @@ Bridge::Service::Service() {
|
||||
::google::protobuf::Empty* resp) {
|
||||
return service->AddLogEntry(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[1],
|
||||
::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,
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::google::protobuf::Empty* req,
|
||||
::google::protobuf::Empty* resp) {
|
||||
return service->GuiReady(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[2],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
@ -1505,7 +1530,7 @@ Bridge::Service::Service() {
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::google::protobuf::Empty* req,
|
||||
::google::protobuf::Empty* resp) {
|
||||
return service->Quit(ctx, req, resp);
|
||||
return service->GuiReady(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[3],
|
||||
@ -1515,17 +1540,17 @@ Bridge::Service::Service() {
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::google::protobuf::Empty* req,
|
||||
::google::protobuf::Empty* resp) {
|
||||
return service->Restart(ctx, req, resp);
|
||||
return service->Quit(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[4],
|
||||
::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, ::google::protobuf::Empty, ::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->ShowOnStartup(ctx, req, resp);
|
||||
::google::protobuf::Empty* resp) {
|
||||
return service->Restart(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[5],
|
||||
@ -1535,7 +1560,7 @@ Bridge::Service::Service() {
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::google::protobuf::Empty* req,
|
||||
::google::protobuf::BoolValue* resp) {
|
||||
return service->ShowSplashScreen(ctx, req, resp);
|
||||
return service->ShowOnStartup(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[6],
|
||||
@ -1545,11 +1570,21 @@ Bridge::Service::Service() {
|
||||
::grpc::ServerContext* ctx,
|
||||
const ::google::protobuf::Empty* req,
|
||||
::google::protobuf::BoolValue* resp) {
|
||||
return service->IsFirstGuiStart(ctx, req, resp);
|
||||
return service->ShowSplashScreen(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[7],
|
||||
::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->IsFirstGuiStart(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[8],
|
||||
::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,
|
||||
@ -1558,7 +1593,7 @@ Bridge::Service::Service() {
|
||||
return service->SetIsAutostartOn(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[8],
|
||||
Bridge_method_names[9],
|
||||
::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,
|
||||
@ -1568,7 +1603,7 @@ Bridge::Service::Service() {
|
||||
return service->IsAutostartOn(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[9],
|
||||
Bridge_method_names[10],
|
||||
::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,
|
||||
@ -1578,7 +1613,7 @@ Bridge::Service::Service() {
|
||||
return service->SetIsBetaEnabled(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[10],
|
||||
Bridge_method_names[11],
|
||||
::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,
|
||||
@ -1588,7 +1623,7 @@ Bridge::Service::Service() {
|
||||
return service->IsBetaEnabled(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[11],
|
||||
Bridge_method_names[12],
|
||||
::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,
|
||||
@ -1598,7 +1633,7 @@ Bridge::Service::Service() {
|
||||
return service->SetIsAllMailVisible(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[12],
|
||||
Bridge_method_names[13],
|
||||
::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,
|
||||
@ -1608,7 +1643,7 @@ Bridge::Service::Service() {
|
||||
return service->IsAllMailVisible(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[13],
|
||||
Bridge_method_names[14],
|
||||
::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,
|
||||
@ -1618,7 +1653,7 @@ Bridge::Service::Service() {
|
||||
return service->GoOs(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[14],
|
||||
Bridge_method_names[15],
|
||||
::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,
|
||||
@ -1628,7 +1663,7 @@ Bridge::Service::Service() {
|
||||
return service->TriggerReset(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[15],
|
||||
Bridge_method_names[16],
|
||||
::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,
|
||||
@ -1638,7 +1673,7 @@ Bridge::Service::Service() {
|
||||
return service->Version(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[16],
|
||||
Bridge_method_names[17],
|
||||
::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,
|
||||
@ -1648,7 +1683,7 @@ Bridge::Service::Service() {
|
||||
return service->LogsPath(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[17],
|
||||
Bridge_method_names[18],
|
||||
::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,
|
||||
@ -1658,7 +1693,7 @@ Bridge::Service::Service() {
|
||||
return service->LicensePath(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[18],
|
||||
Bridge_method_names[19],
|
||||
::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,
|
||||
@ -1668,7 +1703,7 @@ Bridge::Service::Service() {
|
||||
return service->ReleaseNotesPageLink(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[19],
|
||||
Bridge_method_names[20],
|
||||
::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,
|
||||
@ -1678,7 +1713,7 @@ Bridge::Service::Service() {
|
||||
return service->DependencyLicensesLink(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[20],
|
||||
Bridge_method_names[21],
|
||||
::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,
|
||||
@ -1688,7 +1723,7 @@ Bridge::Service::Service() {
|
||||
return service->LandingPageLink(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[21],
|
||||
Bridge_method_names[22],
|
||||
::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,
|
||||
@ -1698,7 +1733,7 @@ Bridge::Service::Service() {
|
||||
return service->SetColorSchemeName(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[22],
|
||||
Bridge_method_names[23],
|
||||
::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,
|
||||
@ -1708,7 +1743,7 @@ Bridge::Service::Service() {
|
||||
return service->ColorSchemeName(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[23],
|
||||
Bridge_method_names[24],
|
||||
::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,
|
||||
@ -1718,7 +1753,7 @@ Bridge::Service::Service() {
|
||||
return service->CurrentEmailClient(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[24],
|
||||
Bridge_method_names[25],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::ReportBugRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
@ -1728,7 +1763,7 @@ Bridge::Service::Service() {
|
||||
return service->ReportBug(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[25],
|
||||
Bridge_method_names[26],
|
||||
::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,
|
||||
@ -1738,7 +1773,7 @@ Bridge::Service::Service() {
|
||||
return service->ForceLauncher(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[26],
|
||||
Bridge_method_names[27],
|
||||
::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,
|
||||
@ -1748,7 +1783,7 @@ Bridge::Service::Service() {
|
||||
return service->SetMainExecutable(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[27],
|
||||
Bridge_method_names[28],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::LoginRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
@ -1758,7 +1793,7 @@ Bridge::Service::Service() {
|
||||
return service->Login(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[28],
|
||||
Bridge_method_names[29],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::LoginRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
@ -1768,7 +1803,7 @@ Bridge::Service::Service() {
|
||||
return service->Login2FA(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[29],
|
||||
Bridge_method_names[30],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::LoginRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
@ -1778,7 +1813,7 @@ Bridge::Service::Service() {
|
||||
return service->Login2Passwords(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[30],
|
||||
Bridge_method_names[31],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::LoginAbortRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
@ -1788,7 +1823,7 @@ Bridge::Service::Service() {
|
||||
return service->LoginAbort(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[31],
|
||||
Bridge_method_names[32],
|
||||
::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,
|
||||
@ -1798,7 +1833,7 @@ Bridge::Service::Service() {
|
||||
return service->CheckUpdate(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[32],
|
||||
Bridge_method_names[33],
|
||||
::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,
|
||||
@ -1808,7 +1843,7 @@ Bridge::Service::Service() {
|
||||
return service->InstallUpdate(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[33],
|
||||
Bridge_method_names[34],
|
||||
::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,
|
||||
@ -1818,7 +1853,7 @@ Bridge::Service::Service() {
|
||||
return service->SetIsAutomaticUpdateOn(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[34],
|
||||
Bridge_method_names[35],
|
||||
::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,
|
||||
@ -1828,7 +1863,7 @@ Bridge::Service::Service() {
|
||||
return service->IsAutomaticUpdateOn(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[35],
|
||||
Bridge_method_names[36],
|
||||
::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,
|
||||
@ -1838,7 +1873,7 @@ Bridge::Service::Service() {
|
||||
return service->IsCacheOnDiskEnabled(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[36],
|
||||
Bridge_method_names[37],
|
||||
::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,
|
||||
@ -1848,7 +1883,7 @@ Bridge::Service::Service() {
|
||||
return service->DiskCachePath(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[37],
|
||||
Bridge_method_names[38],
|
||||
::grpc::internal::RpcMethod::NORMAL_RPC,
|
||||
new ::grpc::internal::RpcMethodHandler< Bridge::Service, ::grpc::ChangeLocalCacheRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
|
||||
[](Bridge::Service* service,
|
||||
@ -1858,7 +1893,7 @@ Bridge::Service::Service() {
|
||||
return service->ChangeLocalCache(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[38],
|
||||
Bridge_method_names[39],
|
||||
::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,
|
||||
@ -1868,7 +1903,7 @@ Bridge::Service::Service() {
|
||||
return service->SetIsDoHEnabled(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[39],
|
||||
Bridge_method_names[40],
|
||||
::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,
|
||||
@ -1878,7 +1913,7 @@ Bridge::Service::Service() {
|
||||
return service->IsDoHEnabled(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[40],
|
||||
Bridge_method_names[41],
|
||||
::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,
|
||||
@ -1888,7 +1923,7 @@ Bridge::Service::Service() {
|
||||
return service->SetUseSslForSmtp(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[41],
|
||||
Bridge_method_names[42],
|
||||
::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,
|
||||
@ -1898,7 +1933,7 @@ Bridge::Service::Service() {
|
||||
return service->UseSslForSmtp(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[42],
|
||||
Bridge_method_names[43],
|
||||
::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,
|
||||
@ -1908,7 +1943,7 @@ Bridge::Service::Service() {
|
||||
return service->Hostname(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[43],
|
||||
Bridge_method_names[44],
|
||||
::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,
|
||||
@ -1918,7 +1953,7 @@ Bridge::Service::Service() {
|
||||
return service->ImapPort(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[44],
|
||||
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,
|
||||
@ -1928,7 +1963,7 @@ Bridge::Service::Service() {
|
||||
return service->SmtpPort(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[45],
|
||||
Bridge_method_names[46],
|
||||
::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,
|
||||
@ -1938,7 +1973,7 @@ Bridge::Service::Service() {
|
||||
return service->ChangePorts(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[46],
|
||||
Bridge_method_names[47],
|
||||
::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,
|
||||
@ -1948,7 +1983,7 @@ Bridge::Service::Service() {
|
||||
return service->IsPortFree(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[47],
|
||||
Bridge_method_names[48],
|
||||
::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,
|
||||
@ -1958,7 +1993,7 @@ Bridge::Service::Service() {
|
||||
return service->AvailableKeychains(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[48],
|
||||
Bridge_method_names[49],
|
||||
::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,
|
||||
@ -1968,7 +2003,7 @@ Bridge::Service::Service() {
|
||||
return service->SetCurrentKeychain(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[49],
|
||||
Bridge_method_names[50],
|
||||
::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,
|
||||
@ -1978,7 +2013,7 @@ Bridge::Service::Service() {
|
||||
return service->CurrentKeychain(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[50],
|
||||
Bridge_method_names[51],
|
||||
::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,
|
||||
@ -1988,7 +2023,7 @@ Bridge::Service::Service() {
|
||||
return service->GetUserList(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[51],
|
||||
Bridge_method_names[52],
|
||||
::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,
|
||||
@ -1998,7 +2033,7 @@ Bridge::Service::Service() {
|
||||
return service->GetUser(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[52],
|
||||
Bridge_method_names[53],
|
||||
::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,
|
||||
@ -2008,7 +2043,7 @@ Bridge::Service::Service() {
|
||||
return service->SetUserSplitMode(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[53],
|
||||
Bridge_method_names[54],
|
||||
::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,
|
||||
@ -2018,7 +2053,7 @@ Bridge::Service::Service() {
|
||||
return service->LogoutUser(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[54],
|
||||
Bridge_method_names[55],
|
||||
::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,
|
||||
@ -2028,7 +2063,7 @@ Bridge::Service::Service() {
|
||||
return service->RemoveUser(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[55],
|
||||
Bridge_method_names[56],
|
||||
::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,
|
||||
@ -2038,7 +2073,7 @@ Bridge::Service::Service() {
|
||||
return service->ConfigureUserAppleMail(ctx, req, resp);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[56],
|
||||
Bridge_method_names[57],
|
||||
::grpc::internal::RpcMethod::SERVER_STREAMING,
|
||||
new ::grpc::internal::ServerStreamingHandler< Bridge::Service, ::grpc::EventStreamRequest, ::grpc::StreamEvent>(
|
||||
[](Bridge::Service* service,
|
||||
@ -2048,7 +2083,7 @@ Bridge::Service::Service() {
|
||||
return service->RunEventStream(ctx, req, writer);
|
||||
}, this)));
|
||||
AddMethod(new ::grpc::internal::RpcServiceMethod(
|
||||
Bridge_method_names[57],
|
||||
Bridge_method_names[58],
|
||||
::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,
|
||||
@ -2062,6 +2097,13 @@ Bridge::Service::Service() {
|
||||
Bridge::Service::~Service() {
|
||||
}
|
||||
|
||||
::grpc::Status Bridge::Service::CheckTokens(::grpc::ServerContext* context, const ::google::protobuf::StringValue* request, ::google::protobuf::StringValue* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
(void) response;
|
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
|
||||
}
|
||||
|
||||
::grpc::Status Bridge::Service::AddLogEntry(::grpc::ServerContext* context, const ::grpc::AddLogEntryRequest* request, ::google::protobuf::Empty* response) {
|
||||
(void) context;
|
||||
(void) request;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1492,109 +1492,110 @@ const char descriptor_table_protodef_bridge_2eproto[] PROTOBUF_SECTION_VARIABLE(
|
||||
"ype\022\033\n\027CACHE_UNAVAILABLE_ERROR\020\000\022\031\n\025CACH"
|
||||
"E_CANT_MOVE_ERROR\020\001\022\r\n\tDISK_FULL\020\002*A\n\025Ma"
|
||||
"ilSettingsErrorType\022\023\n\017IMAP_PORT_ISSUE\020\000"
|
||||
"\022\023\n\017SMTP_PORT_ISSUE\020\0012\234\037\n\006Bridge\022\?\n\013AddL"
|
||||
"ogEntry\022\030.grpc.AddLogEntryRequest\032\026.goog"
|
||||
"le.protobuf.Empty\022:\n\010GuiReady\022\026.google.p"
|
||||
"rotobuf.Empty\032\026.google.protobuf.Empty\0226\n"
|
||||
"\004Quit\022\026.google.protobuf.Empty\032\026.google.p"
|
||||
"rotobuf.Empty\0229\n\007Restart\022\026.google.protob"
|
||||
"uf.Empty\032\026.google.protobuf.Empty\022C\n\rShow"
|
||||
"OnStartup\022\026.google.protobuf.Empty\032\032.goog"
|
||||
"le.protobuf.BoolValue\022F\n\020ShowSplashScree"
|
||||
"n\022\026.google.protobuf.Empty\032\032.google.proto"
|
||||
"buf.BoolValue\022E\n\017IsFirstGuiStart\022\026.googl"
|
||||
"e.protobuf.Empty\032\032.google.protobuf.BoolV"
|
||||
"alue\022F\n\020SetIsAutostartOn\022\032.google.protob"
|
||||
"uf.BoolValue\032\026.google.protobuf.Empty\022C\n\r"
|
||||
"IsAutostartOn\022\026.google.protobuf.Empty\032\032."
|
||||
"google.protobuf.BoolValue\022F\n\020SetIsBetaEn"
|
||||
"abled\022\032.google.protobuf.BoolValue\032\026.goog"
|
||||
"le.protobuf.Empty\022C\n\rIsBetaEnabled\022\026.goo"
|
||||
"gle.protobuf.Empty\032\032.google.protobuf.Boo"
|
||||
"lValue\022I\n\023SetIsAllMailVisible\022\032.google.p"
|
||||
"rotobuf.BoolValue\032\026.google.protobuf.Empt"
|
||||
"y\022F\n\020IsAllMailVisible\022\026.google.protobuf."
|
||||
"Empty\032\032.google.protobuf.BoolValue\022<\n\004GoO"
|
||||
"s\022\026.google.protobuf.Empty\032\034.google.proto"
|
||||
"buf.StringValue\022>\n\014TriggerReset\022\026.google"
|
||||
".protobuf.Empty\032\026.google.protobuf.Empty\022"
|
||||
"\?\n\007Version\022\026.google.protobuf.Empty\032\034.goo"
|
||||
"gle.protobuf.StringValue\022@\n\010LogsPath\022\026.g"
|
||||
"\022\023\n\017SMTP_PORT_ISSUE\020\0012\347\037\n\006Bridge\022I\n\013Chec"
|
||||
"kTokens\022\034.google.protobuf.StringValue\032\034."
|
||||
"google.protobuf.StringValue\022\?\n\013AddLogEnt"
|
||||
"ry\022\030.grpc.AddLogEntryRequest\032\026.google.pr"
|
||||
"otobuf.Empty\022:\n\010GuiReady\022\026.google.protob"
|
||||
"uf.Empty\032\026.google.protobuf.Empty\0226\n\004Quit"
|
||||
"\022\026.google.protobuf.Empty\032\026.google.protob"
|
||||
"uf.Empty\0229\n\007Restart\022\026.google.protobuf.Em"
|
||||
"pty\032\026.google.protobuf.Empty\022C\n\rShowOnSta"
|
||||
"rtup\022\026.google.protobuf.Empty\032\032.google.pr"
|
||||
"otobuf.BoolValue\022F\n\020ShowSplashScreen\022\026.g"
|
||||
"oogle.protobuf.Empty\032\032.google.protobuf.B"
|
||||
"oolValue\022E\n\017IsFirstGuiStart\022\026.google.pro"
|
||||
"tobuf.Empty\032\032.google.protobuf.BoolValue\022"
|
||||
"F\n\020SetIsAutostartOn\022\032.google.protobuf.Bo"
|
||||
"olValue\032\026.google.protobuf.Empty\022C\n\rIsAut"
|
||||
"ostartOn\022\026.google.protobuf.Empty\032\032.googl"
|
||||
"e.protobuf.BoolValue\022F\n\020SetIsBetaEnabled"
|
||||
"\022\032.google.protobuf.BoolValue\032\026.google.pr"
|
||||
"otobuf.Empty\022C\n\rIsBetaEnabled\022\026.google.p"
|
||||
"rotobuf.Empty\032\032.google.protobuf.BoolValu"
|
||||
"e\022I\n\023SetIsAllMailVisible\022\032.google.protob"
|
||||
"uf.BoolValue\032\026.google.protobuf.Empty\022F\n\020"
|
||||
"IsAllMailVisible\022\026.google.protobuf.Empty"
|
||||
"\032\032.google.protobuf.BoolValue\022<\n\004GoOs\022\026.g"
|
||||
"oogle.protobuf.Empty\032\034.google.protobuf.S"
|
||||
"tringValue\022C\n\013LicensePath\022\026.google.proto"
|
||||
"buf.Empty\032\034.google.protobuf.StringValue\022"
|
||||
"L\n\024ReleaseNotesPageLink\022\026.google.protobu"
|
||||
"f.Empty\032\034.google.protobuf.StringValue\022N\n"
|
||||
"\026DependencyLicensesLink\022\026.google.protobu"
|
||||
"f.Empty\032\034.google.protobuf.StringValue\022G\n"
|
||||
"\017LandingPageLink\022\026.google.protobuf.Empty"
|
||||
"\032\034.google.protobuf.StringValue\022J\n\022SetCol"
|
||||
"orSchemeName\022\034.google.protobuf.StringVal"
|
||||
"ue\032\026.google.protobuf.Empty\022G\n\017ColorSchem"
|
||||
"eName\022\026.google.protobuf.Empty\032\034.google.p"
|
||||
"rotobuf.StringValue\022J\n\022CurrentEmailClien"
|
||||
"t\022\026.google.protobuf.Empty\032\034.google.proto"
|
||||
"buf.StringValue\022;\n\tReportBug\022\026.grpc.Repo"
|
||||
"rtBugRequest\032\026.google.protobuf.Empty\022E\n\r"
|
||||
"ForceLauncher\022\034.google.protobuf.StringVa"
|
||||
"lue\032\026.google.protobuf.Empty\022I\n\021SetMainEx"
|
||||
"ecutable\022\034.google.protobuf.StringValue\032\026"
|
||||
".google.protobuf.Empty\0223\n\005Login\022\022.grpc.L"
|
||||
"oginRequest\032\026.google.protobuf.Empty\0226\n\010L"
|
||||
"ogin2FA\022\022.grpc.LoginRequest\032\026.google.pro"
|
||||
"tobuf.Empty\022=\n\017Login2Passwords\022\022.grpc.Lo"
|
||||
"ginRequest\032\026.google.protobuf.Empty\022=\n\nLo"
|
||||
"ginAbort\022\027.grpc.LoginAbortRequest\032\026.goog"
|
||||
"le.protobuf.Empty\022=\n\013CheckUpdate\022\026.googl"
|
||||
"e.protobuf.Empty\032\026.google.protobuf.Empty"
|
||||
"\022\?\n\rInstallUpdate\022\026.google.protobuf.Empt"
|
||||
"y\032\026.google.protobuf.Empty\022L\n\026SetIsAutoma"
|
||||
"ticUpdateOn\022\032.google.protobuf.BoolValue\032"
|
||||
"\026.google.protobuf.Empty\022I\n\023IsAutomaticUp"
|
||||
"dateOn\022\026.google.protobuf.Empty\032\032.google."
|
||||
"protobuf.BoolValue\022J\n\024IsCacheOnDiskEnabl"
|
||||
"ed\022\026.google.protobuf.Empty\032\032.google.prot"
|
||||
"obuf.BoolValue\022E\n\rDiskCachePath\022\026.google"
|
||||
"tringValue\022>\n\014TriggerReset\022\026.google.prot"
|
||||
"obuf.Empty\032\026.google.protobuf.Empty\022\?\n\007Ve"
|
||||
"rsion\022\026.google.protobuf.Empty\032\034.google.p"
|
||||
"rotobuf.StringValue\022@\n\010LogsPath\022\026.google"
|
||||
".protobuf.Empty\032\034.google.protobuf.String"
|
||||
"Value\022I\n\020ChangeLocalCache\022\035.grpc.ChangeL"
|
||||
"ocalCacheRequest\032\026.google.protobuf.Empty"
|
||||
"\022E\n\017SetIsDoHEnabled\022\032.google.protobuf.Bo"
|
||||
"olValue\032\026.google.protobuf.Empty\022B\n\014IsDoH"
|
||||
"Enabled\022\026.google.protobuf.Empty\032\032.google"
|
||||
".protobuf.BoolValue\022F\n\020SetUseSslForSmtp\022"
|
||||
"\032.google.protobuf.BoolValue\032\026.google.pro"
|
||||
"tobuf.Empty\022C\n\rUseSslForSmtp\022\026.google.pr"
|
||||
"otobuf.Empty\032\032.google.protobuf.BoolValue"
|
||||
"\022@\n\010Hostname\022\026.google.protobuf.Empty\032\034.g"
|
||||
"oogle.protobuf.StringValue\022\?\n\010ImapPort\022\026"
|
||||
".google.protobuf.Empty\032\033.google.protobuf"
|
||||
".Int32Value\022\?\n\010SmtpPort\022\026.google.protobu"
|
||||
"f.Empty\032\033.google.protobuf.Int32Value\022\?\n\013"
|
||||
"ChangePorts\022\030.grpc.ChangePortsRequest\032\026."
|
||||
"google.protobuf.Empty\022E\n\nIsPortFree\022\033.go"
|
||||
"ogle.protobuf.Int32Value\032\032.google.protob"
|
||||
"uf.BoolValue\022N\n\022AvailableKeychains\022\026.goo"
|
||||
"gle.protobuf.Empty\032 .grpc.AvailableKeych"
|
||||
"ainsResponse\022J\n\022SetCurrentKeychain\022\034.goo"
|
||||
"gle.protobuf.StringValue\032\026.google.protob"
|
||||
"uf.Empty\022G\n\017CurrentKeychain\022\026.google.pro"
|
||||
"tobuf.Empty\032\034.google.protobuf.StringValu"
|
||||
"e\022=\n\013GetUserList\022\026.google.protobuf.Empty"
|
||||
"\032\026.grpc.UserListResponse\0223\n\007GetUser\022\034.go"
|
||||
"ogle.protobuf.StringValue\032\n.grpc.User\022F\n"
|
||||
"\020SetUserSplitMode\022\032.grpc.UserSplitModeRe"
|
||||
"quest\032\026.google.protobuf.Empty\022B\n\nLogoutU"
|
||||
"ser\022\034.google.protobuf.StringValue\032\026.goog"
|
||||
"le.protobuf.Empty\022B\n\nRemoveUser\022\034.google"
|
||||
".protobuf.StringValue\032\026.google.protobuf."
|
||||
"Empty\022Q\n\026ConfigureUserAppleMail\022\037.grpc.C"
|
||||
"onfigureAppleMailRequest\032\026.google.protob"
|
||||
"uf.Empty\022\?\n\016RunEventStream\022\030.grpc.EventS"
|
||||
"treamRequest\032\021.grpc.StreamEvent0\001\022A\n\017Sto"
|
||||
"pEventStream\022\026.google.protobuf.Empty\032\026.g"
|
||||
"oogle.protobuf.EmptyB6Z4github.com/Proto"
|
||||
"nMail/proton-bridge/v2/internal/grpcb\006pr"
|
||||
"oto3"
|
||||
"Value\022C\n\013LicensePath\022\026.google.protobuf.E"
|
||||
"mpty\032\034.google.protobuf.StringValue\022L\n\024Re"
|
||||
"leaseNotesPageLink\022\026.google.protobuf.Emp"
|
||||
"ty\032\034.google.protobuf.StringValue\022N\n\026Depe"
|
||||
"ndencyLicensesLink\022\026.google.protobuf.Emp"
|
||||
"ty\032\034.google.protobuf.StringValue\022G\n\017Land"
|
||||
"ingPageLink\022\026.google.protobuf.Empty\032\034.go"
|
||||
"ogle.protobuf.StringValue\022J\n\022SetColorSch"
|
||||
"emeName\022\034.google.protobuf.StringValue\032\026."
|
||||
"google.protobuf.Empty\022G\n\017ColorSchemeName"
|
||||
"\022\026.google.protobuf.Empty\032\034.google.protob"
|
||||
"uf.StringValue\022J\n\022CurrentEmailClient\022\026.g"
|
||||
"oogle.protobuf.Empty\032\034.google.protobuf.S"
|
||||
"tringValue\022;\n\tReportBug\022\026.grpc.ReportBug"
|
||||
"Request\032\026.google.protobuf.Empty\022E\n\rForce"
|
||||
"Launcher\022\034.google.protobuf.StringValue\032\026"
|
||||
".google.protobuf.Empty\022I\n\021SetMainExecuta"
|
||||
"ble\022\034.google.protobuf.StringValue\032\026.goog"
|
||||
"le.protobuf.Empty\0223\n\005Login\022\022.grpc.LoginR"
|
||||
"equest\032\026.google.protobuf.Empty\0226\n\010Login2"
|
||||
"FA\022\022.grpc.LoginRequest\032\026.google.protobuf"
|
||||
".Empty\022=\n\017Login2Passwords\022\022.grpc.LoginRe"
|
||||
"quest\032\026.google.protobuf.Empty\022=\n\nLoginAb"
|
||||
"ort\022\027.grpc.LoginAbortRequest\032\026.google.pr"
|
||||
"otobuf.Empty\022=\n\013CheckUpdate\022\026.google.pro"
|
||||
"tobuf.Empty\032\026.google.protobuf.Empty\022\?\n\rI"
|
||||
"nstallUpdate\022\026.google.protobuf.Empty\032\026.g"
|
||||
"oogle.protobuf.Empty\022L\n\026SetIsAutomaticUp"
|
||||
"dateOn\022\032.google.protobuf.BoolValue\032\026.goo"
|
||||
"gle.protobuf.Empty\022I\n\023IsAutomaticUpdateO"
|
||||
"n\022\026.google.protobuf.Empty\032\032.google.proto"
|
||||
"buf.BoolValue\022J\n\024IsCacheOnDiskEnabled\022\026."
|
||||
"google.protobuf.Empty\032\032.google.protobuf."
|
||||
"BoolValue\022E\n\rDiskCachePath\022\026.google.prot"
|
||||
"obuf.Empty\032\034.google.protobuf.StringValue"
|
||||
"\022I\n\020ChangeLocalCache\022\035.grpc.ChangeLocalC"
|
||||
"acheRequest\032\026.google.protobuf.Empty\022E\n\017S"
|
||||
"etIsDoHEnabled\022\032.google.protobuf.BoolVal"
|
||||
"ue\032\026.google.protobuf.Empty\022B\n\014IsDoHEnabl"
|
||||
"ed\022\026.google.protobuf.Empty\032\032.google.prot"
|
||||
"obuf.BoolValue\022F\n\020SetUseSslForSmtp\022\032.goo"
|
||||
"gle.protobuf.BoolValue\032\026.google.protobuf"
|
||||
".Empty\022C\n\rUseSslForSmtp\022\026.google.protobu"
|
||||
"f.Empty\032\032.google.protobuf.BoolValue\022@\n\010H"
|
||||
"ostname\022\026.google.protobuf.Empty\032\034.google"
|
||||
".protobuf.StringValue\022\?\n\010ImapPort\022\026.goog"
|
||||
"le.protobuf.Empty\032\033.google.protobuf.Int3"
|
||||
"2Value\022\?\n\010SmtpPort\022\026.google.protobuf.Emp"
|
||||
"ty\032\033.google.protobuf.Int32Value\022\?\n\013Chang"
|
||||
"ePorts\022\030.grpc.ChangePortsRequest\032\026.googl"
|
||||
"e.protobuf.Empty\022E\n\nIsPortFree\022\033.google."
|
||||
"protobuf.Int32Value\032\032.google.protobuf.Bo"
|
||||
"olValue\022N\n\022AvailableKeychains\022\026.google.p"
|
||||
"rotobuf.Empty\032 .grpc.AvailableKeychainsR"
|
||||
"esponse\022J\n\022SetCurrentKeychain\022\034.google.p"
|
||||
"rotobuf.StringValue\032\026.google.protobuf.Em"
|
||||
"pty\022G\n\017CurrentKeychain\022\026.google.protobuf"
|
||||
".Empty\032\034.google.protobuf.StringValue\022=\n\013"
|
||||
"GetUserList\022\026.google.protobuf.Empty\032\026.gr"
|
||||
"pc.UserListResponse\0223\n\007GetUser\022\034.google."
|
||||
"protobuf.StringValue\032\n.grpc.User\022F\n\020SetU"
|
||||
"serSplitMode\022\032.grpc.UserSplitModeRequest"
|
||||
"\032\026.google.protobuf.Empty\022B\n\nLogoutUser\022\034"
|
||||
".google.protobuf.StringValue\032\026.google.pr"
|
||||
"otobuf.Empty\022B\n\nRemoveUser\022\034.google.prot"
|
||||
"obuf.StringValue\032\026.google.protobuf.Empty"
|
||||
"\022Q\n\026ConfigureUserAppleMail\022\037.grpc.Config"
|
||||
"ureAppleMailRequest\032\026.google.protobuf.Em"
|
||||
"pty\022\?\n\016RunEventStream\022\030.grpc.EventStream"
|
||||
"Request\032\021.grpc.StreamEvent0\001\022A\n\017StopEven"
|
||||
"tStream\022\026.google.protobuf.Empty\032\026.google"
|
||||
".protobuf.EmptyB6Z4github.com/ProtonMail"
|
||||
"/proton-bridge/v2/internal/grpcb\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_bridge_2eproto_deps[2] = {
|
||||
&::descriptor_table_google_2fprotobuf_2fempty_2eproto,
|
||||
@ -1602,7 +1603,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_bridge_2eproto_deps
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_bridge_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_bridge_2eproto = {
|
||||
false, false, 9644, descriptor_table_protodef_bridge_2eproto,
|
||||
false, false, 9719, descriptor_table_protodef_bridge_2eproto,
|
||||
"bridge.proto",
|
||||
&descriptor_table_bridge_2eproto_once, descriptor_table_bridge_2eproto_deps, 2, 58,
|
||||
schemas, file_default_instances, TableStruct_bridge_2eproto::offsets,
|
||||
|
||||
Reference in New Issue
Block a user