diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp index c282c28ae..05666a201 100644 --- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp +++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp @@ -1,1189 +1,1181 @@ #include "CommCoreModule.h" #include "../CryptoTools/DeviceID.h" #include "DatabaseManager.h" #include "DraftStoreOperations.h" -#include "GRPCStreamHostObject.h" #include "InternalModules/GlobalDBSingleton.h" #include "InternalModules/GlobalNetworkSingleton.h" #include "MessageStoreOperations.h" #include "ThreadStoreOperations.h" #include #include namespace comm { using namespace facebook::react; template T CommCoreModule::runSyncOrThrowJSError( jsi::Runtime &rt, std::function task) { std::promise promise; GlobalDBSingleton::instance.scheduleOrRunCancellable([&promise, &task]() { try { if constexpr (std::is_void::value) { task(); promise.set_value(); } else { promise.set_value(task()); } } catch (const std::exception &e) { promise.set_exception(std::make_exception_ptr(e)); } }); // We cannot instantiate JSError on database thread, so // on the main thread we re-throw C++ error, catch it and // transform to informative JSError on the main thread try { return promise.get_future().get(); } catch (const std::exception &e) { throw jsi::JSError(rt, e.what()); } } jsi::Value CommCoreModule::getDraft(jsi::Runtime &rt, const jsi::String &key) { std::string keyStr = key.utf8(rt); return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=, &innerRt]() { std::string error; std::string draftStr; try { draftStr = DatabaseManager::getQueryExecutor().getDraft(keyStr); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([=, &innerRt]() { if (error.size()) { promise->reject(error); return; } jsi::String draft = jsi::String::createFromUtf8(innerRt, draftStr); promise->resolve(std::move(draft)); }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::updateDraft(jsi::Runtime &rt, const jsi::Object &draft) { std::string keyStr = draft.getProperty(rt, "key").asString(rt).utf8(rt); std::string textStr = draft.getProperty(rt, "text").asString(rt).utf8(rt); return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { std::string error; try { DatabaseManager::getQueryExecutor().updateDraft(keyStr, textStr); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); } else { promise->resolve(true); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::moveDraft( jsi::Runtime &rt, const jsi::String &oldKey, const jsi::String &newKey) { std::string oldKeyStr = oldKey.utf8(rt); std::string newKeyStr = newKey.utf8(rt); return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { std::string error; bool result = false; try { result = DatabaseManager::getQueryExecutor().moveDraft( oldKeyStr, newKeyStr); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); } else { promise->resolve(result); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::getAllDrafts(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=, &innerRt]() { std::string error; std::vector draftsVector; size_t numDrafts; try { draftsVector = DatabaseManager::getQueryExecutor().getAllDrafts(); numDrafts = count_if( draftsVector.begin(), draftsVector.end(), [](Draft draft) { return !draft.text.empty(); }); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([=, &innerRt]() { if (error.size()) { promise->reject(error); return; } jsi::Array jsiDrafts = jsi::Array(innerRt, numDrafts); size_t writeIndex = 0; for (Draft draft : draftsVector) { if (draft.text.empty()) { continue; } auto jsiDraft = jsi::Object(innerRt); jsiDraft.setProperty(innerRt, "key", draft.key); jsiDraft.setProperty(innerRt, "text", draft.text); jsiDrafts.setValueAtIndex(innerRt, writeIndex++, jsiDraft); } promise->resolve(std::move(jsiDrafts)); }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::removeAllDrafts(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { std::string error; try { DatabaseManager::getQueryExecutor().removeAllDrafts(); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); return; } promise->resolve(jsi::Value::undefined()); }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Array CommCoreModule::getAllMessagesSync(jsi::Runtime &rt) { auto messagesVector = this->runSyncOrThrowJSError< std::vector>>>(rt, []() { return DatabaseManager::getQueryExecutor().getAllMessages(); }); size_t numMessages{messagesVector.size()}; jsi::Array jsiMessages = jsi::Array(rt, numMessages); size_t writeIndex = 0; for (const auto &[message, media] : messagesVector) { auto jsiMessage = jsi::Object(rt); jsiMessage.setProperty(rt, "id", message.id); if (message.local_id) { auto local_id = message.local_id.get(); jsiMessage.setProperty(rt, "local_id", *local_id); } jsiMessage.setProperty(rt, "thread", message.thread); jsiMessage.setProperty(rt, "user", message.user); jsiMessage.setProperty(rt, "type", std::to_string(message.type)); if (message.future_type) { auto future_type = message.future_type.get(); jsiMessage.setProperty(rt, "future_type", std::to_string(*future_type)); } if (message.content) { auto content = message.content.get(); jsiMessage.setProperty(rt, "content", *content); } jsiMessage.setProperty(rt, "time", std::to_string(message.time)); size_t media_idx = 0; jsi::Array jsiMediaArray = jsi::Array(rt, media.size()); for (const auto &media_info : media) { auto jsiMedia = jsi::Object(rt); jsiMedia.setProperty(rt, "id", media_info.id); jsiMedia.setProperty(rt, "uri", media_info.uri); jsiMedia.setProperty(rt, "type", media_info.type); jsiMedia.setProperty(rt, "extras", media_info.extras); jsiMediaArray.setValueAtIndex(rt, media_idx++, jsiMedia); } jsiMessage.setProperty(rt, "media_infos", jsiMediaArray); jsiMessages.setValueAtIndex(rt, writeIndex++, jsiMessage); } return jsiMessages; } jsi::Value CommCoreModule::getAllMessages(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=, &innerRt]() { std::string error; std::vector>> messagesVector; size_t numMessages; try { messagesVector = DatabaseManager::getQueryExecutor().getAllMessages(); numMessages = messagesVector.size(); } catch (std::system_error &e) { error = e.what(); } auto messagesVectorPtr = std::make_shared< std::vector>>>( std::move(messagesVector)); this->jsInvoker_->invokeAsync( [messagesVectorPtr, &innerRt, promise, error, numMessages]() { if (error.size()) { promise->reject(error); return; } jsi::Array jsiMessages = jsi::Array(innerRt, numMessages); size_t writeIndex = 0; for (const auto &[message, media] : *messagesVectorPtr) { auto jsiMessage = jsi::Object(innerRt); jsiMessage.setProperty(innerRt, "id", message.id); if (message.local_id) { auto local_id = message.local_id.get(); jsiMessage.setProperty(innerRt, "local_id", *local_id); } jsiMessage.setProperty(innerRt, "thread", message.thread); jsiMessage.setProperty(innerRt, "user", message.user); jsiMessage.setProperty( innerRt, "type", std::to_string(message.type)); if (message.future_type) { auto future_type = message.future_type.get(); jsiMessage.setProperty( innerRt, "future_type", std::to_string(*future_type)); } if (message.content) { auto content = message.content.get(); jsiMessage.setProperty(innerRt, "content", *content); } jsiMessage.setProperty( innerRt, "time", std::to_string(message.time)); size_t media_idx = 0; jsi::Array jsiMediaArray = jsi::Array(innerRt, media.size()); for (const auto &media_info : media) { auto jsiMedia = jsi::Object(innerRt); jsiMedia.setProperty(innerRt, "id", media_info.id); jsiMedia.setProperty(innerRt, "uri", media_info.uri); jsiMedia.setProperty(innerRt, "type", media_info.type); jsiMedia.setProperty(innerRt, "extras", media_info.extras); jsiMediaArray.setValueAtIndex( innerRt, media_idx++, jsiMedia); } jsiMessage.setProperty(innerRt, "media_infos", jsiMediaArray); jsiMessages.setValueAtIndex( innerRt, writeIndex++, jsiMessage); } promise->resolve(std::move(jsiMessages)); }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } const std::string UPDATE_DRAFT_OPERATION = "update"; const std::string MOVE_DRAFT_OPERATION = "move"; const std::string REMOVE_ALL_DRAFTS_OPERATION = "remove_all"; std::vector> createDraftStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) { std::vector> draftStoreOps; for (auto idx = 0; idx < operations.size(rt); idx++) { auto op = operations.getValueAtIndex(rt, idx).asObject(rt); auto op_type = op.getProperty(rt, "type").asString(rt).utf8(rt); if (op_type == REMOVE_ALL_DRAFTS_OPERATION) { draftStoreOps.push_back(std::make_unique()); continue; } auto payload_obj = op.getProperty(rt, "payload").asObject(rt); if (op_type == UPDATE_DRAFT_OPERATION) { draftStoreOps.push_back( std::make_unique(rt, payload_obj)); } else if (op_type == MOVE_DRAFT_OPERATION) { draftStoreOps.push_back( std::make_unique(rt, payload_obj)); } else { throw std::runtime_error("unsupported operation: " + op_type); } } return draftStoreOps; } jsi::Value CommCoreModule::processDraftStoreOperations( jsi::Runtime &rt, const jsi::Array &operations) { std::string createOperationsError; std::shared_ptr>> draftStoreOpsPtr; try { auto draftStoreOps = createDraftStoreOperations(rt, operations); draftStoreOpsPtr = std::make_shared>>( std::move(draftStoreOps)); } catch (std::runtime_error &e) { createOperationsError = e.what(); } return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { std::string error = createOperationsError; if (!error.size()) { try { DatabaseManager::getQueryExecutor().beginTransaction(); for (const auto &operation : *draftStoreOpsPtr) { operation->execute(); } DatabaseManager::getQueryExecutor().commitTransaction(); } catch (std::system_error &e) { error = e.what(); DatabaseManager::getQueryExecutor().rollbackTransaction(); } } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } const std::string REKEY_OPERATION = "rekey"; const std::string REMOVE_OPERATION = "remove"; const std::string REPLACE_OPERATION = "replace"; const std::string REMOVE_MSGS_FOR_THREADS_OPERATION = "remove_messages_for_threads"; const std::string REMOVE_ALL_OPERATION = "remove_all"; std::vector> createMessageStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) { std::vector> messageStoreOps; for (auto idx = 0; idx < operations.size(rt); idx++) { auto op = operations.getValueAtIndex(rt, idx).asObject(rt); auto op_type = op.getProperty(rt, "type").asString(rt).utf8(rt); if (op_type == REMOVE_ALL_OPERATION) { messageStoreOps.push_back(std::make_unique()); continue; } auto payload_obj = op.getProperty(rt, "payload").asObject(rt); if (op_type == REMOVE_OPERATION) { messageStoreOps.push_back( std::make_unique(rt, payload_obj)); } else if (op_type == REMOVE_MSGS_FOR_THREADS_OPERATION) { messageStoreOps.push_back( std::make_unique(rt, payload_obj)); } else if (op_type == REPLACE_OPERATION) { messageStoreOps.push_back( std::make_unique(rt, payload_obj)); } else if (op_type == REKEY_OPERATION) { messageStoreOps.push_back( std::make_unique(rt, payload_obj)); } else { throw std::runtime_error("unsupported operation: " + op_type); } } return messageStoreOps; } jsi::Value CommCoreModule::processMessageStoreOperations( jsi::Runtime &rt, const jsi::Array &operations) { std::string createOperationsError; std::shared_ptr>> messageStoreOpsPtr; try { auto messageStoreOps = createMessageStoreOperations(rt, operations); messageStoreOpsPtr = std::make_shared< std::vector>>( std::move(messageStoreOps)); } catch (std::runtime_error &e) { createOperationsError = e.what(); } return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { std::string error = createOperationsError; if (!error.size()) { try { DatabaseManager::getQueryExecutor().beginTransaction(); for (const auto &operation : *messageStoreOpsPtr) { operation->execute(); } DatabaseManager::getQueryExecutor().commitTransaction(); } catch (std::system_error &e) { error = e.what(); DatabaseManager::getQueryExecutor().rollbackTransaction(); } } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } void CommCoreModule::processMessageStoreOperationsSync( jsi::Runtime &rt, const jsi::Array &operations) { std::vector> messageStoreOps; try { messageStoreOps = createMessageStoreOperations(rt, operations); } catch (const std::exception &e) { throw jsi::JSError(rt, e.what()); } this->runSyncOrThrowJSError(rt, [&messageStoreOps]() { try { DatabaseManager::getQueryExecutor().beginTransaction(); for (const auto &operation : messageStoreOps) { operation->execute(); } DatabaseManager::getQueryExecutor().commitTransaction(); } catch (const std::exception &e) { DatabaseManager::getQueryExecutor().rollbackTransaction(); throw e; } }); } jsi::Value CommCoreModule::getAllThreads(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=, &innerRt]() { std::string error; std::vector threadsVector; size_t numThreads; try { threadsVector = DatabaseManager::getQueryExecutor().getAllThreads(); numThreads = threadsVector.size(); } catch (std::system_error &e) { error = e.what(); } auto threadsVectorPtr = std::make_shared>(std::move(threadsVector)); this->jsInvoker_->invokeAsync([=, &innerRt]() { if (error.size()) { promise->reject(error); return; } jsi::Array jsiThreads = jsi::Array(innerRt, numThreads); size_t writeIdx = 0; for (const Thread &thread : *threadsVectorPtr) { jsi::Object jsiThread = jsi::Object(innerRt); jsiThread.setProperty(innerRt, "id", thread.id); jsiThread.setProperty(innerRt, "type", thread.type); jsiThread.setProperty( innerRt, "name", thread.name ? jsi::String::createFromUtf8(innerRt, *thread.name) : jsi::Value::null()); jsiThread.setProperty( innerRt, "description", thread.description ? jsi::String::createFromUtf8( innerRt, *thread.description) : jsi::Value::null()); jsiThread.setProperty(innerRt, "color", thread.color); jsiThread.setProperty( innerRt, "creationTime", std::to_string(thread.creation_time)); jsiThread.setProperty( innerRt, "parentThreadID", thread.parent_thread_id ? jsi::String::createFromUtf8( innerRt, *thread.parent_thread_id) : jsi::Value::null()); jsiThread.setProperty( innerRt, "containingThreadID", thread.containing_thread_id ? jsi::String::createFromUtf8( innerRt, *thread.containing_thread_id) : jsi::Value::null()); jsiThread.setProperty( innerRt, "community", thread.community ? jsi::String::createFromUtf8(innerRt, *thread.community) : jsi::Value::null()); jsiThread.setProperty(innerRt, "members", thread.members); jsiThread.setProperty(innerRt, "roles", thread.roles); jsiThread.setProperty( innerRt, "currentUser", thread.current_user); jsiThread.setProperty( innerRt, "sourceMessageID", thread.source_message_id ? jsi::String::createFromUtf8( innerRt, *thread.source_message_id) : jsi::Value::null()); jsiThread.setProperty( innerRt, "repliesCount", thread.replies_count); jsiThreads.setValueAtIndex(innerRt, writeIdx++, jsiThread); } promise->resolve(std::move(jsiThreads)); }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); }; jsi::Array CommCoreModule::getAllThreadsSync(jsi::Runtime &rt) { auto threadsVector = this->runSyncOrThrowJSError>( rt, []() { return DatabaseManager::getQueryExecutor().getAllThreads(); }); size_t numThreads{threadsVector.size()}; jsi::Array jsiThreads = jsi::Array(rt, numThreads); size_t writeIdx = 0; for (const Thread &thread : threadsVector) { jsi::Object jsiThread = jsi::Object(rt); jsiThread.setProperty(rt, "id", thread.id); jsiThread.setProperty(rt, "type", thread.type); jsiThread.setProperty( rt, "name", thread.name ? jsi::String::createFromUtf8(rt, *thread.name) : jsi::Value::null()); jsiThread.setProperty( rt, "description", thread.description ? jsi::String::createFromUtf8(rt, *thread.description) : jsi::Value::null()); jsiThread.setProperty(rt, "color", thread.color); jsiThread.setProperty( rt, "creationTime", std::to_string(thread.creation_time)); jsiThread.setProperty( rt, "parentThreadID", thread.parent_thread_id ? jsi::String::createFromUtf8(rt, *thread.parent_thread_id) : jsi::Value::null()); jsiThread.setProperty( rt, "containingThreadID", thread.containing_thread_id ? jsi::String::createFromUtf8(rt, *thread.containing_thread_id) : jsi::Value::null()); jsiThread.setProperty( rt, "community", thread.community ? jsi::String::createFromUtf8(rt, *thread.community) : jsi::Value::null()); jsiThread.setProperty(rt, "members", thread.members); jsiThread.setProperty(rt, "roles", thread.roles); jsiThread.setProperty(rt, "currentUser", thread.current_user); jsiThread.setProperty( rt, "sourceMessageID", thread.source_message_id ? jsi::String::createFromUtf8(rt, *thread.source_message_id) : jsi::Value::null()); jsiThread.setProperty(rt, "repliesCount", thread.replies_count); jsiThreads.setValueAtIndex(rt, writeIdx++, jsiThread); } return jsiThreads; } std::vector> createThreadStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) { std::vector> threadStoreOps; for (size_t idx = 0; idx < operations.size(rt); idx++) { jsi::Object op = operations.getValueAtIndex(rt, idx).asObject(rt); std::string opType = op.getProperty(rt, "type").asString(rt).utf8(rt); if (opType == REMOVE_OPERATION) { std::vector threadIDsToRemove; jsi::Object payloadObj = op.getProperty(rt, "payload").asObject(rt); jsi::Array threadIDs = payloadObj.getProperty(rt, "ids").asObject(rt).asArray(rt); for (int threadIdx = 0; threadIdx < threadIDs.size(rt); threadIdx++) { threadIDsToRemove.push_back( threadIDs.getValueAtIndex(rt, threadIdx).asString(rt).utf8(rt)); } threadStoreOps.push_back(std::make_unique( std::move(threadIDsToRemove))); } else if (opType == REMOVE_ALL_OPERATION) { threadStoreOps.push_back(std::make_unique()); } else if (opType == REPLACE_OPERATION) { jsi::Object threadObj = op.getProperty(rt, "payload").asObject(rt); std::string threadID = threadObj.getProperty(rt, "id").asString(rt).utf8(rt); int type = std::lround(threadObj.getProperty(rt, "type").asNumber()); jsi::Value maybeName = threadObj.getProperty(rt, "name"); std::unique_ptr name = maybeName.isString() ? std::make_unique(maybeName.asString(rt).utf8(rt)) : nullptr; jsi::Value maybeDescription = threadObj.getProperty(rt, "description"); std::unique_ptr description = maybeDescription.isString() ? std::make_unique( maybeDescription.asString(rt).utf8(rt)) : nullptr; std::string color = threadObj.getProperty(rt, "color").asString(rt).utf8(rt); int64_t creationTime = std::stoll( threadObj.getProperty(rt, "creationTime").asString(rt).utf8(rt)); jsi::Value maybeParentThreadID = threadObj.getProperty(rt, "parentThreadID"); std::unique_ptr parentThreadID = maybeParentThreadID.isString() ? std::make_unique( maybeParentThreadID.asString(rt).utf8(rt)) : nullptr; jsi::Value maybeContainingThreadID = threadObj.getProperty(rt, "containingThreadID"); std::unique_ptr containingThreadID = maybeContainingThreadID.isString() ? std::make_unique( maybeContainingThreadID.asString(rt).utf8(rt)) : nullptr; jsi::Value maybeCommunity = threadObj.getProperty(rt, "community"); std::unique_ptr community = maybeCommunity.isString() ? std::make_unique(maybeCommunity.asString(rt).utf8(rt)) : nullptr; std::string members = threadObj.getProperty(rt, "members").asString(rt).utf8(rt); std::string roles = threadObj.getProperty(rt, "roles").asString(rt).utf8(rt); std::string currentUser = threadObj.getProperty(rt, "currentUser").asString(rt).utf8(rt); jsi::Value maybeSourceMessageID = threadObj.getProperty(rt, "sourceMessageID"); std::unique_ptr sourceMessageID = maybeSourceMessageID.isString() ? std::make_unique( maybeSourceMessageID.asString(rt).utf8(rt)) : nullptr; int repliesCount = std::lround(threadObj.getProperty(rt, "repliesCount").asNumber()); Thread thread{ threadID, type, std::move(name), std::move(description), color, creationTime, std::move(parentThreadID), std::move(containingThreadID), std::move(community), members, roles, currentUser, std::move(sourceMessageID), repliesCount}; threadStoreOps.push_back( std::make_unique(std::move(thread))); } else { throw std::runtime_error("unsupported operation: " + opType); } }; return threadStoreOps; } jsi::Value CommCoreModule::processThreadStoreOperations( jsi::Runtime &rt, const jsi::Array &operations) { std::string operationsError; std::shared_ptr>> threadStoreOpsPtr; try { auto threadStoreOps = createThreadStoreOperations(rt, operations); threadStoreOpsPtr = std::make_shared< std::vector>>( std::move(threadStoreOps)); } catch (std::runtime_error &e) { operationsError = e.what(); } return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { std::string error = operationsError; if (!error.size()) { try { DatabaseManager::getQueryExecutor().beginTransaction(); for (const auto &operation : *threadStoreOpsPtr) { operation->execute(); } DatabaseManager::getQueryExecutor().commitTransaction(); } catch (std::system_error &e) { error = e.what(); DatabaseManager::getQueryExecutor().rollbackTransaction(); } } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } void CommCoreModule::processThreadStoreOperationsSync( jsi::Runtime &rt, const jsi::Array &operations) { std::vector> threadStoreOps; try { threadStoreOps = createThreadStoreOperations(rt, operations); } catch (const std::exception &e) { throw jsi::JSError(rt, e.what()); } this->runSyncOrThrowJSError(rt, [&threadStoreOps]() { try { DatabaseManager::getQueryExecutor().beginTransaction(); for (const auto &operation : threadStoreOps) { operation->execute(); } DatabaseManager::getQueryExecutor().commitTransaction(); } catch (const std::exception &e) { DatabaseManager::getQueryExecutor().rollbackTransaction(); throw e; } }); } jsi::Value CommCoreModule::initializeCryptoAccount( jsi::Runtime &rt, const jsi::String &userId) { std::string userIdStr = userId.utf8(rt); folly::Optional storedSecretKey = this->secureStore.get(this->secureStoreAccountDataKey); if (!storedSecretKey.hasValue()) { storedSecretKey = crypto::Tools::generateRandomString(64); this->secureStore.set( this->secureStoreAccountDataKey, storedSecretKey.value()); } return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=]() { crypto::Persist persist; std::string error; try { folly::Optional accountData = DatabaseManager::getQueryExecutor().getOlmPersistAccountData(); if (accountData.hasValue()) { persist.account = crypto::OlmBuffer(accountData->begin(), accountData->end()); // handle sessions data std::vector sessionsData = DatabaseManager::getQueryExecutor() .getOlmPersistSessionsData(); for (OlmPersistSession &sessionsDataItem : sessionsData) { crypto::OlmBuffer sessionDataBuffer( sessionsDataItem.session_data.begin(), sessionsDataItem.session_data.end()); persist.sessions.insert(std::make_pair( sessionsDataItem.target_user_id, sessionDataBuffer)); } } } catch (std::system_error &e) { error = e.what(); } this->cryptoThread->scheduleTask([=]() { std::string error; this->cryptoModule.reset(new crypto::CryptoModule( userIdStr, storedSecretKey.value(), persist)); if (persist.isEmpty()) { crypto::Persist newPersist = this->cryptoModule->storeAsB64(storedSecretKey.value()); GlobalDBSingleton::instance.scheduleOrRunCancellable( [=]() { std::string error; try { DatabaseManager::getQueryExecutor().storeOlmPersistData( newPersist); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); return; } promise->resolve(jsi::Value::undefined()); }); }, promise, this->jsInvoker_); } else { this->cryptoModule->restoreFromB64( storedSecretKey.value(), persist); this->jsInvoker_->invokeAsync([=]() { if (error.size()) { promise->reject(error); return; } promise->resolve(jsi::Value::undefined()); }); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } void CommCoreModule::initializeNetworkModule( const std::string &userId, const std::string &deviceToken, const std::string &hostname) { GlobalNetworkSingleton::instance.scheduleOrRun( [=](NetworkModule &networkModule) { networkModule.initializeNetworkModule(userId, deviceToken, hostname); }); } jsi::Value CommCoreModule::getUserPublicKey(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=, &innerRt]() { std::string error; std::string result; if (this->cryptoModule == nullptr) { error = "user has not been initialized"; } else { result = this->cryptoModule->getIdentityKeys(); } this->jsInvoker_->invokeAsync([=, &innerRt]() { if (error.size()) { promise->reject(error); return; } promise->resolve(jsi::String::createFromUtf8(innerRt, result)); }); }; this->cryptoThread->scheduleTask(job); }); } jsi::Value CommCoreModule::getUserOneTimeKeys(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [=, &innerRt]() { std::string error; std::string result; if (this->cryptoModule == nullptr) { error = "user has not been initialized"; } else { result = this->cryptoModule->getOneTimeKeys(); } this->jsInvoker_->invokeAsync([=, &innerRt]() { if (error.size()) { promise->reject(error); return; } promise->resolve(jsi::String::createFromUtf8(innerRt, result)); }); }; this->cryptoThread->scheduleTask(job); }); } -jsi::Object -CommCoreModule::openSocket(jsi::Runtime &rt, const jsi::String &endpoint) { - auto hostObject = - std::make_shared(rt, this->jsInvoker_); - return jsi::Object::createFromHostObject(rt, hostObject); -} - CommCoreModule::CommCoreModule( std::shared_ptr jsInvoker) : facebook::react::CommCoreModuleSchemaCxxSpecJSI(jsInvoker), cryptoThread(std::make_unique("crypto")) { GlobalDBSingleton::instance.enableMultithreading(); GlobalNetworkSingleton::instance.enableMultithreading(); } double CommCoreModule::getCodeVersion(jsi::Runtime &rt) { return this->codeVersion; } jsi::Value CommCoreModule::setNotifyToken(jsi::Runtime &rt, const jsi::String &token) { auto notifyToken{token.utf8(rt)}; return createPromiseAsJSIValue( rt, [this, notifyToken](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [this, notifyToken, promise]() { std::string error; try { DatabaseManager::getQueryExecutor().setNotifyToken(notifyToken); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([error, promise]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::clearNotifyToken(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [this](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [this, promise]() { std::string error; try { DatabaseManager::getQueryExecutor().clearNotifyToken(); } catch (std::system_error &e) { error = e.what(); } this->jsInvoker_->invokeAsync([error, promise]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); }; jsi::Value CommCoreModule::setCurrentUserID(jsi::Runtime &rt, const jsi::String &userID) { auto currentUserID{userID.utf8(rt)}; return createPromiseAsJSIValue( rt, [this, currentUserID](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [this, promise, currentUserID]() { std::string error; try { DatabaseManager::getQueryExecutor().setCurrentUserID(currentUserID); } catch (const std::exception &e) { error = e.what(); } this->jsInvoker_->invokeAsync([error, promise]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::getCurrentUserID(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [this](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [this, &innerRt, promise]() { std::string error; std::string result; try { result = DatabaseManager::getQueryExecutor().getCurrentUserID(); } catch (const std::exception &e) { error = e.what(); } this->jsInvoker_->invokeAsync([&innerRt, error, result, promise]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::String::createFromUtf8(innerRt, result)); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::setDeviceID(jsi::Runtime &rt, const jsi::String &deviceType) { std::string type = deviceType.utf8(rt); std::string deviceID; std::string deviceIDGenerationError; try { deviceID = DeviceIDGenerator::generateDeviceID(type); } catch (std::invalid_argument &e) { deviceIDGenerationError = "setDeviceID: incorrect function argument. Must be one of: KEYSERVER, " "WEB, MOBILE."; } return createPromiseAsJSIValue( rt, [=](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [this, &innerRt, promise, deviceIDGenerationError, deviceID]() { std::string error = deviceIDGenerationError; if (!error.size()) { try { DatabaseManager::getQueryExecutor().setDeviceID(deviceID); } catch (const std::exception &e) { error = e.what(); } } this->jsInvoker_->invokeAsync([&innerRt, promise, error, deviceID]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::String::createFromUtf8(innerRt, deviceID)); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::getDeviceID(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [this](jsi::Runtime &innerRt, std::shared_ptr promise) { taskType job = [this, &innerRt, promise]() { std::string error; std::string result; try { result = DatabaseManager::getQueryExecutor().getDeviceID(); } catch (const std::exception &e) { error = e.what(); } this->jsInvoker_->invokeAsync([&innerRt, error, result, promise]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::String::createFromUtf8(innerRt, result)); } }); }; GlobalDBSingleton::instance.scheduleOrRunCancellable( job, promise, this->jsInvoker_); }); } jsi::Value CommCoreModule::clearSensitiveData(jsi::Runtime &rt) { return createPromiseAsJSIValue( rt, [this](jsi::Runtime &innerRt, std::shared_ptr promise) { GlobalDBSingleton::instance.setTasksCancelled(true); taskType job = [this, promise]() { std::string error; try { DatabaseManager::getQueryExecutor().clearSensitiveData(); } catch (const std::exception &e) { error = e.what(); } this->jsInvoker_->invokeAsync([error, promise]() { if (error.size()) { promise->reject(error); } else { promise->resolve(jsi::Value::undefined()); } }); GlobalDBSingleton::instance.scheduleOrRun( []() { GlobalDBSingleton::instance.setTasksCancelled(false); }); }; GlobalDBSingleton::instance.scheduleOrRun(job); }); } } // namespace comm diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.h b/native/cpp/CommonCpp/NativeModules/CommCoreModule.h index f146f28b5..90cadb3a4 100644 --- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.h +++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.h @@ -1,82 +1,80 @@ #pragma once #include "../CryptoTools/CryptoModule.h" #include "../Tools/CommSecureStore.h" #include "../Tools/WorkerThread.h" #include "../_generated/NativeModules.h" #include "../grpc/Client.h" #include #include #include namespace comm { namespace jsi = facebook::jsi; class CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI { const int codeVersion{155}; std::unique_ptr cryptoThread; CommSecureStore secureStore; const std::string secureStoreAccountDataKey = "cryptoAccountDataKey"; std::unique_ptr cryptoModule; std::unique_ptr networkClient; template T runSyncOrThrowJSError(jsi::Runtime &rt, std::function task); jsi::Value getDraft(jsi::Runtime &rt, const jsi::String &key) override; jsi::Value updateDraft(jsi::Runtime &rt, const jsi::Object &draft) override; jsi::Value moveDraft( jsi::Runtime &rt, const jsi::String &oldKey, const jsi::String &newKey) override; jsi::Value getAllDrafts(jsi::Runtime &rt) override; jsi::Value removeAllDrafts(jsi::Runtime &rt) override; jsi::Value getAllMessages(jsi::Runtime &rt) override; jsi::Array getAllMessagesSync(jsi::Runtime &rt) override; jsi::Value processDraftStoreOperations( jsi::Runtime &rt, const jsi::Array &operations) override; jsi::Value processMessageStoreOperations( jsi::Runtime &rt, const jsi::Array &operations) override; void processMessageStoreOperationsSync( jsi::Runtime &rt, const jsi::Array &operations) override; jsi::Value getAllThreads(jsi::Runtime &rt) override; jsi::Array getAllThreadsSync(jsi::Runtime &rt) override; jsi::Value processThreadStoreOperations( jsi::Runtime &rt, const jsi::Array &operations) override; void processThreadStoreOperationsSync( jsi::Runtime &rt, const jsi::Array &operations) override; jsi::Value initializeCryptoAccount(jsi::Runtime &rt, const jsi::String &userId) override; jsi::Value getUserPublicKey(jsi::Runtime &rt) override; jsi::Value getUserOneTimeKeys(jsi::Runtime &rt) override; - jsi::Object - openSocket(jsi::Runtime &rt, const jsi::String &endpoint) override; double getCodeVersion(jsi::Runtime &rt) override; jsi::Value setNotifyToken(jsi::Runtime &rt, const jsi::String &token) override; jsi::Value clearNotifyToken(jsi::Runtime &rt) override; jsi::Value setCurrentUserID(jsi::Runtime &rt, const jsi::String &userID) override; jsi::Value getCurrentUserID(jsi::Runtime &rt) override; jsi::Value setDeviceID(jsi::Runtime &rt, const jsi::String &deviceType) override; jsi::Value getDeviceID(jsi::Runtime &rt) override; jsi::Value clearSensitiveData(jsi::Runtime &rt) override; public: CommCoreModule(std::shared_ptr jsInvoker); void initializeNetworkModule( const std::string &userId, const std::string &deviceToken, const std::string &hostname = ""); }; } // namespace comm diff --git a/native/cpp/CommonCpp/NativeModules/InternalModules/GlobalNetworkSingleton.cpp b/native/cpp/CommonCpp/NativeModules/InternalModules/GlobalNetworkSingleton.cpp index f5a8e34cc..823617516 100644 --- a/native/cpp/CommonCpp/NativeModules/InternalModules/GlobalNetworkSingleton.cpp +++ b/native/cpp/CommonCpp/NativeModules/InternalModules/GlobalNetworkSingleton.cpp @@ -1,27 +1,26 @@ #include "GlobalNetworkSingleton.h" namespace comm { GlobalNetworkSingleton GlobalNetworkSingleton::instance; NetworkModule &GlobalNetworkSingleton::networkModule() { static thread_local NetworkModule module; return module; } void GlobalNetworkSingleton::scheduleOrRun( std::function &&task) { if (this->thread != nullptr) { this->thread->scheduleTask( [=, task = std::move(task)]() { task(this->networkModule()); }); } else { task(this->networkModule()); } } void GlobalNetworkSingleton::enableMultithreading() { if (this->thread == nullptr) { this->thread = std::make_unique("network"); - this->networkModule().close(); } } } // namespace comm diff --git a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp index 20c998891..c2e71baf8 100644 --- a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp +++ b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp @@ -1,110 +1,50 @@ #include "NetworkModule.h" #include "Logger.h" namespace comm { void NetworkModule::initializeNetworkModule( const std::string &userId, const std::string &deviceToken, const std::string &hostname) { std::string host = (hostname.size() == 0) ? "localhost" : hostname; // initialize network module // this is going to differ depending on a device // 10.0.2.2 for android emulator // 192.168.x.x for a physical device etc const std::shared_ptr credentials = (host.substr(0, 5) == "https") ? grpc::SslCredentials(grpc::SslCredentialsOptions()) : grpc::InsecureChannelCredentials(); this->networkClient.reset( new network::Client(host, "50051", credentials, userId, deviceToken)); } -void NetworkModule::get(std::string sessionID) { - if (!this->networkClient) { - return; - } - this->networkClient->get(sessionID); -} - -void NetworkModule::close() { - this->networkClient.reset(); -} - -grpc::Status NetworkModule::send( - std::string sessionID, - std::string toDeviceID, - std::string payload, - std::vector blobHashes) { - - if (!this->networkClient) { - return grpc::Status::CANCELLED; - } - return this->networkClient->send(sessionID, toDeviceID, payload, blobHashes); -} - -void NetworkModule::setOnReadDoneCallback( - std::function callback) { - if (!this->networkClient) { - return; - } - this->networkClient->setOnReadDoneCallback(callback); -} - -void NetworkModule::setOnOpenCallback(std::function callback) { - if (!this->networkClient) { - return; - } - this->networkClient->setOnOpenCallback(callback); -} - -void NetworkModule::setOnCloseCallback(std::function callback) { - if (!this->networkClient) { - return; - } - this->networkClient->setOnCloseCallback(callback); -} - -void NetworkModule::closeGetStream() { - if (!this->networkClient) { - return; - } - this->networkClient->closeGetStream(); -} - -void NetworkModule::assignSetReadyStateCallback( - std::function callback) { - if (!this->networkClient) { - return; - } - this->networkClient->assignSetReadyStateCallback(callback); -} - std::string NetworkModule::sessionSignature(std::string deviceID) { if (!this->networkClient) { return std::string{}; } return this->networkClient->sessionSignature(deviceID); } std::string NetworkModule::newSession( std::string deviceID, std::string publicKey, std::string signature, std::string notifyToken, tunnelbroker::NewSessionRequest_DeviceTypes deviceType, std::string deviceAppVersion, std::string deviceOS) { if (!this->networkClient) { return std::string{}; } return this->networkClient->newSession( deviceID, publicKey, signature, notifyToken, deviceType, deviceAppVersion, deviceOS); } } // namespace comm diff --git a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h index ade5cd818..908fae054 100644 --- a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h +++ b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h @@ -1,40 +1,27 @@ #pragma once #include "../../grpc/Client.h" #include "SocketStatus.h" #include #include namespace comm { class NetworkModule { std::unique_ptr networkClient; public: void initializeNetworkModule( const std::string &userId, const std::string &deviceToken, const std::string &hostname = ""); - grpc::Status send( - std::string sessionID, - std::string toDeviceID, - std::string payload, - std::vector blobHashes); - void close(); - void get(std::string sessionID); - void closeGetStream(); - void setOnReadDoneCallback(std::function callback); - void setOnOpenCallback(std::function callback); - void setOnCloseCallback(std::function callback); - void assignSetReadyStateCallback(std::function callback); - std::string sessionSignature(std::string deviceID); std::string newSession( std::string deviceID, std::string publicKey, std::string signature, std::string notifyToken, tunnelbroker::NewSessionRequest_DeviceTypes deviceType, std::string deviceAppVersion, std::string deviceOS); }; } // namespace comm diff --git a/native/cpp/CommonCpp/_generated/NativeModules.cpp b/native/cpp/CommonCpp/_generated/NativeModules.cpp index f63e1832b..16b1e6c34 100644 --- a/native/cpp/CommonCpp/_generated/NativeModules.cpp +++ b/native/cpp/CommonCpp/_generated/NativeModules.cpp @@ -1,128 +1,124 @@ /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated by codegen project: GenerateModuleH.js */ #include "NativeModules.h" namespace facebook { namespace react { static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getDraft(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getDraft(rt, args[0].getString(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_updateDraft(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->updateDraft(rt, args[0].getObject(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_moveDraft(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->moveDraft(rt, args[0].getString(rt), args[1].getString(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllDrafts(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getAllDrafts(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_removeAllDrafts(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->removeAllDrafts(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessages(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getAllMessages(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessagesSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getAllMessagesSync(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processDraftStoreOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->processDraftStoreOperations(rt, args[0].getObject(rt).getArray(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->processMessageStoreOperations(rt, args[0].getObject(rt).getArray(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperationsSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->processMessageStoreOperationsSync(rt, args[0].getObject(rt).getArray(rt)); return jsi::Value::undefined(); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreads(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getAllThreads(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreadsSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getAllThreadsSync(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processThreadStoreOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->processThreadStoreOperations(rt, args[0].getObject(rt).getArray(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processThreadStoreOperationsSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->processThreadStoreOperationsSync(rt, args[0].getObject(rt).getArray(rt)); return jsi::Value::undefined(); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_initializeCryptoAccount(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->initializeCryptoAccount(rt, args[0].getString(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getUserPublicKey(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getUserPublicKey(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getUserOneTimeKeys(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getUserOneTimeKeys(rt); } -static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_openSocket(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->openSocket(rt, args[0].getString(rt)); -} static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getCodeVersion(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getCodeVersion(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_setNotifyToken(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->setNotifyToken(rt, args[0].getString(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_clearNotifyToken(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->clearNotifyToken(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_setCurrentUserID(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->setCurrentUserID(rt, args[0].getString(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getCurrentUserID(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getCurrentUserID(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_setDeviceID(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->setDeviceID(rt, args[0].getString(rt)); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getDeviceID(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->getDeviceID(rt); } static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_clearSensitiveData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->clearSensitiveData(rt); } CommCoreModuleSchemaCxxSpecJSI::CommCoreModuleSchemaCxxSpecJSI(std::shared_ptr jsInvoker) : TurboModule("CommTurboModule", jsInvoker) { methodMap_["getDraft"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getDraft}; methodMap_["updateDraft"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_updateDraft}; methodMap_["moveDraft"] = MethodMetadata {2, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_moveDraft}; methodMap_["getAllDrafts"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllDrafts}; methodMap_["removeAllDrafts"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_removeAllDrafts}; methodMap_["getAllMessages"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessages}; methodMap_["getAllMessagesSync"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessagesSync}; methodMap_["processDraftStoreOperations"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processDraftStoreOperations}; methodMap_["processMessageStoreOperations"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperations}; methodMap_["processMessageStoreOperationsSync"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperationsSync}; methodMap_["getAllThreads"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreads}; methodMap_["getAllThreadsSync"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreadsSync}; methodMap_["processThreadStoreOperations"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processThreadStoreOperations}; methodMap_["processThreadStoreOperationsSync"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processThreadStoreOperationsSync}; methodMap_["initializeCryptoAccount"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_initializeCryptoAccount}; methodMap_["getUserPublicKey"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getUserPublicKey}; methodMap_["getUserOneTimeKeys"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getUserOneTimeKeys}; - methodMap_["openSocket"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_openSocket}; methodMap_["getCodeVersion"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getCodeVersion}; methodMap_["setNotifyToken"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_setNotifyToken}; methodMap_["clearNotifyToken"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_clearNotifyToken}; methodMap_["setCurrentUserID"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_setCurrentUserID}; methodMap_["getCurrentUserID"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getCurrentUserID}; methodMap_["setDeviceID"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_setDeviceID}; methodMap_["getDeviceID"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getDeviceID}; methodMap_["clearSensitiveData"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_clearSensitiveData}; } } // namespace react } // namespace facebook diff --git a/native/cpp/CommonCpp/_generated/NativeModules.h b/native/cpp/CommonCpp/_generated/NativeModules.h index 0d98f99be..99e02fd65 100644 --- a/native/cpp/CommonCpp/_generated/NativeModules.h +++ b/native/cpp/CommonCpp/_generated/NativeModules.h @@ -1,51 +1,50 @@ /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated by codegen project: GenerateModuleH.js */ #pragma once #include namespace facebook { namespace react { class JSI_EXPORT CommCoreModuleSchemaCxxSpecJSI : public TurboModule { protected: CommCoreModuleSchemaCxxSpecJSI(std::shared_ptr jsInvoker); public: virtual jsi::Value getDraft(jsi::Runtime &rt, const jsi::String &key) = 0; virtual jsi::Value updateDraft(jsi::Runtime &rt, const jsi::Object &draft) = 0; virtual jsi::Value moveDraft(jsi::Runtime &rt, const jsi::String &oldKey, const jsi::String &newKey) = 0; virtual jsi::Value getAllDrafts(jsi::Runtime &rt) = 0; virtual jsi::Value removeAllDrafts(jsi::Runtime &rt) = 0; virtual jsi::Value getAllMessages(jsi::Runtime &rt) = 0; virtual jsi::Array getAllMessagesSync(jsi::Runtime &rt) = 0; virtual jsi::Value processDraftStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0; virtual jsi::Value processMessageStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0; virtual void processMessageStoreOperationsSync(jsi::Runtime &rt, const jsi::Array &operations) = 0; virtual jsi::Value getAllThreads(jsi::Runtime &rt) = 0; virtual jsi::Array getAllThreadsSync(jsi::Runtime &rt) = 0; virtual jsi::Value processThreadStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0; virtual void processThreadStoreOperationsSync(jsi::Runtime &rt, const jsi::Array &operations) = 0; virtual jsi::Value initializeCryptoAccount(jsi::Runtime &rt, const jsi::String &userId) = 0; virtual jsi::Value getUserPublicKey(jsi::Runtime &rt) = 0; virtual jsi::Value getUserOneTimeKeys(jsi::Runtime &rt) = 0; -virtual jsi::Object openSocket(jsi::Runtime &rt, const jsi::String &endpoint) = 0; virtual double getCodeVersion(jsi::Runtime &rt) = 0; virtual jsi::Value setNotifyToken(jsi::Runtime &rt, const jsi::String &token) = 0; virtual jsi::Value clearNotifyToken(jsi::Runtime &rt) = 0; virtual jsi::Value setCurrentUserID(jsi::Runtime &rt, const jsi::String &userID) = 0; virtual jsi::Value getCurrentUserID(jsi::Runtime &rt) = 0; virtual jsi::Value setDeviceID(jsi::Runtime &rt, const jsi::String &deviceType) = 0; virtual jsi::Value getDeviceID(jsi::Runtime &rt) = 0; virtual jsi::Value clearSensitiveData(jsi::Runtime &rt) = 0; }; } // namespace react } // namespace facebook diff --git a/native/cpp/CommonCpp/grpc/CMakeLists.txt b/native/cpp/CommonCpp/grpc/CMakeLists.txt index 32da4299e..2172a21e5 100644 --- a/native/cpp/CommonCpp/grpc/CMakeLists.txt +++ b/native/cpp/CommonCpp/grpc/CMakeLists.txt @@ -1,68 +1,64 @@ project(grpc-comm) cmake_minimum_required(VERSION 3.4) include(GNUInstallDirs) find_package(Protobuf REQUIRED) find_package(gRPC REQUIRED) set(CMAKE_CXX_STANDARD 14) add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../../../shared/protos" "${CMAKE_CURRENT_BINARY_DIR}/protos" ) set(CLIENT_HDRS "Client.h" - "ClientGetReadReactor.h" - "GRPCStreamHostObject.h" ) set(CLIENT_SRCS "Client.cpp" - "ClientGetReadReactor.cpp" - "GRPCStreamHostObject.cpp" ) add_library(comm-client ${CLIENT_HDRS} ${CLIENT_SRCS} ) target_link_libraries(comm-client gRPC::grpc++ protobuf::libprotobuf comm-tunnelbroker-grpc ) target_include_directories(comm-client PUBLIC $ $ $ $ # HACK: add complete cmake support to react-native? PRIVATE "../../../node_modules/react-native/ReactCommon/callinvoker" "../../../node_modules/react-native/ReactCommon/jsi" ) install(TARGETS comm-client EXPORT comm-export RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-client LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client ) install(FILES ${CLIENT_HDRS} DESTINATION include/grpc) # For development purposes, able to reference build directory export(TARGETS comm-client NAMESPACE comm:: FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm/comm-grpc-client-targets.cmake ) # For installation install(EXPORT comm-export FILE comm-grpc-targets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-grpc NAMESPACE comm-grpc:: ) diff --git a/native/cpp/CommonCpp/grpc/Client.cpp b/native/cpp/CommonCpp/grpc/Client.cpp index 8368de8bb..1ee2b856b 100644 --- a/native/cpp/CommonCpp/grpc/Client.cpp +++ b/native/cpp/CommonCpp/grpc/Client.cpp @@ -1,122 +1,61 @@ #include "Client.h" #include "Logger.h" #include namespace comm { namespace network { Client::Client( std::string hostname, std::string port, std::shared_ptr credentials, const std::string id, const std::string deviceToken) : id(id), deviceToken(deviceToken) { std::shared_ptr channel = grpc::CreateChannel(hostname + ":" + port, credentials); this->stub_ = TunnelbrokerService::NewStub(channel); } -grpc::Status Client::send( - std::string sessionID, - std::string toDeviceID, - std::string payload, - std::vector blobHashes) { - grpc::ClientContext context; - tunnelbroker::SendRequest request; - google::protobuf::Empty response; - - request.set_sessionid(sessionID); - request.set_todeviceid(toDeviceID); - request.set_payload(payload); - - for (const auto &blob : blobHashes) { - request.add_blobhashes(blob); - } - - return this->stub_->Send(&context, request, &response); -} - -void Client::get(std::string sessionID) { - this->clientGetReadReactor = - std::make_unique(this->stub_.get(), sessionID); -} - -void Client::setOnReadDoneCallback(std::function callback) { - if (!this->clientGetReadReactor) { - return; - } - this->clientGetReadReactor->setOnReadDoneCallback(callback); -} - -void Client::setOnOpenCallback(std::function callback) { - if (!this->clientGetReadReactor) { - return; - } - this->clientGetReadReactor->setOnOpenCallback(callback); -} - -void Client::setOnCloseCallback(std::function callback) { - if (!this->clientGetReadReactor) { - return; - } - this->clientGetReadReactor->setOnCloseCallback(callback); -} - -void Client::closeGetStream() { - if (!this->clientGetReadReactor) { - return; - } - this->clientGetReadReactor->close(); -} - -void Client::assignSetReadyStateCallback( - std::function callback) { - if (!this->clientGetReadReactor) { - return; - } - this->clientGetReadReactor->assignSetReadyStateCallback(callback); -} - std::string Client::sessionSignature(std::string deviceID) { grpc::ClientContext context; tunnelbroker::SessionSignatureRequest request; tunnelbroker::SessionSignatureResponse response; request.set_deviceid(deviceID); auto status{this->stub_->SessionSignature(&context, request, &response)}; if (!status.ok()) { return std::string{}; } return response.tosign(); } std::string Client::newSession( std::string deviceID, std::string publicKey, std::string signature, std::string notifyToken, tunnelbroker::NewSessionRequest_DeviceTypes deviceType, std::string deviceAppVersion, std::string deviceOS) { grpc::ClientContext context; tunnelbroker::NewSessionRequest request; tunnelbroker::NewSessionResponse response; request.set_deviceid(deviceID); request.set_publickey(publicKey); request.set_signature(signature); request.set_notifytoken(notifyToken); request.set_devicetype(deviceType); request.set_deviceappversion(deviceAppVersion); request.set_deviceos(deviceOS); auto status{this->stub_->NewSession(&context, request, &response)}; if (!status.ok()) { return std::string{}; } return response.sessionid(); } } // namespace network } // namespace comm diff --git a/native/cpp/CommonCpp/grpc/Client.h b/native/cpp/CommonCpp/grpc/Client.h index 097aafedf..7c2bbb490 100644 --- a/native/cpp/CommonCpp/grpc/Client.h +++ b/native/cpp/CommonCpp/grpc/Client.h @@ -1,57 +1,42 @@ #pragma once #include #include #include -#include "ClientGetReadReactor.h" #include "tunnelbroker.grpc.pb.h" #include "tunnelbroker.pb.h" namespace comm { namespace network { using grpc::Channel; using tunnelbroker::TunnelbrokerService; class Client { std::unique_ptr stub_; const std::string id; const std::string deviceToken; - std::unique_ptr clientGetReadReactor; public: Client( std::string hostname, std::string port, std::shared_ptr credentials, const std::string id, const std::string deviceToken); - grpc::Status send( - std::string sessionID, - std::string toDeviceID, - std::string payload, - std::vector blobHashes); - - void get(std::string sessionID); - void setOnReadDoneCallback(std::function callback); - void setOnOpenCallback(std::function callback); - void setOnCloseCallback(std::function callback); - void closeGetStream(); - void assignSetReadyStateCallback(std::function callback); - std::string sessionSignature(std::string deviceID); std::string newSession( std::string deviceID, std::string publicKey, std::string signature, std::string notifyToken, tunnelbroker::NewSessionRequest_DeviceTypes deviceType, std::string deviceAppVersion, std::string deviceOS); }; } // namespace network } // namespace comm diff --git a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp deleted file mode 100644 index 3140c9798..000000000 --- a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "ClientGetReadReactor.h" - -ClientGetReadReactor::ClientGetReadReactor( - tunnelbroker::TunnelbrokerService::Stub *stub, - std::string sessionID) - : sessionID{sessionID}, request{} { - request.set_sessionid(sessionID); - stub->async()->Get(&(this->context), &(this->request), this); - StartRead(&(this->response)); - StartCall(); -} - -void ClientGetReadReactor::OnReadDone(bool ok) { - if (!ok) { - return; - } - std::lock_guard guard{this->onReadDoneCallbackMutex}; - if (this->onReadDoneCallback) { - this->onReadDoneCallback(this->response.responsemessage().payload()); - } - StartRead(&(this->response)); -} - -void ClientGetReadReactor::close() { - { - std::lock_guard guard{this->setReadyStateMutex}; - this->setReadyState(SocketStatus::CLOSING); - } - this->context.TryCancel(); -} - -void ClientGetReadReactor::setOnOpenCallback( - std::function onOpenCallback) { - std::lock_guard guard{this->onOpenCallbackMutex}; - this->onOpenCallback = onOpenCallback; -} - -void ClientGetReadReactor::setOnReadDoneCallback( - std::function onReadDoneCallback) { - std::lock_guard guard{this->onReadDoneCallbackMutex}; - this->onReadDoneCallback = onReadDoneCallback; -} - -void ClientGetReadReactor::setOnCloseCallback( - std::function onCloseCallback) { - std::lock_guard guard{this->onCloseCallbackMutex}; - this->onCloseCallback = onCloseCallback; -} - -void ClientGetReadReactor::assignSetReadyStateCallback( - std::function callback) { - std::lock_guard guard{this->setReadyStateMutex}; - this->setReadyState = callback; -} - -void ClientGetReadReactor::OnReadInitialMetadataDone(bool ok) { - std::lock_guard guard{this->setReadyStateMutex}; - this->setReadyState(SocketStatus::OPEN); - if (this->onOpenCallback) { - std::lock_guard onOpenGuard{this->onOpenCallbackMutex}; - this->onOpenCallback(); - } -} - -void ClientGetReadReactor::OnDone(const grpc::Status &status) { - std::lock_guard guard{this->setReadyStateMutex}; - this->setReadyState(SocketStatus::CLOSED); - if (this->onCloseCallback) { - std::lock_guard onCloseGuard{this->onCloseCallbackMutex}; - this->onCloseCallback(); - } -} diff --git a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h deleted file mode 100644 index e1d9eb4aa..000000000 --- a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include "../NativeModules/InternalModules/SocketStatus.h" -#include - -#include "tunnelbroker.grpc.pb.h" -#include "tunnelbroker.pb.h" - -class ClientGetReadReactor - : public grpc::ClientReadReactor { - std::string sessionID; - grpc::ClientContext context; - tunnelbroker::GetRequest request; - tunnelbroker::GetResponse response; - std::mutex onReadDoneCallbackMutex; - std::mutex onOpenCallbackMutex; - std::mutex onCloseCallbackMutex; - std::mutex setReadyStateMutex; - std::function onReadDoneCallback; - std::function onOpenCallback; - std::function onCloseCallback; - std::function setReadyState; - -public: - ClientGetReadReactor( - tunnelbroker::TunnelbrokerService::Stub *stub, - std::string sessionID); - - void OnReadInitialMetadataDone(bool ok) override; - void OnReadDone(bool ok) override; - void OnDone(const grpc::Status &status) override; - void close(); - - void setOnOpenCallback(std::function onOpenCallback); - void - setOnReadDoneCallback(std::function onReadDoneCallback); - void setOnCloseCallback(std::function onCloseCallback); - void assignSetReadyStateCallback(std::function callback); -}; diff --git a/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp b/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp deleted file mode 100644 index 6f8ba2765..000000000 --- a/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.cpp +++ /dev/null @@ -1,187 +0,0 @@ -#include "GRPCStreamHostObject.h" -#include "../NativeModules/InternalModules/GlobalNetworkSingleton.h" -#include "../NativeModules/InternalModules/SocketStatus.h" - -using namespace facebook; - -GRPCStreamHostObject::GRPCStreamHostObject( - jsi::Runtime &rt, - std::shared_ptr jsInvoker) - : readyState{SocketStatus::CONNECTING}, - onopen{}, - onmessage{}, - onclose{}, - send{jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forUtf8(rt, "send"), - 1, - [](jsi::Runtime &rt, - const jsi::Value &thisVal, - const jsi::Value *args, - size_t count) { - auto payload{args->asString(rt).utf8(rt)}; - comm::GlobalNetworkSingleton::instance.scheduleOrRun( - [=](comm::NetworkModule &networkModule) { - std::vector blobHashes{}; - networkModule.send( - "sessionID-placeholder", - "toDeviceID-placeholder", - payload, - blobHashes); - }); - return jsi::Value::undefined(); - })}, - close{jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forUtf8(rt, "close"), - 0, - [](jsi::Runtime &rt, - const jsi::Value &thisVal, - const jsi::Value *args, - size_t count) { - comm::GlobalNetworkSingleton::instance.scheduleOrRun( - [=](comm::NetworkModule &networkModule) { - networkModule.closeGetStream(); - }); - - return jsi::Value::undefined(); - })}, - jsInvoker{jsInvoker} { - - auto onReadDoneCallback = [this, &rt](std::string data) { - this->jsInvoker->invokeAsync([this, &rt, data]() { - if (this->onmessage.isNull()) { - return; - } - auto msgObject = jsi::Object(rt); - msgObject.setProperty(rt, "data", jsi::String::createFromUtf8(rt, data)); - this->onmessage.asObject(rt).asFunction(rt).call(rt, msgObject, 1); - }); - }; - - auto onOpenCallback = [this, &rt]() { - this->jsInvoker->invokeAsync([this, &rt]() { - if (this->onopen.isNull()) { - return; - } - this->onopen.asObject(rt).asFunction(rt).call( - rt, jsi::Value::undefined(), 0); - }); - }; - - auto onCloseCallback = [this, &rt]() { - this->jsInvoker->invokeAsync([this, &rt]() { - if (this->onclose.isNull()) { - return; - } - this->onclose.asObject(rt).asFunction(rt).call( - rt, jsi::Value::undefined(), 0); - }); - }; - - // We pass the following lambda to the `NetworkModule` on the "network" - // thread with a reference to `this` bound in. This allows us to directly - // modify the value of `readyState` in a synchronous manner. - auto setReadyStateCallback = [this](SocketStatus newSocketStatus) { - if (!this) { - // This handles the case where `GRPCStreamHostObj` may have been freed - // by the JS garbage collector and `this` is no longer a valid reference. - return; - } - this->readyState = newSocketStatus; - }; - - // The reason we're queueing up the `.get()` call on the JS event loop is - // to handle the case of an `.onopen` callback being set right after a - // call to `openSocket(...)`. - // - // This isn't an issue with the existing `WebSocket` approach because the - // socket will not actually open until the block of JS--which includes the - // setting of the `.onopen` callback--finishes executing. - // See the following for background: https://stackoverflow.com/a/49211579. - // - // Without wrapping the `scheduleOrRun(...)` in an `invokeAsync(...)`, - // it is possible for the gRPC `Get()` stream to open before the `.onopen` - // callback has been properly set. We queue the `get()` call on the JS - // event loop to guarantee that the `.onopen` callback is set before the - // socket can possibly open. This mimics the existing `WebSocket` behavior. - this->jsInvoker->invokeAsync([=]() { - comm::GlobalNetworkSingleton::instance.scheduleOrRun( - [=](comm::NetworkModule &networkModule) { - // The callbacks are set after the call to `.get()` because they - // need to be passed to the `ClientGetReadReactor` object, which is - // only constructed after a call to `.get()`. - networkModule.initializeNetworkModule( - "userId-placeholder", "deviceToken-placeholder", "localhost"); - networkModule.get("sessionID-placeholder"); - networkModule.setOnReadDoneCallback(onReadDoneCallback); - networkModule.setOnOpenCallback(onOpenCallback); - networkModule.setOnCloseCallback(onCloseCallback); - networkModule.assignSetReadyStateCallback(setReadyStateCallback); - }); - }); -} - -std::vector -GRPCStreamHostObject::getPropertyNames(jsi::Runtime &rt) { - std::vector names; - names.reserve(6); - names.push_back(jsi::PropNameID::forUtf8(rt, std::string{"readyState"})); - names.push_back(jsi::PropNameID::forUtf8(rt, std::string{"onopen"})); - names.push_back(jsi::PropNameID::forUtf8(rt, std::string{"onmessage"})); - names.push_back(jsi::PropNameID::forUtf8(rt, std::string{"onclose"})); - names.push_back(jsi::PropNameID::forUtf8(rt, std::string{"close"})); - names.push_back(jsi::PropNameID::forUtf8(rt, std::string{"send"})); - return names; -} - -jsi::Value -GRPCStreamHostObject::get(jsi::Runtime &runtime, const jsi::PropNameID &name) { - auto propName = name.utf8(runtime); - - if (propName == "readyState") { - return jsi::Value(this->readyState); - } - if (propName == "send") { - return this->send.asObject(runtime).asFunction(runtime); - } - if (propName == "close") { - return this->close.asObject(runtime).asFunction(runtime); - } - if (propName == "onopen") { - return this->onopen.isNull() - ? jsi::Value::null() - : this->onopen.asObject(runtime).asFunction(runtime); - } - if (propName == "onmessage") { - return this->onmessage.isNull() - ? jsi::Value::null() - : this->onmessage.asObject(runtime).asFunction(runtime); - } - if (propName == "onclose") { - return this->onclose.isNull() - ? jsi::Value::null() - : this->onclose.asObject(runtime).asFunction(runtime); - } - return jsi::Value::undefined(); -} - -void GRPCStreamHostObject::set( - jsi::Runtime &runtime, - const jsi::PropNameID &name, - const jsi::Value &value) { - auto propName = name.utf8(runtime); - - if (propName == "onopen" && value.isObject() && - value.asObject(runtime).isFunction(runtime)) { - this->onopen = value.asObject(runtime).asFunction(runtime); - } else if ( - propName == "onmessage" && value.isObject() && - value.asObject(runtime).isFunction(runtime)) { - this->onmessage = value.asObject(runtime).asFunction(runtime); - } else if ( - propName == "onclose" && value.isObject() && - value.asObject(runtime).isFunction(runtime)) { - this->onclose = value.asObject(runtime).asFunction(runtime); - } -} diff --git a/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.h b/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.h deleted file mode 100644 index 995989a54..000000000 --- a/native/cpp/CommonCpp/grpc/GRPCStreamHostObject.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#import - -using namespace facebook; - -class JSI_EXPORT GRPCStreamHostObject : public jsi::HostObject { -public: - GRPCStreamHostObject( - jsi::Runtime &rt, - std::shared_ptr jsInvoker); - jsi::Value get(jsi::Runtime &, const jsi::PropNameID &name) override; - void set(jsi::Runtime &, const jsi::PropNameID &name, const jsi::Value &value) - override; - std::vector getPropertyNames(jsi::Runtime &rt) override; - -private: - int readyState; - jsi::Value onopen; - jsi::Value onmessage; - jsi::Value onclose; - jsi::Value send; - jsi::Value close; - std::shared_ptr jsInvoker; -}; diff --git a/native/ios/Comm.xcodeproj/project.pbxproj b/native/ios/Comm.xcodeproj/project.pbxproj index c74c9e080..6d2b8e552 100644 --- a/native/ios/Comm.xcodeproj/project.pbxproj +++ b/native/ios/Comm.xcodeproj/project.pbxproj @@ -1,1724 +1,1718 @@ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 1F537ACC7B60DC049C0ECFA7 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769A87FB41BCE3FEF97FD59A /* ExpoModulesProvider.swift */; }; - 2DDA0AE067906E18B83A455C /* ClientGetReadReactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DDA00CA889DFF0ECB7E338D /* ClientGetReadReactor.cpp */; }; 71009A7B26FDCD72002C8453 /* Client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71009A7926FDCD71002C8453 /* Client.cpp */; }; 71142A7726C2650B0039DCBD /* CommSecureStoreIOSWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71142A7626C2650A0039DCBD /* CommSecureStoreIOSWrapper.mm */; }; 711B408425DA97F9005F8F06 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F26E81B24440D87004049C6 /* dummy.swift */; }; 713EE41126C66B80003D7C48 /* CryptoTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 713EE41026C66B80003D7C48 /* CryptoTest.mm */; }; 71762A75270D8AAE00F565ED /* PlatformSpecificTools.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71762A74270D8AAE00F565ED /* PlatformSpecificTools.mm */; }; 718DE99E2653D41C00365824 /* WorkerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 718DE99C2653D41C00365824 /* WorkerThread.cpp */; }; 71BE84492636A944002849D2 /* NativeModules.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BE843B2636A944002849D2 /* NativeModules.cpp */; }; 71BE844A2636A944002849D2 /* CommCoreModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BE843C2636A944002849D2 /* CommCoreModule.cpp */; }; 71BE844B2636A944002849D2 /* SQLiteQueryExecutor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BE84412636A944002849D2 /* SQLiteQueryExecutor.cpp */; }; 71BF5B7126B3FF0900EDE27D /* Session.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B6F26B3FF0900EDE27D /* Session.cpp */; }; 71BF5B7526B401D300EDE27D /* Tools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B7326B401D300EDE27D /* Tools.cpp */; }; 71BF5B7F26BBDD7400EDE27D /* CryptoModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B7B26BBDA6100EDE27D /* CryptoModule.cpp */; }; 71CA4A64262DA8E500835C89 /* Logger.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71CA4A63262DA8E500835C89 /* Logger.mm */; }; 71CA4AEC262F236100835C89 /* Tools.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71CA4AEB262F236100835C89 /* Tools.mm */; }; 71D4D7CC26C50B1000FCDBCD /* CommSecureStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71D4D7CB26C50B1000FCDBCD /* CommSecureStore.mm */; }; 724995D527B4103A00323FCE /* NotificationService.mm in Sources */ = {isa = PBXBuildFile; fileRef = 724995D427B4103A00323FCE /* NotificationService.mm */; }; 724995D927B4103A00323FCE /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 724995D127B4103A00323FCE /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 724995FB27BA9E8D00323FCE /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 724995FA27BA9E8C00323FCE /* UserNotifications.framework */; }; 726E5D752731A4790032361D /* NetworkModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 726E5D732731A4790032361D /* NetworkModule.cpp */; }; 726E5D782731A5E10032361D /* GlobalNetworkSingleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 726E5D762731A5E10032361D /* GlobalNetworkSingleton.cpp */; }; 75291F0428F9A0D400F4C80E /* DeviceID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75291F0328F9A0AE00F4C80E /* DeviceID.cpp */; }; 7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F761E292201141E001B6FB7 /* JavaScriptCore.framework */; }; 7F788C2C248AA2140098F071 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7F788C2B248AA2130098F071 /* SplashScreen.storyboard */; }; 7F8D602126535E060053CB29 /* OpenSans-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F8D601E26535E060053CB29 /* OpenSans-Semibold.ttf */; }; 7F8D602226535E060053CB29 /* Anaheim-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F8D601F26535E060053CB29 /* Anaheim-Regular.ttf */; }; 7F8D602326535E060053CB29 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F8D602026535E060053CB29 /* OpenSans-Regular.ttf */; }; 7F8D602826535F240053CB29 /* IBMPlexSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F8D602726535EEE0053CB29 /* IBMPlexSans-Bold.ttf */; }; 7F8D602926535F2A0053CB29 /* IBMPlexSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F8D602626535EEE0053CB29 /* IBMPlexSans-Regular.ttf */; }; 8B99BAAC28D50F3000EB5ADB /* libnative_rust_library.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B99BAAB28D50F3000EB5ADB /* libnative_rust_library.a */; }; 8B99BAAE28D511FF00EB5ADB /* lib.rs.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B99BAAD28D511FF00EB5ADB /* lib.rs.cc */; }; 8E43C32C291E5B4A009378F5 /* TerminateApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8E43C32B291E5B4A009378F5 /* TerminateApp.mm */; }; B7162ABD28AAD461006588D3 /* CommIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B7162ABC28AAD461006588D3 /* CommIcons.ttf */; }; B71AFF1F265EDD8600B22352 /* IBMPlexSans-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B71AFF1E265EDD8600B22352 /* IBMPlexSans-Medium.ttf */; }; B734D11028ADD55200570D04 /* SWMansionIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B734D10F28ADD55200570D04 /* SWMansionIcons.ttf */; }; - B7BEE749279B3FB6009CCA35 /* GRPCStreamHostObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B7BEE744279B3E20009CCA35 /* GRPCStreamHostObject.cpp */; }; - CB1648AD27CFBBBB00394D9D /* ClientGetReadReactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DDA00CA889DFF0ECB7E338D /* ClientGetReadReactor.cpp */; }; CB1648AF27CFBE6A00394D9D /* CryptoModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B7B26BBDA6100EDE27D /* CryptoModule.cpp */; }; CB38B48228771C7A00171182 /* NonBlockingLock.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47B287718A200171182 /* NonBlockingLock.mm */; }; CB38B48328771C8300171182 /* NonBlockingLock.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47B287718A200171182 /* NonBlockingLock.mm */; }; CB38B48428771CAF00171182 /* EncryptedFileUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47D2877194100171182 /* EncryptedFileUtils.mm */; }; CB38B48528771CB800171182 /* EncryptedFileUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47D2877194100171182 /* EncryptedFileUtils.mm */; }; CB38B48628771CDD00171182 /* TemporaryMessageStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47F28771A3B00171182 /* TemporaryMessageStorage.mm */; }; CB38B48728771CE500171182 /* TemporaryMessageStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47F28771A3B00171182 /* TemporaryMessageStorage.mm */; }; CB38F2B1286C6C870010535C /* MessageOperationsUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38F2AF286C6C870010535C /* MessageOperationsUtilities.cpp */; }; CB38F2C0286C6CDF0010535C /* MessageOperationsUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB38F2AF286C6C870010535C /* MessageOperationsUtilities.cpp */; }; CB3C621127CE4A320054F24C /* Logger.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71CA4A63262DA8E500835C89 /* Logger.mm */; }; CB3C621227CE65030054F24C /* CommSecureStoreIOSWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71142A7626C2650A0039DCBD /* CommSecureStoreIOSWrapper.mm */; }; CB4821A527CF9F38001AB7E1 /* CommSecureStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71D4D7CB26C50B1000FCDBCD /* CommSecureStore.mm */; }; CB4821A627CFB153001AB7E1 /* Client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71009A7926FDCD71002C8453 /* Client.cpp */; }; CB4821A927CFB153001AB7E1 /* WorkerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 718DE99C2653D41C00365824 /* WorkerThread.cpp */; }; CB4821AA27CFB153001AB7E1 /* Tools.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71CA4AEB262F236100835C89 /* Tools.mm */; }; CB4821AC27CFB17C001AB7E1 /* Session.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B6F26B3FF0900EDE27D /* Session.cpp */; }; CB4821AD27CFB17C001AB7E1 /* NetworkModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 726E5D732731A4790032361D /* NetworkModule.cpp */; }; CB4821AE27CFB187001AB7E1 /* Tools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B7326B401D300EDE27D /* Tools.cpp */; }; CB4821AF27CFB19D001AB7E1 /* PlatformSpecificTools.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71762A74270D8AAE00F565ED /* PlatformSpecificTools.mm */; }; CB4821B127CFB1FA001AB7E1 /* GlobalNetworkSingleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 726E5D762731A5E10032361D /* GlobalNetworkSingleton.cpp */; }; CB4821B227CFB20E001AB7E1 /* SQLiteQueryExecutor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BE84412636A944002849D2 /* SQLiteQueryExecutor.cpp */; }; CBDEC69B28ED867000C17588 /* GlobalDBSingleton.mm in Sources */ = {isa = PBXBuildFile; fileRef = CBDEC69A28ED867000C17588 /* GlobalDBSingleton.mm */; }; CBFE58292885852B003B94C9 /* ThreadOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CBFE58282885852B003B94C9 /* ThreadOperations.cpp */; }; D7DB6E0F85B2DBE15B01EC21 /* libPods-Comm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 994BEBDD4E4959F69CEA0BC3 /* libPods-Comm.a */; }; F02C296C528B51ADAB5AA19D /* libPods-NotificationService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EE4DCB430B05EC9DE7D7B01 /* libPods-NotificationService.a */; }; FC2DF95528BFCFE90017C4AF /* tunnelbroker.grpc.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = FC2DF95128BFCFE90017C4AF /* tunnelbroker.grpc.pb.cc */; }; FC2DF95628BFCFE90017C4AF /* tunnelbroker.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = FC2DF95328BFCFE90017C4AF /* tunnelbroker.pb.cc */; }; FC2DF95728BFD02A0017C4AF /* tunnelbroker.grpc.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = FC2DF95128BFCFE90017C4AF /* tunnelbroker.grpc.pb.cc */; }; FC2DF95828BFD0350017C4AF /* tunnelbroker.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = FC2DF95328BFCFE90017C4AF /* tunnelbroker.pb.cc */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 713EE40B26C6676B003D7C48 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 13B07F861A680F5B00A75B9A; remoteInfo = Comm; }; 724995D727B4103A00323FCE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 724995D027B4103A00323FCE; remoteInfo = NotificationService; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ 724995DA27B4103A00323FCE /* Embed App Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( 724995D927B4103A00323FCE /* NotificationService.appex in Embed App Extensions */, ); name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 13B07F961A680F5B00A75B9A /* Comm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Comm.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Comm/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Comm/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Comm/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.release.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.release.plist; path = Comm/Info.release.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Comm/main.m; sourceTree = ""; }; 2DDA00CA889DFF0ECB7E338D /* ClientGetReadReactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientGetReadReactor.cpp; sourceTree = ""; }; 2DDA05D6D8D20D885F22F82C /* SocketStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStatus.h; sourceTree = ""; }; 2DDA0A22FECC9DAA5C19C35D /* Metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Metadata.h; sourceTree = ""; }; 3EE4DCB430B05EC9DE7D7B01 /* libPods-NotificationService.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationService.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3EEB3E70587B0ADAD05237B0 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Comm/ExpoModulesProvider.swift"; sourceTree = ""; }; 71009A7926FDCD71002C8453 /* Client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Client.cpp; sourceTree = ""; }; 71009A7A26FDCD71002C8453 /* Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Client.h; sourceTree = ""; }; 71142A7526C2650A0039DCBD /* CommSecureStoreIOSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommSecureStoreIOSWrapper.h; path = Comm/CommSecureStoreIOSWrapper.h; sourceTree = ""; }; 71142A7626C2650A0039DCBD /* CommSecureStoreIOSWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CommSecureStoreIOSWrapper.mm; path = Comm/CommSecureStoreIOSWrapper.mm; sourceTree = ""; }; 711CF80E25DC096000A00FBD /* libFolly.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libFolly.a; sourceTree = BUILT_PRODUCTS_DIR; }; 713EE40626C6676B003D7C48 /* CommTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CommTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 713EE40A26C6676B003D7C48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 713EE41026C66B80003D7C48 /* CryptoTest.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CryptoTest.mm; sourceTree = ""; }; 71762A74270D8AAE00F565ED /* PlatformSpecificTools.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformSpecificTools.mm; path = Comm/PlatformSpecificTools.mm; sourceTree = ""; }; 718DE99C2653D41C00365824 /* WorkerThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerThread.cpp; sourceTree = ""; }; 718DE99D2653D41C00365824 /* WorkerThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WorkerThread.h; sourceTree = ""; }; 71B8CCBD26BD4DEB0040C0A2 /* CommSecureStore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommSecureStore.h; sourceTree = ""; }; 71BE84392636A944002849D2 /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = ""; }; 71BE843B2636A944002849D2 /* NativeModules.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NativeModules.cpp; sourceTree = ""; }; 71BE843C2636A944002849D2 /* CommCoreModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommCoreModule.cpp; sourceTree = ""; }; 71BE843D2636A944002849D2 /* NativeModules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeModules.h; sourceTree = ""; }; 71BE843E2636A944002849D2 /* CommCoreModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommCoreModule.h; sourceTree = ""; }; 71BE84402636A944002849D2 /* DatabaseQueryExecutor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseQueryExecutor.h; sourceTree = ""; }; 71BE84412636A944002849D2 /* SQLiteQueryExecutor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLiteQueryExecutor.cpp; sourceTree = ""; }; 71BE84422636A944002849D2 /* SQLiteQueryExecutor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteQueryExecutor.h; sourceTree = ""; }; 71BE84432636A944002849D2 /* DatabaseManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseManager.h; sourceTree = ""; }; 71BE84452636A944002849D2 /* Draft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Draft.h; sourceTree = ""; }; 71BE84482636A944002849D2 /* sqlite_orm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqlite_orm.h; sourceTree = ""; }; 71BF5B6F26B3FF0900EDE27D /* Session.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Session.cpp; sourceTree = ""; }; 71BF5B7026B3FF0900EDE27D /* Session.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Session.h; sourceTree = ""; }; 71BF5B7226B3FFBC00EDE27D /* Persist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Persist.h; sourceTree = ""; }; 71BF5B7326B401D300EDE27D /* Tools.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Tools.cpp; sourceTree = ""; }; 71BF5B7426B401D300EDE27D /* Tools.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = ""; }; 71BF5B7A26BBDA6000EDE27D /* CryptoModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoModule.h; sourceTree = ""; }; 71BF5B7B26BBDA6100EDE27D /* CryptoModule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoModule.cpp; sourceTree = ""; }; 71CA4A63262DA8E500835C89 /* Logger.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Logger.mm; path = Comm/Logger.mm; sourceTree = ""; }; 71CA4AEA262F230A00835C89 /* Tools.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Tools.h; path = Comm/Tools.h; sourceTree = ""; }; 71CA4AEB262F236100835C89 /* Tools.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = Tools.mm; path = Comm/Tools.mm; sourceTree = ""; }; 71D4D7CB26C50B1000FCDBCD /* CommSecureStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CommSecureStore.mm; path = Comm/CommSecureStore.mm; sourceTree = ""; }; 71DC160C270C43D300822863 /* PlatformSpecificTools.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformSpecificTools.h; sourceTree = ""; }; 724995D127B4103A00323FCE /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 724995D327B4103A00323FCE /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = ""; }; 724995D427B4103A00323FCE /* NotificationService.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NotificationService.mm; sourceTree = ""; }; 724995D627B4103A00323FCE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 724995FA27BA9E8C00323FCE /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; 726E5D732731A4790032361D /* NetworkModule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkModule.cpp; sourceTree = ""; }; 726E5D742731A4790032361D /* NetworkModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkModule.h; sourceTree = ""; }; 726E5D762731A5E10032361D /* GlobalNetworkSingleton.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalNetworkSingleton.cpp; sourceTree = ""; }; 726E5D772731A5E10032361D /* GlobalNetworkSingleton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlobalNetworkSingleton.h; sourceTree = ""; }; 75291F0228F9A09E00F4C80E /* DeviceID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceID.h; sourceTree = ""; }; 75291F0328F9A0AE00F4C80E /* DeviceID.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceID.cpp; sourceTree = ""; }; 769A87FB41BCE3FEF97FD59A /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-NotificationService/ExpoModulesProvider.swift"; sourceTree = ""; }; 7F26E81B24440D87004049C6 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = ""; }; 7F554F822332D58B007CB9F7 /* Info.debug.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.debug.plist; path = Comm/Info.debug.plist; sourceTree = ""; }; 7F761E292201141E001B6FB7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 7F788C2B248AA2130098F071 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SplashScreen.storyboard; sourceTree = ""; }; 7F8D601E26535E060053CB29 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Semibold.ttf"; path = "Resources/OpenSans-Semibold.ttf"; sourceTree = ""; }; 7F8D601F26535E060053CB29 /* Anaheim-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Anaheim-Regular.ttf"; path = "Resources/Anaheim-Regular.ttf"; sourceTree = ""; }; 7F8D602026535E060053CB29 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Regular.ttf"; path = "Resources/OpenSans-Regular.ttf"; sourceTree = ""; }; 7F8D602626535EEE0053CB29 /* IBMPlexSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "IBMPlexSans-Regular.ttf"; path = "Resources/IBMPlexSans-Regular.ttf"; sourceTree = ""; }; 7F8D602726535EEE0053CB29 /* IBMPlexSans-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "IBMPlexSans-Bold.ttf"; path = "Resources/IBMPlexSans-Bold.ttf"; sourceTree = ""; }; 7FCEA2DC2444010B004017B1 /* Comm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Comm-Bridging-Header.h"; sourceTree = ""; }; 7FCFD8BD1E81B8DF00629B0E /* Comm.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Comm.entitlements; path = Comm/Comm.entitlements; sourceTree = ""; }; 891D1495EE1F375F3AF6C7ED /* Pods-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.debug.xcconfig"; sourceTree = ""; }; 8B99AF6D28D50D4800EB5ADB /* lib.rs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lib.rs.h; sourceTree = ""; }; 8B99B59928D50D4900EB5ADB /* cxx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cxx.h; sourceTree = ""; }; 8B99BAAB28D50F3000EB5ADB /* libnative_rust_library.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libnative_rust_library.a; path = ../native_rust_library/target/universal/release/libnative_rust_library.a; sourceTree = ""; }; 8B99BAAD28D511FF00EB5ADB /* lib.rs.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lib.rs.cc; sourceTree = ""; }; 8E43C32B291E5B4A009378F5 /* TerminateApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TerminateApp.mm; path = Comm/TerminateApp.mm; sourceTree = ""; }; 8E43C32E291E5B9D009378F5 /* TerminateApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerminateApp.h; path = ../cpp/CommonCpp/Tools/TerminateApp.h; sourceTree = ""; }; 913E5A7BDECB327E3DE11053 /* Pods-NotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.release.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.release.xcconfig"; sourceTree = ""; }; 994BEBDD4E4959F69CEA0BC3 /* libPods-Comm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Comm.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B7055C6B26E477CF00BE0548 /* MessageStoreOperations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageStoreOperations.h; sourceTree = ""; }; B70FBC1226B047050040F480 /* Message.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Message.h; sourceTree = ""; }; B7162ABC28AAD461006588D3 /* CommIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = CommIcons.ttf; path = Resources/CommIcons.ttf; sourceTree = ""; }; B71AFF1E265EDD8600B22352 /* IBMPlexSans-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "IBMPlexSans-Medium.ttf"; path = "Resources/IBMPlexSans-Medium.ttf"; sourceTree = ""; }; B72879B827A865EF008A04CC /* ClientGetReadReactor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ClientGetReadReactor.h; sourceTree = ""; }; B734D10F28ADD55200570D04 /* SWMansionIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = SWMansionIcons.ttf; path = Resources/SWMansionIcons.ttf; sourceTree = ""; }; B7906F692720905A009BBBF5 /* ThreadStoreOperations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ThreadStoreOperations.h; sourceTree = ""; }; B7906F6A27209091009BBBF5 /* OlmPersistAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OlmPersistAccount.h; sourceTree = ""; }; B7906F6B27209091009BBBF5 /* OlmPersistSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OlmPersistSession.h; sourceTree = ""; }; B7906F6C27209091009BBBF5 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = ""; }; B7BEE744279B3E20009CCA35 /* GRPCStreamHostObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GRPCStreamHostObject.cpp; sourceTree = ""; }; B7BEE748279B3F2E009CCA35 /* GRPCStreamHostObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GRPCStreamHostObject.h; sourceTree = ""; }; B7E937CA26F448E700022A7C /* Media.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Media.h; sourceTree = ""; }; C562A7004903539402D988CE /* Pods-Comm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Comm.release.xcconfig"; path = "Target Support Files/Pods-Comm/Pods-Comm.release.xcconfig"; sourceTree = ""; }; CB1648B027CFD07E00394D9D /* CommRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = CommRelease.entitlements; path = Comm/CommRelease.entitlements; sourceTree = ""; }; CB30C12327D0ACF700FBE8DE /* NotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationService.entitlements; sourceTree = ""; }; CB38B4792877179A00171182 /* NonBlockingLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonBlockingLock.h; path = Comm/TemporaryMessageStorage/NonBlockingLock.h; sourceTree = ""; }; CB38B47B287718A200171182 /* NonBlockingLock.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = NonBlockingLock.mm; path = Comm/TemporaryMessageStorage/NonBlockingLock.mm; sourceTree = ""; }; CB38B47C2877190100171182 /* EncryptedFileUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EncryptedFileUtils.h; path = Comm/TemporaryMessageStorage/EncryptedFileUtils.h; sourceTree = ""; }; CB38B47D2877194100171182 /* EncryptedFileUtils.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = EncryptedFileUtils.mm; path = Comm/TemporaryMessageStorage/EncryptedFileUtils.mm; sourceTree = ""; }; CB38B47E287719C500171182 /* TemporaryMessageStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TemporaryMessageStorage.h; path = Comm/TemporaryMessageStorage/TemporaryMessageStorage.h; sourceTree = ""; }; CB38B47F28771A3B00171182 /* TemporaryMessageStorage.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = TemporaryMessageStorage.mm; path = Comm/TemporaryMessageStorage/TemporaryMessageStorage.mm; sourceTree = ""; }; CB38F2AE286C6C870010535C /* MessageSpecs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MessageSpecs.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs.h; sourceTree = ""; }; CB38F2AF286C6C870010535C /* MessageOperationsUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MessageOperationsUtilities.cpp; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageOperationsUtilities.cpp; sourceTree = ""; }; CB38F2B0286C6C870010535C /* MessageOperationsUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MessageOperationsUtilities.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageOperationsUtilities.h; sourceTree = ""; }; CB38F2B2286C6C970010535C /* CreateThreadMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CreateThreadMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/CreateThreadMessageSpec.h; sourceTree = ""; }; CB38F2B3286C6C970010535C /* TextMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/TextMessageSpec.h; sourceTree = ""; }; CB38F2B4286C6C970010535C /* CreateSidebarMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CreateSidebarMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/CreateSidebarMessageSpec.h; sourceTree = ""; }; CB38F2B5286C6C970010535C /* ChangeRoleMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangeRoleMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/ChangeRoleMessageSpec.h; sourceTree = ""; }; CB38F2B6286C6C970010535C /* RestoreEntryMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RestoreEntryMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/RestoreEntryMessageSpec.h; sourceTree = ""; }; CB38F2B7286C6C970010535C /* MessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/MessageSpec.h; sourceTree = ""; }; CB38F2B8286C6C970010535C /* ChangeSettingsMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangeSettingsMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/ChangeSettingsMessageSpec.h; sourceTree = ""; }; CB38F2B9286C6C970010535C /* UnsupportedMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnsupportedMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/UnsupportedMessageSpec.h; sourceTree = ""; }; CB38F2BA286C6C970010535C /* CreateEntryMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CreateEntryMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/CreateEntryMessageSpec.h; sourceTree = ""; }; CB38F2BB286C6C970010535C /* EditEntryMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditEntryMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/EditEntryMessageSpec.h; sourceTree = ""; }; CB38F2BC286C6C970010535C /* CreateSubThreadMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CreateSubThreadMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/CreateSubThreadMessageSpec.h; sourceTree = ""; }; CB38F2BD286C6C970010535C /* MultimediaMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MultimediaMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/MultimediaMessageSpec.h; sourceTree = ""; }; CB38F2BE286C6C980010535C /* DeleteEntryMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeleteEntryMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/DeleteEntryMessageSpec.h; sourceTree = ""; }; CB38F2BF286C6C980010535C /* UpdateRelationshipMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UpdateRelationshipMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/UpdateRelationshipMessageSpec.h; sourceTree = ""; }; CB3C621327CE66540054F24C /* libEXSecureStore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libEXSecureStore.a; sourceTree = BUILT_PRODUCTS_DIR; }; CBDEC69928ED859600C17588 /* GlobalDBSingleton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlobalDBSingleton.h; sourceTree = ""; }; CBDEC69A28ED867000C17588 /* GlobalDBSingleton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GlobalDBSingleton.mm; path = Comm/GlobalDBSingleton.mm; sourceTree = ""; }; CBFE58272885852B003B94C9 /* ThreadOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadOperations.h; path = PersistentStorageUtilities/ThreadOperationsUtilities/ThreadOperations.h; sourceTree = ""; }; CBFE58282885852B003B94C9 /* ThreadOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadOperations.cpp; path = PersistentStorageUtilities/ThreadOperationsUtilities/ThreadOperations.cpp; sourceTree = ""; }; F53DA7B3F26C2798DCE74A94 /* Pods-Comm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Comm.debug.xcconfig"; path = "Target Support Files/Pods-Comm/Pods-Comm.debug.xcconfig"; sourceTree = ""; }; FC2DF95128BFCFE90017C4AF /* tunnelbroker.grpc.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tunnelbroker.grpc.pb.cc; sourceTree = ""; }; FC2DF95228BFCFE90017C4AF /* tunnelbroker.grpc.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tunnelbroker.grpc.pb.h; sourceTree = ""; }; FC2DF95328BFCFE90017C4AF /* tunnelbroker.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tunnelbroker.pb.cc; sourceTree = ""; }; FC2DF95428BFCFE90017C4AF /* tunnelbroker.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tunnelbroker.pb.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 8B99BAAC28D50F3000EB5ADB /* libnative_rust_library.a in Frameworks */, 7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */, D7DB6E0F85B2DBE15B01EC21 /* libPods-Comm.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 713EE40326C6676B003D7C48 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 724995CE27B4103A00323FCE /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 724995FB27BA9E8D00323FCE /* UserNotifications.framework in Frameworks */, F02C296C528B51ADAB5AA19D /* libPods-NotificationService.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 13B07FAE1A68108700A75B9A /* Comm */ = { isa = PBXGroup; children = ( CB1648B027CFD07E00394D9D /* CommRelease.entitlements */, 71B8CCB626BD30EC0040C0A2 /* CommCoreImplementations */, 7F788C2B248AA2130098F071 /* SplashScreen.storyboard */, 7FCFD8BD1E81B8DF00629B0E /* Comm.entitlements */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 7F554F822332D58B007CB9F7 /* Info.debug.plist */, 13B07FB61A68108700A75B9A /* Info.release.plist */, 13B07FB71A68108700A75B9A /* main.m */, 7FCEA2DC2444010B004017B1 /* Comm-Bridging-Header.h */, 7F26E81B24440D87004049C6 /* dummy.swift */, ); name = Comm; sourceTree = ""; }; 5F5A6FB2C6AD630620BBF58C /* NotificationService */ = { isa = PBXGroup; children = ( 769A87FB41BCE3FEF97FD59A /* ExpoModulesProvider.swift */, ); name = NotificationService; sourceTree = ""; }; 6534411766BE4CA4B0AB0A78 /* Resources */ = { isa = PBXGroup; children = ( B7162ABC28AAD461006588D3 /* CommIcons.ttf */, B734D10F28ADD55200570D04 /* SWMansionIcons.ttf */, 7F8D601F26535E060053CB29 /* Anaheim-Regular.ttf */, 7F8D602026535E060053CB29 /* OpenSans-Regular.ttf */, B71AFF1E265EDD8600B22352 /* IBMPlexSans-Medium.ttf */, 7F8D601E26535E060053CB29 /* OpenSans-Semibold.ttf */, 7F8D602726535EEE0053CB29 /* IBMPlexSans-Bold.ttf */, 7F8D602626535EEE0053CB29 /* IBMPlexSans-Regular.ttf */, ); name = Resources; sourceTree = ""; }; 713EE40726C6676B003D7C48 /* CommTests */ = { isa = PBXGroup; children = ( 713EE41026C66B80003D7C48 /* CryptoTest.mm */, 713EE40A26C6676B003D7C48 /* Info.plist */, ); path = CommTests; sourceTree = ""; }; 718A3C0426F22BD100F04A8D /* grpc */ = { isa = PBXGroup; children = ( 71009A7926FDCD71002C8453 /* Client.cpp */, 71009A7A26FDCD71002C8453 /* Client.h */, B7BEE744279B3E20009CCA35 /* GRPCStreamHostObject.cpp */, B7BEE748279B3F2E009CCA35 /* GRPCStreamHostObject.h */, B72879B827A865EF008A04CC /* ClientGetReadReactor.h */, 2DDA00CA889DFF0ECB7E338D /* ClientGetReadReactor.cpp */, ); path = grpc; sourceTree = ""; }; 71B8CCB626BD30EC0040C0A2 /* CommCoreImplementations */ = { isa = PBXGroup; children = ( 8E43C32E291E5B9D009378F5 /* TerminateApp.h */, 8E43C32B291E5B4A009378F5 /* TerminateApp.mm */, CBDEC69A28ED867000C17588 /* GlobalDBSingleton.mm */, CB38B4782877177B00171182 /* TemporaryMessageStorage */, 71762A74270D8AAE00F565ED /* PlatformSpecificTools.mm */, 71D4D7CB26C50B1000FCDBCD /* CommSecureStore.mm */, 71142A7526C2650A0039DCBD /* CommSecureStoreIOSWrapper.h */, 71142A7626C2650A0039DCBD /* CommSecureStoreIOSWrapper.mm */, 71CA4AEA262F230A00835C89 /* Tools.h */, 71CA4AEB262F236100835C89 /* Tools.mm */, 71CA4A63262DA8E500835C89 /* Logger.mm */, ); name = CommCoreImplementations; sourceTree = ""; }; 71BE84362636A944002849D2 /* cpp */ = { isa = PBXGroup; children = ( 71BE84372636A944002849D2 /* CommonCpp */, 71BE84462636A944002849D2 /* third-party */, ); name = cpp; path = ../cpp; sourceTree = ""; }; 71BE84372636A944002849D2 /* CommonCpp */ = { isa = PBXGroup; children = ( 71F971B4270726C000DDC5BF /* _generated */, 718A3C0426F22BD100F04A8D /* grpc */, 71BF5B6A26B3FCFF00EDE27D /* CryptoTools */, 71BE84382636A944002849D2 /* Tools */, 71BE843A2636A944002849D2 /* NativeModules */, 71BE843F2636A944002849D2 /* DatabaseManagers */, ); path = CommonCpp; sourceTree = ""; }; 71BE84382636A944002849D2 /* Tools */ = { isa = PBXGroup; children = ( 71B8CCBD26BD4DEB0040C0A2 /* CommSecureStore.h */, 718DE99C2653D41C00365824 /* WorkerThread.cpp */, 718DE99D2653D41C00365824 /* WorkerThread.h */, 71BE84392636A944002849D2 /* Logger.h */, 71DC160C270C43D300822863 /* PlatformSpecificTools.h */, ); path = Tools; sourceTree = ""; }; 71BE843A2636A944002849D2 /* NativeModules */ = { isa = PBXGroup; children = ( CBED0E2C284E086100CD3863 /* PersistentStorageUtilities */, 726E5D722731A4240032361D /* InternalModules */, 71BE843C2636A944002849D2 /* CommCoreModule.cpp */, 71BE843E2636A944002849D2 /* CommCoreModule.h */, B7055C6B26E477CF00BE0548 /* MessageStoreOperations.h */, B7906F692720905A009BBBF5 /* ThreadStoreOperations.h */, ); path = NativeModules; sourceTree = ""; }; 71BE843F2636A944002849D2 /* DatabaseManagers */ = { isa = PBXGroup; children = ( 71BE84402636A944002849D2 /* DatabaseQueryExecutor.h */, 71BE84412636A944002849D2 /* SQLiteQueryExecutor.cpp */, 71BE84422636A944002849D2 /* SQLiteQueryExecutor.h */, 71BE84432636A944002849D2 /* DatabaseManager.h */, 71BE84442636A944002849D2 /* entities */, ); path = DatabaseManagers; sourceTree = ""; }; 71BE84442636A944002849D2 /* entities */ = { isa = PBXGroup; children = ( B7906F6A27209091009BBBF5 /* OlmPersistAccount.h */, B7906F6B27209091009BBBF5 /* OlmPersistSession.h */, B7906F6C27209091009BBBF5 /* Thread.h */, 71BE84452636A944002849D2 /* Draft.h */, B70FBC1226B047050040F480 /* Message.h */, B7E937CA26F448E700022A7C /* Media.h */, 2DDA0A22FECC9DAA5C19C35D /* Metadata.h */, ); path = entities; sourceTree = ""; }; 71BE84462636A944002849D2 /* third-party */ = { isa = PBXGroup; children = ( 71BE84472636A944002849D2 /* sqlite_orm */, ); path = "third-party"; sourceTree = ""; }; 71BE84472636A944002849D2 /* sqlite_orm */ = { isa = PBXGroup; children = ( 71BE84482636A944002849D2 /* sqlite_orm.h */, ); path = sqlite_orm; sourceTree = ""; }; 71BF5B6A26B3FCFF00EDE27D /* CryptoTools */ = { isa = PBXGroup; children = ( 75291F0328F9A0AE00F4C80E /* DeviceID.cpp */, 75291F0228F9A09E00F4C80E /* DeviceID.h */, 71BF5B7B26BBDA6100EDE27D /* CryptoModule.cpp */, 71BF5B7A26BBDA6000EDE27D /* CryptoModule.h */, 71BF5B6F26B3FF0900EDE27D /* Session.cpp */, 71BF5B7026B3FF0900EDE27D /* Session.h */, 71BF5B7226B3FFBC00EDE27D /* Persist.h */, 71BF5B7326B401D300EDE27D /* Tools.cpp */, 71BF5B7426B401D300EDE27D /* Tools.h */, ); path = CryptoTools; sourceTree = ""; }; 71F971B4270726C000DDC5BF /* _generated */ = { isa = PBXGroup; children = ( 71BE843D2636A944002849D2 /* NativeModules.h */, 71BE843B2636A944002849D2 /* NativeModules.cpp */, ); path = _generated; sourceTree = ""; }; 724995D227B4103A00323FCE /* NotificationService */ = { isa = PBXGroup; children = ( CB30C12327D0ACF700FBE8DE /* NotificationService.entitlements */, 724995D327B4103A00323FCE /* NotificationService.h */, 724995D427B4103A00323FCE /* NotificationService.mm */, 724995D627B4103A00323FCE /* Info.plist */, ); path = NotificationService; sourceTree = ""; }; 726E5D722731A4240032361D /* InternalModules */ = { isa = PBXGroup; children = ( CBDEC69928ED859600C17588 /* GlobalDBSingleton.h */, 726E5D732731A4790032361D /* NetworkModule.cpp */, 726E5D742731A4790032361D /* NetworkModule.h */, 726E5D762731A5E10032361D /* GlobalNetworkSingleton.cpp */, 726E5D772731A5E10032361D /* GlobalNetworkSingleton.h */, 2DDA05D6D8D20D885F22F82C /* SocketStatus.h */, ); path = InternalModules; sourceTree = ""; }; 7FF0870B1E833C3F000A1ACF /* Frameworks */ = { isa = PBXGroup; children = ( 8B99BAAB28D50F3000EB5ADB /* libnative_rust_library.a */, CB3C621327CE66540054F24C /* libEXSecureStore.a */, 724995FA27BA9E8C00323FCE /* UserNotifications.framework */, 711CF80E25DC096000A00FBD /* libFolly.a */, 7F761E292201141E001B6FB7 /* JavaScriptCore.framework */, 994BEBDD4E4959F69CEA0BC3 /* libPods-Comm.a */, 3EE4DCB430B05EC9DE7D7B01 /* libPods-NotificationService.a */, ); name = Frameworks; sourceTree = ""; }; 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( 8B99AF6B28D50D4800EB5ADB /* native_rust_library */, FC2DF94E28BFCF5B0017C4AF /* shared */, 71BE84362636A944002849D2 /* cpp */, 13B07FAE1A68108700A75B9A /* Comm */, 713EE40726C6676B003D7C48 /* CommTests */, 724995D227B4103A00323FCE /* NotificationService */, 83CBBA001A601CBA00E9B192 /* Products */, 6534411766BE4CA4B0AB0A78 /* Resources */, 7FF0870B1E833C3F000A1ACF /* Frameworks */, D533B93718E3B9684B508006 /* Pods */, AFF3F1F76178B42122C79BDE /* ExpoModulesProviders */, ); indentWidth = 2; sourceTree = ""; tabWidth = 2; }; 83CBBA001A601CBA00E9B192 /* Products */ = { isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* Comm.app */, 713EE40626C6676B003D7C48 /* CommTests.xctest */, 724995D127B4103A00323FCE /* NotificationService.appex */, ); name = Products; sourceTree = ""; }; 8B99AF6B28D50D4800EB5ADB /* native_rust_library */ = { isa = PBXGroup; children = ( 8B99BAAD28D511FF00EB5ADB /* lib.rs.cc */, 8B99AF6D28D50D4800EB5ADB /* lib.rs.h */, 8B99B59928D50D4900EB5ADB /* cxx.h */, ); name = native_rust_library; path = ../native_rust_library; sourceTree = ""; }; AFF3F1F76178B42122C79BDE /* ExpoModulesProviders */ = { isa = PBXGroup; children = ( E75E6E4967CE9A8BBA89ED86 /* Comm */, 5F5A6FB2C6AD630620BBF58C /* NotificationService */, ); name = ExpoModulesProviders; sourceTree = ""; }; CB38B4782877177B00171182 /* TemporaryMessageStorage */ = { isa = PBXGroup; children = ( CB38B47F28771A3B00171182 /* TemporaryMessageStorage.mm */, CB38B47E287719C500171182 /* TemporaryMessageStorage.h */, CB38B47D2877194100171182 /* EncryptedFileUtils.mm */, CB38B47C2877190100171182 /* EncryptedFileUtils.h */, CB38B47B287718A200171182 /* NonBlockingLock.mm */, CB38B4792877179A00171182 /* NonBlockingLock.h */, ); name = TemporaryMessageStorage; sourceTree = ""; }; CB38F2AC286C6C010010535C /* MessageOperationsUtilities */ = { isa = PBXGroup; children = ( CB38F2AF286C6C870010535C /* MessageOperationsUtilities.cpp */, CB38F2B0286C6C870010535C /* MessageOperationsUtilities.h */, CB38F2AE286C6C870010535C /* MessageSpecs.h */, CB38F2AD286C6C4B0010535C /* MessageSpecs */, ); name = MessageOperationsUtilities; sourceTree = ""; }; CB38F2AD286C6C4B0010535C /* MessageSpecs */ = { isa = PBXGroup; children = ( CB38F2B5286C6C970010535C /* ChangeRoleMessageSpec.h */, CB38F2B8286C6C970010535C /* ChangeSettingsMessageSpec.h */, CB38F2BA286C6C970010535C /* CreateEntryMessageSpec.h */, CB38F2B4286C6C970010535C /* CreateSidebarMessageSpec.h */, CB38F2BC286C6C970010535C /* CreateSubThreadMessageSpec.h */, CB38F2B2286C6C970010535C /* CreateThreadMessageSpec.h */, CB38F2BE286C6C980010535C /* DeleteEntryMessageSpec.h */, CB38F2BB286C6C970010535C /* EditEntryMessageSpec.h */, CB38F2B7286C6C970010535C /* MessageSpec.h */, CB38F2BD286C6C970010535C /* MultimediaMessageSpec.h */, CB38F2B6286C6C970010535C /* RestoreEntryMessageSpec.h */, CB38F2B3286C6C970010535C /* TextMessageSpec.h */, CB38F2B9286C6C970010535C /* UnsupportedMessageSpec.h */, CB38F2BF286C6C980010535C /* UpdateRelationshipMessageSpec.h */, ); name = MessageSpecs; sourceTree = ""; }; CBED0E2C284E086100CD3863 /* PersistentStorageUtilities */ = { isa = PBXGroup; children = ( CBFE582628858512003B94C9 /* ThreadOperationsUtilities */, CB38F2AC286C6C010010535C /* MessageOperationsUtilities */, ); name = PersistentStorageUtilities; sourceTree = ""; }; CBFE582628858512003B94C9 /* ThreadOperationsUtilities */ = { isa = PBXGroup; children = ( CBFE58282885852B003B94C9 /* ThreadOperations.cpp */, CBFE58272885852B003B94C9 /* ThreadOperations.h */, ); name = ThreadOperationsUtilities; sourceTree = ""; }; D533B93718E3B9684B508006 /* Pods */ = { isa = PBXGroup; children = ( F53DA7B3F26C2798DCE74A94 /* Pods-Comm.debug.xcconfig */, C562A7004903539402D988CE /* Pods-Comm.release.xcconfig */, 891D1495EE1F375F3AF6C7ED /* Pods-NotificationService.debug.xcconfig */, 913E5A7BDECB327E3DE11053 /* Pods-NotificationService.release.xcconfig */, ); path = Pods; sourceTree = ""; }; E75E6E4967CE9A8BBA89ED86 /* Comm */ = { isa = PBXGroup; children = ( 3EEB3E70587B0ADAD05237B0 /* ExpoModulesProvider.swift */, ); name = Comm; sourceTree = ""; }; FC2DF94E28BFCF5B0017C4AF /* shared */ = { isa = PBXGroup; children = ( FC2DF94F28BFCFA30017C4AF /* protos */, ); name = shared; path = ../../shared; sourceTree = ""; }; FC2DF94F28BFCFA30017C4AF /* protos */ = { isa = PBXGroup; children = ( FC2DF95028BFCFB80017C4AF /* _generated */, ); path = protos; sourceTree = ""; }; FC2DF95028BFCFB80017C4AF /* _generated */ = { isa = PBXGroup; children = ( FC2DF95128BFCFE90017C4AF /* tunnelbroker.grpc.pb.cc */, FC2DF95228BFCFE90017C4AF /* tunnelbroker.grpc.pb.h */, FC2DF95328BFCFE90017C4AF /* tunnelbroker.pb.cc */, FC2DF95428BFCFE90017C4AF /* tunnelbroker.pb.h */, ); path = _generated; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 13B07F861A680F5B00A75B9A /* Comm */ = { isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Comm" */; buildPhases = ( 02DE093B3C1DDF10C1FA3E9C /* [CP] Check Pods Manifest.lock */, 8BF9F24E28B795E200E20C13 /* Build Rust library */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, DB38BFA0686C805CE44F051F /* [CP] Copy Pods Resources */, EA2E8897D838D7F3E680EACE /* [CP] Embed Pods Frameworks */, 724995DA27B4103A00323FCE /* Embed App Extensions */, ); buildRules = ( ); dependencies = ( 724995D827B4103A00323FCE /* PBXTargetDependency */, ); name = Comm; productName = "Hello World"; productReference = 13B07F961A680F5B00A75B9A /* Comm.app */; productType = "com.apple.product-type.application"; }; 713EE40526C6676B003D7C48 /* CommTests */ = { isa = PBXNativeTarget; buildConfigurationList = 713EE40F26C6676B003D7C48 /* Build configuration list for PBXNativeTarget "CommTests" */; buildPhases = ( 713EE40226C6676B003D7C48 /* Sources */, 713EE40326C6676B003D7C48 /* Frameworks */, 713EE40426C6676B003D7C48 /* Resources */, ); buildRules = ( ); dependencies = ( 713EE40C26C6676B003D7C48 /* PBXTargetDependency */, ); name = CommTests; productName = CommTests; productReference = 713EE40626C6676B003D7C48 /* CommTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 724995D027B4103A00323FCE /* NotificationService */ = { isa = PBXNativeTarget; buildConfigurationList = 724995DD27B4103A00323FCE /* Build configuration list for PBXNativeTarget "NotificationService" */; buildPhases = ( 6735FA74B2C82E3B27E18258 /* [CP] Check Pods Manifest.lock */, 724995CD27B4103A00323FCE /* Sources */, 724995CE27B4103A00323FCE /* Frameworks */, 724995CF27B4103A00323FCE /* Resources */, E6221695BEF4548AF41DD8EB /* [CP] Copy Pods Resources */, ); buildRules = ( ); dependencies = ( ); name = NotificationService; productName = NotificationService; productReference = 724995D127B4103A00323FCE /* NotificationService.appex */; productType = "com.apple.product-type.app-extension"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1150; ORGANIZATIONNAME = "Comm Technologies, Inc."; TargetAttributes = { 13B07F861A680F5B00A75B9A = { DevelopmentTeam = H98Y8MH53M; LastSwiftMigration = 1140; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.BackgroundModes = { enabled = 1; }; com.apple.GameCenter = { enabled = 0; }; com.apple.InAppPurchase = { enabled = 0; }; com.apple.Keychain = { enabled = 1; }; com.apple.Push = { enabled = 1; }; com.apple.SafariKeychain = { enabled = 1; }; }; }; 713EE40526C6676B003D7C48 = { CreatedOnToolsVersion = 12.5.1; ProvisioningStyle = Automatic; TestTargetID = 13B07F861A680F5B00A75B9A; }; 724995D027B4103A00323FCE = { CreatedOnToolsVersion = 13.0; DevelopmentTeam = H98Y8MH53M; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Comm" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( English, en, Base, ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 13B07F861A680F5B00A75B9A /* Comm */, 713EE40526C6676B003D7C48 /* CommTests */, 724995D027B4103A00323FCE /* NotificationService */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 13B07F8E1A680F5B00A75B9A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 7F8D602926535F2A0053CB29 /* IBMPlexSans-Regular.ttf in Resources */, 7F8D602826535F240053CB29 /* IBMPlexSans-Bold.ttf in Resources */, 7F8D602126535E060053CB29 /* OpenSans-Semibold.ttf in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 7F788C2C248AA2140098F071 /* SplashScreen.storyboard in Resources */, B7162ABD28AAD461006588D3 /* CommIcons.ttf in Resources */, 7F8D602226535E060053CB29 /* Anaheim-Regular.ttf in Resources */, B71AFF1F265EDD8600B22352 /* IBMPlexSans-Medium.ttf in Resources */, 7F8D602326535E060053CB29 /* OpenSans-Regular.ttf in Resources */, B734D11028ADD55200570D04 /* SWMansionIcons.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 713EE40426C6676B003D7C48 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 724995CF27B4103A00323FCE /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Bundle React Native code and images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; 02DE093B3C1DDF10C1FA3E9C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-Comm-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 6735FA74B2C82E3B27E18258 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-NotificationService-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 8BF9F24E28B795E200E20C13 /* Build Rust library */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( ); name = "Build Rust library"; outputFileListPaths = ( ); outputPaths = ( "${SRCROOT}/../native_rust_library/lib.rs.cc", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "${SRCROOT}/../../scripts/build-rust-native-library.sh\n"; }; DB38BFA0686C805CE44F051F /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Comm/Pods-Comm-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++/gRPCCertificates-Cpp.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Comm/Pods-Comm-resources.sh\"\n"; showEnvVarsInLog = 0; }; E6221695BEF4548AF41DD8EB /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-NotificationService/Pods-NotificationService-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++/gRPCCertificates-Cpp.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationService/Pods-NotificationService-resources.sh\"\n"; showEnvVarsInLog = 0; }; EA2E8897D838D7F3E680EACE /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Comm/Pods-Comm-frameworks.sh", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Comm/Pods-Comm-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 75291F0428F9A0D400F4C80E /* DeviceID.cpp in Sources */, FC2DF95628BFCFE90017C4AF /* tunnelbroker.pb.cc in Sources */, 8E43C32C291E5B4A009378F5 /* TerminateApp.mm in Sources */, CB38B48628771CDD00171182 /* TemporaryMessageStorage.mm in Sources */, CB38B48428771CAF00171182 /* EncryptedFileUtils.mm in Sources */, CBFE58292885852B003B94C9 /* ThreadOperations.cpp in Sources */, CB38B48228771C7A00171182 /* NonBlockingLock.mm in Sources */, - B7BEE749279B3FB6009CCA35 /* GRPCStreamHostObject.cpp in Sources */, 718DE99E2653D41C00365824 /* WorkerThread.cpp in Sources */, 8B99BAAE28D511FF00EB5ADB /* lib.rs.cc in Sources */, 71CA4AEC262F236100835C89 /* Tools.mm in Sources */, 71009A7B26FDCD72002C8453 /* Client.cpp in Sources */, 71762A75270D8AAE00F565ED /* PlatformSpecificTools.mm in Sources */, 71BF5B7126B3FF0900EDE27D /* Session.cpp in Sources */, 726E5D752731A4790032361D /* NetworkModule.cpp in Sources */, 71BF5B7526B401D300EDE27D /* Tools.cpp in Sources */, 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 71142A7726C2650B0039DCBD /* CommSecureStoreIOSWrapper.mm in Sources */, FC2DF95528BFCFE90017C4AF /* tunnelbroker.grpc.pb.cc in Sources */, CB38F2B1286C6C870010535C /* MessageOperationsUtilities.cpp in Sources */, 71BE84492636A944002849D2 /* NativeModules.cpp in Sources */, 71CA4A64262DA8E500835C89 /* Logger.mm in Sources */, 71BF5B7F26BBDD7400EDE27D /* CryptoModule.cpp in Sources */, 71BE844A2636A944002849D2 /* CommCoreModule.cpp in Sources */, 71D4D7CC26C50B1000FCDBCD /* CommSecureStore.mm in Sources */, 711B408425DA97F9005F8F06 /* dummy.swift in Sources */, CBDEC69B28ED867000C17588 /* GlobalDBSingleton.mm in Sources */, 726E5D782731A5E10032361D /* GlobalNetworkSingleton.cpp in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, 71BE844B2636A944002849D2 /* SQLiteQueryExecutor.cpp in Sources */, - 2DDA0AE067906E18B83A455C /* ClientGetReadReactor.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 713EE40226C6676B003D7C48 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 713EE41126C66B80003D7C48 /* CryptoTest.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 724995CD27B4103A00323FCE /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CB38B48728771CE500171182 /* TemporaryMessageStorage.mm in Sources */, CB38B48528771CB800171182 /* EncryptedFileUtils.mm in Sources */, CB38B48328771C8300171182 /* NonBlockingLock.mm in Sources */, CB38F2C0286C6CDF0010535C /* MessageOperationsUtilities.cpp in Sources */, CB1648AF27CFBE6A00394D9D /* CryptoModule.cpp in Sources */, - CB1648AD27CFBBBB00394D9D /* ClientGetReadReactor.cpp in Sources */, CB4821B227CFB20E001AB7E1 /* SQLiteQueryExecutor.cpp in Sources */, CB4821B127CFB1FA001AB7E1 /* GlobalNetworkSingleton.cpp in Sources */, CB4821AE27CFB187001AB7E1 /* Tools.cpp in Sources */, FC2DF95828BFD0350017C4AF /* tunnelbroker.pb.cc in Sources */, FC2DF95728BFD02A0017C4AF /* tunnelbroker.grpc.pb.cc in Sources */, CB4821AC27CFB17C001AB7E1 /* Session.cpp in Sources */, CB4821AD27CFB17C001AB7E1 /* NetworkModule.cpp in Sources */, CB4821A627CFB153001AB7E1 /* Client.cpp in Sources */, CB4821A927CFB153001AB7E1 /* WorkerThread.cpp in Sources */, CB4821AA27CFB153001AB7E1 /* Tools.mm in Sources */, CB4821A527CF9F38001AB7E1 /* CommSecureStore.mm in Sources */, CB3C621227CE65030054F24C /* CommSecureStoreIOSWrapper.mm in Sources */, CB3C621127CE4A320054F24C /* Logger.mm in Sources */, 724995D527B4103A00323FCE /* NotificationService.mm in Sources */, CB4821AF27CFB19D001AB7E1 /* PlatformSpecificTools.mm in Sources */, 1F537ACC7B60DC049C0ECFA7 /* ExpoModulesProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 713EE40C26C6676B003D7C48 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 13B07F861A680F5B00A75B9A /* Comm */; targetProxy = 713EE40B26C6676B003D7C48 /* PBXContainerItemProxy */; }; 724995D827B4103A00323FCE /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 724995D027B4103A00323FCE /* NotificationService */; targetProxy = 724995D727B4103A00323FCE /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = F53DA7B3F26C2798DCE74A94 /* Pods-Comm.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_MODULES = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; CODE_SIGN_ENTITLEMENTS = Comm/Comm.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = H98Y8MH53M; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "COCOAPODS=1", "FB_SONARKIT_ENABLED=1", "SD_WEBP=1", ); HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS", "$(PODS_ROOT)/boost-for-react-native", "$(SRCROOT)/../native_rust_library", ); INFOPLIST_FILE = Comm/Info.debug.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/DVAssetLoaderDelegate\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXFont\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXHaptics\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXImageLoader\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXImageManipulator\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXKeepAwake\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXSecureStore\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ExpoModulesCore\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/FBReactNativeSpec\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-Boost-iOSX\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-DoubleConversion\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-Fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-Folly\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-Glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-PeerTalk\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-RSocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/FlipperKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/OLMKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf-C++\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RCTTypeSafety\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNCClipboard\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNCMaskedView\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNDeviceInfo\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNExitApp\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNFS\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNFastImage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNGestureHandler\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNKeychain\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNReanimated\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNScreens\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNVectorIcons\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Core\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-CoreModules\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTAnimation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTBlob\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTImage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTLinking\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTNetwork\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTSettings\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTText\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTVibration\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsi\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsiexecutor\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsinspector\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-logger\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-perflogger\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeART\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeDarkMode\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeKeyboardInput\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeKeyboardTrackingView\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SPTPersistentCache\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SQLCipher-Amalgamation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/abseil\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libwebp\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/lottie-react-native\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-background-upload\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-camera\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ffmpeg\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-flipper\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-in-app-message\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-netinfo\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-notifications\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-orientation-locker\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-safe-area-context\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-video\"", /usr/lib/swift, "$(SRCROOT)/../native_rust_library/target/universal/release", ); OTHER_CPLUSPLUSFLAGS = ( "-DFOLLY_MOBILE=1", "-DFOLLY_NO_CONFIG", "-DFOLLY_USE_LIBCPP=1", "-DRNVERSION=63", "-fcxx-modules", "-fmodules", ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = app.comm; PRODUCT_NAME = Comm; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Comm-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; USE_HEADERMAP = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = C562A7004903539402D988CE /* Pods-Comm.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_MODULES = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; CODE_SIGN_ENTITLEMENTS = Comm/Comm.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = H98Y8MH53M; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS", "$(PODS_ROOT)/boost-for-react-native", "$(SRCROOT)/../native_rust_library", ); INFOPLIST_FILE = Comm/Info.release.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/DVAssetLoaderDelegate\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXFont\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXHaptics\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXImageLoader\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXImageManipulator\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXKeepAwake\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/EXSecureStore\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ExpoModulesCore\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/FBReactNativeSpec\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/OLMKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf-C++\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RCTTypeSafety\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNCClipboard\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNCMaskedView\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNDeviceInfo\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNExitApp\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNFS\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNFastImage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNGestureHandler\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNKeychain\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNReanimated\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNScreens\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/RNVectorIcons\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Core\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-CoreModules\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTAnimation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTBlob\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTImage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTLinking\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTNetwork\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTSettings\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTText\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTVibration\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsi\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsiexecutor\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsinspector\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-logger\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/React-perflogger\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeART\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeDarkMode\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeKeyboardInput\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactNativeKeyboardTrackingView\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SPTPersistentCache\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SQLCipher-Amalgamation\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/abseil\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libwebp\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/lottie-react-native\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-background-upload\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-camera\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ffmpeg\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-flipper\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-in-app-message\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-netinfo\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-notifications\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-orientation-locker\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-safe-area-context\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-video\"", /usr/lib/swift, "$(SRCROOT)/../native_rust_library/target/universal/release", ); ONLY_ACTIVE_ARCH = YES; OTHER_CPLUSPLUSFLAGS = ( "-DFOLLY_MOBILE=1", "-DFOLLY_NO_CONFIG", "-DFOLLY_USE_LIBCPP=1", "-DRNVERSION=63", "-fcxx-modules", "-fmodules", ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = app.comm; PRODUCT_NAME = Comm; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Comm-Bridging-Header.h"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; USE_HEADERMAP = YES; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; 713EE40D26C6676B003D7C48 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = dwarf; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = CommTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = swm.CommTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Comm.app/Comm"; USER_HEADER_SEARCH_PATHS = ( ../../node_modules/olm/include, ../../node_modules/olm/lib, "${PODS_ROOT}/OLMKit/include", "${PODS_ROOT}/OLMKit/lib", ); }; name = Debug; }; 713EE40E26C6676B003D7C48 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = CommTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = swm.CommTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Comm.app/Comm"; USER_HEADER_SEARCH_PATHS = ( ../../node_modules/olm/include, ../../node_modules/olm/lib, "${PODS_ROOT}/OLMKit/include", "${PODS_ROOT}/OLMKit/lib", ); }; name = Release; }; 724995DB27B4103A00323FCE /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 891D1495EE1F375F3AF6C7ED /* Pods-NotificationService.debug.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 155; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = H98Y8MH53M; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = NotificationService/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = NotificationService; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Comm Technologies, Inc. All rights reserved."; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0.155; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; OTHER_CFLAGS = ( "$(inherited)", "-DSQLITE_HAS_CODEC", "-DFOLLY_MOBILE=1", "-DFOLLY_NO_CONFIG", "-DFOLLY_USE_LIBCPP=1", "-DSQLITE_TEMP_STORE=2", "-DSQLCIPHER_CRYPTO_OPENSSL", ); OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; PRODUCT_BUNDLE_IDENTIFIER = app.comm.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; 724995DC27B4103A00323FCE /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 913E5A7BDECB327E3DE11053 /* Pods-NotificationService.release.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 155; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = H98Y8MH53M; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = NotificationService/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = NotificationService; INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Comm Technologies, Inc. All rights reserved."; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); MARKETING_VERSION = 1.0.155; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "$(inherited)", "-DSQLITE_HAS_CODEC", "-DFOLLY_MOBILE=1", "-DFOLLY_NO_CONFIG", "-DFOLLY_USE_LIBCPP=1", "-DSQLITE_TEMP_STORE=2", "-DSQLCIPHER_CRYPTO_OPENSSL", ); PRODUCT_BUNDLE_IDENTIFIER = app.comm.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "FB_SONARKIT_ENABLED=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 83CBBA211A601CBA00E9B192 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; VALIDATE_PRODUCT = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Comm" */ = { isa = XCConfigurationList; buildConfigurations = ( 13B07F941A680F5B00A75B9A /* Debug */, 13B07F951A680F5B00A75B9A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 713EE40F26C6676B003D7C48 /* Build configuration list for PBXNativeTarget "CommTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 713EE40D26C6676B003D7C48 /* Debug */, 713EE40E26C6676B003D7C48 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 724995DD27B4103A00323FCE /* Build configuration list for PBXNativeTarget "NotificationService" */ = { isa = XCConfigurationList; buildConfigurations = ( 724995DB27B4103A00323FCE /* Debug */, 724995DC27B4103A00323FCE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Comm" */ = { isa = XCConfigurationList; buildConfigurations = ( 83CBBA201A601CBA00E9B192 /* Debug */, 83CBBA211A601CBA00E9B192 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; } diff --git a/native/schema/CommCoreModuleSchema.js b/native/schema/CommCoreModuleSchema.js index 9264dbb41..1940b1b95 100644 --- a/native/schema/CommCoreModuleSchema.js +++ b/native/schema/CommCoreModuleSchema.js @@ -1,62 +1,61 @@ // @flow 'use strict'; import { TurboModuleRegistry } from 'react-native'; import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport'; import type { ClientDBDraftInfo, ClientDBDraftStoreOperation, } from 'lib/types/draft-types'; import type { ClientDBMessageInfo, ClientDBMessageStoreOperation, } from 'lib/types/message-types'; import type { ClientDBThreadInfo, ClientDBThreadStoreOperation, } from 'lib/types/thread-types'; export interface Spec extends TurboModule { +getDraft: (key: string) => Promise; +updateDraft: (draft: ClientDBDraftInfo) => Promise; +moveDraft: (oldKey: string, newKey: string) => Promise; +getAllDrafts: () => Promise<$ReadOnlyArray>; +removeAllDrafts: () => Promise; +getAllMessages: () => Promise<$ReadOnlyArray>; +getAllMessagesSync: () => $ReadOnlyArray; +processDraftStoreOperations: ( operations: $ReadOnlyArray, ) => Promise; +processMessageStoreOperations: ( operations: $ReadOnlyArray, ) => Promise; +processMessageStoreOperationsSync: ( operations: $ReadOnlyArray, ) => void; +getAllThreads: () => Promise<$ReadOnlyArray>; +getAllThreadsSync: () => $ReadOnlyArray; +processThreadStoreOperations: ( operations: $ReadOnlyArray, ) => Promise; +processThreadStoreOperationsSync: ( operations: $ReadOnlyArray, ) => void; +initializeCryptoAccount: (userId: string) => Promise; +getUserPublicKey: () => Promise; +getUserOneTimeKeys: () => Promise; - +openSocket: (endpoint: string) => Object; +getCodeVersion: () => number; +setNotifyToken: (token: string) => Promise; +clearNotifyToken: () => Promise; +setCurrentUserID: (userID: string) => Promise; +getCurrentUserID: () => Promise; +setDeviceID: (deviceType: string) => Promise; +getDeviceID: () => Promise; +clearSensitiveData: () => Promise; } export default (TurboModuleRegistry.getEnforcing( 'CommTurboModule', ): Spec); diff --git a/services/tunnelbroker/src/server/mod.rs b/services/tunnelbroker/src/server/mod.rs index da7c20a39..dc4580901 100644 --- a/services/tunnelbroker/src/server/mod.rs +++ b/services/tunnelbroker/src/server/mod.rs @@ -1,401 +1,382 @@ use crate::cxx_bridge::ffi::MessageItem; use super::constants; use super::cxx_bridge::ffi::{ ackMessageFromAMQP, eraseMessagesFromAMQP, getMessagesFromDatabase, getSessionItem, newSessionHandler, removeMessages, sendMessages, sessionSignatureHandler, updateSessionItemDeviceToken, updateSessionItemIsOnline, waitMessageFromDeliveryBroker, GRPCStatusCodes, }; use anyhow::Result; use futures::Stream; use std::pin::Pin; use tokio::sync::mpsc; use tokio::time::{sleep, Duration}; use tokio_stream::{wrappers::ReceiverStream, StreamExt}; use tonic::{transport::Server, Request, Response, Status, Streaming}; use tracing::{debug, error}; use tunnelbroker::message_to_tunnelbroker::Data::{ MessagesToSend, NewNotifyToken, ProcessedMessages, }; use tunnelbroker::tunnelbroker_service_server::{ TunnelbrokerService, TunnelbrokerServiceServer, }; mod tools; mod tunnelbroker { tonic::include_proto!("tunnelbroker"); } #[derive(Debug, Default)] struct TunnelbrokerServiceHandlers {} #[tonic::async_trait] impl TunnelbrokerService for TunnelbrokerServiceHandlers { async fn session_signature( &self, request: Request, ) -> Result, Status> { let result = sessionSignatureHandler(&request.into_inner().device_id); if result.grpcStatus.statusCode != GRPCStatusCodes::Ok { return Err(tools::create_tonic_status( result.grpcStatus.statusCode, &result.grpcStatus.errorText, )); } Ok(Response::new(tunnelbroker::SessionSignatureResponse { to_sign: result.toSign, })) } async fn new_session( &self, request: Request, ) -> Result, Status> { let inner_request = request.into_inner(); let notify_token = inner_request.notify_token.unwrap_or(String::new()); if !tunnelbroker::new_session_request::DeviceTypes::is_valid( inner_request.device_type, ) { return Err(tools::create_tonic_status( GRPCStatusCodes::InvalidArgument, "Unsupported device type", )); }; let result = newSessionHandler( &inner_request.device_id, &inner_request.public_key, &inner_request.signature, inner_request.device_type, &inner_request.device_app_version, &inner_request.device_os, ¬ify_token, ); if result.grpcStatus.statusCode != GRPCStatusCodes::Ok { return Err(tools::create_tonic_status( result.grpcStatus.statusCode, &result.grpcStatus.errorText, )); } Ok(Response::new(tunnelbroker::NewSessionResponse { session_id: result.sessionID, })) } type MessagesStreamStream = Pin< Box< dyn Stream> + Send, >, >; async fn messages_stream( &self, request: Request>, ) -> Result, Status> { let session_id = match request.metadata().get("sessionID") { Some(metadata_session_id) => metadata_session_id .to_str() .expect("metadata session id was not valid UTF8") .to_string(), None => { return Err(Status::invalid_argument( "No 'sessionID' in metadata was provided", )) } }; let session_item = match getSessionItem(&session_id) { Ok(database_item) => database_item, Err(err) => return Err(Status::unauthenticated(err.what())), }; let (tx, rx) = mpsc::channel(constants::GRPC_TX_QUEUE_SIZE); // Through this function, we will write to the output stream from different Tokio // tasks and update the device's online status if the write was unsuccessful async fn tx_writer( session_id: &str, channel: &tokio::sync::mpsc::Sender, payload: T, ) -> Result<(), String> { let result = channel.send(payload).await; match result { Ok(result) => Ok(result), Err(err) => { if let Err(err) = updateSessionItemIsOnline(&session_id, false) { return Err(err.what().to_string()); } return Err(err.to_string()); } } } if let Err(err) = updateSessionItemIsOnline(&session_id, true) { return Err(Status::internal(err.what())); } // Checking for an empty notif token and requesting the new one from the client if session_item.notifyToken.is_empty() && session_item.deviceType == tunnelbroker::new_session_request::DeviceTypes::Mobile as i32 { let result = tx_writer( &session_id, &tx, Ok(tunnelbroker::MessageToClient { data: Some( tunnelbroker::message_to_client::Data::NewNotifyTokenRequired(()), ), }), ); if let Err(err) = result.await { debug!( "Error while sending notification token request to the client: {}", err ); }; } // When a client connects to the bidirectional messages stream, first we check // if there are undelivered messages in the database let messages_from_database = match getMessagesFromDatabase(&session_item.deviceID) { Ok(messages) => messages, Err(err) => return Err(Status::internal(err.what())), }; if messages_from_database.len() > 0 { if let Err(err) = eraseMessagesFromAMQP(&session_item.deviceID) { return Err(Status::internal(err.what())); }; let mut messages_to_response = vec![]; for message in &messages_from_database { messages_to_response.push(tunnelbroker::MessageToClientStruct { message_id: message.messageID.clone(), from_device_id: message.fromDeviceID.clone(), payload: message.payload.clone(), blob_hashes: vec![message.blobHashes.clone()], }); } let result_from_writer = tx_writer( &session_id, &tx, Ok(tunnelbroker::MessageToClient { data: Some(tunnelbroker::message_to_client::Data::MessagesToDeliver( tunnelbroker::MessagesToDeliver { messages: messages_to_response, }, )), }), ); if let Err(err) = result_from_writer.await { debug!( "Error while sending undelivered messages from database to the client: {}", err ); return Err(Status::aborted(err)); }; } // Spawning asynchronous Tokio task with the client pinging loop inside to // make sure that the client is online tokio::spawn({ let session_id = session_id.clone(); let tx = tx.clone(); async move { loop { sleep(Duration::from_millis(constants::GRPC_PING_INTERVAL_MS)).await; let result = tx_writer( &session_id, &tx, Ok(tunnelbroker::MessageToClient { data: Some(tunnelbroker::message_to_client::Data::Ping(())), }), ); if let Err(err) = result.await { debug!("Failed to write ping to a channel: {}", err); break; }; } } }); // Spawning asynchronous Tokio task to deliver new messages // to the client from delivery broker tokio::spawn({ let device_id = session_item.deviceID.clone(); let session_id = session_id.clone(); let tx = tx.clone(); async move { loop { let message_to_deliver = match waitMessageFromDeliveryBroker(&device_id) { Ok(message_item) => message_item, Err(err) => { error!( "Error on waiting messages from DeliveryBroker: {}", err.what() ); return; } }; let writer_result = tx_writer( &session_id, &tx, Ok(tunnelbroker::MessageToClient { data: Some( tunnelbroker::message_to_client::Data::MessagesToDeliver( tunnelbroker::MessagesToDeliver { messages: vec![tunnelbroker::MessageToClientStruct { message_id: message_to_deliver.messageID, from_device_id: message_to_deliver.fromDeviceID, payload: message_to_deliver.payload, blob_hashes: vec![message_to_deliver.blobHashes], }], }, ), ), }), ); if let Err(err) = writer_result.await { debug!("Error on writing to the stream: {}", err); return; }; if let Err(err) = ackMessageFromAMQP(message_to_deliver.deliveryTag) { debug!("Error on message acknowledgement in AMQP queue: {}", err); return; }; } } }); let mut input_stream = request.into_inner(); // Spawning asynchronous Tokio task for handling incoming messages from the client tokio::spawn(async move { while let Some(result) = input_stream.next().await { if let Err(err) = result { debug!("Error in input stream: {}", err); break; } if let Some(message_data) = result.unwrap().data { match message_data { NewNotifyToken(new_token) => { if let Err(err) = updateSessionItemDeviceToken(&session_id, &new_token) { error!( "Error in updating the device notification token in the database: {}", err.what() ); let writer_result = tx_writer( &session_id, &tx, Err( Status::internal( "Error in updating the device notification token in the database" ) ), ); if let Err(err) = writer_result.await { debug!( "Failed to write internal error to a channel: {}", err ); }; } } MessagesToSend(messages_to_send) => { let mut messages_vec = vec![]; for message in messages_to_send.messages { messages_vec.push(MessageItem { messageID: String::new(), fromDeviceID: session_item.deviceID.clone(), toDeviceID: message.to_device_id, payload: message.payload, blobHashes: String::new(), deliveryTag: 0, }); } let messages_ids = match sendMessages(&messages_vec) { Err(err) => { error!("Error on sending messages: {}", err.what()); return; } Ok(ids) => ids, }; if let Err(err) = tx_writer( &session_id, &tx, Ok(tunnelbroker::MessageToClient { data: Some( tunnelbroker::message_to_client::Data::ProcessedMessages( tunnelbroker::ProcessedMessages { message_id: messages_ids, }, ), ), }), ) .await { debug!( "Error on sending back processed messages IDs to the stream: {}", err); }; } ProcessedMessages(processed_messages) => { if let Err(err) = removeMessages( &session_item.deviceID, &processed_messages.message_id, ) { error!( "Error removing messages from the database: {}", err.what() ); }; } } } } if let Err(err) = updateSessionItemIsOnline(&session_id, false) { error!( "Error in updating the session online state in the database: {}", err.what() ); } }); let output_stream = ReceiverStream::new(rx); Ok(Response::new( Box::pin(output_stream) as Self::MessagesStreamStream )) } - - // These empty old API handlers are deprecated and should be removed. - // They are implemented only to fix the building process. - async fn send( - &self, - _request: Request, - ) -> Result, Status> { - Err(Status::cancelled("Deprecated")) - } - - type GetStream = Pin< - Box> + Send>, - >; - async fn get( - &self, - _request: Request, - ) -> Result, Status> { - Err(Status::cancelled("Deprecated")) - } } pub async fn run_grpc_server() -> Result<()> { let addr = format!("[::1]:{}", constants::GRPC_SERVER_PORT).parse()?; Server::builder() .add_service(TunnelbrokerServiceServer::new( TunnelbrokerServiceHandlers::default(), )) .serve(addr) .await?; Ok(()) } diff --git a/shared/protos/_generated/tunnelbroker.grpc.pb.cc b/shared/protos/_generated/tunnelbroker.grpc.pb.cc index 4bcafc3f5..9a6a0b2a1 100644 --- a/shared/protos/_generated/tunnelbroker.grpc.pb.cc +++ b/shared/protos/_generated/tunnelbroker.grpc.pb.cc @@ -1,239 +1,162 @@ // @generated by the gRPC C++ plugin. // If you make any local change, they will be lost. // source: tunnelbroker.proto #include "tunnelbroker.pb.h" #include "tunnelbroker.grpc.pb.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace tunnelbroker { static const char* TunnelbrokerService_method_names[] = { "/tunnelbroker.TunnelbrokerService/SessionSignature", "/tunnelbroker.TunnelbrokerService/NewSession", - "/tunnelbroker.TunnelbrokerService/Send", - "/tunnelbroker.TunnelbrokerService/Get", "/tunnelbroker.TunnelbrokerService/MessagesStream", }; std::unique_ptr< TunnelbrokerService::Stub> TunnelbrokerService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { (void)options; std::unique_ptr< TunnelbrokerService::Stub> stub(new TunnelbrokerService::Stub(channel, options)); return stub; } TunnelbrokerService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) : channel_(channel), rpcmethod_SessionSignature_(TunnelbrokerService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_NewSession_(TunnelbrokerService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_Send_(TunnelbrokerService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_Get_(TunnelbrokerService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) - , rpcmethod_MessagesStream_(TunnelbrokerService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel) + , rpcmethod_MessagesStream_(TunnelbrokerService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel) {} ::grpc::Status TunnelbrokerService::Stub::SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::tunnelbroker::SessionSignatureResponse* response) { return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SessionSignature_, context, request, response); } void TunnelbrokerService::Stub::async::SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, std::function f) { ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SessionSignature_, context, request, response, std::move(f)); } void TunnelbrokerService::Stub::async::SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, ::grpc::ClientUnaryReactor* reactor) { ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SessionSignature_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* TunnelbrokerService::Stub::PrepareAsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tunnelbroker::SessionSignatureResponse, ::tunnelbroker::SessionSignatureRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SessionSignature_, context, request); } ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* TunnelbrokerService::Stub::AsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { auto* result = this->PrepareAsyncSessionSignatureRaw(context, request, cq); result->StartCall(); return result; } ::grpc::Status TunnelbrokerService::Stub::NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::tunnelbroker::NewSessionResponse* response) { return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_NewSession_, context, request, response); } void TunnelbrokerService::Stub::async::NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, std::function f) { ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_NewSession_, context, request, response, std::move(f)); } void TunnelbrokerService::Stub::async::NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) { ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_NewSession_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* TunnelbrokerService::Stub::PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::tunnelbroker::NewSessionResponse, ::tunnelbroker::NewSessionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_NewSession_, context, request); } ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* TunnelbrokerService::Stub::AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { auto* result = this->PrepareAsyncNewSessionRaw(context, request, cq); result->StartCall(); return result; } -::grpc::Status TunnelbrokerService::Stub::Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::google::protobuf::Empty* response) { - return ::grpc::internal::BlockingUnaryCall< ::tunnelbroker::SendRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Send_, context, request, response); -} - -void TunnelbrokerService::Stub::async::Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::tunnelbroker::SendRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Send_, context, request, response, std::move(f)); -} - -void TunnelbrokerService::Stub::async::Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Send_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* TunnelbrokerService::Stub::PrepareAsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::Empty, ::tunnelbroker::SendRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Send_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* TunnelbrokerService::Stub::AsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncSendRaw(context, request, cq); - result->StartCall(); - return result; -} - -::grpc::ClientReader< ::tunnelbroker::GetResponse>* TunnelbrokerService::Stub::GetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) { - return ::grpc::internal::ClientReaderFactory< ::tunnelbroker::GetResponse>::Create(channel_.get(), rpcmethod_Get_, context, request); -} - -void TunnelbrokerService::Stub::async::Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ClientReadReactor< ::tunnelbroker::GetResponse>* reactor) { - ::grpc::internal::ClientCallbackReaderFactory< ::tunnelbroker::GetResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_Get_, context, request, reactor); -} - -::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* TunnelbrokerService::Stub::AsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return ::grpc::internal::ClientAsyncReaderFactory< ::tunnelbroker::GetResponse>::Create(channel_.get(), cq, rpcmethod_Get_, context, request, true, tag); -} - -::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* TunnelbrokerService::Stub::PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderFactory< ::tunnelbroker::GetResponse>::Create(channel_.get(), cq, rpcmethod_Get_, context, request, false, nullptr); -} - ::grpc::ClientReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* TunnelbrokerService::Stub::MessagesStreamRaw(::grpc::ClientContext* context) { return ::grpc::internal::ClientReaderWriterFactory< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>::Create(channel_.get(), rpcmethod_MessagesStream_, context); } void TunnelbrokerService::Stub::async::MessagesStream(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tunnelbroker::MessageToTunnelbroker,::tunnelbroker::MessageToClient>* reactor) { ::grpc::internal::ClientCallbackReaderWriterFactory< ::tunnelbroker::MessageToTunnelbroker,::tunnelbroker::MessageToClient>::Create(stub_->channel_.get(), stub_->rpcmethod_MessagesStream_, context, reactor); } ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* TunnelbrokerService::Stub::AsyncMessagesStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { return ::grpc::internal::ClientAsyncReaderWriterFactory< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>::Create(channel_.get(), cq, rpcmethod_MessagesStream_, context, true, tag); } ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* TunnelbrokerService::Stub::PrepareAsyncMessagesStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { return ::grpc::internal::ClientAsyncReaderWriterFactory< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>::Create(channel_.get(), cq, rpcmethod_MessagesStream_, context, false, nullptr); } TunnelbrokerService::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( TunnelbrokerService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](TunnelbrokerService::Service* service, ::grpc::ServerContext* ctx, const ::tunnelbroker::SessionSignatureRequest* req, ::tunnelbroker::SessionSignatureResponse* resp) { return service->SessionSignature(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( TunnelbrokerService_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](TunnelbrokerService::Service* service, ::grpc::ServerContext* ctx, const ::tunnelbroker::NewSessionRequest* req, ::tunnelbroker::NewSessionResponse* resp) { return service->NewSession(ctx, req, resp); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( TunnelbrokerService_method_names[2], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< TunnelbrokerService::Service, ::tunnelbroker::SendRequest, ::google::protobuf::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::SendRequest* req, - ::google::protobuf::Empty* resp) { - return service->Send(ctx, req, resp); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[3], - ::grpc::internal::RpcMethod::SERVER_STREAMING, - new ::grpc::internal::ServerStreamingHandler< TunnelbrokerService::Service, ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>( - [](TunnelbrokerService::Service* service, - ::grpc::ServerContext* ctx, - const ::tunnelbroker::GetRequest* req, - ::grpc::ServerWriter<::tunnelbroker::GetResponse>* writer) { - return service->Get(ctx, req, writer); - }, this))); - AddMethod(new ::grpc::internal::RpcServiceMethod( - TunnelbrokerService_method_names[4], ::grpc::internal::RpcMethod::BIDI_STREAMING, new ::grpc::internal::BidiStreamingHandler< TunnelbrokerService::Service, ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>( [](TunnelbrokerService::Service* service, ::grpc::ServerContext* ctx, ::grpc::ServerReaderWriter<::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* stream) { return service->MessagesStream(ctx, stream); }, this))); } TunnelbrokerService::Service::~Service() { } ::grpc::Status TunnelbrokerService::Service::SessionSignature(::grpc::ServerContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response) { (void) context; (void) request; (void) response; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } ::grpc::Status TunnelbrokerService::Service::NewSession(::grpc::ServerContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response) { (void) context; (void) request; (void) response; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } -::grpc::Status TunnelbrokerService::Service::Send(::grpc::ServerContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status TunnelbrokerService::Service::Get(::grpc::ServerContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* writer) { - (void) context; - (void) request; - (void) writer; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - ::grpc::Status TunnelbrokerService::Service::MessagesStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* stream) { (void) context; (void) stream; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } } // namespace tunnelbroker diff --git a/shared/protos/_generated/tunnelbroker.grpc.pb.h b/shared/protos/_generated/tunnelbroker.grpc.pb.h index b3b71e899..50c147d6e 100644 --- a/shared/protos/_generated/tunnelbroker.grpc.pb.h +++ b/shared/protos/_generated/tunnelbroker.grpc.pb.h @@ -1,850 +1,528 @@ // @generated by the gRPC C++ plugin. // If you make any local change, they will be lost. // source: tunnelbroker.proto #ifndef GRPC_tunnelbroker_2eproto__INCLUDED #define GRPC_tunnelbroker_2eproto__INCLUDED #include "tunnelbroker.pb.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace tunnelbroker { class TunnelbrokerService final { public: static constexpr char const* service_full_name() { return "tunnelbroker.TunnelbrokerService"; } class StubInterface { public: virtual ~StubInterface() {} virtual ::grpc::Status SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::tunnelbroker::SessionSignatureResponse* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>> AsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>>(AsyncSessionSignatureRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>> PrepareAsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>>(PrepareAsyncSessionSignatureRaw(context, request, cq)); } virtual ::grpc::Status NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::tunnelbroker::NewSessionResponse* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>> AsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>>(AsyncNewSessionRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>> PrepareAsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>>(PrepareAsyncNewSessionRaw(context, request, cq)); } - virtual ::grpc::Status Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::google::protobuf::Empty* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> AsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(AsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientReaderInterface< ::tunnelbroker::GetResponse>> Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) { - return std::unique_ptr< ::grpc::ClientReaderInterface< ::tunnelbroker::GetResponse>>(GetRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>> AsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>>(AsyncGetRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>> PrepareAsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>>(PrepareAsyncGetRaw(context, request, cq)); - } - // Replacing Send and Get with a single bidirectional streaming RPC - // The client should provide the valid `sessionID` identifier - // from the `NewSession` in the stream request metadata std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>> MessagesStream(::grpc::ClientContext* context) { return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>>(MessagesStreamRaw(context)); } std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>> AsyncMessagesStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>>(AsyncMessagesStreamRaw(context, cq, tag)); } std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>> PrepareAsyncMessagesStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>>(PrepareAsyncMessagesStreamRaw(context, cq)); } class async_interface { public: virtual ~async_interface() {} virtual void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, std::function) = 0; virtual void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, std::function) = 0; virtual void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, std::function) = 0; - virtual void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ClientReadReactor< ::tunnelbroker::GetResponse>* reactor) = 0; - // Replacing Send and Get with a single bidirectional streaming RPC - // The client should provide the valid `sessionID` identifier - // from the `NewSession` in the stream request metadata virtual void MessagesStream(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tunnelbroker::MessageToTunnelbroker,::tunnelbroker::MessageToClient>* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } class async_interface* experimental_async() { return async(); } private: virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>* AsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::SessionSignatureResponse>* PrepareAsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>* AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::tunnelbroker::NewSessionResponse>* PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* AsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderInterface< ::tunnelbroker::GetResponse>* GetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>* AsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderInterface< ::tunnelbroker::GetResponse>* PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* MessagesStreamRaw(::grpc::ClientContext* context) = 0; virtual ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* AsyncMessagesStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; virtual ::grpc::ClientAsyncReaderWriterInterface< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* PrepareAsyncMessagesStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); ::grpc::Status SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::tunnelbroker::SessionSignatureResponse* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>> AsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>>(AsyncSessionSignatureRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>> PrepareAsyncSessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>>(PrepareAsyncSessionSignatureRaw(context, request, cq)); } ::grpc::Status NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::tunnelbroker::NewSessionResponse* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>> AsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>>(AsyncNewSessionRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>> PrepareAsyncNewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>>(PrepareAsyncNewSessionRaw(context, request, cq)); } - ::grpc::Status Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::google::protobuf::Empty* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> AsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(AsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncSend(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncSendRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientReader< ::tunnelbroker::GetResponse>> Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) { - return std::unique_ptr< ::grpc::ClientReader< ::tunnelbroker::GetResponse>>(GetRaw(context, request)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>> AsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>>(AsyncGetRaw(context, request, cq, tag)); - } - std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>> PrepareAsyncGet(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>>(PrepareAsyncGetRaw(context, request, cq)); - } std::unique_ptr< ::grpc::ClientReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>> MessagesStream(::grpc::ClientContext* context) { return std::unique_ptr< ::grpc::ClientReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>>(MessagesStreamRaw(context)); } std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>> AsyncMessagesStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>>(AsyncMessagesStreamRaw(context, cq, tag)); } std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>> PrepareAsyncMessagesStream(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>>(PrepareAsyncMessagesStreamRaw(context, cq)); } class async final : public StubInterface::async_interface { public: void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, std::function) override; void SessionSignature(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response, ::grpc::ClientUnaryReactor* reactor) override; void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, std::function) override; void NewSession(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, std::function) override; - void Send(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; - void Get(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ClientReadReactor< ::tunnelbroker::GetResponse>* reactor) override; void MessagesStream(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tunnelbroker::MessageToTunnelbroker,::tunnelbroker::MessageToClient>* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } Stub* stub() { return stub_; } Stub* stub_; }; class async* async() override { return &async_stub_; } private: std::shared_ptr< ::grpc::ChannelInterface> channel_; class async async_stub_{this}; ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* AsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::tunnelbroker::SessionSignatureResponse>* PrepareAsyncSessionSignatureRaw(::grpc::ClientContext* context, const ::tunnelbroker::SessionSignatureRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::tunnelbroker::NewSessionResponse>* PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tunnelbroker::NewSessionRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* AsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncSendRaw(::grpc::ClientContext* context, const ::tunnelbroker::SendRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReader< ::tunnelbroker::GetResponse>* GetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request) override; - ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* AsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReader< ::tunnelbroker::GetResponse>* PrepareAsyncGetRaw(::grpc::ClientContext* context, const ::tunnelbroker::GetRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* MessagesStreamRaw(::grpc::ClientContext* context) override; ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* AsyncMessagesStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; ::grpc::ClientAsyncReaderWriter< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* PrepareAsyncMessagesStreamRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_SessionSignature_; const ::grpc::internal::RpcMethod rpcmethod_NewSession_; - const ::grpc::internal::RpcMethod rpcmethod_Send_; - const ::grpc::internal::RpcMethod rpcmethod_Get_; const ::grpc::internal::RpcMethod rpcmethod_MessagesStream_; }; static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); class Service : public ::grpc::Service { public: Service(); virtual ~Service(); virtual ::grpc::Status SessionSignature(::grpc::ServerContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response); virtual ::grpc::Status NewSession(::grpc::ServerContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response); - virtual ::grpc::Status Send(::grpc::ServerContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response); - virtual ::grpc::Status Get(::grpc::ServerContext* context, const ::tunnelbroker::GetRequest* request, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* writer); - // Replacing Send and Get with a single bidirectional streaming RPC - // The client should provide the valid `sessionID` identifier - // from the `NewSession` in the stream request metadata virtual ::grpc::Status MessagesStream(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* stream); }; template class WithAsyncMethod_SessionSignature : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_SessionSignature() { ::grpc::Service::MarkMethodAsync(0); } ~WithAsyncMethod_SessionSignature() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestSessionSignature(::grpc::ServerContext* context, ::tunnelbroker::SessionSignatureRequest* request, ::grpc::ServerAsyncResponseWriter< ::tunnelbroker::SessionSignatureResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); } }; template class WithAsyncMethod_NewSession : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_NewSession() { ::grpc::Service::MarkMethodAsync(1); } ~WithAsyncMethod_NewSession() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestNewSession(::grpc::ServerContext* context, ::tunnelbroker::NewSessionRequest* request, ::grpc::ServerAsyncResponseWriter< ::tunnelbroker::NewSessionResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); } }; template - class WithAsyncMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Send() { - ::grpc::Service::MarkMethodAsync(2); - } - ~WithAsyncMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSend(::grpc::ServerContext* context, ::tunnelbroker::SendRequest* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Get() { - ::grpc::Service::MarkMethodAsync(3); - } - ~WithAsyncMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGet(::grpc::ServerContext* context, ::tunnelbroker::GetRequest* request, ::grpc::ServerAsyncWriter< ::tunnelbroker::GetResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template class WithAsyncMethod_MessagesStream : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_MessagesStream() { - ::grpc::Service::MarkMethodAsync(4); + ::grpc::Service::MarkMethodAsync(2); } ~WithAsyncMethod_MessagesStream() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status MessagesStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestMessagesStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(4, context, stream, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncBidiStreaming(2, context, stream, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_SessionSignature > > > > AsyncService; + typedef WithAsyncMethod_SessionSignature > > AsyncService; template class WithCallbackMethod_SessionSignature : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_SessionSignature() { ::grpc::Service::MarkMethodCallback(0, new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>( [this]( ::grpc::CallbackServerContext* context, const ::tunnelbroker::SessionSignatureRequest* request, ::tunnelbroker::SessionSignatureResponse* response) { return this->SessionSignature(context, request, response); }));} void SetMessageAllocatorFor_SessionSignature( ::grpc::MessageAllocator< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>* allocator) { ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>*>(handler) ->SetMessageAllocator(allocator); } ~WithCallbackMethod_SessionSignature() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* SessionSignature( ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) { return nullptr; } }; template class WithCallbackMethod_NewSession : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_NewSession() { ::grpc::Service::MarkMethodCallback(1, new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>( [this]( ::grpc::CallbackServerContext* context, const ::tunnelbroker::NewSessionRequest* request, ::tunnelbroker::NewSessionResponse* response) { return this->NewSession(context, request, response); }));} void SetMessageAllocatorFor_NewSession( ::grpc::MessageAllocator< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>* allocator) { ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>*>(handler) ->SetMessageAllocator(allocator); } ~WithCallbackMethod_NewSession() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* NewSession( ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) { return nullptr; } }; template - class WithCallbackMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Send() { - ::grpc::Service::MarkMethodCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SendRequest, ::google::protobuf::Empty>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::SendRequest* request, ::google::protobuf::Empty* response) { return this->Send(context, request, response); }));} - void SetMessageAllocatorFor_Send( - ::grpc::MessageAllocator< ::tunnelbroker::SendRequest, ::google::protobuf::Empty>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); - static_cast<::grpc::internal::CallbackUnaryHandler< ::tunnelbroker::SendRequest, ::google::protobuf::Empty>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Send( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } - }; - template - class WithCallbackMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Get() { - ::grpc::Service::MarkMethodCallback(3, - new ::grpc::internal::CallbackServerStreamingHandler< ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::tunnelbroker::GetRequest* request) { return this->Get(context, request); })); - } - ~WithCallbackMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::tunnelbroker::GetResponse>* Get( - ::grpc::CallbackServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/) { return nullptr; } - }; - template class WithCallbackMethod_MessagesStream : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_MessagesStream() { - ::grpc::Service::MarkMethodCallback(4, + ::grpc::Service::MarkMethodCallback(2, new ::grpc::internal::CallbackBidiHandler< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>( [this]( ::grpc::CallbackServerContext* context) { return this->MessagesStream(context); })); } ~WithCallbackMethod_MessagesStream() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status MessagesStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerBidiReactor< ::tunnelbroker::MessageToTunnelbroker, ::tunnelbroker::MessageToClient>* MessagesStream( ::grpc::CallbackServerContext* /*context*/) { return nullptr; } }; - typedef WithCallbackMethod_SessionSignature > > > > CallbackService; + typedef WithCallbackMethod_SessionSignature > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_SessionSignature : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_SessionSignature() { ::grpc::Service::MarkMethodGeneric(0); } ~WithGenericMethod_SessionSignature() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template class WithGenericMethod_NewSession : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_NewSession() { ::grpc::Service::MarkMethodGeneric(1); } ~WithGenericMethod_NewSession() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Send() { - ::grpc::Service::MarkMethodGeneric(2); - } - ~WithGenericMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Get() { - ::grpc::Service::MarkMethodGeneric(3); - } - ~WithGenericMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template class WithGenericMethod_MessagesStream : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_MessagesStream() { - ::grpc::Service::MarkMethodGeneric(4); + ::grpc::Service::MarkMethodGeneric(2); } ~WithGenericMethod_MessagesStream() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status MessagesStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template class WithRawMethod_SessionSignature : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_SessionSignature() { ::grpc::Service::MarkMethodRaw(0); } ~WithRawMethod_SessionSignature() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestSessionSignature(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); } }; template class WithRawMethod_NewSession : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_NewSession() { ::grpc::Service::MarkMethodRaw(1); } ~WithRawMethod_NewSession() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestNewSession(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); } }; template - class WithRawMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Send() { - ::grpc::Service::MarkMethodRaw(2); - } - ~WithRawMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestSend(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Get() { - ::grpc::Service::MarkMethodRaw(3); - } - ~WithRawMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGet(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag); - } - }; - template class WithRawMethod_MessagesStream : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_MessagesStream() { - ::grpc::Service::MarkMethodRaw(4); + ::grpc::Service::MarkMethodRaw(2); } ~WithRawMethod_MessagesStream() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status MessagesStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestMessagesStream(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(4, context, stream, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncBidiStreaming(2, context, stream, new_call_cq, notification_cq, tag); } }; template class WithRawCallbackMethod_SessionSignature : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_SessionSignature() { ::grpc::Service::MarkMethodRawCallback(0, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SessionSignature(context, request, response); })); } ~WithRawCallbackMethod_SessionSignature() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* SessionSignature( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template class WithRawCallbackMethod_NewSession : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_NewSession() { ::grpc::Service::MarkMethodRawCallback(1, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->NewSession(context, request, response); })); } ~WithRawCallbackMethod_NewSession() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerUnaryReactor* NewSession( ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template - class WithRawCallbackMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Send() { - ::grpc::Service::MarkMethodRawCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Send(context, request, response); })); - } - ~WithRawCallbackMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Send( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithRawCallbackMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Get() { - ::grpc::Service::MarkMethodRawCallback(3, - new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->Get(context, request); })); - } - ~WithRawCallbackMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* Get( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } - }; - template class WithRawCallbackMethod_MessagesStream : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_MessagesStream() { - ::grpc::Service::MarkMethodRawCallback(4, + ::grpc::Service::MarkMethodRawCallback(2, new ::grpc::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context) { return this->MessagesStream(context); })); } ~WithRawCallbackMethod_MessagesStream() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status MessagesStream(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tunnelbroker::MessageToClient, ::tunnelbroker::MessageToTunnelbroker>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* MessagesStream( ::grpc::CallbackServerContext* /*context*/) { return nullptr; } }; template class WithStreamedUnaryMethod_SessionSignature : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_SessionSignature() { ::grpc::Service::MarkMethodStreamed(0, new ::grpc::internal::StreamedUnaryHandler< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>( [this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::SessionSignatureRequest, ::tunnelbroker::SessionSignatureResponse>* streamer) { return this->StreamedSessionSignature(context, streamer); })); } ~WithStreamedUnaryMethod_SessionSignature() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status SessionSignature(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SessionSignatureRequest* /*request*/, ::tunnelbroker::SessionSignatureResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary virtual ::grpc::Status StreamedSessionSignature(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::SessionSignatureRequest,::tunnelbroker::SessionSignatureResponse>* server_unary_streamer) = 0; }; template class WithStreamedUnaryMethod_NewSession : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_NewSession() { ::grpc::Service::MarkMethodStreamed(1, new ::grpc::internal::StreamedUnaryHandler< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>( [this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::NewSessionRequest, ::tunnelbroker::NewSessionResponse>* streamer) { return this->StreamedNewSession(context, streamer); })); } ~WithStreamedUnaryMethod_NewSession() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tunnelbroker::NewSessionRequest* /*request*/, ::tunnelbroker::NewSessionResponse* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary virtual ::grpc::Status StreamedNewSession(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::NewSessionRequest,::tunnelbroker::NewSessionResponse>* server_unary_streamer) = 0; }; - template - class WithStreamedUnaryMethod_Send : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_Send() { - ::grpc::Service::MarkMethodStreamed(2, - new ::grpc::internal::StreamedUnaryHandler< - ::tunnelbroker::SendRequest, ::google::protobuf::Empty>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::tunnelbroker::SendRequest, ::google::protobuf::Empty>* streamer) { - return this->StreamedSend(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_Send() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::tunnelbroker::SendRequest* /*request*/, ::google::protobuf::Empty* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedSend(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tunnelbroker::SendRequest,::google::protobuf::Empty>* server_unary_streamer) = 0; - }; - typedef WithStreamedUnaryMethod_SessionSignature > > StreamedUnaryService; - template - class WithSplitStreamingMethod_Get : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithSplitStreamingMethod_Get() { - ::grpc::Service::MarkMethodStreamed(3, - new ::grpc::internal::SplitServerStreamingHandler< - ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerSplitStreamer< - ::tunnelbroker::GetRequest, ::tunnelbroker::GetResponse>* streamer) { - return this->StreamedGet(context, - streamer); - })); - } - ~WithSplitStreamingMethod_Get() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Get(::grpc::ServerContext* /*context*/, const ::tunnelbroker::GetRequest* /*request*/, ::grpc::ServerWriter< ::tunnelbroker::GetResponse>* /*writer*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with split streamed - virtual ::grpc::Status StreamedGet(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::tunnelbroker::GetRequest,::tunnelbroker::GetResponse>* server_split_streamer) = 0; - }; - typedef WithSplitStreamingMethod_Get SplitStreamedService; - typedef WithStreamedUnaryMethod_SessionSignature > > > StreamedService; + typedef WithStreamedUnaryMethod_SessionSignature > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_SessionSignature > StreamedService; }; } // namespace tunnelbroker #endif // GRPC_tunnelbroker_2eproto__INCLUDED diff --git a/shared/protos/_generated/tunnelbroker.pb.cc b/shared/protos/_generated/tunnelbroker.pb.cc index d04fd6af4..cf1e6e93b 100644 --- a/shared/protos/_generated/tunnelbroker.pb.cc +++ b/shared/protos/_generated/tunnelbroker.pb.cc @@ -1,4775 +1,3443 @@ // @generated by the protocol buffer compiler. DO NOT EDIT! // source: tunnelbroker.proto #include "tunnelbroker.pb.h" #include #include #include #include #include #include #include #include // @@protoc_insertion_point(includes) #include PROTOBUF_PRAGMA_INIT_SEG namespace tunnelbroker { constexpr SessionSignatureRequest::SessionSignatureRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : deviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct SessionSignatureRequestDefaultTypeInternal { constexpr SessionSignatureRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~SessionSignatureRequestDefaultTypeInternal() {} union { SessionSignatureRequest _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SessionSignatureRequestDefaultTypeInternal _SessionSignatureRequest_default_instance_; constexpr SessionSignatureResponse::SessionSignatureResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : tosign_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct SessionSignatureResponseDefaultTypeInternal { constexpr SessionSignatureResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~SessionSignatureResponseDefaultTypeInternal() {} union { SessionSignatureResponse _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SessionSignatureResponseDefaultTypeInternal _SessionSignatureResponse_default_instance_; constexpr NewSessionRequest::NewSessionRequest( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : deviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , publickey_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , notifytoken_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , deviceappversion_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , deviceos_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , devicetype_(0) {} struct NewSessionRequestDefaultTypeInternal { constexpr NewSessionRequestDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~NewSessionRequestDefaultTypeInternal() {} union { NewSessionRequest _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NewSessionRequestDefaultTypeInternal _NewSessionRequest_default_instance_; constexpr NewSessionResponse::NewSessionResponse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : sessionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct NewSessionResponseDefaultTypeInternal { constexpr NewSessionResponseDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~NewSessionResponseDefaultTypeInternal() {} union { NewSessionResponse _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NewSessionResponseDefaultTypeInternal _NewSessionResponse_default_instance_; -constexpr SendRequest::SendRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : blobhashes_() - , sessionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , todeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct SendRequestDefaultTypeInternal { - constexpr SendRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~SendRequestDefaultTypeInternal() {} - union { - SendRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SendRequestDefaultTypeInternal _SendRequest_default_instance_; -constexpr GetRequest::GetRequest( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : sessionid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , newnotifytoken_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct GetRequestDefaultTypeInternal { - constexpr GetRequestDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetRequestDefaultTypeInternal() {} - union { - GetRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetRequestDefaultTypeInternal _GetRequest_default_instance_; -constexpr GetResponseMessage::GetResponseMessage( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : blobhashes_() - , fromdeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct GetResponseMessageDefaultTypeInternal { - constexpr GetResponseMessageDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetResponseMessageDefaultTypeInternal() {} - union { - GetResponseMessage _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetResponseMessageDefaultTypeInternal _GetResponseMessage_default_instance_; -constexpr GetResponse::GetResponse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : _oneof_case_{}{} -struct GetResponseDefaultTypeInternal { - constexpr GetResponseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~GetResponseDefaultTypeInternal() {} - union { - GetResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetResponseDefaultTypeInternal _GetResponse_default_instance_; constexpr ProcessedMessages::ProcessedMessages( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : messageid_(){} struct ProcessedMessagesDefaultTypeInternal { constexpr ProcessedMessagesDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~ProcessedMessagesDefaultTypeInternal() {} union { ProcessedMessages _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ProcessedMessagesDefaultTypeInternal _ProcessedMessages_default_instance_; constexpr MessageToTunnelbrokerStruct::MessageToTunnelbrokerStruct( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : blobhashes_() , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , todeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct MessageToTunnelbrokerStructDefaultTypeInternal { constexpr MessageToTunnelbrokerStructDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~MessageToTunnelbrokerStructDefaultTypeInternal() {} union { MessageToTunnelbrokerStruct _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessageToTunnelbrokerStructDefaultTypeInternal _MessageToTunnelbrokerStruct_default_instance_; constexpr MessagesToSend::MessagesToSend( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : messages_(){} struct MessagesToSendDefaultTypeInternal { constexpr MessagesToSendDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~MessagesToSendDefaultTypeInternal() {} union { MessagesToSend _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessagesToSendDefaultTypeInternal _MessagesToSend_default_instance_; constexpr MessageToTunnelbroker::MessageToTunnelbroker( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : _oneof_case_{}{} struct MessageToTunnelbrokerDefaultTypeInternal { constexpr MessageToTunnelbrokerDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~MessageToTunnelbrokerDefaultTypeInternal() {} union { MessageToTunnelbroker _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessageToTunnelbrokerDefaultTypeInternal _MessageToTunnelbroker_default_instance_; constexpr MessageToClientStruct::MessageToClientStruct( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : blobhashes_() , messageid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , fromdeviceid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct MessageToClientStructDefaultTypeInternal { constexpr MessageToClientStructDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~MessageToClientStructDefaultTypeInternal() {} union { MessageToClientStruct _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessageToClientStructDefaultTypeInternal _MessageToClientStruct_default_instance_; constexpr MessagesToDeliver::MessagesToDeliver( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : messages_(){} struct MessagesToDeliverDefaultTypeInternal { constexpr MessagesToDeliverDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~MessagesToDeliverDefaultTypeInternal() {} union { MessagesToDeliver _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessagesToDeliverDefaultTypeInternal _MessagesToDeliver_default_instance_; constexpr MessageToClient::MessageToClient( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : _oneof_case_{}{} struct MessageToClientDefaultTypeInternal { constexpr MessageToClientDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} ~MessageToClientDefaultTypeInternal() {} union { MessageToClient _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessageToClientDefaultTypeInternal _MessageToClient_default_instance_; } // namespace tunnelbroker -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tunnelbroker_2eproto[15]; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tunnelbroker_2eproto[11]; static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tunnelbroker_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tunnelbroker_2eproto = nullptr; const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tunnelbroker_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureRequest, deviceid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::SessionSignatureResponse, tosign_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, _has_bits_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, deviceid_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, publickey_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, signature_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, notifytoken_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, devicetype_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, deviceappversion_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionRequest, deviceos_), ~0u, ~0u, ~0u, 0, ~0u, ~0u, ~0u, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::NewSessionResponse, sessionid_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, sessionid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, todeviceid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, payload_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::SendRequest, blobhashes_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, _has_bits_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, sessionid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetRequest, newnotifytoken_), - ~0u, - 0, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, fromdeviceid_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, payload_), - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponseMessage, blobhashes_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, _oneof_case_[0]), - ~0u, // no _weak_field_map_ - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::tunnelbroker::GetResponse, data_), - ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::ProcessedMessages, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::ProcessedMessages, messageid_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbrokerStruct, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbrokerStruct, messageid_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbrokerStruct, todeviceid_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbrokerStruct, payload_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbrokerStruct, blobhashes_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessagesToSend, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessagesToSend, messages_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbroker, _internal_metadata_), ~0u, // no _extensions_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbroker, _oneof_case_[0]), ~0u, // no _weak_field_map_ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToTunnelbroker, data_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClientStruct, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClientStruct, messageid_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClientStruct, fromdeviceid_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClientStruct, payload_), PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClientStruct, blobhashes_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessagesToDeliver, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessagesToDeliver, messages_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClient, _internal_metadata_), ~0u, // no _extensions_ PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClient, _oneof_case_[0]), ~0u, // no _weak_field_map_ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::tunnelbroker::MessageToClient, data_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::tunnelbroker::SessionSignatureRequest)}, { 6, -1, sizeof(::tunnelbroker::SessionSignatureResponse)}, { 12, 24, sizeof(::tunnelbroker::NewSessionRequest)}, { 31, -1, sizeof(::tunnelbroker::NewSessionResponse)}, - { 37, -1, sizeof(::tunnelbroker::SendRequest)}, - { 46, 53, sizeof(::tunnelbroker::GetRequest)}, - { 55, -1, sizeof(::tunnelbroker::GetResponseMessage)}, - { 63, -1, sizeof(::tunnelbroker::GetResponse)}, - { 72, -1, sizeof(::tunnelbroker::ProcessedMessages)}, - { 78, -1, sizeof(::tunnelbroker::MessageToTunnelbrokerStruct)}, - { 87, -1, sizeof(::tunnelbroker::MessagesToSend)}, - { 93, -1, sizeof(::tunnelbroker::MessageToTunnelbroker)}, - { 102, -1, sizeof(::tunnelbroker::MessageToClientStruct)}, - { 111, -1, sizeof(::tunnelbroker::MessagesToDeliver)}, - { 117, -1, sizeof(::tunnelbroker::MessageToClient)}, + { 37, -1, sizeof(::tunnelbroker::ProcessedMessages)}, + { 43, -1, sizeof(::tunnelbroker::MessageToTunnelbrokerStruct)}, + { 52, -1, sizeof(::tunnelbroker::MessagesToSend)}, + { 58, -1, sizeof(::tunnelbroker::MessageToTunnelbroker)}, + { 67, -1, sizeof(::tunnelbroker::MessageToClientStruct)}, + { 76, -1, sizeof(::tunnelbroker::MessagesToDeliver)}, + { 82, -1, sizeof(::tunnelbroker::MessageToClient)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { reinterpret_cast(&::tunnelbroker::_SessionSignatureRequest_default_instance_), reinterpret_cast(&::tunnelbroker::_SessionSignatureResponse_default_instance_), reinterpret_cast(&::tunnelbroker::_NewSessionRequest_default_instance_), reinterpret_cast(&::tunnelbroker::_NewSessionResponse_default_instance_), - reinterpret_cast(&::tunnelbroker::_SendRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_GetRequest_default_instance_), - reinterpret_cast(&::tunnelbroker::_GetResponseMessage_default_instance_), - reinterpret_cast(&::tunnelbroker::_GetResponse_default_instance_), reinterpret_cast(&::tunnelbroker::_ProcessedMessages_default_instance_), reinterpret_cast(&::tunnelbroker::_MessageToTunnelbrokerStruct_default_instance_), reinterpret_cast(&::tunnelbroker::_MessagesToSend_default_instance_), reinterpret_cast(&::tunnelbroker::_MessageToTunnelbroker_default_instance_), reinterpret_cast(&::tunnelbroker::_MessageToClientStruct_default_instance_), reinterpret_cast(&::tunnelbroker::_MessagesToDeliver_default_instance_), reinterpret_cast(&::tunnelbroker::_MessageToClient_default_instance_), }; const char descriptor_table_protodef_tunnelbroker_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\022tunnelbroker.proto\022\014tunnelbroker\032\033goog" "le/protobuf/empty.proto\"+\n\027SessionSignat" "ureRequest\022\020\n\010deviceID\030\001 \001(\t\"*\n\030SessionS" "ignatureResponse\022\016\n\006toSign\030\001 \001(\t\"\225\002\n\021New" "SessionRequest\022\020\n\010deviceID\030\001 \001(\t\022\021\n\tpubl" "icKey\030\002 \001(\t\022\021\n\tsignature\030\003 \001(\t\022\030\n\013notify" "Token\030\004 \001(\tH\000\210\001\001\022\?\n\ndeviceType\030\005 \001(\0162+.t" "unnelbroker.NewSessionRequest.DeviceType" "s\022\030\n\020deviceAppVersion\030\006 \001(\t\022\020\n\010deviceOS\030" "\007 \001(\t\"1\n\013DeviceTypes\022\n\n\006MOBILE\020\000\022\007\n\003WEB\020" "\001\022\r\n\tKEYSERVER\020\002B\016\n\014_notifyToken\"\'\n\022NewS" - "essionResponse\022\021\n\tsessionID\030\001 \001(\t\"Y\n\013Sen" - "dRequest\022\021\n\tsessionID\030\001 \001(\t\022\022\n\ntoDeviceI" - "D\030\002 \001(\t\022\017\n\007payload\030\003 \001(\014\022\022\n\nblobHashes\030\004" - " \003(\t\"O\n\nGetRequest\022\021\n\tsessionID\030\001 \001(\t\022\033\n" - "\016newNotifyToken\030\002 \001(\tH\000\210\001\001B\021\n\017_newNotify" - "Token\"O\n\022GetResponseMessage\022\024\n\014fromDevic" - "eID\030\001 \001(\t\022\017\n\007payload\030\002 \001(\014\022\022\n\nblobHashes" - "\030\003 \003(\t\"\264\001\n\013GetResponse\022;\n\017responseMessag" - "e\030\001 \001(\0132 .tunnelbroker.GetResponseMessag" - "eH\000\022&\n\004ping\030\002 \001(\0132\026.google.protobuf.Empt" - "yH\000\0228\n\026newNotifyTokenRequired\030\003 \001(\0132\026.go" - "ogle.protobuf.EmptyH\000B\006\n\004data\"&\n\021Process" - "edMessages\022\021\n\tmessageID\030\001 \003(\t\"i\n\033Message" - "ToTunnelbrokerStruct\022\021\n\tmessageID\030\001 \001(\t\022" - "\022\n\ntoDeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t\022\022\n\n" - "blobHashes\030\004 \003(\t\"M\n\016MessagesToSend\022;\n\010me" - "ssages\030\001 \003(\0132).tunnelbroker.MessageToTun" - "nelbrokerStruct\"\257\001\n\025MessageToTunnelbroke" - "r\0226\n\016messagesToSend\030\001 \001(\0132\034.tunnelbroker" - ".MessagesToSendH\000\022<\n\021processedMessages\030\002" - " \001(\0132\037.tunnelbroker.ProcessedMessagesH\000\022" - "\030\n\016newNotifyToken\030\003 \001(\tH\000B\006\n\004data\"e\n\025Mes" - "sageToClientStruct\022\021\n\tmessageID\030\001 \001(\t\022\024\n" - "\014fromDeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t\022\022\n\n" - "blobHashes\030\004 \003(\t\"J\n\021MessagesToDeliver\0225\n" - "\010messages\030\001 \003(\0132#.tunnelbroker.MessageTo" - "ClientStruct\"\367\001\n\017MessageToClient\022<\n\021mess" - "agesToDeliver\030\001 \001(\0132\037.tunnelbroker.Messa" - "gesToDeliverH\000\022<\n\021processedMessages\030\002 \001(" - "\0132\037.tunnelbroker.ProcessedMessagesH\000\0228\n\026" - "newNotifyTokenRequired\030\003 \001(\0132\026.google.pr" - "otobuf.EmptyH\000\022&\n\004ping\030\004 \001(\0132\026.google.pr" - "otobuf.EmptyH\000B\006\n\004data2\246\003\n\023TunnelbrokerS" - "ervice\022c\n\020SessionSignature\022%.tunnelbroke" - "r.SessionSignatureRequest\032&.tunnelbroker" - ".SessionSignatureResponse\"\000\022Q\n\nNewSessio" - "n\022\037.tunnelbroker.NewSessionRequest\032 .tun" - "nelbroker.NewSessionResponse\"\000\022;\n\004Send\022\031" - ".tunnelbroker.SendRequest\032\026.google.proto" - "buf.Empty\"\000\022>\n\003Get\022\030.tunnelbroker.GetReq" - "uest\032\031.tunnelbroker.GetResponse\"\0000\001\022Z\n\016M" - "essagesStream\022#.tunnelbroker.MessageToTu" - "nnelbroker\032\035.tunnelbroker.MessageToClien" - "t\"\000(\0010\001b\006proto3" + "essionResponse\022\021\n\tsessionID\030\001 \001(\t\"&\n\021Pro" + "cessedMessages\022\021\n\tmessageID\030\001 \003(\t\"i\n\033Mes" + "sageToTunnelbrokerStruct\022\021\n\tmessageID\030\001 " + "\001(\t\022\022\n\ntoDeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t" + "\022\022\n\nblobHashes\030\004 \003(\t\"M\n\016MessagesToSend\022;" + "\n\010messages\030\001 \003(\0132).tunnelbroker.MessageT" + "oTunnelbrokerStruct\"\257\001\n\025MessageToTunnelb" + "roker\0226\n\016messagesToSend\030\001 \001(\0132\034.tunnelbr" + "oker.MessagesToSendH\000\022<\n\021processedMessag" + "es\030\002 \001(\0132\037.tunnelbroker.ProcessedMessage" + "sH\000\022\030\n\016newNotifyToken\030\003 \001(\tH\000B\006\n\004data\"e\n" + "\025MessageToClientStruct\022\021\n\tmessageID\030\001 \001(" + "\t\022\024\n\014fromDeviceID\030\002 \001(\t\022\017\n\007payload\030\003 \001(\t" + "\022\022\n\nblobHashes\030\004 \003(\t\"J\n\021MessagesToDelive" + "r\0225\n\010messages\030\001 \003(\0132#.tunnelbroker.Messa" + "geToClientStruct\"\367\001\n\017MessageToClient\022<\n\021" + "messagesToDeliver\030\001 \001(\0132\037.tunnelbroker.M" + "essagesToDeliverH\000\022<\n\021processedMessages\030" + "\002 \001(\0132\037.tunnelbroker.ProcessedMessagesH\000" + "\0228\n\026newNotifyTokenRequired\030\003 \001(\0132\026.googl" + "e.protobuf.EmptyH\000\022&\n\004ping\030\004 \001(\0132\026.googl" + "e.protobuf.EmptyH\000B\006\n\004data2\251\002\n\023Tunnelbro" + "kerService\022c\n\020SessionSignature\022%.tunnelb" + "roker.SessionSignatureRequest\032&.tunnelbr" + "oker.SessionSignatureResponse\"\000\022Q\n\nNewSe" + "ssion\022\037.tunnelbroker.NewSessionRequest\032 " + ".tunnelbroker.NewSessionResponse\"\000\022Z\n\016Me" + "ssagesStream\022#.tunnelbroker.MessageToTun" + "nelbroker\032\035.tunnelbroker.MessageToClient" + "\"\000(\0010\001b\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tunnelbroker_2eproto_deps[1] = { &::descriptor_table_google_2fprotobuf_2fempty_2eproto, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tunnelbroker_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tunnelbroker_2eproto = { - false, false, 2175, descriptor_table_protodef_tunnelbroker_2eproto, "tunnelbroker.proto", - &descriptor_table_tunnelbroker_2eproto_once, descriptor_table_tunnelbroker_2eproto_deps, 1, 15, + false, false, 1614, descriptor_table_protodef_tunnelbroker_2eproto, "tunnelbroker.proto", + &descriptor_table_tunnelbroker_2eproto_once, descriptor_table_tunnelbroker_2eproto_deps, 1, 11, schemas, file_default_instances, TableStruct_tunnelbroker_2eproto::offsets, file_level_metadata_tunnelbroker_2eproto, file_level_enum_descriptors_tunnelbroker_2eproto, file_level_service_descriptors_tunnelbroker_2eproto, }; PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_tunnelbroker_2eproto_metadata_getter(int index) { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tunnelbroker_2eproto); return descriptor_table_tunnelbroker_2eproto.file_level_metadata[index]; } // Force running AddDescriptors() at dynamic initialization time. PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_tunnelbroker_2eproto(&descriptor_table_tunnelbroker_2eproto); namespace tunnelbroker { const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NewSessionRequest_DeviceTypes_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tunnelbroker_2eproto); return file_level_enum_descriptors_tunnelbroker_2eproto[0]; } bool NewSessionRequest_DeviceTypes_IsValid(int value) { switch (value) { case 0: case 1: case 2: return true; default: return false; } } #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) constexpr NewSessionRequest_DeviceTypes NewSessionRequest::MOBILE; constexpr NewSessionRequest_DeviceTypes NewSessionRequest::WEB; constexpr NewSessionRequest_DeviceTypes NewSessionRequest::KEYSERVER; constexpr NewSessionRequest_DeviceTypes NewSessionRequest::DeviceTypes_MIN; constexpr NewSessionRequest_DeviceTypes NewSessionRequest::DeviceTypes_MAX; constexpr int NewSessionRequest::DeviceTypes_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) // =================================================================== class SessionSignatureRequest::_Internal { public: }; SessionSignatureRequest::SessionSignatureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.SessionSignatureRequest) } SessionSignatureRequest::SessionSignatureRequest(const SessionSignatureRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_deviceid().empty()) { deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceid(), GetArena()); } // @@protoc_insertion_point(copy_constructor:tunnelbroker.SessionSignatureRequest) } void SessionSignatureRequest::SharedCtor() { deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } SessionSignatureRequest::~SessionSignatureRequest() { // @@protoc_insertion_point(destructor:tunnelbroker.SessionSignatureRequest) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void SessionSignatureRequest::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); deviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void SessionSignatureRequest::ArenaDtor(void* object) { SessionSignatureRequest* _this = reinterpret_cast< SessionSignatureRequest* >(object); (void)_this; } void SessionSignatureRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void SessionSignatureRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } void SessionSignatureRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.SessionSignatureRequest) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; deviceid_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* SessionSignatureRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // string deviceID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_deviceid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SessionSignatureRequest.deviceID")); CHK_(ptr); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* SessionSignatureRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.SessionSignatureRequest) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string deviceID = 1; if (this->deviceid().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_deviceid().data(), static_cast(this->_internal_deviceid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.SessionSignatureRequest.deviceID"); target = stream->WriteStringMaybeAliased( 1, this->_internal_deviceid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.SessionSignatureRequest) return target; } size_t SessionSignatureRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.SessionSignatureRequest) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string deviceID = 1; if (this->deviceid().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_deviceid()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SessionSignatureRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.SessionSignatureRequest) GOOGLE_DCHECK_NE(&from, this); const SessionSignatureRequest* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.SessionSignatureRequest) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.SessionSignatureRequest) MergeFrom(*source); } } void SessionSignatureRequest::MergeFrom(const SessionSignatureRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.SessionSignatureRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.deviceid().size() > 0) { _internal_set_deviceid(from._internal_deviceid()); } } void SessionSignatureRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.SessionSignatureRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SessionSignatureRequest::CopyFrom(const SessionSignatureRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.SessionSignatureRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SessionSignatureRequest::IsInitialized() const { return true; } void SessionSignatureRequest::InternalSwap(SessionSignatureRequest* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); deviceid_.Swap(&other->deviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata SessionSignatureRequest::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class SessionSignatureResponse::_Internal { public: }; SessionSignatureResponse::SessionSignatureResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.SessionSignatureResponse) } SessionSignatureResponse::SessionSignatureResponse(const SessionSignatureResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); tosign_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_tosign().empty()) { tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tosign(), GetArena()); } // @@protoc_insertion_point(copy_constructor:tunnelbroker.SessionSignatureResponse) } void SessionSignatureResponse::SharedCtor() { tosign_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } SessionSignatureResponse::~SessionSignatureResponse() { // @@protoc_insertion_point(destructor:tunnelbroker.SessionSignatureResponse) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void SessionSignatureResponse::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); tosign_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void SessionSignatureResponse::ArenaDtor(void* object) { SessionSignatureResponse* _this = reinterpret_cast< SessionSignatureResponse* >(object); (void)_this; } void SessionSignatureResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void SessionSignatureResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } void SessionSignatureResponse::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.SessionSignatureResponse) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; tosign_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* SessionSignatureResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // string toSign = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_tosign(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SessionSignatureResponse.toSign")); CHK_(ptr); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* SessionSignatureResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.SessionSignatureResponse) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string toSign = 1; if (this->tosign().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_tosign().data(), static_cast(this->_internal_tosign().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.SessionSignatureResponse.toSign"); target = stream->WriteStringMaybeAliased( 1, this->_internal_tosign(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.SessionSignatureResponse) return target; } size_t SessionSignatureResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.SessionSignatureResponse) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string toSign = 1; if (this->tosign().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_tosign()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SessionSignatureResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.SessionSignatureResponse) GOOGLE_DCHECK_NE(&from, this); const SessionSignatureResponse* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.SessionSignatureResponse) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.SessionSignatureResponse) MergeFrom(*source); } } void SessionSignatureResponse::MergeFrom(const SessionSignatureResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.SessionSignatureResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.tosign().size() > 0) { _internal_set_tosign(from._internal_tosign()); } } void SessionSignatureResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.SessionSignatureResponse) if (&from == this) return; Clear(); MergeFrom(from); } void SessionSignatureResponse::CopyFrom(const SessionSignatureResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.SessionSignatureResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool SessionSignatureResponse::IsInitialized() const { return true; } void SessionSignatureResponse::InternalSwap(SessionSignatureResponse* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); tosign_.Swap(&other->tosign_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata SessionSignatureResponse::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class NewSessionRequest::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static void set_has_notifytoken(HasBits* has_bits) { (*has_bits)[0] |= 1u; } }; NewSessionRequest::NewSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewSessionRequest) } NewSessionRequest::NewSessionRequest(const NewSessionRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_deviceid().empty()) { deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceid(), GetArena()); } publickey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_publickey().empty()) { publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_publickey(), GetArena()); } signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_signature().empty()) { signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), GetArena()); } notifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from._internal_has_notifytoken()) { notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_notifytoken(), GetArena()); } deviceappversion_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_deviceappversion().empty()) { deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceappversion(), GetArena()); } deviceos_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_deviceos().empty()) { deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_deviceos(), GetArena()); } devicetype_ = from.devicetype_; // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewSessionRequest) } void NewSessionRequest::SharedCtor() { deviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); publickey_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); notifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); deviceappversion_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); deviceos_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); devicetype_ = 0; } NewSessionRequest::~NewSessionRequest() { // @@protoc_insertion_point(destructor:tunnelbroker.NewSessionRequest) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void NewSessionRequest::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); deviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); publickey_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); notifytoken_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); deviceappversion_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); deviceos_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void NewSessionRequest::ArenaDtor(void* object) { NewSessionRequest* _this = reinterpret_cast< NewSessionRequest* >(object); (void)_this; } void NewSessionRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void NewSessionRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } void NewSessionRequest::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.NewSessionRequest) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; deviceid_.ClearToEmpty(); publickey_.ClearToEmpty(); signature_.ClearToEmpty(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { notifytoken_.ClearNonDefaultToEmpty(); } deviceappversion_.ClearToEmpty(); deviceos_.ClearToEmpty(); devicetype_ = 0; _has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* NewSessionRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // string deviceID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_deviceid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.deviceID")); CHK_(ptr); } else goto handle_unusual; continue; // string publicKey = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { auto str = _internal_mutable_publickey(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.publicKey")); CHK_(ptr); } else goto handle_unusual; continue; // string signature = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { auto str = _internal_mutable_signature(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.signature")); CHK_(ptr); } else goto handle_unusual; continue; // string notifyToken = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { auto str = _internal_mutable_notifytoken(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.notifyToken")); CHK_(ptr); } else goto handle_unusual; continue; // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); _internal_set_devicetype(static_cast<::tunnelbroker::NewSessionRequest_DeviceTypes>(val)); } else goto handle_unusual; continue; // string deviceAppVersion = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { auto str = _internal_mutable_deviceappversion(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.deviceAppVersion")); CHK_(ptr); } else goto handle_unusual; continue; // string deviceOS = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { auto str = _internal_mutable_deviceos(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionRequest.deviceOS")); CHK_(ptr); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: _has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* NewSessionRequest::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewSessionRequest) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string deviceID = 1; if (this->deviceid().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_deviceid().data(), static_cast(this->_internal_deviceid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.NewSessionRequest.deviceID"); target = stream->WriteStringMaybeAliased( 1, this->_internal_deviceid(), target); } // string publicKey = 2; if (this->publickey().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_publickey().data(), static_cast(this->_internal_publickey().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.NewSessionRequest.publicKey"); target = stream->WriteStringMaybeAliased( 2, this->_internal_publickey(), target); } // string signature = 3; if (this->signature().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_signature().data(), static_cast(this->_internal_signature().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.NewSessionRequest.signature"); target = stream->WriteStringMaybeAliased( 3, this->_internal_signature(), target); } // string notifyToken = 4; if (_internal_has_notifytoken()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_notifytoken().data(), static_cast(this->_internal_notifytoken().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.NewSessionRequest.notifyToken"); target = stream->WriteStringMaybeAliased( 4, this->_internal_notifytoken(), target); } // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; if (this->devicetype() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 5, this->_internal_devicetype(), target); } // string deviceAppVersion = 6; if (this->deviceappversion().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_deviceappversion().data(), static_cast(this->_internal_deviceappversion().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.NewSessionRequest.deviceAppVersion"); target = stream->WriteStringMaybeAliased( 6, this->_internal_deviceappversion(), target); } // string deviceOS = 7; if (this->deviceos().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_deviceos().data(), static_cast(this->_internal_deviceos().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.NewSessionRequest.deviceOS"); target = stream->WriteStringMaybeAliased( 7, this->_internal_deviceos(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.NewSessionRequest) return target; } size_t NewSessionRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewSessionRequest) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string deviceID = 1; if (this->deviceid().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_deviceid()); } // string publicKey = 2; if (this->publickey().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_publickey()); } // string signature = 3; if (this->signature().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_signature()); } // string notifyToken = 4; cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_notifytoken()); } // string deviceAppVersion = 6; if (this->deviceappversion().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_deviceappversion()); } // string deviceOS = 7; if (this->deviceos().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_deviceos()); } // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; if (this->devicetype() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_devicetype()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NewSessionRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewSessionRequest) GOOGLE_DCHECK_NE(&from, this); const NewSessionRequest* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewSessionRequest) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewSessionRequest) MergeFrom(*source); } } void NewSessionRequest::MergeFrom(const NewSessionRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewSessionRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.deviceid().size() > 0) { _internal_set_deviceid(from._internal_deviceid()); } if (from.publickey().size() > 0) { _internal_set_publickey(from._internal_publickey()); } if (from.signature().size() > 0) { _internal_set_signature(from._internal_signature()); } if (from._internal_has_notifytoken()) { _internal_set_notifytoken(from._internal_notifytoken()); } if (from.deviceappversion().size() > 0) { _internal_set_deviceappversion(from._internal_deviceappversion()); } if (from.deviceos().size() > 0) { _internal_set_deviceos(from._internal_deviceos()); } - if (from.devicetype() != 0) { - _internal_set_devicetype(from._internal_devicetype()); - } -} - -void NewSessionRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewSessionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void NewSessionRequest::CopyFrom(const NewSessionRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewSessionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool NewSessionRequest::IsInitialized() const { - return true; -} - -void NewSessionRequest::InternalSwap(NewSessionRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - deviceid_.Swap(&other->deviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - publickey_.Swap(&other->publickey_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - signature_.Swap(&other->signature_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - notifytoken_.Swap(&other->notifytoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - deviceappversion_.Swap(&other->deviceappversion_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - deviceos_.Swap(&other->deviceos_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(devicetype_, other->devicetype_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata NewSessionRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class NewSessionResponse::_Internal { - public: -}; - -NewSessionResponse::NewSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewSessionResponse) -} -NewSessionResponse::NewSessionResponse(const NewSessionResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_sessionid().empty()) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewSessionResponse) -} - -void NewSessionResponse::SharedCtor() { -sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -NewSessionResponse::~NewSessionResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.NewSessionResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void NewSessionResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void NewSessionResponse::ArenaDtor(void* object) { - NewSessionResponse* _this = reinterpret_cast< NewSessionResponse* >(object); - (void)_this; -} -void NewSessionResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void NewSessionResponse::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void NewSessionResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.NewSessionResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - sessionid_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* NewSessionResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string sessionID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_sessionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionResponse.sessionID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* NewSessionResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewSessionResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.NewSessionResponse.sessionID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_sessionid(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.NewSessionResponse) - return target; -} - -size_t NewSessionResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewSessionResponse) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sessionid()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void NewSessionResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewSessionResponse) - GOOGLE_DCHECK_NE(&from, this); - const NewSessionResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewSessionResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewSessionResponse) - MergeFrom(*source); - } -} - -void NewSessionResponse::MergeFrom(const NewSessionResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewSessionResponse) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.sessionid().size() > 0) { - _internal_set_sessionid(from._internal_sessionid()); - } -} - -void NewSessionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewSessionResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void NewSessionResponse::CopyFrom(const NewSessionResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewSessionResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool NewSessionResponse::IsInitialized() const { - return true; -} - -void NewSessionResponse::InternalSwap(NewSessionResponse* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata NewSessionResponse::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class SendRequest::_Internal { - public: -}; - -SendRequest::SendRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - blobhashes_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.SendRequest) -} -SendRequest::SendRequest(const SendRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - blobhashes_(from.blobhashes_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_sessionid().empty()) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), - GetArena()); - } - todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_todeviceid().empty()) { - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_todeviceid(), - GetArena()); - } - payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_payload().empty()) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.SendRequest) -} - -void SendRequest::SharedCtor() { -sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -SendRequest::~SendRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.SendRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void SendRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - todeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void SendRequest::ArenaDtor(void* object) { - SendRequest* _this = reinterpret_cast< SendRequest* >(object); - (void)_this; -} -void SendRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void SendRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void SendRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.SendRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - blobhashes_.Clear(); - sessionid_.ClearToEmpty(); - todeviceid_.ClearToEmpty(); - payload_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SendRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string sessionID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_sessionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SendRequest.sessionID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string toDeviceID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_todeviceid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SendRequest.toDeviceID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bytes payload = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - auto str = _internal_mutable_payload(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string blobHashes = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_blobhashes(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.SendRequest.blobHashes")); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* SendRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.SendRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SendRequest.sessionID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_sessionid(), target); - } - - // string toDeviceID = 2; - if (this->todeviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_todeviceid().data(), static_cast(this->_internal_todeviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SendRequest.toDeviceID"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_todeviceid(), target); - } - - // bytes payload = 3; - if (this->payload().size() > 0) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_payload(), target); - } - - // repeated string blobHashes = 4; - for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { - const auto& s = this->_internal_blobhashes(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.SendRequest.blobHashes"); - target = stream->WriteString(4, s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.SendRequest) - return target; -} - -size_t SendRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.SendRequest) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated string blobHashes = 4; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); - for (int i = 0, n = blobhashes_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - blobhashes_.Get(i)); - } - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sessionid()); - } - - // string toDeviceID = 2; - if (this->todeviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_todeviceid()); - } - - // bytes payload = 3; - if (this->payload().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_payload()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void SendRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.SendRequest) - GOOGLE_DCHECK_NE(&from, this); - const SendRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.SendRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.SendRequest) - MergeFrom(*source); - } -} - -void SendRequest::MergeFrom(const SendRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.SendRequest) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - blobhashes_.MergeFrom(from.blobhashes_); - if (from.sessionid().size() > 0) { - _internal_set_sessionid(from._internal_sessionid()); - } - if (from.todeviceid().size() > 0) { - _internal_set_todeviceid(from._internal_todeviceid()); - } - if (from.payload().size() > 0) { - _internal_set_payload(from._internal_payload()); - } -} - -void SendRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.SendRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SendRequest::CopyFrom(const SendRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.SendRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SendRequest::IsInitialized() const { - return true; -} - -void SendRequest::InternalSwap(SendRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - blobhashes_.InternalSwap(&other->blobhashes_); - sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - todeviceid_.Swap(&other->todeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SendRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class GetRequest::_Internal { - public: - using HasBits = decltype(std::declval()._has_bits_); - static void set_has_newnotifytoken(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } -}; - -GetRequest::GetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetRequest) -} -GetRequest::GetRequest(const GetRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_sessionid().empty()) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), - GetArena()); - } - newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (from._internal_has_newnotifytoken()) { - newnotifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_newnotifytoken(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetRequest) -} - -void GetRequest::SharedCtor() { -sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -GetRequest::~GetRequest() { - // @@protoc_insertion_point(destructor:tunnelbroker.GetRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GetRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - newnotifytoken_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void GetRequest::ArenaDtor(void* object) { - GetRequest* _this = reinterpret_cast< GetRequest* >(object); - (void)_this; -} -void GetRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void GetRequest::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void GetRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - sessionid_.ClearToEmpty(); - cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - newnotifytoken_.ClearNonDefaultToEmpty(); - } - _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string sessionID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_sessionid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetRequest.sessionID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string newNotifyToken = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_newnotifytoken(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetRequest.newNotifyToken")); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - _has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* GetRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetRequest.sessionID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_sessionid(), target); - } - - // string newNotifyToken = 2; - if (_internal_has_newnotifytoken()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_newnotifytoken().data(), static_cast(this->_internal_newnotifytoken().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetRequest.newNotifyToken"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_newnotifytoken(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.GetRequest) - return target; -} - -size_t GetRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetRequest) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string sessionID = 1; - if (this->sessionid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sessionid()); - } - - // string newNotifyToken = 2; - cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_newnotifytoken()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GetRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.GetRequest) - GOOGLE_DCHECK_NE(&from, this); - const GetRequest* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.GetRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.GetRequest) - MergeFrom(*source); - } -} - -void GetRequest::MergeFrom(const GetRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.GetRequest) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.sessionid().size() > 0) { - _internal_set_sessionid(from._internal_sessionid()); - } - if (from._internal_has_newnotifytoken()) { - _internal_set_newnotifytoken(from._internal_newnotifytoken()); - } -} - -void GetRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.GetRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GetRequest::CopyFrom(const GetRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.GetRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GetRequest::IsInitialized() const { - return true; -} - -void GetRequest::InternalSwap(GetRequest* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - newnotifytoken_.Swap(&other->newnotifytoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GetRequest::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -class GetResponseMessage::_Internal { - public: -}; - -GetResponseMessage::GetResponseMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - blobhashes_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetResponseMessage) -} -GetResponseMessage::GetResponseMessage(const GetResponseMessage& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - blobhashes_(from.blobhashes_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_fromdeviceid().empty()) { - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_fromdeviceid(), - GetArena()); - } - payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_payload().empty()) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetResponseMessage) -} - -void GetResponseMessage::SharedCtor() { -fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -GetResponseMessage::~GetResponseMessage() { - // @@protoc_insertion_point(destructor:tunnelbroker.GetResponseMessage) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GetResponseMessage::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - fromdeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void GetResponseMessage::ArenaDtor(void* object) { - GetResponseMessage* _this = reinterpret_cast< GetResponseMessage* >(object); - (void)_this; -} -void GetResponseMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void GetResponseMessage::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void GetResponseMessage::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetResponseMessage) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - blobhashes_.Clear(); - fromdeviceid_.ClearToEmpty(); - payload_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetResponseMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string fromDeviceID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_fromdeviceid(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetResponseMessage.fromDeviceID")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bytes payload = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_payload(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string blobHashes = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_blobhashes(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.GetResponseMessage.blobHashes")); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* GetResponseMessage::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetResponseMessage) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string fromDeviceID = 1; - if (this->fromdeviceid().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_fromdeviceid().data(), static_cast(this->_internal_fromdeviceid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetResponseMessage.fromDeviceID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_fromdeviceid(), target); - } - - // bytes payload = 2; - if (this->payload().size() > 0) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_payload(), target); - } - - // repeated string blobHashes = 3; - for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { - const auto& s = this->_internal_blobhashes(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "tunnelbroker.GetResponseMessage.blobHashes"); - target = stream->WriteString(3, s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.GetResponseMessage) - return target; -} - -size_t GetResponseMessage::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetResponseMessage) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated string blobHashes = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); - for (int i = 0, n = blobhashes_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - blobhashes_.Get(i)); - } - - // string fromDeviceID = 1; - if (this->fromdeviceid().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_fromdeviceid()); - } - - // bytes payload = 2; - if (this->payload().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_payload()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GetResponseMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.GetResponseMessage) - GOOGLE_DCHECK_NE(&from, this); - const GetResponseMessage* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.GetResponseMessage) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.GetResponseMessage) - MergeFrom(*source); - } -} - -void GetResponseMessage::MergeFrom(const GetResponseMessage& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.GetResponseMessage) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - blobhashes_.MergeFrom(from.blobhashes_); - if (from.fromdeviceid().size() > 0) { - _internal_set_fromdeviceid(from._internal_fromdeviceid()); - } - if (from.payload().size() > 0) { - _internal_set_payload(from._internal_payload()); + if (from.devicetype() != 0) { + _internal_set_devicetype(from._internal_devicetype()); } } -void GetResponseMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.GetResponseMessage) +void NewSessionRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } -void GetResponseMessage::CopyFrom(const GetResponseMessage& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.GetResponseMessage) +void NewSessionRequest::CopyFrom(const NewSessionRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewSessionRequest) if (&from == this) return; Clear(); MergeFrom(from); } -bool GetResponseMessage::IsInitialized() const { +bool NewSessionRequest::IsInitialized() const { return true; } -void GetResponseMessage::InternalSwap(GetResponseMessage* other) { +void NewSessionRequest::InternalSwap(NewSessionRequest* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - blobhashes_.InternalSwap(&other->blobhashes_); - fromdeviceid_.Swap(&other->fromdeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(_has_bits_[0], other->_has_bits_[0]); + deviceid_.Swap(&other->deviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + publickey_.Swap(&other->publickey_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + signature_.Swap(&other->signature_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + notifytoken_.Swap(&other->notifytoken_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + deviceappversion_.Swap(&other->deviceappversion_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + deviceos_.Swap(&other->deviceos_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(devicetype_, other->devicetype_); } -::PROTOBUF_NAMESPACE_ID::Metadata GetResponseMessage::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata NewSessionRequest::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -class GetResponse::_Internal { +class NewSessionResponse::_Internal { public: - static const ::tunnelbroker::GetResponseMessage& responsemessage(const GetResponse* msg); - static const PROTOBUF_NAMESPACE_ID::Empty& ping(const GetResponse* msg); - static const PROTOBUF_NAMESPACE_ID::Empty& newnotifytokenrequired(const GetResponse* msg); }; -const ::tunnelbroker::GetResponseMessage& -GetResponse::_Internal::responsemessage(const GetResponse* msg) { - return *msg->data_.responsemessage_; -} -const PROTOBUF_NAMESPACE_ID::Empty& -GetResponse::_Internal::ping(const GetResponse* msg) { - return *msg->data_.ping_; -} -const PROTOBUF_NAMESPACE_ID::Empty& -GetResponse::_Internal::newnotifytokenrequired(const GetResponse* msg) { - return *msg->data_.newnotifytokenrequired_; -} -void GetResponse::set_allocated_responsemessage(::tunnelbroker::GetResponseMessage* responsemessage) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - clear_data(); - if (responsemessage) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(responsemessage); - if (message_arena != submessage_arena) { - responsemessage = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, responsemessage, submessage_arena); - } - set_has_responsemessage(); - data_.responsemessage_ = responsemessage; - } - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.responseMessage) -} -void GetResponse::set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - clear_data(); - if (ping) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ping)->GetArena(); - if (message_arena != submessage_arena) { - ping = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, ping, submessage_arena); - } - set_has_ping(); - data_.ping_ = ping; - } - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.ping) -} -void GetResponse::clear_ping() { - if (_internal_has_ping()) { - if (GetArena() == nullptr) { - delete data_.ping_; - } - clear_has_data(); - } -} -void GetResponse::set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - clear_data(); - if (newnotifytokenrequired) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(newnotifytokenrequired)->GetArena(); - if (message_arena != submessage_arena) { - newnotifytokenrequired = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, newnotifytokenrequired, submessage_arena); - } - set_has_newnotifytokenrequired(); - data_.newnotifytokenrequired_ = newnotifytokenrequired; - } - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponse.newNotifyTokenRequired) -} -void GetResponse::clear_newnotifytokenrequired() { - if (_internal_has_newnotifytokenrequired()) { - if (GetArena() == nullptr) { - delete data_.newnotifytokenrequired_; - } - clear_has_data(); - } -} -GetResponse::GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) +NewSessionResponse::NewSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tunnelbroker.GetResponse) + // @@protoc_insertion_point(arena_constructor:tunnelbroker.NewSessionResponse) } -GetResponse::GetResponse(const GetResponse& from) +NewSessionResponse::NewSessionResponse(const NewSessionResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - clear_has_data(); - switch (from.data_case()) { - case kResponseMessage: { - _internal_mutable_responsemessage()->::tunnelbroker::GetResponseMessage::MergeFrom(from._internal_responsemessage()); - break; - } - case kPing: { - _internal_mutable_ping()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_ping()); - break; - } - case kNewNotifyTokenRequired: { - _internal_mutable_newnotifytokenrequired()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_newnotifytokenrequired()); - break; - } - case DATA_NOT_SET: { - break; - } + sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_sessionid().empty()) { + sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), + GetArena()); } - // @@protoc_insertion_point(copy_constructor:tunnelbroker.GetResponse) + // @@protoc_insertion_point(copy_constructor:tunnelbroker.NewSessionResponse) } -void GetResponse::SharedCtor() { -clear_has_data(); +void NewSessionResponse::SharedCtor() { +sessionid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -GetResponse::~GetResponse() { - // @@protoc_insertion_point(destructor:tunnelbroker.GetResponse) +NewSessionResponse::~NewSessionResponse() { + // @@protoc_insertion_point(destructor:tunnelbroker.NewSessionResponse) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void GetResponse::SharedDtor() { +void NewSessionResponse::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - if (has_data()) { - clear_data(); - } + sessionid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void GetResponse::ArenaDtor(void* object) { - GetResponse* _this = reinterpret_cast< GetResponse* >(object); +void NewSessionResponse::ArenaDtor(void* object) { + NewSessionResponse* _this = reinterpret_cast< NewSessionResponse* >(object); (void)_this; } -void GetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void NewSessionResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void GetResponse::SetCachedSize(int size) const { +void NewSessionResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } -void GetResponse::clear_data() { -// @@protoc_insertion_point(one_of_clear_start:tunnelbroker.GetResponse) - switch (data_case()) { - case kResponseMessage: { - if (GetArena() == nullptr) { - delete data_.responsemessage_; - } - break; - } - case kPing: { - if (GetArena() == nullptr) { - delete data_.ping_; - } - break; - } - case kNewNotifyTokenRequired: { - if (GetArena() == nullptr) { - delete data_.newnotifytokenrequired_; - } - break; - } - case DATA_NOT_SET: { - break; - } - } - _oneof_case_[0] = DATA_NOT_SET; -} - - -void GetResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:tunnelbroker.GetResponse) +void NewSessionResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:tunnelbroker.NewSessionResponse) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - clear_data(); + sessionid_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* GetResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* NewSessionResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // .tunnelbroker.GetResponseMessage responseMessage = 1; + // string sessionID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_responsemessage(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .google.protobuf.Empty ping = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_ping(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .google.protobuf.Empty newNotifyTokenRequired = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_newnotifytokenrequired(), ptr); + auto str = _internal_mutable_sessionid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.NewSessionResponse.sessionID")); CHK_(ptr); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* GetResponse::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* NewSessionResponse::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.GetResponse) + // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.NewSessionResponse) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tunnelbroker.GetResponseMessage responseMessage = 1; - if (_internal_has_responsemessage()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 1, _Internal::responsemessage(this), target, stream); - } - - // .google.protobuf.Empty ping = 2; - if (_internal_has_ping()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::ping(this), target, stream); - } - - // .google.protobuf.Empty newNotifyTokenRequired = 3; - if (_internal_has_newnotifytokenrequired()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::newnotifytokenrequired(this), target, stream); + // string sessionID = 1; + if (this->sessionid().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sessionid().data(), static_cast(this->_internal_sessionid().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tunnelbroker.NewSessionResponse.sessionID"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_sessionid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.GetResponse) + // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.NewSessionResponse) return target; } -size_t GetResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.GetResponse) +size_t NewSessionResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tunnelbroker.NewSessionResponse) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - switch (data_case()) { - // .tunnelbroker.GetResponseMessage responseMessage = 1; - case kResponseMessage: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *data_.responsemessage_); - break; - } - // .google.protobuf.Empty ping = 2; - case kPing: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *data_.ping_); - break; - } - // .google.protobuf.Empty newNotifyTokenRequired = 3; - case kNewNotifyTokenRequired: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *data_.newnotifytokenrequired_); - break; - } - case DATA_NOT_SET: { - break; - } + // string sessionID = 1; + if (this->sessionid().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sessionid()); } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void GetResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.GetResponse) +void NewSessionResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.NewSessionResponse) GOOGLE_DCHECK_NE(&from, this); - const GetResponse* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const NewSessionResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.GetResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.NewSessionResponse) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.GetResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.NewSessionResponse) MergeFrom(*source); } } -void GetResponse::MergeFrom(const GetResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.GetResponse) +void NewSessionResponse::MergeFrom(const NewSessionResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.NewSessionResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - switch (from.data_case()) { - case kResponseMessage: { - _internal_mutable_responsemessage()->::tunnelbroker::GetResponseMessage::MergeFrom(from._internal_responsemessage()); - break; - } - case kPing: { - _internal_mutable_ping()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_ping()); - break; - } - case kNewNotifyTokenRequired: { - _internal_mutable_newnotifytokenrequired()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_newnotifytokenrequired()); - break; - } - case DATA_NOT_SET: { - break; - } + if (from.sessionid().size() > 0) { + _internal_set_sessionid(from._internal_sessionid()); } } -void GetResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.GetResponse) +void NewSessionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.NewSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } -void GetResponse::CopyFrom(const GetResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.GetResponse) +void NewSessionResponse::CopyFrom(const NewSessionResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.NewSessionResponse) if (&from == this) return; Clear(); MergeFrom(from); } -bool GetResponse::IsInitialized() const { +bool NewSessionResponse::IsInitialized() const { return true; } -void GetResponse::InternalSwap(GetResponse* other) { +void NewSessionResponse::InternalSwap(NewSessionResponse* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(data_, other->data_); - swap(_oneof_case_[0], other->_oneof_case_[0]); + sessionid_.Swap(&other->sessionid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -::PROTOBUF_NAMESPACE_ID::Metadata GetResponse::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata NewSessionResponse::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class ProcessedMessages::_Internal { public: }; ProcessedMessages::ProcessedMessages(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena), messageid_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.ProcessedMessages) } ProcessedMessages::ProcessedMessages(const ProcessedMessages& from) : ::PROTOBUF_NAMESPACE_ID::Message(), messageid_(from.messageid_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tunnelbroker.ProcessedMessages) } void ProcessedMessages::SharedCtor() { } ProcessedMessages::~ProcessedMessages() { // @@protoc_insertion_point(destructor:tunnelbroker.ProcessedMessages) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void ProcessedMessages::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } void ProcessedMessages::ArenaDtor(void* object) { ProcessedMessages* _this = reinterpret_cast< ProcessedMessages* >(object); (void)_this; } void ProcessedMessages::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void ProcessedMessages::SetCachedSize(int size) const { _cached_size_.Set(size); } void ProcessedMessages::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.ProcessedMessages) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; messageid_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* ProcessedMessages::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // repeated string messageID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr -= 1; do { ptr += 1; auto str = _internal_add_messageid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.ProcessedMessages.messageID")); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* ProcessedMessages::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.ProcessedMessages) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string messageID = 1; for (int i = 0, n = this->_internal_messageid_size(); i < n; i++) { const auto& s = this->_internal_messageid(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.ProcessedMessages.messageID"); target = stream->WriteString(1, s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.ProcessedMessages) return target; } size_t ProcessedMessages::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.ProcessedMessages) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string messageID = 1; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(messageid_.size()); for (int i = 0, n = messageid_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( messageid_.Get(i)); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ProcessedMessages::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.ProcessedMessages) GOOGLE_DCHECK_NE(&from, this); const ProcessedMessages* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.ProcessedMessages) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.ProcessedMessages) MergeFrom(*source); } } void ProcessedMessages::MergeFrom(const ProcessedMessages& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.ProcessedMessages) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; messageid_.MergeFrom(from.messageid_); } void ProcessedMessages::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.ProcessedMessages) if (&from == this) return; Clear(); MergeFrom(from); } void ProcessedMessages::CopyFrom(const ProcessedMessages& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.ProcessedMessages) if (&from == this) return; Clear(); MergeFrom(from); } bool ProcessedMessages::IsInitialized() const { return true; } void ProcessedMessages::InternalSwap(ProcessedMessages* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); messageid_.InternalSwap(&other->messageid_); } ::PROTOBUF_NAMESPACE_ID::Metadata ProcessedMessages::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class MessageToTunnelbrokerStruct::_Internal { public: }; MessageToTunnelbrokerStruct::MessageToTunnelbrokerStruct(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena), blobhashes_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.MessageToTunnelbrokerStruct) } MessageToTunnelbrokerStruct::MessageToTunnelbrokerStruct(const MessageToTunnelbrokerStruct& from) : ::PROTOBUF_NAMESPACE_ID::Message(), blobhashes_(from.blobhashes_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_messageid().empty()) { messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), GetArena()); } todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_todeviceid().empty()) { todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_todeviceid(), GetArena()); } payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_payload().empty()) { payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), GetArena()); } // @@protoc_insertion_point(copy_constructor:tunnelbroker.MessageToTunnelbrokerStruct) } void MessageToTunnelbrokerStruct::SharedCtor() { messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); todeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } MessageToTunnelbrokerStruct::~MessageToTunnelbrokerStruct() { // @@protoc_insertion_point(destructor:tunnelbroker.MessageToTunnelbrokerStruct) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessageToTunnelbrokerStruct::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); todeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void MessageToTunnelbrokerStruct::ArenaDtor(void* object) { MessageToTunnelbrokerStruct* _this = reinterpret_cast< MessageToTunnelbrokerStruct* >(object); (void)_this; } void MessageToTunnelbrokerStruct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessageToTunnelbrokerStruct::SetCachedSize(int size) const { _cached_size_.Set(size); } void MessageToTunnelbrokerStruct::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.MessageToTunnelbrokerStruct) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; blobhashes_.Clear(); messageid_.ClearToEmpty(); todeviceid_.ClearToEmpty(); payload_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* MessageToTunnelbrokerStruct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // string messageID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_messageid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToTunnelbrokerStruct.messageID")); CHK_(ptr); } else goto handle_unusual; continue; // string toDeviceID = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { auto str = _internal_mutable_todeviceid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID")); CHK_(ptr); } else goto handle_unusual; continue; // string payload = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { auto str = _internal_mutable_payload(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToTunnelbrokerStruct.payload")); CHK_(ptr); } else goto handle_unusual; continue; // repeated string blobHashes = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { ptr -= 1; do { ptr += 1; auto str = _internal_add_blobhashes(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToTunnelbrokerStruct.blobHashes")); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* MessageToTunnelbrokerStruct::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.MessageToTunnelbrokerStruct) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string messageID = 1; if (this->messageid().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToTunnelbrokerStruct.messageID"); target = stream->WriteStringMaybeAliased( 1, this->_internal_messageid(), target); } // string toDeviceID = 2; if (this->todeviceid().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_todeviceid().data(), static_cast(this->_internal_todeviceid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID"); target = stream->WriteStringMaybeAliased( 2, this->_internal_todeviceid(), target); } // string payload = 3; if (this->payload().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_payload().data(), static_cast(this->_internal_payload().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToTunnelbrokerStruct.payload"); target = stream->WriteStringMaybeAliased( 3, this->_internal_payload(), target); } // repeated string blobHashes = 4; for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { const auto& s = this->_internal_blobhashes(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToTunnelbrokerStruct.blobHashes"); target = stream->WriteString(4, s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.MessageToTunnelbrokerStruct) return target; } size_t MessageToTunnelbrokerStruct::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.MessageToTunnelbrokerStruct) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string blobHashes = 4; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); for (int i = 0, n = blobhashes_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( blobhashes_.Get(i)); } // string messageID = 1; if (this->messageid().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_messageid()); } // string toDeviceID = 2; if (this->todeviceid().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_todeviceid()); } // string payload = 3; if (this->payload().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_payload()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MessageToTunnelbrokerStruct::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.MessageToTunnelbrokerStruct) GOOGLE_DCHECK_NE(&from, this); const MessageToTunnelbrokerStruct* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.MessageToTunnelbrokerStruct) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.MessageToTunnelbrokerStruct) MergeFrom(*source); } } void MessageToTunnelbrokerStruct::MergeFrom(const MessageToTunnelbrokerStruct& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.MessageToTunnelbrokerStruct) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; blobhashes_.MergeFrom(from.blobhashes_); if (from.messageid().size() > 0) { _internal_set_messageid(from._internal_messageid()); } if (from.todeviceid().size() > 0) { _internal_set_todeviceid(from._internal_todeviceid()); } if (from.payload().size() > 0) { _internal_set_payload(from._internal_payload()); } } void MessageToTunnelbrokerStruct::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.MessageToTunnelbrokerStruct) if (&from == this) return; Clear(); MergeFrom(from); } void MessageToTunnelbrokerStruct::CopyFrom(const MessageToTunnelbrokerStruct& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.MessageToTunnelbrokerStruct) if (&from == this) return; Clear(); MergeFrom(from); } bool MessageToTunnelbrokerStruct::IsInitialized() const { return true; } void MessageToTunnelbrokerStruct::InternalSwap(MessageToTunnelbrokerStruct* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); blobhashes_.InternalSwap(&other->blobhashes_); messageid_.Swap(&other->messageid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); todeviceid_.Swap(&other->todeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata MessageToTunnelbrokerStruct::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class MessagesToSend::_Internal { public: }; MessagesToSend::MessagesToSend(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena), messages_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.MessagesToSend) } MessagesToSend::MessagesToSend(const MessagesToSend& from) : ::PROTOBUF_NAMESPACE_ID::Message(), messages_(from.messages_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tunnelbroker.MessagesToSend) } void MessagesToSend::SharedCtor() { } MessagesToSend::~MessagesToSend() { // @@protoc_insertion_point(destructor:tunnelbroker.MessagesToSend) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessagesToSend::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } void MessagesToSend::ArenaDtor(void* object) { MessagesToSend* _this = reinterpret_cast< MessagesToSend* >(object); (void)_this; } void MessagesToSend::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessagesToSend::SetCachedSize(int size) const { _cached_size_.Set(size); } void MessagesToSend::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.MessagesToSend) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; messages_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* MessagesToSend::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // repeated .tunnelbroker.MessageToTunnelbrokerStruct messages = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr -= 1; do { ptr += 1; ptr = ctx->ParseMessage(_internal_add_messages(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* MessagesToSend::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.MessagesToSend) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tunnelbroker.MessageToTunnelbrokerStruct messages = 1; for (unsigned int i = 0, n = static_cast(this->_internal_messages_size()); i < n; i++) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(1, this->_internal_messages(i), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.MessagesToSend) return target; } size_t MessagesToSend::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.MessagesToSend) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .tunnelbroker.MessageToTunnelbrokerStruct messages = 1; total_size += 1UL * this->_internal_messages_size(); for (const auto& msg : this->messages_) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MessagesToSend::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.MessagesToSend) GOOGLE_DCHECK_NE(&from, this); const MessagesToSend* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.MessagesToSend) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.MessagesToSend) MergeFrom(*source); } } void MessagesToSend::MergeFrom(const MessagesToSend& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.MessagesToSend) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; messages_.MergeFrom(from.messages_); } void MessagesToSend::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.MessagesToSend) if (&from == this) return; Clear(); MergeFrom(from); } void MessagesToSend::CopyFrom(const MessagesToSend& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.MessagesToSend) if (&from == this) return; Clear(); MergeFrom(from); } bool MessagesToSend::IsInitialized() const { return true; } void MessagesToSend::InternalSwap(MessagesToSend* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); messages_.InternalSwap(&other->messages_); } ::PROTOBUF_NAMESPACE_ID::Metadata MessagesToSend::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class MessageToTunnelbroker::_Internal { public: static const ::tunnelbroker::MessagesToSend& messagestosend(const MessageToTunnelbroker* msg); static const ::tunnelbroker::ProcessedMessages& processedmessages(const MessageToTunnelbroker* msg); }; const ::tunnelbroker::MessagesToSend& MessageToTunnelbroker::_Internal::messagestosend(const MessageToTunnelbroker* msg) { return *msg->data_.messagestosend_; } const ::tunnelbroker::ProcessedMessages& MessageToTunnelbroker::_Internal::processedmessages(const MessageToTunnelbroker* msg) { return *msg->data_.processedmessages_; } void MessageToTunnelbroker::set_allocated_messagestosend(::tunnelbroker::MessagesToSend* messagestosend) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_data(); if (messagestosend) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(messagestosend); if (message_arena != submessage_arena) { messagestosend = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, messagestosend, submessage_arena); } set_has_messagestosend(); data_.messagestosend_ = messagestosend; } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToTunnelbroker.messagesToSend) } void MessageToTunnelbroker::set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_data(); if (processedmessages) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(processedmessages); if (message_arena != submessage_arena) { processedmessages = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, processedmessages, submessage_arena); } set_has_processedmessages(); data_.processedmessages_ = processedmessages; } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToTunnelbroker.processedMessages) } MessageToTunnelbroker::MessageToTunnelbroker(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.MessageToTunnelbroker) } MessageToTunnelbroker::MessageToTunnelbroker(const MessageToTunnelbroker& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); clear_has_data(); switch (from.data_case()) { case kMessagesToSend: { _internal_mutable_messagestosend()->::tunnelbroker::MessagesToSend::MergeFrom(from._internal_messagestosend()); break; } case kProcessedMessages: { _internal_mutable_processedmessages()->::tunnelbroker::ProcessedMessages::MergeFrom(from._internal_processedmessages()); break; } case kNewNotifyToken: { _internal_set_newnotifytoken(from._internal_newnotifytoken()); break; } case DATA_NOT_SET: { break; } } // @@protoc_insertion_point(copy_constructor:tunnelbroker.MessageToTunnelbroker) } void MessageToTunnelbroker::SharedCtor() { clear_has_data(); } MessageToTunnelbroker::~MessageToTunnelbroker() { // @@protoc_insertion_point(destructor:tunnelbroker.MessageToTunnelbroker) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessageToTunnelbroker::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); if (has_data()) { clear_data(); } } void MessageToTunnelbroker::ArenaDtor(void* object) { MessageToTunnelbroker* _this = reinterpret_cast< MessageToTunnelbroker* >(object); (void)_this; } void MessageToTunnelbroker::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessageToTunnelbroker::SetCachedSize(int size) const { _cached_size_.Set(size); } void MessageToTunnelbroker::clear_data() { // @@protoc_insertion_point(one_of_clear_start:tunnelbroker.MessageToTunnelbroker) switch (data_case()) { case kMessagesToSend: { if (GetArena() == nullptr) { delete data_.messagestosend_; } break; } case kProcessedMessages: { if (GetArena() == nullptr) { delete data_.processedmessages_; } break; } case kNewNotifyToken: { data_.newnotifytoken_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); break; } case DATA_NOT_SET: { break; } } _oneof_case_[0] = DATA_NOT_SET; } void MessageToTunnelbroker::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.MessageToTunnelbroker) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; clear_data(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* MessageToTunnelbroker::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // .tunnelbroker.MessagesToSend messagesToSend = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr = ctx->ParseMessage(_internal_mutable_messagestosend(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .tunnelbroker.ProcessedMessages processedMessages = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_processedmessages(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // string newNotifyToken = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { auto str = _internal_mutable_newnotifytoken(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToTunnelbroker.newNotifyToken")); CHK_(ptr); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* MessageToTunnelbroker::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.MessageToTunnelbroker) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .tunnelbroker.MessagesToSend messagesToSend = 1; if (_internal_has_messagestosend()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( 1, _Internal::messagestosend(this), target, stream); } // .tunnelbroker.ProcessedMessages processedMessages = 2; if (_internal_has_processedmessages()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( 2, _Internal::processedmessages(this), target, stream); } // string newNotifyToken = 3; if (_internal_has_newnotifytoken()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_newnotifytoken().data(), static_cast(this->_internal_newnotifytoken().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToTunnelbroker.newNotifyToken"); target = stream->WriteStringMaybeAliased( 3, this->_internal_newnotifytoken(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.MessageToTunnelbroker) return target; } size_t MessageToTunnelbroker::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.MessageToTunnelbroker) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; switch (data_case()) { // .tunnelbroker.MessagesToSend messagesToSend = 1; case kMessagesToSend: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *data_.messagestosend_); break; } // .tunnelbroker.ProcessedMessages processedMessages = 2; case kProcessedMessages: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *data_.processedmessages_); break; } // string newNotifyToken = 3; case kNewNotifyToken: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_newnotifytoken()); break; } case DATA_NOT_SET: { break; } } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MessageToTunnelbroker::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.MessageToTunnelbroker) GOOGLE_DCHECK_NE(&from, this); const MessageToTunnelbroker* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.MessageToTunnelbroker) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.MessageToTunnelbroker) MergeFrom(*source); } } void MessageToTunnelbroker::MergeFrom(const MessageToTunnelbroker& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.MessageToTunnelbroker) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; switch (from.data_case()) { case kMessagesToSend: { _internal_mutable_messagestosend()->::tunnelbroker::MessagesToSend::MergeFrom(from._internal_messagestosend()); break; } case kProcessedMessages: { _internal_mutable_processedmessages()->::tunnelbroker::ProcessedMessages::MergeFrom(from._internal_processedmessages()); break; } case kNewNotifyToken: { _internal_set_newnotifytoken(from._internal_newnotifytoken()); break; } case DATA_NOT_SET: { break; } } } void MessageToTunnelbroker::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.MessageToTunnelbroker) if (&from == this) return; Clear(); MergeFrom(from); } void MessageToTunnelbroker::CopyFrom(const MessageToTunnelbroker& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.MessageToTunnelbroker) if (&from == this) return; Clear(); MergeFrom(from); } bool MessageToTunnelbroker::IsInitialized() const { return true; } void MessageToTunnelbroker::InternalSwap(MessageToTunnelbroker* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(data_, other->data_); swap(_oneof_case_[0], other->_oneof_case_[0]); } ::PROTOBUF_NAMESPACE_ID::Metadata MessageToTunnelbroker::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class MessageToClientStruct::_Internal { public: }; MessageToClientStruct::MessageToClientStruct(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena), blobhashes_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.MessageToClientStruct) } MessageToClientStruct::MessageToClientStruct(const MessageToClientStruct& from) : ::PROTOBUF_NAMESPACE_ID::Message(), blobhashes_(from.blobhashes_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_messageid().empty()) { messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_messageid(), GetArena()); } fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_fromdeviceid().empty()) { fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_fromdeviceid(), GetArena()); } payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from._internal_payload().empty()) { payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), GetArena()); } // @@protoc_insertion_point(copy_constructor:tunnelbroker.MessageToClientStruct) } void MessageToClientStruct::SharedCtor() { messageid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); fromdeviceid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } MessageToClientStruct::~MessageToClientStruct() { // @@protoc_insertion_point(destructor:tunnelbroker.MessageToClientStruct) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessageToClientStruct::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); messageid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); fromdeviceid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void MessageToClientStruct::ArenaDtor(void* object) { MessageToClientStruct* _this = reinterpret_cast< MessageToClientStruct* >(object); (void)_this; } void MessageToClientStruct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessageToClientStruct::SetCachedSize(int size) const { _cached_size_.Set(size); } void MessageToClientStruct::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.MessageToClientStruct) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; blobhashes_.Clear(); messageid_.ClearToEmpty(); fromdeviceid_.ClearToEmpty(); payload_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* MessageToClientStruct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // string messageID = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_messageid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToClientStruct.messageID")); CHK_(ptr); } else goto handle_unusual; continue; // string fromDeviceID = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { auto str = _internal_mutable_fromdeviceid(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToClientStruct.fromDeviceID")); CHK_(ptr); } else goto handle_unusual; continue; // string payload = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { auto str = _internal_mutable_payload(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToClientStruct.payload")); CHK_(ptr); } else goto handle_unusual; continue; // repeated string blobHashes = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { ptr -= 1; do { ptr += 1; auto str = _internal_add_blobhashes(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "tunnelbroker.MessageToClientStruct.blobHashes")); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* MessageToClientStruct::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.MessageToClientStruct) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string messageID = 1; if (this->messageid().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_messageid().data(), static_cast(this->_internal_messageid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToClientStruct.messageID"); target = stream->WriteStringMaybeAliased( 1, this->_internal_messageid(), target); } // string fromDeviceID = 2; if (this->fromdeviceid().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_fromdeviceid().data(), static_cast(this->_internal_fromdeviceid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToClientStruct.fromDeviceID"); target = stream->WriteStringMaybeAliased( 2, this->_internal_fromdeviceid(), target); } // string payload = 3; if (this->payload().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_payload().data(), static_cast(this->_internal_payload().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToClientStruct.payload"); target = stream->WriteStringMaybeAliased( 3, this->_internal_payload(), target); } // repeated string blobHashes = 4; for (int i = 0, n = this->_internal_blobhashes_size(); i < n; i++) { const auto& s = this->_internal_blobhashes(i); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "tunnelbroker.MessageToClientStruct.blobHashes"); target = stream->WriteString(4, s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.MessageToClientStruct) return target; } size_t MessageToClientStruct::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.MessageToClientStruct) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string blobHashes = 4; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(blobhashes_.size()); for (int i = 0, n = blobhashes_.size(); i < n; i++) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( blobhashes_.Get(i)); } // string messageID = 1; if (this->messageid().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_messageid()); } // string fromDeviceID = 2; if (this->fromdeviceid().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_fromdeviceid()); } // string payload = 3; if (this->payload().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_payload()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MessageToClientStruct::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.MessageToClientStruct) GOOGLE_DCHECK_NE(&from, this); const MessageToClientStruct* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.MessageToClientStruct) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.MessageToClientStruct) MergeFrom(*source); } } void MessageToClientStruct::MergeFrom(const MessageToClientStruct& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.MessageToClientStruct) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; blobhashes_.MergeFrom(from.blobhashes_); if (from.messageid().size() > 0) { _internal_set_messageid(from._internal_messageid()); } if (from.fromdeviceid().size() > 0) { _internal_set_fromdeviceid(from._internal_fromdeviceid()); } if (from.payload().size() > 0) { _internal_set_payload(from._internal_payload()); } } void MessageToClientStruct::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.MessageToClientStruct) if (&from == this) return; Clear(); MergeFrom(from); } void MessageToClientStruct::CopyFrom(const MessageToClientStruct& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.MessageToClientStruct) if (&from == this) return; Clear(); MergeFrom(from); } bool MessageToClientStruct::IsInitialized() const { return true; } void MessageToClientStruct::InternalSwap(MessageToClientStruct* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); blobhashes_.InternalSwap(&other->blobhashes_); messageid_.Swap(&other->messageid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); fromdeviceid_.Swap(&other->fromdeviceid_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); payload_.Swap(&other->payload_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } ::PROTOBUF_NAMESPACE_ID::Metadata MessageToClientStruct::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class MessagesToDeliver::_Internal { public: }; MessagesToDeliver::MessagesToDeliver(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena), messages_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.MessagesToDeliver) } MessagesToDeliver::MessagesToDeliver(const MessagesToDeliver& from) : ::PROTOBUF_NAMESPACE_ID::Message(), messages_(from.messages_) { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:tunnelbroker.MessagesToDeliver) } void MessagesToDeliver::SharedCtor() { } MessagesToDeliver::~MessagesToDeliver() { // @@protoc_insertion_point(destructor:tunnelbroker.MessagesToDeliver) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessagesToDeliver::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } void MessagesToDeliver::ArenaDtor(void* object) { MessagesToDeliver* _this = reinterpret_cast< MessagesToDeliver* >(object); (void)_this; } void MessagesToDeliver::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessagesToDeliver::SetCachedSize(int size) const { _cached_size_.Set(size); } void MessagesToDeliver::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.MessagesToDeliver) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; messages_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* MessagesToDeliver::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // repeated .tunnelbroker.MessageToClientStruct messages = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr -= 1; do { ptr += 1; ptr = ctx->ParseMessage(_internal_add_messages(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* MessagesToDeliver::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.MessagesToDeliver) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .tunnelbroker.MessageToClientStruct messages = 1; for (unsigned int i = 0, n = static_cast(this->_internal_messages_size()); i < n; i++) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(1, this->_internal_messages(i), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.MessagesToDeliver) return target; } size_t MessagesToDeliver::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.MessagesToDeliver) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .tunnelbroker.MessageToClientStruct messages = 1; total_size += 1UL * this->_internal_messages_size(); for (const auto& msg : this->messages_) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MessagesToDeliver::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.MessagesToDeliver) GOOGLE_DCHECK_NE(&from, this); const MessagesToDeliver* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.MessagesToDeliver) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.MessagesToDeliver) MergeFrom(*source); } } void MessagesToDeliver::MergeFrom(const MessagesToDeliver& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.MessagesToDeliver) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; messages_.MergeFrom(from.messages_); } void MessagesToDeliver::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.MessagesToDeliver) if (&from == this) return; Clear(); MergeFrom(from); } void MessagesToDeliver::CopyFrom(const MessagesToDeliver& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.MessagesToDeliver) if (&from == this) return; Clear(); MergeFrom(from); } bool MessagesToDeliver::IsInitialized() const { return true; } void MessagesToDeliver::InternalSwap(MessagesToDeliver* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); messages_.InternalSwap(&other->messages_); } ::PROTOBUF_NAMESPACE_ID::Metadata MessagesToDeliver::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== class MessageToClient::_Internal { public: static const ::tunnelbroker::MessagesToDeliver& messagestodeliver(const MessageToClient* msg); static const ::tunnelbroker::ProcessedMessages& processedmessages(const MessageToClient* msg); static const PROTOBUF_NAMESPACE_ID::Empty& newnotifytokenrequired(const MessageToClient* msg); static const PROTOBUF_NAMESPACE_ID::Empty& ping(const MessageToClient* msg); }; const ::tunnelbroker::MessagesToDeliver& MessageToClient::_Internal::messagestodeliver(const MessageToClient* msg) { return *msg->data_.messagestodeliver_; } const ::tunnelbroker::ProcessedMessages& MessageToClient::_Internal::processedmessages(const MessageToClient* msg) { return *msg->data_.processedmessages_; } const PROTOBUF_NAMESPACE_ID::Empty& MessageToClient::_Internal::newnotifytokenrequired(const MessageToClient* msg) { return *msg->data_.newnotifytokenrequired_; } const PROTOBUF_NAMESPACE_ID::Empty& MessageToClient::_Internal::ping(const MessageToClient* msg) { return *msg->data_.ping_; } void MessageToClient::set_allocated_messagestodeliver(::tunnelbroker::MessagesToDeliver* messagestodeliver) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_data(); if (messagestodeliver) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(messagestodeliver); if (message_arena != submessage_arena) { messagestodeliver = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, messagestodeliver, submessage_arena); } set_has_messagestodeliver(); data_.messagestodeliver_ = messagestodeliver; } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClient.messagesToDeliver) } void MessageToClient::set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_data(); if (processedmessages) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(processedmessages); if (message_arena != submessage_arena) { processedmessages = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, processedmessages, submessage_arena); } set_has_processedmessages(); data_.processedmessages_ = processedmessages; } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClient.processedMessages) } void MessageToClient::set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_data(); if (newnotifytokenrequired) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(newnotifytokenrequired)->GetArena(); if (message_arena != submessage_arena) { newnotifytokenrequired = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, newnotifytokenrequired, submessage_arena); } set_has_newnotifytokenrequired(); data_.newnotifytokenrequired_ = newnotifytokenrequired; } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClient.newNotifyTokenRequired) } void MessageToClient::clear_newnotifytokenrequired() { if (_internal_has_newnotifytokenrequired()) { if (GetArena() == nullptr) { delete data_.newnotifytokenrequired_; } clear_has_data(); } } void MessageToClient::set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); clear_data(); if (ping) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ping)->GetArena(); if (message_arena != submessage_arena) { ping = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, ping, submessage_arena); } set_has_ping(); data_.ping_ = ping; } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClient.ping) } void MessageToClient::clear_ping() { if (_internal_has_ping()) { if (GetArena() == nullptr) { delete data_.ping_; } clear_has_data(); } } MessageToClient::MessageToClient(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:tunnelbroker.MessageToClient) } MessageToClient::MessageToClient(const MessageToClient& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); clear_has_data(); switch (from.data_case()) { case kMessagesToDeliver: { _internal_mutable_messagestodeliver()->::tunnelbroker::MessagesToDeliver::MergeFrom(from._internal_messagestodeliver()); break; } case kProcessedMessages: { _internal_mutable_processedmessages()->::tunnelbroker::ProcessedMessages::MergeFrom(from._internal_processedmessages()); break; } case kNewNotifyTokenRequired: { _internal_mutable_newnotifytokenrequired()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_newnotifytokenrequired()); break; } case kPing: { _internal_mutable_ping()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_ping()); break; } case DATA_NOT_SET: { break; } } // @@protoc_insertion_point(copy_constructor:tunnelbroker.MessageToClient) } void MessageToClient::SharedCtor() { clear_has_data(); } MessageToClient::~MessageToClient() { // @@protoc_insertion_point(destructor:tunnelbroker.MessageToClient) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } void MessageToClient::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); if (has_data()) { clear_data(); } } void MessageToClient::ArenaDtor(void* object) { MessageToClient* _this = reinterpret_cast< MessageToClient* >(object); (void)_this; } void MessageToClient::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessageToClient::SetCachedSize(int size) const { _cached_size_.Set(size); } void MessageToClient::clear_data() { // @@protoc_insertion_point(one_of_clear_start:tunnelbroker.MessageToClient) switch (data_case()) { case kMessagesToDeliver: { if (GetArena() == nullptr) { delete data_.messagestodeliver_; } break; } case kProcessedMessages: { if (GetArena() == nullptr) { delete data_.processedmessages_; } break; } case kNewNotifyTokenRequired: { if (GetArena() == nullptr) { delete data_.newnotifytokenrequired_; } break; } case kPing: { if (GetArena() == nullptr) { delete data_.ping_; } break; } case DATA_NOT_SET: { break; } } _oneof_case_[0] = DATA_NOT_SET; } void MessageToClient::Clear() { // @@protoc_insertion_point(message_clear_start:tunnelbroker.MessageToClient) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; clear_data(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* MessageToClient::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // .tunnelbroker.MessagesToDeliver messagesToDeliver = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr = ctx->ParseMessage(_internal_mutable_messagestodeliver(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .tunnelbroker.ProcessedMessages processedMessages = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_processedmessages(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.Empty newNotifyTokenRequired = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_newnotifytokenrequired(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // .google.protobuf.Empty ping = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { ptr = ctx->ParseMessage(_internal_mutable_ping(), ptr); CHK_(ptr); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* MessageToClient::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:tunnelbroker.MessageToClient) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .tunnelbroker.MessagesToDeliver messagesToDeliver = 1; if (_internal_has_messagestodeliver()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( 1, _Internal::messagestodeliver(this), target, stream); } // .tunnelbroker.ProcessedMessages processedMessages = 2; if (_internal_has_processedmessages()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( 2, _Internal::processedmessages(this), target, stream); } // .google.protobuf.Empty newNotifyTokenRequired = 3; if (_internal_has_newnotifytokenrequired()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( 3, _Internal::newnotifytokenrequired(this), target, stream); } // .google.protobuf.Empty ping = 4; if (_internal_has_ping()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( 4, _Internal::ping(this), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:tunnelbroker.MessageToClient) return target; } size_t MessageToClient::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:tunnelbroker.MessageToClient) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; switch (data_case()) { // .tunnelbroker.MessagesToDeliver messagesToDeliver = 1; case kMessagesToDeliver: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *data_.messagestodeliver_); break; } // .tunnelbroker.ProcessedMessages processedMessages = 2; case kProcessedMessages: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *data_.processedmessages_); break; } // .google.protobuf.Empty newNotifyTokenRequired = 3; case kNewNotifyTokenRequired: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *data_.newnotifytokenrequired_); break; } // .google.protobuf.Empty ping = 4; case kPing: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *data_.ping_); break; } case DATA_NOT_SET: { break; } } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MessageToClient::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:tunnelbroker.MessageToClient) GOOGLE_DCHECK_NE(&from, this); const MessageToClient* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:tunnelbroker.MessageToClient) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:tunnelbroker.MessageToClient) MergeFrom(*source); } } void MessageToClient::MergeFrom(const MessageToClient& from) { // @@protoc_insertion_point(class_specific_merge_from_start:tunnelbroker.MessageToClient) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; switch (from.data_case()) { case kMessagesToDeliver: { _internal_mutable_messagestodeliver()->::tunnelbroker::MessagesToDeliver::MergeFrom(from._internal_messagestodeliver()); break; } case kProcessedMessages: { _internal_mutable_processedmessages()->::tunnelbroker::ProcessedMessages::MergeFrom(from._internal_processedmessages()); break; } case kNewNotifyTokenRequired: { _internal_mutable_newnotifytokenrequired()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_newnotifytokenrequired()); break; } case kPing: { _internal_mutable_ping()->PROTOBUF_NAMESPACE_ID::Empty::MergeFrom(from._internal_ping()); break; } case DATA_NOT_SET: { break; } } } void MessageToClient::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:tunnelbroker.MessageToClient) if (&from == this) return; Clear(); MergeFrom(from); } void MessageToClient::CopyFrom(const MessageToClient& from) { // @@protoc_insertion_point(class_specific_copy_from_start:tunnelbroker.MessageToClient) if (&from == this) return; Clear(); MergeFrom(from); } bool MessageToClient::IsInitialized() const { return true; } void MessageToClient::InternalSwap(MessageToClient* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); swap(data_, other->data_); swap(_oneof_case_[0], other->_oneof_case_[0]); } ::PROTOBUF_NAMESPACE_ID::Metadata MessageToClient::GetMetadata() const { return GetMetadataStatic(); } // @@protoc_insertion_point(namespace_scope) } // namespace tunnelbroker PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE ::tunnelbroker::SessionSignatureRequest* Arena::CreateMaybeMessage< ::tunnelbroker::SessionSignatureRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::SessionSignatureRequest >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::SessionSignatureResponse* Arena::CreateMaybeMessage< ::tunnelbroker::SessionSignatureResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::SessionSignatureResponse >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::NewSessionRequest* Arena::CreateMaybeMessage< ::tunnelbroker::NewSessionRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::NewSessionRequest >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::NewSessionResponse* Arena::CreateMaybeMessage< ::tunnelbroker::NewSessionResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::NewSessionResponse >(arena); } -template<> PROTOBUF_NOINLINE ::tunnelbroker::SendRequest* Arena::CreateMaybeMessage< ::tunnelbroker::SendRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::SendRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::GetRequest* Arena::CreateMaybeMessage< ::tunnelbroker::GetRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::GetRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::GetResponseMessage* Arena::CreateMaybeMessage< ::tunnelbroker::GetResponseMessage >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::GetResponseMessage >(arena); -} -template<> PROTOBUF_NOINLINE ::tunnelbroker::GetResponse* Arena::CreateMaybeMessage< ::tunnelbroker::GetResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::tunnelbroker::GetResponse >(arena); -} template<> PROTOBUF_NOINLINE ::tunnelbroker::ProcessedMessages* Arena::CreateMaybeMessage< ::tunnelbroker::ProcessedMessages >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::ProcessedMessages >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::MessageToTunnelbrokerStruct* Arena::CreateMaybeMessage< ::tunnelbroker::MessageToTunnelbrokerStruct >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::MessageToTunnelbrokerStruct >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::MessagesToSend* Arena::CreateMaybeMessage< ::tunnelbroker::MessagesToSend >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::MessagesToSend >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::MessageToTunnelbroker* Arena::CreateMaybeMessage< ::tunnelbroker::MessageToTunnelbroker >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::MessageToTunnelbroker >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::MessageToClientStruct* Arena::CreateMaybeMessage< ::tunnelbroker::MessageToClientStruct >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::MessageToClientStruct >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::MessagesToDeliver* Arena::CreateMaybeMessage< ::tunnelbroker::MessagesToDeliver >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::MessagesToDeliver >(arena); } template<> PROTOBUF_NOINLINE ::tunnelbroker::MessageToClient* Arena::CreateMaybeMessage< ::tunnelbroker::MessageToClient >(Arena* arena) { return Arena::CreateMessageInternal< ::tunnelbroker::MessageToClient >(arena); } PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/shared/protos/_generated/tunnelbroker.pb.h b/shared/protos/_generated/tunnelbroker.pb.h index 6e599f303..b7481ac6b 100644 --- a/shared/protos/_generated/tunnelbroker.pb.h +++ b/shared/protos/_generated/tunnelbroker.pb.h @@ -1,5639 +1,4032 @@ // @generated by the protocol buffer compiler. DO NOT EDIT! // source: tunnelbroker.proto #ifndef GOOGLE_PROTOBUF_INCLUDED_tunnelbroker_2eproto #define GOOGLE_PROTOBUF_INCLUDED_tunnelbroker_2eproto #include #include #include #if PROTOBUF_VERSION < 3015000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 3015008 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include #include #include #include #include #include #include #include #include #include // IWYU pragma: export #include // IWYU pragma: export #include #include #include // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_tunnelbroker_2eproto PROTOBUF_NAMESPACE_OPEN namespace internal { class AnyMetadata; } // namespace internal PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct TableStruct_tunnelbroker_2eproto { static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[15] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[11] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tunnelbroker_2eproto; ::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_tunnelbroker_2eproto_metadata_getter(int index); namespace tunnelbroker { -class GetRequest; -struct GetRequestDefaultTypeInternal; -extern GetRequestDefaultTypeInternal _GetRequest_default_instance_; -class GetResponse; -struct GetResponseDefaultTypeInternal; -extern GetResponseDefaultTypeInternal _GetResponse_default_instance_; -class GetResponseMessage; -struct GetResponseMessageDefaultTypeInternal; -extern GetResponseMessageDefaultTypeInternal _GetResponseMessage_default_instance_; class MessageToClient; struct MessageToClientDefaultTypeInternal; extern MessageToClientDefaultTypeInternal _MessageToClient_default_instance_; class MessageToClientStruct; struct MessageToClientStructDefaultTypeInternal; extern MessageToClientStructDefaultTypeInternal _MessageToClientStruct_default_instance_; class MessageToTunnelbroker; struct MessageToTunnelbrokerDefaultTypeInternal; extern MessageToTunnelbrokerDefaultTypeInternal _MessageToTunnelbroker_default_instance_; class MessageToTunnelbrokerStruct; struct MessageToTunnelbrokerStructDefaultTypeInternal; extern MessageToTunnelbrokerStructDefaultTypeInternal _MessageToTunnelbrokerStruct_default_instance_; class MessagesToDeliver; struct MessagesToDeliverDefaultTypeInternal; extern MessagesToDeliverDefaultTypeInternal _MessagesToDeliver_default_instance_; class MessagesToSend; struct MessagesToSendDefaultTypeInternal; extern MessagesToSendDefaultTypeInternal _MessagesToSend_default_instance_; class NewSessionRequest; struct NewSessionRequestDefaultTypeInternal; extern NewSessionRequestDefaultTypeInternal _NewSessionRequest_default_instance_; class NewSessionResponse; struct NewSessionResponseDefaultTypeInternal; extern NewSessionResponseDefaultTypeInternal _NewSessionResponse_default_instance_; class ProcessedMessages; struct ProcessedMessagesDefaultTypeInternal; extern ProcessedMessagesDefaultTypeInternal _ProcessedMessages_default_instance_; -class SendRequest; -struct SendRequestDefaultTypeInternal; -extern SendRequestDefaultTypeInternal _SendRequest_default_instance_; class SessionSignatureRequest; struct SessionSignatureRequestDefaultTypeInternal; extern SessionSignatureRequestDefaultTypeInternal _SessionSignatureRequest_default_instance_; class SessionSignatureResponse; struct SessionSignatureResponseDefaultTypeInternal; extern SessionSignatureResponseDefaultTypeInternal _SessionSignatureResponse_default_instance_; } // namespace tunnelbroker PROTOBUF_NAMESPACE_OPEN -template<> ::tunnelbroker::GetRequest* Arena::CreateMaybeMessage<::tunnelbroker::GetRequest>(Arena*); -template<> ::tunnelbroker::GetResponse* Arena::CreateMaybeMessage<::tunnelbroker::GetResponse>(Arena*); -template<> ::tunnelbroker::GetResponseMessage* Arena::CreateMaybeMessage<::tunnelbroker::GetResponseMessage>(Arena*); template<> ::tunnelbroker::MessageToClient* Arena::CreateMaybeMessage<::tunnelbroker::MessageToClient>(Arena*); template<> ::tunnelbroker::MessageToClientStruct* Arena::CreateMaybeMessage<::tunnelbroker::MessageToClientStruct>(Arena*); template<> ::tunnelbroker::MessageToTunnelbroker* Arena::CreateMaybeMessage<::tunnelbroker::MessageToTunnelbroker>(Arena*); template<> ::tunnelbroker::MessageToTunnelbrokerStruct* Arena::CreateMaybeMessage<::tunnelbroker::MessageToTunnelbrokerStruct>(Arena*); template<> ::tunnelbroker::MessagesToDeliver* Arena::CreateMaybeMessage<::tunnelbroker::MessagesToDeliver>(Arena*); template<> ::tunnelbroker::MessagesToSend* Arena::CreateMaybeMessage<::tunnelbroker::MessagesToSend>(Arena*); template<> ::tunnelbroker::NewSessionRequest* Arena::CreateMaybeMessage<::tunnelbroker::NewSessionRequest>(Arena*); template<> ::tunnelbroker::NewSessionResponse* Arena::CreateMaybeMessage<::tunnelbroker::NewSessionResponse>(Arena*); template<> ::tunnelbroker::ProcessedMessages* Arena::CreateMaybeMessage<::tunnelbroker::ProcessedMessages>(Arena*); -template<> ::tunnelbroker::SendRequest* Arena::CreateMaybeMessage<::tunnelbroker::SendRequest>(Arena*); template<> ::tunnelbroker::SessionSignatureRequest* Arena::CreateMaybeMessage<::tunnelbroker::SessionSignatureRequest>(Arena*); template<> ::tunnelbroker::SessionSignatureResponse* Arena::CreateMaybeMessage<::tunnelbroker::SessionSignatureResponse>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace tunnelbroker { enum NewSessionRequest_DeviceTypes : int { NewSessionRequest_DeviceTypes_MOBILE = 0, NewSessionRequest_DeviceTypes_WEB = 1, NewSessionRequest_DeviceTypes_KEYSERVER = 2, NewSessionRequest_DeviceTypes_NewSessionRequest_DeviceTypes_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), NewSessionRequest_DeviceTypes_NewSessionRequest_DeviceTypes_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool NewSessionRequest_DeviceTypes_IsValid(int value); constexpr NewSessionRequest_DeviceTypes NewSessionRequest_DeviceTypes_DeviceTypes_MIN = NewSessionRequest_DeviceTypes_MOBILE; constexpr NewSessionRequest_DeviceTypes NewSessionRequest_DeviceTypes_DeviceTypes_MAX = NewSessionRequest_DeviceTypes_KEYSERVER; constexpr int NewSessionRequest_DeviceTypes_DeviceTypes_ARRAYSIZE = NewSessionRequest_DeviceTypes_DeviceTypes_MAX + 1; const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NewSessionRequest_DeviceTypes_descriptor(); template inline const std::string& NewSessionRequest_DeviceTypes_Name(T enum_t_value) { static_assert(::std::is_same::value || ::std::is_integral::value, "Incorrect type passed to function NewSessionRequest_DeviceTypes_Name."); return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( NewSessionRequest_DeviceTypes_descriptor(), enum_t_value); } inline bool NewSessionRequest_DeviceTypes_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NewSessionRequest_DeviceTypes* value) { return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( NewSessionRequest_DeviceTypes_descriptor(), name, value); } // =================================================================== class SessionSignatureRequest PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.SessionSignatureRequest) */ { public: inline SessionSignatureRequest() : SessionSignatureRequest(nullptr) {} virtual ~SessionSignatureRequest(); explicit constexpr SessionSignatureRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); SessionSignatureRequest(const SessionSignatureRequest& from); SessionSignatureRequest(SessionSignatureRequest&& from) noexcept : SessionSignatureRequest() { *this = ::std::move(from); } inline SessionSignatureRequest& operator=(const SessionSignatureRequest& from) { CopyFrom(from); return *this; } inline SessionSignatureRequest& operator=(SessionSignatureRequest&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } static const SessionSignatureRequest& default_instance() { return *internal_default_instance(); } static inline const SessionSignatureRequest* internal_default_instance() { return reinterpret_cast( &_SessionSignatureRequest_default_instance_); } static constexpr int kIndexInFileMessages = 0; friend void swap(SessionSignatureRequest& a, SessionSignatureRequest& b) { a.Swap(&b); } inline void Swap(SessionSignatureRequest* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(SessionSignatureRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline SessionSignatureRequest* New() const final { return CreateMaybeMessage(nullptr); } SessionSignatureRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SessionSignatureRequest& from); void MergeFrom(const SessionSignatureRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SessionSignatureRequest* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "tunnelbroker.SessionSignatureRequest"; } protected: explicit SessionSignatureRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kDeviceIDFieldNumber = 1, }; // string deviceID = 1; void clear_deviceid(); const std::string& deviceid() const; void set_deviceid(const std::string& value); void set_deviceid(std::string&& value); void set_deviceid(const char* value); void set_deviceid(const char* value, size_t size); std::string* mutable_deviceid(); std::string* release_deviceid(); void set_allocated_deviceid(std::string* deviceid); private: const std::string& _internal_deviceid() const; void _internal_set_deviceid(const std::string& value); std::string* _internal_mutable_deviceid(); public: // @@protoc_insertion_point(class_scope:tunnelbroker.SessionSignatureRequest) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- class SessionSignatureResponse PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.SessionSignatureResponse) */ { public: inline SessionSignatureResponse() : SessionSignatureResponse(nullptr) {} virtual ~SessionSignatureResponse(); explicit constexpr SessionSignatureResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); SessionSignatureResponse(const SessionSignatureResponse& from); SessionSignatureResponse(SessionSignatureResponse&& from) noexcept : SessionSignatureResponse() { *this = ::std::move(from); } inline SessionSignatureResponse& operator=(const SessionSignatureResponse& from) { CopyFrom(from); return *this; } inline SessionSignatureResponse& operator=(SessionSignatureResponse&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } static const SessionSignatureResponse& default_instance() { return *internal_default_instance(); } static inline const SessionSignatureResponse* internal_default_instance() { return reinterpret_cast( &_SessionSignatureResponse_default_instance_); } static constexpr int kIndexInFileMessages = 1; friend void swap(SessionSignatureResponse& a, SessionSignatureResponse& b) { a.Swap(&b); } inline void Swap(SessionSignatureResponse* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(SessionSignatureResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline SessionSignatureResponse* New() const final { return CreateMaybeMessage(nullptr); } SessionSignatureResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SessionSignatureResponse& from); void MergeFrom(const SessionSignatureResponse& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SessionSignatureResponse* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "tunnelbroker.SessionSignatureResponse"; } protected: explicit SessionSignatureResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kToSignFieldNumber = 1, }; // string toSign = 1; void clear_tosign(); const std::string& tosign() const; void set_tosign(const std::string& value); void set_tosign(std::string&& value); void set_tosign(const char* value); void set_tosign(const char* value, size_t size); std::string* mutable_tosign(); std::string* release_tosign(); void set_allocated_tosign(std::string* tosign); private: const std::string& _internal_tosign() const; void _internal_set_tosign(const std::string& value); std::string* _internal_mutable_tosign(); public: // @@protoc_insertion_point(class_scope:tunnelbroker.SessionSignatureResponse) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tosign_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- class NewSessionRequest PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.NewSessionRequest) */ { public: inline NewSessionRequest() : NewSessionRequest(nullptr) {} virtual ~NewSessionRequest(); explicit constexpr NewSessionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); NewSessionRequest(const NewSessionRequest& from); NewSessionRequest(NewSessionRequest&& from) noexcept : NewSessionRequest() { *this = ::std::move(from); } inline NewSessionRequest& operator=(const NewSessionRequest& from) { CopyFrom(from); return *this; } inline NewSessionRequest& operator=(NewSessionRequest&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } static const NewSessionRequest& default_instance() { return *internal_default_instance(); } static inline const NewSessionRequest* internal_default_instance() { return reinterpret_cast( &_NewSessionRequest_default_instance_); } static constexpr int kIndexInFileMessages = 2; friend void swap(NewSessionRequest& a, NewSessionRequest& b) { a.Swap(&b); } inline void Swap(NewSessionRequest* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(NewSessionRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline NewSessionRequest* New() const final { return CreateMaybeMessage(nullptr); } NewSessionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const NewSessionRequest& from); void MergeFrom(const NewSessionRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(NewSessionRequest* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "tunnelbroker.NewSessionRequest"; } protected: explicit NewSessionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- typedef NewSessionRequest_DeviceTypes DeviceTypes; static constexpr DeviceTypes MOBILE = NewSessionRequest_DeviceTypes_MOBILE; static constexpr DeviceTypes WEB = NewSessionRequest_DeviceTypes_WEB; static constexpr DeviceTypes KEYSERVER = NewSessionRequest_DeviceTypes_KEYSERVER; static inline bool DeviceTypes_IsValid(int value) { return NewSessionRequest_DeviceTypes_IsValid(value); } static constexpr DeviceTypes DeviceTypes_MIN = NewSessionRequest_DeviceTypes_DeviceTypes_MIN; static constexpr DeviceTypes DeviceTypes_MAX = NewSessionRequest_DeviceTypes_DeviceTypes_MAX; static constexpr int DeviceTypes_ARRAYSIZE = NewSessionRequest_DeviceTypes_DeviceTypes_ARRAYSIZE; static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeviceTypes_descriptor() { return NewSessionRequest_DeviceTypes_descriptor(); } template static inline const std::string& DeviceTypes_Name(T enum_t_value) { static_assert(::std::is_same::value || ::std::is_integral::value, "Incorrect type passed to function DeviceTypes_Name."); return NewSessionRequest_DeviceTypes_Name(enum_t_value); } static inline bool DeviceTypes_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceTypes* value) { return NewSessionRequest_DeviceTypes_Parse(name, value); } // accessors ------------------------------------------------------- enum : int { kDeviceIDFieldNumber = 1, kPublicKeyFieldNumber = 2, kSignatureFieldNumber = 3, kNotifyTokenFieldNumber = 4, kDeviceAppVersionFieldNumber = 6, kDeviceOSFieldNumber = 7, kDeviceTypeFieldNumber = 5, }; // string deviceID = 1; void clear_deviceid(); const std::string& deviceid() const; void set_deviceid(const std::string& value); void set_deviceid(std::string&& value); void set_deviceid(const char* value); void set_deviceid(const char* value, size_t size); std::string* mutable_deviceid(); std::string* release_deviceid(); void set_allocated_deviceid(std::string* deviceid); private: const std::string& _internal_deviceid() const; void _internal_set_deviceid(const std::string& value); std::string* _internal_mutable_deviceid(); public: // string publicKey = 2; void clear_publickey(); const std::string& publickey() const; void set_publickey(const std::string& value); void set_publickey(std::string&& value); void set_publickey(const char* value); void set_publickey(const char* value, size_t size); std::string* mutable_publickey(); std::string* release_publickey(); void set_allocated_publickey(std::string* publickey); private: const std::string& _internal_publickey() const; void _internal_set_publickey(const std::string& value); std::string* _internal_mutable_publickey(); public: // string signature = 3; void clear_signature(); const std::string& signature() const; void set_signature(const std::string& value); void set_signature(std::string&& value); void set_signature(const char* value); void set_signature(const char* value, size_t size); std::string* mutable_signature(); std::string* release_signature(); void set_allocated_signature(std::string* signature); private: const std::string& _internal_signature() const; void _internal_set_signature(const std::string& value); std::string* _internal_mutable_signature(); public: // string notifyToken = 4; bool has_notifytoken() const; private: bool _internal_has_notifytoken() const; public: void clear_notifytoken(); const std::string& notifytoken() const; void set_notifytoken(const std::string& value); void set_notifytoken(std::string&& value); void set_notifytoken(const char* value); void set_notifytoken(const char* value, size_t size); std::string* mutable_notifytoken(); std::string* release_notifytoken(); void set_allocated_notifytoken(std::string* notifytoken); private: const std::string& _internal_notifytoken() const; void _internal_set_notifytoken(const std::string& value); std::string* _internal_mutable_notifytoken(); public: // string deviceAppVersion = 6; void clear_deviceappversion(); const std::string& deviceappversion() const; void set_deviceappversion(const std::string& value); void set_deviceappversion(std::string&& value); void set_deviceappversion(const char* value); void set_deviceappversion(const char* value, size_t size); std::string* mutable_deviceappversion(); std::string* release_deviceappversion(); void set_allocated_deviceappversion(std::string* deviceappversion); private: const std::string& _internal_deviceappversion() const; void _internal_set_deviceappversion(const std::string& value); std::string* _internal_mutable_deviceappversion(); public: // string deviceOS = 7; void clear_deviceos(); const std::string& deviceos() const; void set_deviceos(const std::string& value); void set_deviceos(std::string&& value); void set_deviceos(const char* value); void set_deviceos(const char* value, size_t size); std::string* mutable_deviceos(); std::string* release_deviceos(); void set_allocated_deviceos(std::string* deviceos); private: const std::string& _internal_deviceos() const; void _internal_set_deviceos(const std::string& value); std::string* _internal_mutable_deviceos(); public: // .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; void clear_devicetype(); ::tunnelbroker::NewSessionRequest_DeviceTypes devicetype() const; void set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value); private: ::tunnelbroker::NewSessionRequest_DeviceTypes _internal_devicetype() const; void _internal_set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value); public: // @@protoc_insertion_point(class_scope:tunnelbroker.NewSessionRequest) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr publickey_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr notifytoken_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceappversion_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceos_; int devicetype_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- class NewSessionResponse PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.NewSessionResponse) */ { public: inline NewSessionResponse() : NewSessionResponse(nullptr) {} virtual ~NewSessionResponse(); explicit constexpr NewSessionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); NewSessionResponse(const NewSessionResponse& from); NewSessionResponse(NewSessionResponse&& from) noexcept : NewSessionResponse() { *this = ::std::move(from); } inline NewSessionResponse& operator=(const NewSessionResponse& from) { CopyFrom(from); return *this; } inline NewSessionResponse& operator=(NewSessionResponse&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } static const NewSessionResponse& default_instance() { return *internal_default_instance(); } static inline const NewSessionResponse* internal_default_instance() { return reinterpret_cast( &_NewSessionResponse_default_instance_); } static constexpr int kIndexInFileMessages = 3; friend void swap(NewSessionResponse& a, NewSessionResponse& b) { a.Swap(&b); } inline void Swap(NewSessionResponse* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(NewSessionResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline NewSessionResponse* New() const final { return CreateMaybeMessage(nullptr); } NewSessionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const NewSessionResponse& from); void MergeFrom(const NewSessionResponse& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(NewSessionResponse* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "tunnelbroker.NewSessionResponse"; } protected: explicit NewSessionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kSessionIDFieldNumber = 1, }; // string sessionID = 1; void clear_sessionid(); const std::string& sessionid() const; void set_sessionid(const std::string& value); void set_sessionid(std::string&& value); void set_sessionid(const char* value); void set_sessionid(const char* value, size_t size); std::string* mutable_sessionid(); std::string* release_sessionid(); void set_allocated_sessionid(std::string* sessionid); private: const std::string& _internal_sessionid() const; void _internal_set_sessionid(const std::string& value); std::string* _internal_mutable_sessionid(); public: // @@protoc_insertion_point(class_scope:tunnelbroker.NewSessionResponse) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sessionid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- -class SendRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.SendRequest) */ { +class ProcessedMessages PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.ProcessedMessages) */ { public: - inline SendRequest() : SendRequest(nullptr) {} - virtual ~SendRequest(); - explicit constexpr SendRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline ProcessedMessages() : ProcessedMessages(nullptr) {} + virtual ~ProcessedMessages(); + explicit constexpr ProcessedMessages(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - SendRequest(const SendRequest& from); - SendRequest(SendRequest&& from) noexcept - : SendRequest() { + ProcessedMessages(const ProcessedMessages& from); + ProcessedMessages(ProcessedMessages&& from) noexcept + : ProcessedMessages() { *this = ::std::move(from); } - inline SendRequest& operator=(const SendRequest& from) { + inline ProcessedMessages& operator=(const ProcessedMessages& from) { CopyFrom(from); return *this; } - inline SendRequest& operator=(SendRequest&& from) noexcept { + inline ProcessedMessages& operator=(ProcessedMessages&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const SendRequest& default_instance() { + static const ProcessedMessages& default_instance() { return *internal_default_instance(); } - static inline const SendRequest* internal_default_instance() { - return reinterpret_cast( - &_SendRequest_default_instance_); + static inline const ProcessedMessages* internal_default_instance() { + return reinterpret_cast( + &_ProcessedMessages_default_instance_); } static constexpr int kIndexInFileMessages = 4; - friend void swap(SendRequest& a, SendRequest& b) { + friend void swap(ProcessedMessages& a, ProcessedMessages& b) { + a.Swap(&b); + } + inline void Swap(ProcessedMessages* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ProcessedMessages* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ProcessedMessages* New() const final { + return CreateMaybeMessage(nullptr); + } + + ProcessedMessages* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ProcessedMessages& from); + void MergeFrom(const ProcessedMessages& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ProcessedMessages* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tunnelbroker.ProcessedMessages"; + } + protected: + explicit ProcessedMessages(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMessageIDFieldNumber = 1, + }; + // repeated string messageID = 1; + int messageid_size() const; + private: + int _internal_messageid_size() const; + public: + void clear_messageid(); + const std::string& messageid(int index) const; + std::string* mutable_messageid(int index); + void set_messageid(int index, const std::string& value); + void set_messageid(int index, std::string&& value); + void set_messageid(int index, const char* value); + void set_messageid(int index, const char* value, size_t size); + std::string* add_messageid(); + void add_messageid(const std::string& value); + void add_messageid(std::string&& value); + void add_messageid(const char* value); + void add_messageid(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& messageid() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_messageid(); + private: + const std::string& _internal_messageid(int index) const; + std::string* _internal_add_messageid(); + public: + + // @@protoc_insertion_point(class_scope:tunnelbroker.ProcessedMessages) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField messageid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_tunnelbroker_2eproto; +}; +// ------------------------------------------------------------------- + +class MessageToTunnelbrokerStruct PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToTunnelbrokerStruct) */ { + public: + inline MessageToTunnelbrokerStruct() : MessageToTunnelbrokerStruct(nullptr) {} + virtual ~MessageToTunnelbrokerStruct(); + explicit constexpr MessageToTunnelbrokerStruct(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MessageToTunnelbrokerStruct(const MessageToTunnelbrokerStruct& from); + MessageToTunnelbrokerStruct(MessageToTunnelbrokerStruct&& from) noexcept + : MessageToTunnelbrokerStruct() { + *this = ::std::move(from); + } + + inline MessageToTunnelbrokerStruct& operator=(const MessageToTunnelbrokerStruct& from) { + CopyFrom(from); + return *this; + } + inline MessageToTunnelbrokerStruct& operator=(MessageToTunnelbrokerStruct&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const MessageToTunnelbrokerStruct& default_instance() { + return *internal_default_instance(); + } + static inline const MessageToTunnelbrokerStruct* internal_default_instance() { + return reinterpret_cast( + &_MessageToTunnelbrokerStruct_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(MessageToTunnelbrokerStruct& a, MessageToTunnelbrokerStruct& b) { a.Swap(&b); } - inline void Swap(SendRequest* other) { + inline void Swap(MessageToTunnelbrokerStruct* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(SendRequest* other) { + void UnsafeArenaSwap(MessageToTunnelbrokerStruct* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline SendRequest* New() const final { - return CreateMaybeMessage(nullptr); + inline MessageToTunnelbrokerStruct* New() const final { + return CreateMaybeMessage(nullptr); } - SendRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MessageToTunnelbrokerStruct* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SendRequest& from); - void MergeFrom(const SendRequest& from); + void CopyFrom(const MessageToTunnelbrokerStruct& from); + void MergeFrom(const MessageToTunnelbrokerStruct& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(SendRequest* other); + void InternalSwap(MessageToTunnelbrokerStruct* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.SendRequest"; + return "tunnelbroker.MessageToTunnelbrokerStruct"; } protected: - explicit SendRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessageToTunnelbrokerStruct(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kBlobHashesFieldNumber = 4, - kSessionIDFieldNumber = 1, + kMessageIDFieldNumber = 1, kToDeviceIDFieldNumber = 2, kPayloadFieldNumber = 3, }; // repeated string blobHashes = 4; int blobhashes_size() const; private: int _internal_blobhashes_size() const; public: void clear_blobhashes(); const std::string& blobhashes(int index) const; std::string* mutable_blobhashes(int index); void set_blobhashes(int index, const std::string& value); void set_blobhashes(int index, std::string&& value); void set_blobhashes(int index, const char* value); void set_blobhashes(int index, const char* value, size_t size); std::string* add_blobhashes(); void add_blobhashes(const std::string& value); void add_blobhashes(std::string&& value); void add_blobhashes(const char* value); void add_blobhashes(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); private: const std::string& _internal_blobhashes(int index) const; std::string* _internal_add_blobhashes(); public: - // string sessionID = 1; - void clear_sessionid(); - const std::string& sessionid() const; - void set_sessionid(const std::string& value); - void set_sessionid(std::string&& value); - void set_sessionid(const char* value); - void set_sessionid(const char* value, size_t size); - std::string* mutable_sessionid(); - std::string* release_sessionid(); - void set_allocated_sessionid(std::string* sessionid); + // string messageID = 1; + void clear_messageid(); + const std::string& messageid() const; + void set_messageid(const std::string& value); + void set_messageid(std::string&& value); + void set_messageid(const char* value); + void set_messageid(const char* value, size_t size); + std::string* mutable_messageid(); + std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); private: - const std::string& _internal_sessionid() const; - void _internal_set_sessionid(const std::string& value); - std::string* _internal_mutable_sessionid(); + const std::string& _internal_messageid() const; + void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); public: // string toDeviceID = 2; void clear_todeviceid(); const std::string& todeviceid() const; void set_todeviceid(const std::string& value); void set_todeviceid(std::string&& value); void set_todeviceid(const char* value); void set_todeviceid(const char* value, size_t size); std::string* mutable_todeviceid(); std::string* release_todeviceid(); void set_allocated_todeviceid(std::string* todeviceid); private: const std::string& _internal_todeviceid() const; void _internal_set_todeviceid(const std::string& value); std::string* _internal_mutable_todeviceid(); public: - // bytes payload = 3; + // string payload = 3; void clear_payload(); const std::string& payload() const; void set_payload(const std::string& value); void set_payload(std::string&& value); void set_payload(const char* value); - void set_payload(const void* value, size_t size); + void set_payload(const char* value, size_t size); std::string* mutable_payload(); std::string* release_payload(); void set_allocated_payload(std::string* payload); private: const std::string& _internal_payload() const; void _internal_set_payload(const std::string& value); std::string* _internal_mutable_payload(); public: - // @@protoc_insertion_point(class_scope:tunnelbroker.SendRequest) + // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToTunnelbrokerStruct) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sessionid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr todeviceid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- -class GetRequest PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetRequest) */ { +class MessagesToSend PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessagesToSend) */ { public: - inline GetRequest() : GetRequest(nullptr) {} - virtual ~GetRequest(); - explicit constexpr GetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline MessagesToSend() : MessagesToSend(nullptr) {} + virtual ~MessagesToSend(); + explicit constexpr MessagesToSend(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - GetRequest(const GetRequest& from); - GetRequest(GetRequest&& from) noexcept - : GetRequest() { + MessagesToSend(const MessagesToSend& from); + MessagesToSend(MessagesToSend&& from) noexcept + : MessagesToSend() { *this = ::std::move(from); } - inline GetRequest& operator=(const GetRequest& from) { + inline MessagesToSend& operator=(const MessagesToSend& from) { CopyFrom(from); return *this; } - inline GetRequest& operator=(GetRequest&& from) noexcept { + inline MessagesToSend& operator=(MessagesToSend&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const GetRequest& default_instance() { + static const MessagesToSend& default_instance() { return *internal_default_instance(); } - static inline const GetRequest* internal_default_instance() { - return reinterpret_cast( - &_GetRequest_default_instance_); + static inline const MessagesToSend* internal_default_instance() { + return reinterpret_cast( + &_MessagesToSend_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; - friend void swap(GetRequest& a, GetRequest& b) { + friend void swap(MessagesToSend& a, MessagesToSend& b) { a.Swap(&b); } - inline void Swap(GetRequest* other) { + inline void Swap(MessagesToSend* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetRequest* other) { + void UnsafeArenaSwap(MessagesToSend* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline GetRequest* New() const final { - return CreateMaybeMessage(nullptr); + inline MessagesToSend* New() const final { + return CreateMaybeMessage(nullptr); } - GetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MessagesToSend* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetRequest& from); - void MergeFrom(const GetRequest& from); + void CopyFrom(const MessagesToSend& from); + void MergeFrom(const MessagesToSend& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetRequest* other); + void InternalSwap(MessagesToSend* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.GetRequest"; + return "tunnelbroker.MessagesToSend"; } protected: - explicit GetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessagesToSend(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kSessionIDFieldNumber = 1, - kNewNotifyTokenFieldNumber = 2, + kMessagesFieldNumber = 1, }; - // string sessionID = 1; - void clear_sessionid(); - const std::string& sessionid() const; - void set_sessionid(const std::string& value); - void set_sessionid(std::string&& value); - void set_sessionid(const char* value); - void set_sessionid(const char* value, size_t size); - std::string* mutable_sessionid(); - std::string* release_sessionid(); - void set_allocated_sessionid(std::string* sessionid); + // repeated .tunnelbroker.MessageToTunnelbrokerStruct messages = 1; + int messages_size() const; private: - const std::string& _internal_sessionid() const; - void _internal_set_sessionid(const std::string& value); - std::string* _internal_mutable_sessionid(); - public: - - // string newNotifyToken = 2; - bool has_newnotifytoken() const; - private: - bool _internal_has_newnotifytoken() const; + int _internal_messages_size() const; public: - void clear_newnotifytoken(); - const std::string& newnotifytoken() const; - void set_newnotifytoken(const std::string& value); - void set_newnotifytoken(std::string&& value); - void set_newnotifytoken(const char* value); - void set_newnotifytoken(const char* value, size_t size); - std::string* mutable_newnotifytoken(); - std::string* release_newnotifytoken(); - void set_allocated_newnotifytoken(std::string* newnotifytoken); + void clear_messages(); + ::tunnelbroker::MessageToTunnelbrokerStruct* mutable_messages(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct >* + mutable_messages(); private: - const std::string& _internal_newnotifytoken() const; - void _internal_set_newnotifytoken(const std::string& value); - std::string* _internal_mutable_newnotifytoken(); + const ::tunnelbroker::MessageToTunnelbrokerStruct& _internal_messages(int index) const; + ::tunnelbroker::MessageToTunnelbrokerStruct* _internal_add_messages(); public: + const ::tunnelbroker::MessageToTunnelbrokerStruct& messages(int index) const; + ::tunnelbroker::MessageToTunnelbrokerStruct* add_messages(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct >& + messages() const; - // @@protoc_insertion_point(class_scope:tunnelbroker.GetRequest) + // @@protoc_insertion_point(class_scope:tunnelbroker.MessagesToSend) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct > messages_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sessionid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr newnotifytoken_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- -class GetResponseMessage PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetResponseMessage) */ { +class MessageToTunnelbroker PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToTunnelbroker) */ { public: - inline GetResponseMessage() : GetResponseMessage(nullptr) {} - virtual ~GetResponseMessage(); - explicit constexpr GetResponseMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline MessageToTunnelbroker() : MessageToTunnelbroker(nullptr) {} + virtual ~MessageToTunnelbroker(); + explicit constexpr MessageToTunnelbroker(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - GetResponseMessage(const GetResponseMessage& from); - GetResponseMessage(GetResponseMessage&& from) noexcept - : GetResponseMessage() { + MessageToTunnelbroker(const MessageToTunnelbroker& from); + MessageToTunnelbroker(MessageToTunnelbroker&& from) noexcept + : MessageToTunnelbroker() { *this = ::std::move(from); } - inline GetResponseMessage& operator=(const GetResponseMessage& from) { + inline MessageToTunnelbroker& operator=(const MessageToTunnelbroker& from) { CopyFrom(from); return *this; } - inline GetResponseMessage& operator=(GetResponseMessage&& from) noexcept { + inline MessageToTunnelbroker& operator=(MessageToTunnelbroker&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const GetResponseMessage& default_instance() { + static const MessageToTunnelbroker& default_instance() { return *internal_default_instance(); } - static inline const GetResponseMessage* internal_default_instance() { - return reinterpret_cast( - &_GetResponseMessage_default_instance_); + enum DataCase { + kMessagesToSend = 1, + kProcessedMessages = 2, + kNewNotifyToken = 3, + DATA_NOT_SET = 0, + }; + + static inline const MessageToTunnelbroker* internal_default_instance() { + return reinterpret_cast( + &_MessageToTunnelbroker_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; - friend void swap(GetResponseMessage& a, GetResponseMessage& b) { + friend void swap(MessageToTunnelbroker& a, MessageToTunnelbroker& b) { a.Swap(&b); } - inline void Swap(GetResponseMessage* other) { + inline void Swap(MessageToTunnelbroker* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetResponseMessage* other) { + void UnsafeArenaSwap(MessageToTunnelbroker* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline GetResponseMessage* New() const final { - return CreateMaybeMessage(nullptr); + inline MessageToTunnelbroker* New() const final { + return CreateMaybeMessage(nullptr); } - GetResponseMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MessageToTunnelbroker* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetResponseMessage& from); - void MergeFrom(const GetResponseMessage& from); + void CopyFrom(const MessageToTunnelbroker& from); + void MergeFrom(const MessageToTunnelbroker& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetResponseMessage* other); + void InternalSwap(MessageToTunnelbroker* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.GetResponseMessage"; + return "tunnelbroker.MessageToTunnelbroker"; } protected: - explicit GetResponseMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessageToTunnelbroker(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kBlobHashesFieldNumber = 3, - kFromDeviceIDFieldNumber = 1, - kPayloadFieldNumber = 2, + kMessagesToSendFieldNumber = 1, + kProcessedMessagesFieldNumber = 2, + kNewNotifyTokenFieldNumber = 3, }; - // repeated string blobHashes = 3; - int blobhashes_size() const; + // .tunnelbroker.MessagesToSend messagesToSend = 1; + bool has_messagestosend() const; private: - int _internal_blobhashes_size() const; + bool _internal_has_messagestosend() const; public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); + void clear_messagestosend(); + const ::tunnelbroker::MessagesToSend& messagestosend() const; + ::tunnelbroker::MessagesToSend* release_messagestosend(); + ::tunnelbroker::MessagesToSend* mutable_messagestosend(); + void set_allocated_messagestosend(::tunnelbroker::MessagesToSend* messagestosend); private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); + const ::tunnelbroker::MessagesToSend& _internal_messagestosend() const; + ::tunnelbroker::MessagesToSend* _internal_mutable_messagestosend(); public: + void unsafe_arena_set_allocated_messagestosend( + ::tunnelbroker::MessagesToSend* messagestosend); + ::tunnelbroker::MessagesToSend* unsafe_arena_release_messagestosend(); - // string fromDeviceID = 1; - void clear_fromdeviceid(); - const std::string& fromdeviceid() const; - void set_fromdeviceid(const std::string& value); - void set_fromdeviceid(std::string&& value); - void set_fromdeviceid(const char* value); - void set_fromdeviceid(const char* value, size_t size); - std::string* mutable_fromdeviceid(); - std::string* release_fromdeviceid(); - void set_allocated_fromdeviceid(std::string* fromdeviceid); + // .tunnelbroker.ProcessedMessages processedMessages = 2; + bool has_processedmessages() const; private: - const std::string& _internal_fromdeviceid() const; - void _internal_set_fromdeviceid(const std::string& value); - std::string* _internal_mutable_fromdeviceid(); + bool _internal_has_processedmessages() const; + public: + void clear_processedmessages(); + const ::tunnelbroker::ProcessedMessages& processedmessages() const; + ::tunnelbroker::ProcessedMessages* release_processedmessages(); + ::tunnelbroker::ProcessedMessages* mutable_processedmessages(); + void set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages); + private: + const ::tunnelbroker::ProcessedMessages& _internal_processedmessages() const; + ::tunnelbroker::ProcessedMessages* _internal_mutable_processedmessages(); public: + void unsafe_arena_set_allocated_processedmessages( + ::tunnelbroker::ProcessedMessages* processedmessages); + ::tunnelbroker::ProcessedMessages* unsafe_arena_release_processedmessages(); - // bytes payload = 2; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const void* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); + // string newNotifyToken = 3; + bool has_newnotifytoken() const; private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); + bool _internal_has_newnotifytoken() const; + public: + void clear_newnotifytoken(); + const std::string& newnotifytoken() const; + void set_newnotifytoken(const std::string& value); + void set_newnotifytoken(std::string&& value); + void set_newnotifytoken(const char* value); + void set_newnotifytoken(const char* value, size_t size); + std::string* mutable_newnotifytoken(); + std::string* release_newnotifytoken(); + void set_allocated_newnotifytoken(std::string* newnotifytoken); + private: + const std::string& _internal_newnotifytoken() const; + void _internal_set_newnotifytoken(const std::string& value); + std::string* _internal_mutable_newnotifytoken(); public: - // @@protoc_insertion_point(class_scope:tunnelbroker.GetResponseMessage) + void clear_data(); + DataCase data_case() const; + // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToTunnelbroker) private: class _Internal; + void set_has_messagestosend(); + void set_has_processedmessages(); + void set_has_newnotifytoken(); + + inline bool has_data() const; + inline void clear_has_data(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fromdeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; + union DataUnion { + constexpr DataUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tunnelbroker::MessagesToSend* messagestosend_; + ::tunnelbroker::ProcessedMessages* processedmessages_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr newnotifytoken_; + } data_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; + friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- -class GetResponse PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.GetResponse) */ { +class MessageToClientStruct PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToClientStruct) */ { public: - inline GetResponse() : GetResponse(nullptr) {} - virtual ~GetResponse(); - explicit constexpr GetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline MessageToClientStruct() : MessageToClientStruct(nullptr) {} + virtual ~MessageToClientStruct(); + explicit constexpr MessageToClientStruct(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - GetResponse(const GetResponse& from); - GetResponse(GetResponse&& from) noexcept - : GetResponse() { + MessageToClientStruct(const MessageToClientStruct& from); + MessageToClientStruct(MessageToClientStruct&& from) noexcept + : MessageToClientStruct() { *this = ::std::move(from); } - inline GetResponse& operator=(const GetResponse& from) { + inline MessageToClientStruct& operator=(const MessageToClientStruct& from) { CopyFrom(from); return *this; } - inline GetResponse& operator=(GetResponse&& from) noexcept { + inline MessageToClientStruct& operator=(MessageToClientStruct&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const GetResponse& default_instance() { + static const MessageToClientStruct& default_instance() { return *internal_default_instance(); } - enum DataCase { - kResponseMessage = 1, - kPing = 2, - kNewNotifyTokenRequired = 3, - DATA_NOT_SET = 0, - }; - - static inline const GetResponse* internal_default_instance() { - return reinterpret_cast( - &_GetResponse_default_instance_); + static inline const MessageToClientStruct* internal_default_instance() { + return reinterpret_cast( + &_MessageToClientStruct_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 8; - friend void swap(GetResponse& a, GetResponse& b) { + friend void swap(MessageToClientStruct& a, MessageToClientStruct& b) { a.Swap(&b); } - inline void Swap(GetResponse* other) { + inline void Swap(MessageToClientStruct* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetResponse* other) { + void UnsafeArenaSwap(MessageToClientStruct* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline GetResponse* New() const final { - return CreateMaybeMessage(nullptr); + inline MessageToClientStruct* New() const final { + return CreateMaybeMessage(nullptr); } - GetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MessageToClientStruct* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GetResponse& from); - void MergeFrom(const GetResponse& from); + void CopyFrom(const MessageToClientStruct& from); + void MergeFrom(const MessageToClientStruct& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetResponse* other); + void InternalSwap(MessageToClientStruct* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.GetResponse"; + return "tunnelbroker.MessageToClientStruct"; } protected: - explicit GetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessageToClientStruct(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kResponseMessageFieldNumber = 1, - kPingFieldNumber = 2, - kNewNotifyTokenRequiredFieldNumber = 3, + kBlobHashesFieldNumber = 4, + kMessageIDFieldNumber = 1, + kFromDeviceIDFieldNumber = 2, + kPayloadFieldNumber = 3, }; - // .tunnelbroker.GetResponseMessage responseMessage = 1; - bool has_responsemessage() const; + // repeated string blobHashes = 4; + int blobhashes_size() const; private: - bool _internal_has_responsemessage() const; + int _internal_blobhashes_size() const; public: - void clear_responsemessage(); - const ::tunnelbroker::GetResponseMessage& responsemessage() const; - ::tunnelbroker::GetResponseMessage* release_responsemessage(); - ::tunnelbroker::GetResponseMessage* mutable_responsemessage(); - void set_allocated_responsemessage(::tunnelbroker::GetResponseMessage* responsemessage); + void clear_blobhashes(); + const std::string& blobhashes(int index) const; + std::string* mutable_blobhashes(int index); + void set_blobhashes(int index, const std::string& value); + void set_blobhashes(int index, std::string&& value); + void set_blobhashes(int index, const char* value); + void set_blobhashes(int index, const char* value, size_t size); + std::string* add_blobhashes(); + void add_blobhashes(const std::string& value); + void add_blobhashes(std::string&& value); + void add_blobhashes(const char* value); + void add_blobhashes(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); private: - const ::tunnelbroker::GetResponseMessage& _internal_responsemessage() const; - ::tunnelbroker::GetResponseMessage* _internal_mutable_responsemessage(); + const std::string& _internal_blobhashes(int index) const; + std::string* _internal_add_blobhashes(); public: - void unsafe_arena_set_allocated_responsemessage( - ::tunnelbroker::GetResponseMessage* responsemessage); - ::tunnelbroker::GetResponseMessage* unsafe_arena_release_responsemessage(); - // .google.protobuf.Empty ping = 2; - bool has_ping() const; + // string messageID = 1; + void clear_messageid(); + const std::string& messageid() const; + void set_messageid(const std::string& value); + void set_messageid(std::string&& value); + void set_messageid(const char* value); + void set_messageid(const char* value, size_t size); + std::string* mutable_messageid(); + std::string* release_messageid(); + void set_allocated_messageid(std::string* messageid); private: - bool _internal_has_ping() const; + const std::string& _internal_messageid() const; + void _internal_set_messageid(const std::string& value); + std::string* _internal_mutable_messageid(); public: - void clear_ping(); - const PROTOBUF_NAMESPACE_ID::Empty& ping() const; - PROTOBUF_NAMESPACE_ID::Empty* release_ping(); - PROTOBUF_NAMESPACE_ID::Empty* mutable_ping(); - void set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping); - private: - const PROTOBUF_NAMESPACE_ID::Empty& _internal_ping() const; - PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_ping(); - public: - void unsafe_arena_set_allocated_ping( - PROTOBUF_NAMESPACE_ID::Empty* ping); - PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_ping(); - // .google.protobuf.Empty newNotifyTokenRequired = 3; - bool has_newnotifytokenrequired() const; + // string fromDeviceID = 2; + void clear_fromdeviceid(); + const std::string& fromdeviceid() const; + void set_fromdeviceid(const std::string& value); + void set_fromdeviceid(std::string&& value); + void set_fromdeviceid(const char* value); + void set_fromdeviceid(const char* value, size_t size); + std::string* mutable_fromdeviceid(); + std::string* release_fromdeviceid(); + void set_allocated_fromdeviceid(std::string* fromdeviceid); private: - bool _internal_has_newnotifytokenrequired() const; + const std::string& _internal_fromdeviceid() const; + void _internal_set_fromdeviceid(const std::string& value); + std::string* _internal_mutable_fromdeviceid(); public: - void clear_newnotifytokenrequired(); - const PROTOBUF_NAMESPACE_ID::Empty& newnotifytokenrequired() const; - PROTOBUF_NAMESPACE_ID::Empty* release_newnotifytokenrequired(); - PROTOBUF_NAMESPACE_ID::Empty* mutable_newnotifytokenrequired(); - void set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired); + + // string payload = 3; + void clear_payload(); + const std::string& payload() const; + void set_payload(const std::string& value); + void set_payload(std::string&& value); + void set_payload(const char* value); + void set_payload(const char* value, size_t size); + std::string* mutable_payload(); + std::string* release_payload(); + void set_allocated_payload(std::string* payload); private: - const PROTOBUF_NAMESPACE_ID::Empty& _internal_newnotifytokenrequired() const; - PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_newnotifytokenrequired(); + const std::string& _internal_payload() const; + void _internal_set_payload(const std::string& value); + std::string* _internal_mutable_payload(); public: - void unsafe_arena_set_allocated_newnotifytokenrequired( - PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired); - PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_newnotifytokenrequired(); - void clear_data(); - DataCase data_case() const; - // @@protoc_insertion_point(class_scope:tunnelbroker.GetResponse) + // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToClientStruct) private: class _Internal; - void set_has_responsemessage(); - void set_has_ping(); - void set_has_newnotifytokenrequired(); - - inline bool has_data() const; - inline void clear_has_data(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - union DataUnion { - constexpr DataUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::tunnelbroker::GetResponseMessage* responsemessage_; - PROTOBUF_NAMESPACE_ID::Empty* ping_; - PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired_; - } data_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fromdeviceid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; - friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- -class ProcessedMessages PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.ProcessedMessages) */ { +class MessagesToDeliver PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessagesToDeliver) */ { public: - inline ProcessedMessages() : ProcessedMessages(nullptr) {} - virtual ~ProcessedMessages(); - explicit constexpr ProcessedMessages(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline MessagesToDeliver() : MessagesToDeliver(nullptr) {} + virtual ~MessagesToDeliver(); + explicit constexpr MessagesToDeliver(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - ProcessedMessages(const ProcessedMessages& from); - ProcessedMessages(ProcessedMessages&& from) noexcept - : ProcessedMessages() { + MessagesToDeliver(const MessagesToDeliver& from); + MessagesToDeliver(MessagesToDeliver&& from) noexcept + : MessagesToDeliver() { *this = ::std::move(from); } - inline ProcessedMessages& operator=(const ProcessedMessages& from) { + inline MessagesToDeliver& operator=(const MessagesToDeliver& from) { CopyFrom(from); return *this; } - inline ProcessedMessages& operator=(ProcessedMessages&& from) noexcept { + inline MessagesToDeliver& operator=(MessagesToDeliver&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const ProcessedMessages& default_instance() { + static const MessagesToDeliver& default_instance() { return *internal_default_instance(); } - static inline const ProcessedMessages* internal_default_instance() { - return reinterpret_cast( - &_ProcessedMessages_default_instance_); + static inline const MessagesToDeliver* internal_default_instance() { + return reinterpret_cast( + &_MessagesToDeliver_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; - friend void swap(ProcessedMessages& a, ProcessedMessages& b) { + friend void swap(MessagesToDeliver& a, MessagesToDeliver& b) { a.Swap(&b); } - inline void Swap(ProcessedMessages* other) { + inline void Swap(MessagesToDeliver* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ProcessedMessages* other) { + void UnsafeArenaSwap(MessagesToDeliver* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline ProcessedMessages* New() const final { - return CreateMaybeMessage(nullptr); + inline MessagesToDeliver* New() const final { + return CreateMaybeMessage(nullptr); } - ProcessedMessages* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MessagesToDeliver* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const ProcessedMessages& from); - void MergeFrom(const ProcessedMessages& from); + void CopyFrom(const MessagesToDeliver& from); + void MergeFrom(const MessagesToDeliver& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ProcessedMessages* other); + void InternalSwap(MessagesToDeliver* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.ProcessedMessages"; + return "tunnelbroker.MessagesToDeliver"; } protected: - explicit ProcessedMessages(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessagesToDeliver(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kMessageIDFieldNumber = 1, + kMessagesFieldNumber = 1, }; - // repeated string messageID = 1; - int messageid_size() const; + // repeated .tunnelbroker.MessageToClientStruct messages = 1; + int messages_size() const; private: - int _internal_messageid_size() const; + int _internal_messages_size() const; public: - void clear_messageid(); - const std::string& messageid(int index) const; - std::string* mutable_messageid(int index); - void set_messageid(int index, const std::string& value); - void set_messageid(int index, std::string&& value); - void set_messageid(int index, const char* value); - void set_messageid(int index, const char* value, size_t size); - std::string* add_messageid(); - void add_messageid(const std::string& value); - void add_messageid(std::string&& value); - void add_messageid(const char* value); - void add_messageid(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& messageid() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_messageid(); + void clear_messages(); + ::tunnelbroker::MessageToClientStruct* mutable_messages(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct >* + mutable_messages(); private: - const std::string& _internal_messageid(int index) const; - std::string* _internal_add_messageid(); + const ::tunnelbroker::MessageToClientStruct& _internal_messages(int index) const; + ::tunnelbroker::MessageToClientStruct* _internal_add_messages(); public: + const ::tunnelbroker::MessageToClientStruct& messages(int index) const; + ::tunnelbroker::MessageToClientStruct* add_messages(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct >& + messages() const; - // @@protoc_insertion_point(class_scope:tunnelbroker.ProcessedMessages) + // @@protoc_insertion_point(class_scope:tunnelbroker.MessagesToDeliver) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField messageid_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct > messages_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_tunnelbroker_2eproto; }; // ------------------------------------------------------------------- -class MessageToTunnelbrokerStruct PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToTunnelbrokerStruct) */ { +class MessageToClient PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToClient) */ { public: - inline MessageToTunnelbrokerStruct() : MessageToTunnelbrokerStruct(nullptr) {} - virtual ~MessageToTunnelbrokerStruct(); - explicit constexpr MessageToTunnelbrokerStruct(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline MessageToClient() : MessageToClient(nullptr) {} + virtual ~MessageToClient(); + explicit constexpr MessageToClient(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - MessageToTunnelbrokerStruct(const MessageToTunnelbrokerStruct& from); - MessageToTunnelbrokerStruct(MessageToTunnelbrokerStruct&& from) noexcept - : MessageToTunnelbrokerStruct() { + MessageToClient(const MessageToClient& from); + MessageToClient(MessageToClient&& from) noexcept + : MessageToClient() { *this = ::std::move(from); } - inline MessageToTunnelbrokerStruct& operator=(const MessageToTunnelbrokerStruct& from) { + inline MessageToClient& operator=(const MessageToClient& from) { CopyFrom(from); return *this; } - inline MessageToTunnelbrokerStruct& operator=(MessageToTunnelbrokerStruct&& from) noexcept { + inline MessageToClient& operator=(MessageToClient&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return GetMetadataStatic().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const MessageToTunnelbrokerStruct& default_instance() { + static const MessageToClient& default_instance() { return *internal_default_instance(); } - static inline const MessageToTunnelbrokerStruct* internal_default_instance() { - return reinterpret_cast( - &_MessageToTunnelbrokerStruct_default_instance_); + enum DataCase { + kMessagesToDeliver = 1, + kProcessedMessages = 2, + kNewNotifyTokenRequired = 3, + kPing = 4, + DATA_NOT_SET = 0, + }; + + static inline const MessageToClient* internal_default_instance() { + return reinterpret_cast( + &_MessageToClient_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 10; - friend void swap(MessageToTunnelbrokerStruct& a, MessageToTunnelbrokerStruct& b) { + friend void swap(MessageToClient& a, MessageToClient& b) { a.Swap(&b); } - inline void Swap(MessageToTunnelbrokerStruct* other) { + inline void Swap(MessageToClient* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(MessageToTunnelbrokerStruct* other) { + void UnsafeArenaSwap(MessageToClient* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline MessageToTunnelbrokerStruct* New() const final { - return CreateMaybeMessage(nullptr); + inline MessageToClient* New() const final { + return CreateMaybeMessage(nullptr); } - MessageToTunnelbrokerStruct* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MessageToClient* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MessageToTunnelbrokerStruct& from); - void MergeFrom(const MessageToTunnelbrokerStruct& from); + void CopyFrom(const MessageToClient& from); + void MergeFrom(const MessageToClient& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(MessageToTunnelbrokerStruct* other); + void InternalSwap(MessageToClient* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.MessageToTunnelbrokerStruct"; + return "tunnelbroker.MessageToClient"; } protected: - explicit MessageToTunnelbrokerStruct(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MessageToClient(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); } public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kBlobHashesFieldNumber = 4, - kMessageIDFieldNumber = 1, - kToDeviceIDFieldNumber = 2, - kPayloadFieldNumber = 3, + kMessagesToDeliverFieldNumber = 1, + kProcessedMessagesFieldNumber = 2, + kNewNotifyTokenRequiredFieldNumber = 3, + kPingFieldNumber = 4, }; - // repeated string blobHashes = 4; - int blobhashes_size() const; + // .tunnelbroker.MessagesToDeliver messagesToDeliver = 1; + bool has_messagestodeliver() const; private: - int _internal_blobhashes_size() const; + bool _internal_has_messagestodeliver() const; public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); + void clear_messagestodeliver(); + const ::tunnelbroker::MessagesToDeliver& messagestodeliver() const; + ::tunnelbroker::MessagesToDeliver* release_messagestodeliver(); + ::tunnelbroker::MessagesToDeliver* mutable_messagestodeliver(); + void set_allocated_messagestodeliver(::tunnelbroker::MessagesToDeliver* messagestodeliver); private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); - public: - - // string messageID = 1; - void clear_messageid(); - const std::string& messageid() const; - void set_messageid(const std::string& value); - void set_messageid(std::string&& value); - void set_messageid(const char* value); - void set_messageid(const char* value, size_t size); - std::string* mutable_messageid(); - std::string* release_messageid(); - void set_allocated_messageid(std::string* messageid); - private: - const std::string& _internal_messageid() const; - void _internal_set_messageid(const std::string& value); - std::string* _internal_mutable_messageid(); + const ::tunnelbroker::MessagesToDeliver& _internal_messagestodeliver() const; + ::tunnelbroker::MessagesToDeliver* _internal_mutable_messagestodeliver(); public: + void unsafe_arena_set_allocated_messagestodeliver( + ::tunnelbroker::MessagesToDeliver* messagestodeliver); + ::tunnelbroker::MessagesToDeliver* unsafe_arena_release_messagestodeliver(); - // string toDeviceID = 2; - void clear_todeviceid(); - const std::string& todeviceid() const; - void set_todeviceid(const std::string& value); - void set_todeviceid(std::string&& value); - void set_todeviceid(const char* value); - void set_todeviceid(const char* value, size_t size); - std::string* mutable_todeviceid(); - std::string* release_todeviceid(); - void set_allocated_todeviceid(std::string* todeviceid); + // .tunnelbroker.ProcessedMessages processedMessages = 2; + bool has_processedmessages() const; private: - const std::string& _internal_todeviceid() const; - void _internal_set_todeviceid(const std::string& value); - std::string* _internal_mutable_todeviceid(); + bool _internal_has_processedmessages() const; public: - - // string payload = 3; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const char* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); + void clear_processedmessages(); + const ::tunnelbroker::ProcessedMessages& processedmessages() const; + ::tunnelbroker::ProcessedMessages* release_processedmessages(); + ::tunnelbroker::ProcessedMessages* mutable_processedmessages(); + void set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages); private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); + const ::tunnelbroker::ProcessedMessages& _internal_processedmessages() const; + ::tunnelbroker::ProcessedMessages* _internal_mutable_processedmessages(); public: + void unsafe_arena_set_allocated_processedmessages( + ::tunnelbroker::ProcessedMessages* processedmessages); + ::tunnelbroker::ProcessedMessages* unsafe_arena_release_processedmessages(); - // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToTunnelbrokerStruct) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr todeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class MessagesToSend PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessagesToSend) */ { - public: - inline MessagesToSend() : MessagesToSend(nullptr) {} - virtual ~MessagesToSend(); - explicit constexpr MessagesToSend(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MessagesToSend(const MessagesToSend& from); - MessagesToSend(MessagesToSend&& from) noexcept - : MessagesToSend() { - *this = ::std::move(from); - } - - inline MessagesToSend& operator=(const MessagesToSend& from) { - CopyFrom(from); - return *this; - } - inline MessagesToSend& operator=(MessagesToSend&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MessagesToSend& default_instance() { - return *internal_default_instance(); - } - static inline const MessagesToSend* internal_default_instance() { - return reinterpret_cast( - &_MessagesToSend_default_instance_); - } - static constexpr int kIndexInFileMessages = - 10; - - friend void swap(MessagesToSend& a, MessagesToSend& b) { - a.Swap(&b); - } - inline void Swap(MessagesToSend* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MessagesToSend* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MessagesToSend* New() const final { - return CreateMaybeMessage(nullptr); - } - - MessagesToSend* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MessagesToSend& from); - void MergeFrom(const MessagesToSend& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MessagesToSend* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.MessagesToSend"; - } - protected: - explicit MessagesToSend(::PROTOBUF_NAMESPACE_ID::Arena* arena); + // .google.protobuf.Empty newNotifyTokenRequired = 3; + bool has_newnotifytokenrequired() const; private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + bool _internal_has_newnotifytokenrequired() const; public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + void clear_newnotifytokenrequired(); + const PROTOBUF_NAMESPACE_ID::Empty& newnotifytokenrequired() const; + PROTOBUF_NAMESPACE_ID::Empty* release_newnotifytokenrequired(); + PROTOBUF_NAMESPACE_ID::Empty* mutable_newnotifytokenrequired(); + void set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired); private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); - } - + const PROTOBUF_NAMESPACE_ID::Empty& _internal_newnotifytokenrequired() const; + PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_newnotifytokenrequired(); public: + void unsafe_arena_set_allocated_newnotifytokenrequired( + PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired); + PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_newnotifytokenrequired(); - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMessagesFieldNumber = 1, - }; - // repeated .tunnelbroker.MessageToTunnelbrokerStruct messages = 1; - int messages_size() const; + // .google.protobuf.Empty ping = 4; + bool has_ping() const; private: - int _internal_messages_size() const; + bool _internal_has_ping() const; public: - void clear_messages(); - ::tunnelbroker::MessageToTunnelbrokerStruct* mutable_messages(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct >* - mutable_messages(); + void clear_ping(); + const PROTOBUF_NAMESPACE_ID::Empty& ping() const; + PROTOBUF_NAMESPACE_ID::Empty* release_ping(); + PROTOBUF_NAMESPACE_ID::Empty* mutable_ping(); + void set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping); private: - const ::tunnelbroker::MessageToTunnelbrokerStruct& _internal_messages(int index) const; - ::tunnelbroker::MessageToTunnelbrokerStruct* _internal_add_messages(); + const PROTOBUF_NAMESPACE_ID::Empty& _internal_ping() const; + PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_ping(); public: - const ::tunnelbroker::MessageToTunnelbrokerStruct& messages(int index) const; - ::tunnelbroker::MessageToTunnelbrokerStruct* add_messages(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct >& - messages() const; + void unsafe_arena_set_allocated_ping( + PROTOBUF_NAMESPACE_ID::Empty* ping); + PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_ping(); - // @@protoc_insertion_point(class_scope:tunnelbroker.MessagesToSend) + void clear_data(); + DataCase data_case() const; + // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToClient) private: class _Internal; + void set_has_messagestodeliver(); + void set_has_processedmessages(); + void set_has_newnotifytokenrequired(); + void set_has_ping(); + + inline bool has_data() const; + inline void clear_has_data(); - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct > messages_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class MessageToTunnelbroker PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToTunnelbroker) */ { - public: - inline MessageToTunnelbroker() : MessageToTunnelbroker(nullptr) {} - virtual ~MessageToTunnelbroker(); - explicit constexpr MessageToTunnelbroker(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MessageToTunnelbroker(const MessageToTunnelbroker& from); - MessageToTunnelbroker(MessageToTunnelbroker&& from) noexcept - : MessageToTunnelbroker() { - *this = ::std::move(from); - } - - inline MessageToTunnelbroker& operator=(const MessageToTunnelbroker& from) { - CopyFrom(from); - return *this; - } - inline MessageToTunnelbroker& operator=(MessageToTunnelbroker&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MessageToTunnelbroker& default_instance() { - return *internal_default_instance(); - } - enum DataCase { - kMessagesToSend = 1, - kProcessedMessages = 2, - kNewNotifyToken = 3, - DATA_NOT_SET = 0, - }; - - static inline const MessageToTunnelbroker* internal_default_instance() { - return reinterpret_cast( - &_MessageToTunnelbroker_default_instance_); - } - static constexpr int kIndexInFileMessages = - 11; - - friend void swap(MessageToTunnelbroker& a, MessageToTunnelbroker& b) { - a.Swap(&b); - } - inline void Swap(MessageToTunnelbroker* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MessageToTunnelbroker* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MessageToTunnelbroker* New() const final { - return CreateMaybeMessage(nullptr); - } - - MessageToTunnelbroker* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MessageToTunnelbroker& from); - void MergeFrom(const MessageToTunnelbroker& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MessageToTunnelbroker* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.MessageToTunnelbroker"; - } - protected: - explicit MessageToTunnelbroker(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMessagesToSendFieldNumber = 1, - kProcessedMessagesFieldNumber = 2, - kNewNotifyTokenFieldNumber = 3, - }; - // .tunnelbroker.MessagesToSend messagesToSend = 1; - bool has_messagestosend() const; - private: - bool _internal_has_messagestosend() const; - public: - void clear_messagestosend(); - const ::tunnelbroker::MessagesToSend& messagestosend() const; - ::tunnelbroker::MessagesToSend* release_messagestosend(); - ::tunnelbroker::MessagesToSend* mutable_messagestosend(); - void set_allocated_messagestosend(::tunnelbroker::MessagesToSend* messagestosend); - private: - const ::tunnelbroker::MessagesToSend& _internal_messagestosend() const; - ::tunnelbroker::MessagesToSend* _internal_mutable_messagestosend(); - public: - void unsafe_arena_set_allocated_messagestosend( - ::tunnelbroker::MessagesToSend* messagestosend); - ::tunnelbroker::MessagesToSend* unsafe_arena_release_messagestosend(); - - // .tunnelbroker.ProcessedMessages processedMessages = 2; - bool has_processedmessages() const; - private: - bool _internal_has_processedmessages() const; - public: - void clear_processedmessages(); - const ::tunnelbroker::ProcessedMessages& processedmessages() const; - ::tunnelbroker::ProcessedMessages* release_processedmessages(); - ::tunnelbroker::ProcessedMessages* mutable_processedmessages(); - void set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages); - private: - const ::tunnelbroker::ProcessedMessages& _internal_processedmessages() const; - ::tunnelbroker::ProcessedMessages* _internal_mutable_processedmessages(); - public: - void unsafe_arena_set_allocated_processedmessages( - ::tunnelbroker::ProcessedMessages* processedmessages); - ::tunnelbroker::ProcessedMessages* unsafe_arena_release_processedmessages(); - - // string newNotifyToken = 3; - bool has_newnotifytoken() const; - private: - bool _internal_has_newnotifytoken() const; - public: - void clear_newnotifytoken(); - const std::string& newnotifytoken() const; - void set_newnotifytoken(const std::string& value); - void set_newnotifytoken(std::string&& value); - void set_newnotifytoken(const char* value); - void set_newnotifytoken(const char* value, size_t size); - std::string* mutable_newnotifytoken(); - std::string* release_newnotifytoken(); - void set_allocated_newnotifytoken(std::string* newnotifytoken); - private: - const std::string& _internal_newnotifytoken() const; - void _internal_set_newnotifytoken(const std::string& value); - std::string* _internal_mutable_newnotifytoken(); - public: - - void clear_data(); - DataCase data_case() const; - // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToTunnelbroker) - private: - class _Internal; - void set_has_messagestosend(); - void set_has_processedmessages(); - void set_has_newnotifytoken(); - - inline bool has_data() const; - inline void clear_has_data(); - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; union DataUnion { constexpr DataUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::tunnelbroker::MessagesToSend* messagestosend_; - ::tunnelbroker::ProcessedMessages* processedmessages_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr newnotifytoken_; - } data_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; - - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class MessageToClientStruct PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToClientStruct) */ { - public: - inline MessageToClientStruct() : MessageToClientStruct(nullptr) {} - virtual ~MessageToClientStruct(); - explicit constexpr MessageToClientStruct(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MessageToClientStruct(const MessageToClientStruct& from); - MessageToClientStruct(MessageToClientStruct&& from) noexcept - : MessageToClientStruct() { - *this = ::std::move(from); - } - - inline MessageToClientStruct& operator=(const MessageToClientStruct& from) { - CopyFrom(from); - return *this; - } - inline MessageToClientStruct& operator=(MessageToClientStruct&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MessageToClientStruct& default_instance() { - return *internal_default_instance(); - } - static inline const MessageToClientStruct* internal_default_instance() { - return reinterpret_cast( - &_MessageToClientStruct_default_instance_); - } - static constexpr int kIndexInFileMessages = - 12; - - friend void swap(MessageToClientStruct& a, MessageToClientStruct& b) { - a.Swap(&b); - } - inline void Swap(MessageToClientStruct* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MessageToClientStruct* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MessageToClientStruct* New() const final { - return CreateMaybeMessage(nullptr); - } - - MessageToClientStruct* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MessageToClientStruct& from); - void MergeFrom(const MessageToClientStruct& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MessageToClientStruct* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.MessageToClientStruct"; - } - protected: - explicit MessageToClientStruct(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kBlobHashesFieldNumber = 4, - kMessageIDFieldNumber = 1, - kFromDeviceIDFieldNumber = 2, - kPayloadFieldNumber = 3, - }; - // repeated string blobHashes = 4; - int blobhashes_size() const; - private: - int _internal_blobhashes_size() const; - public: - void clear_blobhashes(); - const std::string& blobhashes(int index) const; - std::string* mutable_blobhashes(int index); - void set_blobhashes(int index, const std::string& value); - void set_blobhashes(int index, std::string&& value); - void set_blobhashes(int index, const char* value); - void set_blobhashes(int index, const char* value, size_t size); - std::string* add_blobhashes(); - void add_blobhashes(const std::string& value); - void add_blobhashes(std::string&& value); - void add_blobhashes(const char* value); - void add_blobhashes(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& blobhashes() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_blobhashes(); - private: - const std::string& _internal_blobhashes(int index) const; - std::string* _internal_add_blobhashes(); - public: - - // string messageID = 1; - void clear_messageid(); - const std::string& messageid() const; - void set_messageid(const std::string& value); - void set_messageid(std::string&& value); - void set_messageid(const char* value); - void set_messageid(const char* value, size_t size); - std::string* mutable_messageid(); - std::string* release_messageid(); - void set_allocated_messageid(std::string* messageid); - private: - const std::string& _internal_messageid() const; - void _internal_set_messageid(const std::string& value); - std::string* _internal_mutable_messageid(); - public: - - // string fromDeviceID = 2; - void clear_fromdeviceid(); - const std::string& fromdeviceid() const; - void set_fromdeviceid(const std::string& value); - void set_fromdeviceid(std::string&& value); - void set_fromdeviceid(const char* value); - void set_fromdeviceid(const char* value, size_t size); - std::string* mutable_fromdeviceid(); - std::string* release_fromdeviceid(); - void set_allocated_fromdeviceid(std::string* fromdeviceid); - private: - const std::string& _internal_fromdeviceid() const; - void _internal_set_fromdeviceid(const std::string& value); - std::string* _internal_mutable_fromdeviceid(); - public: - - // string payload = 3; - void clear_payload(); - const std::string& payload() const; - void set_payload(const std::string& value); - void set_payload(std::string&& value); - void set_payload(const char* value); - void set_payload(const char* value, size_t size); - std::string* mutable_payload(); - std::string* release_payload(); - void set_allocated_payload(std::string* payload); - private: - const std::string& _internal_payload() const; - void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); - public: - - // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToClientStruct) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField blobhashes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr messageid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fromdeviceid_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class MessagesToDeliver PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessagesToDeliver) */ { - public: - inline MessagesToDeliver() : MessagesToDeliver(nullptr) {} - virtual ~MessagesToDeliver(); - explicit constexpr MessagesToDeliver(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MessagesToDeliver(const MessagesToDeliver& from); - MessagesToDeliver(MessagesToDeliver&& from) noexcept - : MessagesToDeliver() { - *this = ::std::move(from); - } - - inline MessagesToDeliver& operator=(const MessagesToDeliver& from) { - CopyFrom(from); - return *this; - } - inline MessagesToDeliver& operator=(MessagesToDeliver&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MessagesToDeliver& default_instance() { - return *internal_default_instance(); - } - static inline const MessagesToDeliver* internal_default_instance() { - return reinterpret_cast( - &_MessagesToDeliver_default_instance_); - } - static constexpr int kIndexInFileMessages = - 13; - - friend void swap(MessagesToDeliver& a, MessagesToDeliver& b) { - a.Swap(&b); - } - inline void Swap(MessagesToDeliver* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MessagesToDeliver* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MessagesToDeliver* New() const final { - return CreateMaybeMessage(nullptr); - } - - MessagesToDeliver* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MessagesToDeliver& from); - void MergeFrom(const MessagesToDeliver& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MessagesToDeliver* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.MessagesToDeliver"; - } - protected: - explicit MessagesToDeliver(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMessagesFieldNumber = 1, - }; - // repeated .tunnelbroker.MessageToClientStruct messages = 1; - int messages_size() const; - private: - int _internal_messages_size() const; - public: - void clear_messages(); - ::tunnelbroker::MessageToClientStruct* mutable_messages(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct >* - mutable_messages(); - private: - const ::tunnelbroker::MessageToClientStruct& _internal_messages(int index) const; - ::tunnelbroker::MessageToClientStruct* _internal_add_messages(); - public: - const ::tunnelbroker::MessageToClientStruct& messages(int index) const; - ::tunnelbroker::MessageToClientStruct* add_messages(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct >& - messages() const; - - // @@protoc_insertion_point(class_scope:tunnelbroker.MessagesToDeliver) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct > messages_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// ------------------------------------------------------------------- - -class MessageToClient PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tunnelbroker.MessageToClient) */ { - public: - inline MessageToClient() : MessageToClient(nullptr) {} - virtual ~MessageToClient(); - explicit constexpr MessageToClient(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - MessageToClient(const MessageToClient& from); - MessageToClient(MessageToClient&& from) noexcept - : MessageToClient() { - *this = ::std::move(from); - } - - inline MessageToClient& operator=(const MessageToClient& from) { - CopyFrom(from); - return *this; - } - inline MessageToClient& operator=(MessageToClient&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MessageToClient& default_instance() { - return *internal_default_instance(); - } - enum DataCase { - kMessagesToDeliver = 1, - kProcessedMessages = 2, - kNewNotifyTokenRequired = 3, - kPing = 4, - DATA_NOT_SET = 0, - }; - - static inline const MessageToClient* internal_default_instance() { - return reinterpret_cast( - &_MessageToClient_default_instance_); - } - static constexpr int kIndexInFileMessages = - 14; - - friend void swap(MessageToClient& a, MessageToClient& b) { - a.Swap(&b); - } - inline void Swap(MessageToClient* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MessageToClient* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MessageToClient* New() const final { - return CreateMaybeMessage(nullptr); - } - - MessageToClient* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MessageToClient& from); - void MergeFrom(const MessageToClient& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MessageToClient* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "tunnelbroker.MessageToClient"; - } - protected: - explicit MessageToClient(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - return ::descriptor_table_tunnelbroker_2eproto_metadata_getter(kIndexInFileMessages); - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMessagesToDeliverFieldNumber = 1, - kProcessedMessagesFieldNumber = 2, - kNewNotifyTokenRequiredFieldNumber = 3, - kPingFieldNumber = 4, - }; - // .tunnelbroker.MessagesToDeliver messagesToDeliver = 1; - bool has_messagestodeliver() const; - private: - bool _internal_has_messagestodeliver() const; - public: - void clear_messagestodeliver(); - const ::tunnelbroker::MessagesToDeliver& messagestodeliver() const; - ::tunnelbroker::MessagesToDeliver* release_messagestodeliver(); - ::tunnelbroker::MessagesToDeliver* mutable_messagestodeliver(); - void set_allocated_messagestodeliver(::tunnelbroker::MessagesToDeliver* messagestodeliver); - private: - const ::tunnelbroker::MessagesToDeliver& _internal_messagestodeliver() const; - ::tunnelbroker::MessagesToDeliver* _internal_mutable_messagestodeliver(); - public: - void unsafe_arena_set_allocated_messagestodeliver( - ::tunnelbroker::MessagesToDeliver* messagestodeliver); - ::tunnelbroker::MessagesToDeliver* unsafe_arena_release_messagestodeliver(); - - // .tunnelbroker.ProcessedMessages processedMessages = 2; - bool has_processedmessages() const; - private: - bool _internal_has_processedmessages() const; - public: - void clear_processedmessages(); - const ::tunnelbroker::ProcessedMessages& processedmessages() const; - ::tunnelbroker::ProcessedMessages* release_processedmessages(); - ::tunnelbroker::ProcessedMessages* mutable_processedmessages(); - void set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages); - private: - const ::tunnelbroker::ProcessedMessages& _internal_processedmessages() const; - ::tunnelbroker::ProcessedMessages* _internal_mutable_processedmessages(); - public: - void unsafe_arena_set_allocated_processedmessages( - ::tunnelbroker::ProcessedMessages* processedmessages); - ::tunnelbroker::ProcessedMessages* unsafe_arena_release_processedmessages(); - - // .google.protobuf.Empty newNotifyTokenRequired = 3; - bool has_newnotifytokenrequired() const; - private: - bool _internal_has_newnotifytokenrequired() const; - public: - void clear_newnotifytokenrequired(); - const PROTOBUF_NAMESPACE_ID::Empty& newnotifytokenrequired() const; - PROTOBUF_NAMESPACE_ID::Empty* release_newnotifytokenrequired(); - PROTOBUF_NAMESPACE_ID::Empty* mutable_newnotifytokenrequired(); - void set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired); - private: - const PROTOBUF_NAMESPACE_ID::Empty& _internal_newnotifytokenrequired() const; - PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_newnotifytokenrequired(); - public: - void unsafe_arena_set_allocated_newnotifytokenrequired( - PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired); - PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_newnotifytokenrequired(); - - // .google.protobuf.Empty ping = 4; - bool has_ping() const; - private: - bool _internal_has_ping() const; - public: - void clear_ping(); - const PROTOBUF_NAMESPACE_ID::Empty& ping() const; - PROTOBUF_NAMESPACE_ID::Empty* release_ping(); - PROTOBUF_NAMESPACE_ID::Empty* mutable_ping(); - void set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping); - private: - const PROTOBUF_NAMESPACE_ID::Empty& _internal_ping() const; - PROTOBUF_NAMESPACE_ID::Empty* _internal_mutable_ping(); - public: - void unsafe_arena_set_allocated_ping( - PROTOBUF_NAMESPACE_ID::Empty* ping); - PROTOBUF_NAMESPACE_ID::Empty* unsafe_arena_release_ping(); - - void clear_data(); - DataCase data_case() const; - // @@protoc_insertion_point(class_scope:tunnelbroker.MessageToClient) - private: - class _Internal; - void set_has_messagestodeliver(); - void set_has_processedmessages(); - void set_has_newnotifytokenrequired(); - void set_has_ping(); - - inline bool has_data() const; - inline void clear_has_data(); - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - union DataUnion { - constexpr DataUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::tunnelbroker::MessagesToDeliver* messagestodeliver_; - ::tunnelbroker::ProcessedMessages* processedmessages_; - PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired_; - PROTOBUF_NAMESPACE_ID::Empty* ping_; - } data_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; - - friend struct ::TableStruct_tunnelbroker_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// SessionSignatureRequest - -// string deviceID = 1; -inline void SessionSignatureRequest::clear_deviceid() { - deviceid_.ClearToEmpty(); -} -inline const std::string& SessionSignatureRequest::deviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SessionSignatureRequest.deviceID) - return _internal_deviceid(); -} -inline void SessionSignatureRequest::set_deviceid(const std::string& value) { - _internal_set_deviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline std::string* SessionSignatureRequest::mutable_deviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SessionSignatureRequest.deviceID) - return _internal_mutable_deviceid(); -} -inline const std::string& SessionSignatureRequest::_internal_deviceid() const { - return deviceid_.Get(); -} -inline void SessionSignatureRequest::_internal_set_deviceid(const std::string& value) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SessionSignatureRequest::set_deviceid(std::string&& value) { - - deviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline void SessionSignatureRequest::set_deviceid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline void SessionSignatureRequest::set_deviceid(const char* value, - size_t size) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SessionSignatureRequest.deviceID) -} -inline std::string* SessionSignatureRequest::_internal_mutable_deviceid() { - - return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SessionSignatureRequest::release_deviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.SessionSignatureRequest.deviceID) - return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SessionSignatureRequest::set_allocated_deviceid(std::string* deviceid) { - if (deviceid != nullptr) { - - } else { - - } - deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SessionSignatureRequest.deviceID) -} - -// ------------------------------------------------------------------- - -// SessionSignatureResponse - -// string toSign = 1; -inline void SessionSignatureResponse::clear_tosign() { - tosign_.ClearToEmpty(); -} -inline const std::string& SessionSignatureResponse::tosign() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SessionSignatureResponse.toSign) - return _internal_tosign(); -} -inline void SessionSignatureResponse::set_tosign(const std::string& value) { - _internal_set_tosign(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SessionSignatureResponse.toSign) -} -inline std::string* SessionSignatureResponse::mutable_tosign() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SessionSignatureResponse.toSign) - return _internal_mutable_tosign(); -} -inline const std::string& SessionSignatureResponse::_internal_tosign() const { - return tosign_.Get(); -} -inline void SessionSignatureResponse::_internal_set_tosign(const std::string& value) { - - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void SessionSignatureResponse::set_tosign(std::string&& value) { - - tosign_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SessionSignatureResponse.toSign) -} -inline void SessionSignatureResponse::set_tosign(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SessionSignatureResponse.toSign) -} -inline void SessionSignatureResponse::set_tosign(const char* value, - size_t size) { - - tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SessionSignatureResponse.toSign) -} -inline std::string* SessionSignatureResponse::_internal_mutable_tosign() { - - return tosign_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* SessionSignatureResponse::release_tosign() { - // @@protoc_insertion_point(field_release:tunnelbroker.SessionSignatureResponse.toSign) - return tosign_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void SessionSignatureResponse::set_allocated_tosign(std::string* tosign) { - if (tosign != nullptr) { - - } else { - - } - tosign_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tosign, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SessionSignatureResponse.toSign) -} - -// ------------------------------------------------------------------- - -// NewSessionRequest - -// string deviceID = 1; -inline void NewSessionRequest::clear_deviceid() { - deviceid_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::deviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceID) - return _internal_deviceid(); -} -inline void NewSessionRequest::set_deviceid(const std::string& value) { - _internal_set_deviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceID) -} -inline std::string* NewSessionRequest::mutable_deviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceID) - return _internal_mutable_deviceid(); -} -inline const std::string& NewSessionRequest::_internal_deviceid() const { - return deviceid_.Get(); -} -inline void NewSessionRequest::_internal_set_deviceid(const std::string& value) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_deviceid(std::string&& value) { - - deviceid_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceID) -} -inline void NewSessionRequest::set_deviceid(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceID) -} -inline void NewSessionRequest::set_deviceid(const char* value, - size_t size) { - - deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceID) -} -inline std::string* NewSessionRequest::_internal_mutable_deviceid() { - - return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_deviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceID) - return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_deviceid(std::string* deviceid) { - if (deviceid != nullptr) { - - } else { - - } - deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceID) -} - -// string publicKey = 2; -inline void NewSessionRequest::clear_publickey() { - publickey_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::publickey() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.publicKey) - return _internal_publickey(); -} -inline void NewSessionRequest::set_publickey(const std::string& value) { - _internal_set_publickey(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.publicKey) -} -inline std::string* NewSessionRequest::mutable_publickey() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.publicKey) - return _internal_mutable_publickey(); -} -inline const std::string& NewSessionRequest::_internal_publickey() const { - return publickey_.Get(); -} -inline void NewSessionRequest::_internal_set_publickey(const std::string& value) { - - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_publickey(std::string&& value) { - - publickey_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.publicKey) -} -inline void NewSessionRequest::set_publickey(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.publicKey) -} -inline void NewSessionRequest::set_publickey(const char* value, - size_t size) { - - publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.publicKey) -} -inline std::string* NewSessionRequest::_internal_mutable_publickey() { - - return publickey_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_publickey() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.publicKey) - return publickey_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_publickey(std::string* publickey) { - if (publickey != nullptr) { - - } else { - - } - publickey_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), publickey, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.publicKey) -} - -// string signature = 3; -inline void NewSessionRequest::clear_signature() { - signature_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::signature() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.signature) - return _internal_signature(); -} -inline void NewSessionRequest::set_signature(const std::string& value) { - _internal_set_signature(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.signature) -} -inline std::string* NewSessionRequest::mutable_signature() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.signature) - return _internal_mutable_signature(); -} -inline const std::string& NewSessionRequest::_internal_signature() const { - return signature_.Get(); -} -inline void NewSessionRequest::_internal_set_signature(const std::string& value) { - - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_signature(std::string&& value) { - - signature_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.signature) -} -inline void NewSessionRequest::set_signature(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.signature) -} -inline void NewSessionRequest::set_signature(const char* value, - size_t size) { - - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.signature) -} -inline std::string* NewSessionRequest::_internal_mutable_signature() { - - return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_signature() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.signature) - return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_signature(std::string* signature) { - if (signature != nullptr) { - - } else { - - } - signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.signature) -} - -// string notifyToken = 4; -inline bool NewSessionRequest::_internal_has_notifytoken() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool NewSessionRequest::has_notifytoken() const { - return _internal_has_notifytoken(); -} -inline void NewSessionRequest::clear_notifytoken() { - notifytoken_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& NewSessionRequest::notifytoken() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.notifyToken) - return _internal_notifytoken(); -} -inline void NewSessionRequest::set_notifytoken(const std::string& value) { - _internal_set_notifytoken(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.notifyToken) -} -inline std::string* NewSessionRequest::mutable_notifytoken() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.notifyToken) - return _internal_mutable_notifytoken(); -} -inline const std::string& NewSessionRequest::_internal_notifytoken() const { - return notifytoken_.Get(); -} -inline void NewSessionRequest::_internal_set_notifytoken(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_notifytoken(std::string&& value) { - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.notifyToken) -} -inline void NewSessionRequest::set_notifytoken(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.notifyToken) -} -inline void NewSessionRequest::set_notifytoken(const char* value, - size_t size) { - _has_bits_[0] |= 0x00000001u; - notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.notifyToken) -} -inline std::string* NewSessionRequest::_internal_mutable_notifytoken() { - _has_bits_[0] |= 0x00000001u; - return notifytoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_notifytoken() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.notifyToken) - if (!_internal_has_notifytoken()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - return notifytoken_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_notifytoken(std::string* notifytoken) { - if (notifytoken != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - notifytoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), notifytoken, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.notifyToken) -} - -// .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; -inline void NewSessionRequest::clear_devicetype() { - devicetype_ = 0; -} -inline ::tunnelbroker::NewSessionRequest_DeviceTypes NewSessionRequest::_internal_devicetype() const { - return static_cast< ::tunnelbroker::NewSessionRequest_DeviceTypes >(devicetype_); -} -inline ::tunnelbroker::NewSessionRequest_DeviceTypes NewSessionRequest::devicetype() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceType) - return _internal_devicetype(); -} -inline void NewSessionRequest::_internal_set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value) { - - devicetype_ = value; -} -inline void NewSessionRequest::set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value) { - _internal_set_devicetype(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceType) -} - -// string deviceAppVersion = 6; -inline void NewSessionRequest::clear_deviceappversion() { - deviceappversion_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::deviceappversion() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceAppVersion) - return _internal_deviceappversion(); -} -inline void NewSessionRequest::set_deviceappversion(const std::string& value) { - _internal_set_deviceappversion(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline std::string* NewSessionRequest::mutable_deviceappversion() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceAppVersion) - return _internal_mutable_deviceappversion(); -} -inline const std::string& NewSessionRequest::_internal_deviceappversion() const { - return deviceappversion_.Get(); -} -inline void NewSessionRequest::_internal_set_deviceappversion(const std::string& value) { - - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_deviceappversion(std::string&& value) { - - deviceappversion_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline void NewSessionRequest::set_deviceappversion(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline void NewSessionRequest::set_deviceappversion(const char* value, - size_t size) { - - deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceAppVersion) -} -inline std::string* NewSessionRequest::_internal_mutable_deviceappversion() { - - return deviceappversion_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_deviceappversion() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceAppVersion) - return deviceappversion_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_deviceappversion(std::string* deviceappversion) { - if (deviceappversion != nullptr) { - - } else { - - } - deviceappversion_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceappversion, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceAppVersion) -} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::tunnelbroker::MessagesToDeliver* messagestodeliver_; + ::tunnelbroker::ProcessedMessages* processedmessages_; + PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired_; + PROTOBUF_NAMESPACE_ID::Empty* ping_; + } data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; -// string deviceOS = 7; -inline void NewSessionRequest::clear_deviceos() { - deviceos_.ClearToEmpty(); -} -inline const std::string& NewSessionRequest::deviceos() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceOS) - return _internal_deviceos(); -} -inline void NewSessionRequest::set_deviceos(const std::string& value) { - _internal_set_deviceos(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceOS) -} -inline std::string* NewSessionRequest::mutable_deviceos() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceOS) - return _internal_mutable_deviceos(); -} -inline const std::string& NewSessionRequest::_internal_deviceos() const { - return deviceos_.Get(); -} -inline void NewSessionRequest::_internal_set_deviceos(const std::string& value) { - - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); -} -inline void NewSessionRequest::set_deviceos(std::string&& value) { - - deviceos_.Set( - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceOS) -} -inline void NewSessionRequest::set_deviceos(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceOS) -} -inline void NewSessionRequest::set_deviceos(const char* value, - size_t size) { - - deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceOS) -} -inline std::string* NewSessionRequest::_internal_mutable_deviceos() { - - return deviceos_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); -} -inline std::string* NewSessionRequest::release_deviceos() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceOS) - return deviceos_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void NewSessionRequest::set_allocated_deviceos(std::string* deviceos) { - if (deviceos != nullptr) { - - } else { - - } - deviceos_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceos, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceOS) -} + friend struct ::TableStruct_tunnelbroker_2eproto; +}; +// =================================================================== -// ------------------------------------------------------------------- -// NewSessionResponse +// =================================================================== -// string sessionID = 1; -inline void NewSessionResponse::clear_sessionid() { - sessionid_.ClearToEmpty(); +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SessionSignatureRequest + +// string deviceID = 1; +inline void SessionSignatureRequest::clear_deviceid() { + deviceid_.ClearToEmpty(); } -inline const std::string& NewSessionResponse::sessionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionResponse.sessionID) - return _internal_sessionid(); +inline const std::string& SessionSignatureRequest::deviceid() const { + // @@protoc_insertion_point(field_get:tunnelbroker.SessionSignatureRequest.deviceID) + return _internal_deviceid(); } -inline void NewSessionResponse::set_sessionid(const std::string& value) { - _internal_set_sessionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionResponse.sessionID) +inline void SessionSignatureRequest::set_deviceid(const std::string& value) { + _internal_set_deviceid(value); + // @@protoc_insertion_point(field_set:tunnelbroker.SessionSignatureRequest.deviceID) } -inline std::string* NewSessionResponse::mutable_sessionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionResponse.sessionID) - return _internal_mutable_sessionid(); +inline std::string* SessionSignatureRequest::mutable_deviceid() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.SessionSignatureRequest.deviceID) + return _internal_mutable_deviceid(); } -inline const std::string& NewSessionResponse::_internal_sessionid() const { - return sessionid_.Get(); +inline const std::string& SessionSignatureRequest::_internal_deviceid() const { + return deviceid_.Get(); } -inline void NewSessionResponse::_internal_set_sessionid(const std::string& value) { +inline void SessionSignatureRequest::_internal_set_deviceid(const std::string& value) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void NewSessionResponse::set_sessionid(std::string&& value) { +inline void SessionSignatureRequest::set_deviceid(std::string&& value) { - sessionid_.Set( + deviceid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionResponse.sessionID) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SessionSignatureRequest.deviceID) } -inline void NewSessionResponse::set_sessionid(const char* value) { +inline void SessionSignatureRequest::set_deviceid(const char* value) { GOOGLE_DCHECK(value != nullptr); - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionResponse.sessionID) + deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.SessionSignatureRequest.deviceID) } -inline void NewSessionResponse::set_sessionid(const char* value, +inline void SessionSignatureRequest::set_deviceid(const char* value, size_t size) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionResponse.sessionID) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SessionSignatureRequest.deviceID) } -inline std::string* NewSessionResponse::_internal_mutable_sessionid() { +inline std::string* SessionSignatureRequest::_internal_mutable_deviceid() { - return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* NewSessionResponse::release_sessionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionResponse.sessionID) - return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* SessionSignatureRequest::release_deviceid() { + // @@protoc_insertion_point(field_release:tunnelbroker.SessionSignatureRequest.deviceID) + return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void NewSessionResponse::set_allocated_sessionid(std::string* sessionid) { - if (sessionid != nullptr) { +inline void SessionSignatureRequest::set_allocated_deviceid(std::string* deviceid) { + if (deviceid != nullptr) { } else { } - sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, + deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionResponse.sessionID) + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SessionSignatureRequest.deviceID) } // ------------------------------------------------------------------- -// SendRequest +// SessionSignatureResponse -// string sessionID = 1; -inline void SendRequest::clear_sessionid() { - sessionid_.ClearToEmpty(); +// string toSign = 1; +inline void SessionSignatureResponse::clear_tosign() { + tosign_.ClearToEmpty(); } -inline const std::string& SendRequest::sessionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.sessionID) - return _internal_sessionid(); +inline const std::string& SessionSignatureResponse::tosign() const { + // @@protoc_insertion_point(field_get:tunnelbroker.SessionSignatureResponse.toSign) + return _internal_tosign(); } -inline void SendRequest::set_sessionid(const std::string& value) { - _internal_set_sessionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.sessionID) +inline void SessionSignatureResponse::set_tosign(const std::string& value) { + _internal_set_tosign(value); + // @@protoc_insertion_point(field_set:tunnelbroker.SessionSignatureResponse.toSign) } -inline std::string* SendRequest::mutable_sessionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.sessionID) - return _internal_mutable_sessionid(); +inline std::string* SessionSignatureResponse::mutable_tosign() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.SessionSignatureResponse.toSign) + return _internal_mutable_tosign(); } -inline const std::string& SendRequest::_internal_sessionid() const { - return sessionid_.Get(); +inline const std::string& SessionSignatureResponse::_internal_tosign() const { + return tosign_.Get(); } -inline void SendRequest::_internal_set_sessionid(const std::string& value) { +inline void SessionSignatureResponse::_internal_set_tosign(const std::string& value) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void SendRequest::set_sessionid(std::string&& value) { +inline void SessionSignatureResponse::set_tosign(std::string&& value) { - sessionid_.Set( + tosign_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SendRequest.sessionID) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SessionSignatureResponse.toSign) } -inline void SendRequest::set_sessionid(const char* value) { +inline void SessionSignatureResponse::set_tosign(const char* value) { GOOGLE_DCHECK(value != nullptr); - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.sessionID) + tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.SessionSignatureResponse.toSign) } -inline void SendRequest::set_sessionid(const char* value, +inline void SessionSignatureResponse::set_tosign(const char* value, size_t size) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + tosign_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.sessionID) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SessionSignatureResponse.toSign) } -inline std::string* SendRequest::_internal_mutable_sessionid() { +inline std::string* SessionSignatureResponse::_internal_mutable_tosign() { - return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return tosign_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* SendRequest::release_sessionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.SendRequest.sessionID) - return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* SessionSignatureResponse::release_tosign() { + // @@protoc_insertion_point(field_release:tunnelbroker.SessionSignatureResponse.toSign) + return tosign_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void SendRequest::set_allocated_sessionid(std::string* sessionid) { - if (sessionid != nullptr) { +inline void SessionSignatureResponse::set_allocated_tosign(std::string* tosign) { + if (tosign != nullptr) { } else { } - sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, + tosign_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tosign, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SendRequest.sessionID) + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SessionSignatureResponse.toSign) } -// string toDeviceID = 2; -inline void SendRequest::clear_todeviceid() { - todeviceid_.ClearToEmpty(); +// ------------------------------------------------------------------- + +// NewSessionRequest + +// string deviceID = 1; +inline void NewSessionRequest::clear_deviceid() { + deviceid_.ClearToEmpty(); } -inline const std::string& SendRequest::todeviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.toDeviceID) - return _internal_todeviceid(); +inline const std::string& NewSessionRequest::deviceid() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceID) + return _internal_deviceid(); } -inline void SendRequest::set_todeviceid(const std::string& value) { - _internal_set_todeviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.toDeviceID) +inline void NewSessionRequest::set_deviceid(const std::string& value) { + _internal_set_deviceid(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceID) } -inline std::string* SendRequest::mutable_todeviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.toDeviceID) - return _internal_mutable_todeviceid(); +inline std::string* NewSessionRequest::mutable_deviceid() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceID) + return _internal_mutable_deviceid(); } -inline const std::string& SendRequest::_internal_todeviceid() const { - return todeviceid_.Get(); +inline const std::string& NewSessionRequest::_internal_deviceid() const { + return deviceid_.Get(); } -inline void SendRequest::_internal_set_todeviceid(const std::string& value) { +inline void NewSessionRequest::_internal_set_deviceid(const std::string& value) { - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void SendRequest::set_todeviceid(std::string&& value) { +inline void NewSessionRequest::set_deviceid(std::string&& value) { - todeviceid_.Set( + deviceid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SendRequest.toDeviceID) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceID) } -inline void SendRequest::set_todeviceid(const char* value) { +inline void NewSessionRequest::set_deviceid(const char* value) { GOOGLE_DCHECK(value != nullptr); - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.toDeviceID) + deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceID) } -inline void SendRequest::set_todeviceid(const char* value, +inline void NewSessionRequest::set_deviceid(const char* value, size_t size) { - todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.toDeviceID) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceID) } -inline std::string* SendRequest::_internal_mutable_todeviceid() { +inline std::string* NewSessionRequest::_internal_mutable_deviceid() { - return todeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* SendRequest::release_todeviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.SendRequest.toDeviceID) - return todeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* NewSessionRequest::release_deviceid() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceID) + return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void SendRequest::set_allocated_todeviceid(std::string* todeviceid) { - if (todeviceid != nullptr) { +inline void NewSessionRequest::set_allocated_deviceid(std::string* deviceid) { + if (deviceid != nullptr) { } else { } - todeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), todeviceid, + deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SendRequest.toDeviceID) + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceID) } -// bytes payload = 3; -inline void SendRequest::clear_payload() { - payload_.ClearToEmpty(); +// string publicKey = 2; +inline void NewSessionRequest::clear_publickey() { + publickey_.ClearToEmpty(); } -inline const std::string& SendRequest::payload() const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.payload) - return _internal_payload(); +inline const std::string& NewSessionRequest::publickey() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.publicKey) + return _internal_publickey(); } -inline void SendRequest::set_payload(const std::string& value) { - _internal_set_payload(value); - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.payload) +inline void NewSessionRequest::set_publickey(const std::string& value) { + _internal_set_publickey(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.publicKey) } -inline std::string* SendRequest::mutable_payload() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.payload) - return _internal_mutable_payload(); +inline std::string* NewSessionRequest::mutable_publickey() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.publicKey) + return _internal_mutable_publickey(); } -inline const std::string& SendRequest::_internal_payload() const { - return payload_.Get(); +inline const std::string& NewSessionRequest::_internal_publickey() const { + return publickey_.Get(); } -inline void SendRequest::_internal_set_payload(const std::string& value) { +inline void NewSessionRequest::_internal_set_publickey(const std::string& value) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void SendRequest::set_payload(std::string&& value) { +inline void NewSessionRequest::set_publickey(std::string&& value) { - payload_.Set( + publickey_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.SendRequest.payload) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.publicKey) } -inline void SendRequest::set_payload(const char* value) { +inline void NewSessionRequest::set_publickey(const char* value) { GOOGLE_DCHECK(value != nullptr); - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.payload) + publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.publicKey) } -inline void SendRequest::set_payload(const void* value, +inline void NewSessionRequest::set_publickey(const char* value, size_t size) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + publickey_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.payload) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.publicKey) } -inline std::string* SendRequest::_internal_mutable_payload() { +inline std::string* NewSessionRequest::_internal_mutable_publickey() { - return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return publickey_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* SendRequest::release_payload() { - // @@protoc_insertion_point(field_release:tunnelbroker.SendRequest.payload) - return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* NewSessionRequest::release_publickey() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.publicKey) + return publickey_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void SendRequest::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { +inline void NewSessionRequest::set_allocated_publickey(std::string* publickey) { + if (publickey != nullptr) { } else { } - payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, + publickey_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), publickey, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.SendRequest.payload) -} - -// repeated string blobHashes = 4; -inline int SendRequest::_internal_blobhashes_size() const { - return blobhashes_.size(); -} -inline int SendRequest::blobhashes_size() const { - return _internal_blobhashes_size(); -} -inline void SendRequest::clear_blobhashes() { - blobhashes_.Clear(); -} -inline std::string* SendRequest::add_blobhashes() { - // @@protoc_insertion_point(field_add_mutable:tunnelbroker.SendRequest.blobHashes) - return _internal_add_blobhashes(); -} -inline const std::string& SendRequest::_internal_blobhashes(int index) const { - return blobhashes_.Get(index); -} -inline const std::string& SendRequest::blobhashes(int index) const { - // @@protoc_insertion_point(field_get:tunnelbroker.SendRequest.blobHashes) - return _internal_blobhashes(index); -} -inline std::string* SendRequest::mutable_blobhashes(int index) { - // @@protoc_insertion_point(field_mutable:tunnelbroker.SendRequest.blobHashes) - return blobhashes_.Mutable(index); -} -inline void SendRequest::set_blobhashes(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.blobHashes) - blobhashes_.Mutable(index)->assign(value); -} -inline void SendRequest::set_blobhashes(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.SendRequest.blobHashes) - blobhashes_.Mutable(index)->assign(std::move(value)); -} -inline void SendRequest::set_blobhashes(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::set_blobhashes(int index, const char* value, size_t size) { - blobhashes_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.SendRequest.blobHashes) -} -inline std::string* SendRequest::_internal_add_blobhashes() { - return blobhashes_.Add(); -} -inline void SendRequest::add_blobhashes(const std::string& value) { - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::add_blobhashes(std::string&& value) { - blobhashes_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::add_blobhashes(const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tunnelbroker.SendRequest.blobHashes) -} -inline void SendRequest::add_blobhashes(const char* value, size_t size) { - blobhashes_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tunnelbroker.SendRequest.blobHashes) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -SendRequest::blobhashes() const { - // @@protoc_insertion_point(field_list:tunnelbroker.SendRequest.blobHashes) - return blobhashes_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -SendRequest::mutable_blobhashes() { - // @@protoc_insertion_point(field_mutable_list:tunnelbroker.SendRequest.blobHashes) - return &blobhashes_; + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.publicKey) } -// ------------------------------------------------------------------- - -// GetRequest - -// string sessionID = 1; -inline void GetRequest::clear_sessionid() { - sessionid_.ClearToEmpty(); +// string signature = 3; +inline void NewSessionRequest::clear_signature() { + signature_.ClearToEmpty(); } -inline const std::string& GetRequest::sessionid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetRequest.sessionID) - return _internal_sessionid(); +inline const std::string& NewSessionRequest::signature() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.signature) + return _internal_signature(); } -inline void GetRequest::set_sessionid(const std::string& value) { - _internal_set_sessionid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetRequest.sessionID) +inline void NewSessionRequest::set_signature(const std::string& value) { + _internal_set_signature(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.signature) } -inline std::string* GetRequest::mutable_sessionid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetRequest.sessionID) - return _internal_mutable_sessionid(); +inline std::string* NewSessionRequest::mutable_signature() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.signature) + return _internal_mutable_signature(); } -inline const std::string& GetRequest::_internal_sessionid() const { - return sessionid_.Get(); +inline const std::string& NewSessionRequest::_internal_signature() const { + return signature_.Get(); } -inline void GetRequest::_internal_set_sessionid(const std::string& value) { +inline void NewSessionRequest::_internal_set_signature(const std::string& value) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void GetRequest::set_sessionid(std::string&& value) { +inline void NewSessionRequest::set_signature(std::string&& value) { - sessionid_.Set( + signature_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetRequest.sessionID) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.signature) } -inline void GetRequest::set_sessionid(const char* value) { +inline void NewSessionRequest::set_signature(const char* value) { GOOGLE_DCHECK(value != nullptr); - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.GetRequest.sessionID) + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.signature) } -inline void GetRequest::set_sessionid(const char* value, +inline void NewSessionRequest::set_signature(const char* value, size_t size) { - sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetRequest.sessionID) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.signature) } -inline std::string* GetRequest::_internal_mutable_sessionid() { +inline std::string* NewSessionRequest::_internal_mutable_signature() { - return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* GetRequest::release_sessionid() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetRequest.sessionID) - return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* NewSessionRequest::release_signature() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.signature) + return signature_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void GetRequest::set_allocated_sessionid(std::string* sessionid) { - if (sessionid != nullptr) { +inline void NewSessionRequest::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { } else { } - sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetRequest.sessionID) + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.signature) } -// string newNotifyToken = 2; -inline bool GetRequest::_internal_has_newnotifytoken() const { +// string notifyToken = 4; +inline bool NewSessionRequest::_internal_has_notifytoken() const { bool value = (_has_bits_[0] & 0x00000001u) != 0; return value; } -inline bool GetRequest::has_newnotifytoken() const { - return _internal_has_newnotifytoken(); +inline bool NewSessionRequest::has_notifytoken() const { + return _internal_has_notifytoken(); } -inline void GetRequest::clear_newnotifytoken() { - newnotifytoken_.ClearToEmpty(); +inline void NewSessionRequest::clear_notifytoken() { + notifytoken_.ClearToEmpty(); _has_bits_[0] &= ~0x00000001u; } -inline const std::string& GetRequest::newnotifytoken() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetRequest.newNotifyToken) - return _internal_newnotifytoken(); +inline const std::string& NewSessionRequest::notifytoken() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.notifyToken) + return _internal_notifytoken(); } -inline void GetRequest::set_newnotifytoken(const std::string& value) { - _internal_set_newnotifytoken(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetRequest.newNotifyToken) +inline void NewSessionRequest::set_notifytoken(const std::string& value) { + _internal_set_notifytoken(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.notifyToken) } -inline std::string* GetRequest::mutable_newnotifytoken() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetRequest.newNotifyToken) - return _internal_mutable_newnotifytoken(); +inline std::string* NewSessionRequest::mutable_notifytoken() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.notifyToken) + return _internal_mutable_notifytoken(); } -inline const std::string& GetRequest::_internal_newnotifytoken() const { - return newnotifytoken_.Get(); +inline const std::string& NewSessionRequest::_internal_notifytoken() const { + return notifytoken_.Get(); } -inline void GetRequest::_internal_set_newnotifytoken(const std::string& value) { +inline void NewSessionRequest::_internal_set_notifytoken(const std::string& value) { _has_bits_[0] |= 0x00000001u; - newnotifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void GetRequest::set_newnotifytoken(std::string&& value) { +inline void NewSessionRequest::set_notifytoken(std::string&& value) { _has_bits_[0] |= 0x00000001u; - newnotifytoken_.Set( + notifytoken_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetRequest.newNotifyToken) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.notifyToken) } -inline void GetRequest::set_newnotifytoken(const char* value) { +inline void NewSessionRequest::set_notifytoken(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - newnotifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.GetRequest.newNotifyToken) + notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.notifyToken) } -inline void GetRequest::set_newnotifytoken(const char* value, +inline void NewSessionRequest::set_notifytoken(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - newnotifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + notifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetRequest.newNotifyToken) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.notifyToken) } -inline std::string* GetRequest::_internal_mutable_newnotifytoken() { +inline std::string* NewSessionRequest::_internal_mutable_notifytoken() { _has_bits_[0] |= 0x00000001u; - return newnotifytoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return notifytoken_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* GetRequest::release_newnotifytoken() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetRequest.newNotifyToken) - if (!_internal_has_newnotifytoken()) { +inline std::string* NewSessionRequest::release_notifytoken() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.notifyToken) + if (!_internal_has_notifytoken()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return newnotifytoken_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return notifytoken_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void GetRequest::set_allocated_newnotifytoken(std::string* newnotifytoken) { - if (newnotifytoken != nullptr) { +inline void NewSessionRequest::set_allocated_notifytoken(std::string* notifytoken) { + if (notifytoken != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - newnotifytoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), newnotifytoken, + notifytoken_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), notifytoken, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetRequest.newNotifyToken) + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.notifyToken) } -// ------------------------------------------------------------------- - -// GetResponseMessage +// .tunnelbroker.NewSessionRequest.DeviceTypes deviceType = 5; +inline void NewSessionRequest::clear_devicetype() { + devicetype_ = 0; +} +inline ::tunnelbroker::NewSessionRequest_DeviceTypes NewSessionRequest::_internal_devicetype() const { + return static_cast< ::tunnelbroker::NewSessionRequest_DeviceTypes >(devicetype_); +} +inline ::tunnelbroker::NewSessionRequest_DeviceTypes NewSessionRequest::devicetype() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceType) + return _internal_devicetype(); +} +inline void NewSessionRequest::_internal_set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value) { + + devicetype_ = value; +} +inline void NewSessionRequest::set_devicetype(::tunnelbroker::NewSessionRequest_DeviceTypes value) { + _internal_set_devicetype(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceType) +} -// string fromDeviceID = 1; -inline void GetResponseMessage::clear_fromdeviceid() { - fromdeviceid_.ClearToEmpty(); +// string deviceAppVersion = 6; +inline void NewSessionRequest::clear_deviceappversion() { + deviceappversion_.ClearToEmpty(); } -inline const std::string& GetResponseMessage::fromdeviceid() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponseMessage.fromDeviceID) - return _internal_fromdeviceid(); +inline const std::string& NewSessionRequest::deviceappversion() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceAppVersion) + return _internal_deviceappversion(); } -inline void GetResponseMessage::set_fromdeviceid(const std::string& value) { - _internal_set_fromdeviceid(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.fromDeviceID) +inline void NewSessionRequest::set_deviceappversion(const std::string& value) { + _internal_set_deviceappversion(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceAppVersion) } -inline std::string* GetResponseMessage::mutable_fromdeviceid() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponseMessage.fromDeviceID) - return _internal_mutable_fromdeviceid(); +inline std::string* NewSessionRequest::mutable_deviceappversion() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceAppVersion) + return _internal_mutable_deviceappversion(); } -inline const std::string& GetResponseMessage::_internal_fromdeviceid() const { - return fromdeviceid_.Get(); +inline const std::string& NewSessionRequest::_internal_deviceappversion() const { + return deviceappversion_.Get(); } -inline void GetResponseMessage::_internal_set_fromdeviceid(const std::string& value) { +inline void NewSessionRequest::_internal_set_deviceappversion(const std::string& value) { - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void GetResponseMessage::set_fromdeviceid(std::string&& value) { +inline void NewSessionRequest::set_deviceappversion(std::string&& value) { - fromdeviceid_.Set( + deviceappversion_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponseMessage.fromDeviceID) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceAppVersion) } -inline void GetResponseMessage::set_fromdeviceid(const char* value) { +inline void NewSessionRequest::set_deviceappversion(const char* value) { GOOGLE_DCHECK(value != nullptr); - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponseMessage.fromDeviceID) + deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceAppVersion) } -inline void GetResponseMessage::set_fromdeviceid(const char* value, +inline void NewSessionRequest::set_deviceappversion(const char* value, size_t size) { - fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + deviceappversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponseMessage.fromDeviceID) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceAppVersion) } -inline std::string* GetResponseMessage::_internal_mutable_fromdeviceid() { +inline std::string* NewSessionRequest::_internal_mutable_deviceappversion() { - return fromdeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return deviceappversion_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* GetResponseMessage::release_fromdeviceid() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetResponseMessage.fromDeviceID) - return fromdeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* NewSessionRequest::release_deviceappversion() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceAppVersion) + return deviceappversion_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void GetResponseMessage::set_allocated_fromdeviceid(std::string* fromdeviceid) { - if (fromdeviceid != nullptr) { +inline void NewSessionRequest::set_allocated_deviceappversion(std::string* deviceappversion) { + if (deviceappversion != nullptr) { } else { } - fromdeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fromdeviceid, + deviceappversion_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceappversion, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponseMessage.fromDeviceID) + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceAppVersion) } -// bytes payload = 2; -inline void GetResponseMessage::clear_payload() { - payload_.ClearToEmpty(); +// string deviceOS = 7; +inline void NewSessionRequest::clear_deviceos() { + deviceos_.ClearToEmpty(); } -inline const std::string& GetResponseMessage::payload() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponseMessage.payload) - return _internal_payload(); +inline const std::string& NewSessionRequest::deviceos() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionRequest.deviceOS) + return _internal_deviceos(); } -inline void GetResponseMessage::set_payload(const std::string& value) { - _internal_set_payload(value); - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.payload) +inline void NewSessionRequest::set_deviceos(const std::string& value) { + _internal_set_deviceos(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionRequest.deviceOS) } -inline std::string* GetResponseMessage::mutable_payload() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponseMessage.payload) - return _internal_mutable_payload(); +inline std::string* NewSessionRequest::mutable_deviceos() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionRequest.deviceOS) + return _internal_mutable_deviceos(); } -inline const std::string& GetResponseMessage::_internal_payload() const { - return payload_.Get(); +inline const std::string& NewSessionRequest::_internal_deviceos() const { + return deviceos_.Get(); } -inline void GetResponseMessage::_internal_set_payload(const std::string& value) { +inline void NewSessionRequest::_internal_set_deviceos(const std::string& value) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); + deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline void GetResponseMessage::set_payload(std::string&& value) { +inline void NewSessionRequest::set_deviceos(std::string&& value) { - payload_.Set( + deviceos_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.GetResponseMessage.payload) + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionRequest.deviceOS) } -inline void GetResponseMessage::set_payload(const char* value) { +inline void NewSessionRequest::set_deviceos(const char* value) { GOOGLE_DCHECK(value != nullptr); - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponseMessage.payload) + deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionRequest.deviceOS) } -inline void GetResponseMessage::set_payload(const void* value, +inline void NewSessionRequest::set_deviceos(const char* value, size_t size) { - payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + deviceos_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponseMessage.payload) + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionRequest.deviceOS) } -inline std::string* GetResponseMessage::_internal_mutable_payload() { +inline std::string* NewSessionRequest::_internal_mutable_deviceos() { - return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); + return deviceos_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline std::string* GetResponseMessage::release_payload() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetResponseMessage.payload) - return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* NewSessionRequest::release_deviceos() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionRequest.deviceOS) + return deviceos_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void GetResponseMessage::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { +inline void NewSessionRequest::set_allocated_deviceos(std::string* deviceos) { + if (deviceos != nullptr) { } else { } - payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, + deviceos_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceos, GetArena()); - // @@protoc_insertion_point(field_set_allocated:tunnelbroker.GetResponseMessage.payload) -} - -// repeated string blobHashes = 3; -inline int GetResponseMessage::_internal_blobhashes_size() const { - return blobhashes_.size(); -} -inline int GetResponseMessage::blobhashes_size() const { - return _internal_blobhashes_size(); -} -inline void GetResponseMessage::clear_blobhashes() { - blobhashes_.Clear(); -} -inline std::string* GetResponseMessage::add_blobhashes() { - // @@protoc_insertion_point(field_add_mutable:tunnelbroker.GetResponseMessage.blobHashes) - return _internal_add_blobhashes(); -} -inline const std::string& GetResponseMessage::_internal_blobhashes(int index) const { - return blobhashes_.Get(index); -} -inline const std::string& GetResponseMessage::blobhashes(int index) const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponseMessage.blobHashes) - return _internal_blobhashes(index); -} -inline std::string* GetResponseMessage::mutable_blobhashes(int index) { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponseMessage.blobHashes) - return blobhashes_.Mutable(index); -} -inline void GetResponseMessage::set_blobhashes(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.blobHashes) - blobhashes_.Mutable(index)->assign(value); -} -inline void GetResponseMessage::set_blobhashes(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:tunnelbroker.GetResponseMessage.blobHashes) - blobhashes_.Mutable(index)->assign(std::move(value)); -} -inline void GetResponseMessage::set_blobhashes(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tunnelbroker.GetResponseMessage.blobHashes) -} -inline void GetResponseMessage::set_blobhashes(int index, const char* value, size_t size) { - blobhashes_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tunnelbroker.GetResponseMessage.blobHashes) -} -inline std::string* GetResponseMessage::_internal_add_blobhashes() { - return blobhashes_.Add(); -} -inline void GetResponseMessage::add_blobhashes(const std::string& value) { - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tunnelbroker.GetResponseMessage.blobHashes) -} -inline void GetResponseMessage::add_blobhashes(std::string&& value) { - blobhashes_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tunnelbroker.GetResponseMessage.blobHashes) -} -inline void GetResponseMessage::add_blobhashes(const char* value) { - GOOGLE_DCHECK(value != nullptr); - blobhashes_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tunnelbroker.GetResponseMessage.blobHashes) -} -inline void GetResponseMessage::add_blobhashes(const char* value, size_t size) { - blobhashes_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tunnelbroker.GetResponseMessage.blobHashes) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -GetResponseMessage::blobhashes() const { - // @@protoc_insertion_point(field_list:tunnelbroker.GetResponseMessage.blobHashes) - return blobhashes_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -GetResponseMessage::mutable_blobhashes() { - // @@protoc_insertion_point(field_mutable_list:tunnelbroker.GetResponseMessage.blobHashes) - return &blobhashes_; + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionRequest.deviceOS) } // ------------------------------------------------------------------- -// GetResponse - -// .tunnelbroker.GetResponseMessage responseMessage = 1; -inline bool GetResponse::_internal_has_responsemessage() const { - return data_case() == kResponseMessage; -} -inline bool GetResponse::has_responsemessage() const { - return _internal_has_responsemessage(); -} -inline void GetResponse::set_has_responsemessage() { - _oneof_case_[0] = kResponseMessage; -} -inline void GetResponse::clear_responsemessage() { - if (_internal_has_responsemessage()) { - if (GetArena() == nullptr) { - delete data_.responsemessage_; - } - clear_has_data(); - } -} -inline ::tunnelbroker::GetResponseMessage* GetResponse::release_responsemessage() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.responseMessage) - if (_internal_has_responsemessage()) { - clear_has_data(); - ::tunnelbroker::GetResponseMessage* temp = data_.responsemessage_; - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - data_.responsemessage_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tunnelbroker::GetResponseMessage& GetResponse::_internal_responsemessage() const { - return _internal_has_responsemessage() - ? *data_.responsemessage_ - : reinterpret_cast< ::tunnelbroker::GetResponseMessage&>(::tunnelbroker::_GetResponseMessage_default_instance_); -} -inline const ::tunnelbroker::GetResponseMessage& GetResponse::responsemessage() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.responseMessage) - return _internal_responsemessage(); -} -inline ::tunnelbroker::GetResponseMessage* GetResponse::unsafe_arena_release_responsemessage() { - // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.GetResponse.responseMessage) - if (_internal_has_responsemessage()) { - clear_has_data(); - ::tunnelbroker::GetResponseMessage* temp = data_.responsemessage_; - data_.responsemessage_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void GetResponse::unsafe_arena_set_allocated_responsemessage(::tunnelbroker::GetResponseMessage* responsemessage) { - clear_data(); - if (responsemessage) { - set_has_responsemessage(); - data_.responsemessage_ = responsemessage; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.GetResponse.responseMessage) -} -inline ::tunnelbroker::GetResponseMessage* GetResponse::_internal_mutable_responsemessage() { - if (!_internal_has_responsemessage()) { - clear_data(); - set_has_responsemessage(); - data_.responsemessage_ = CreateMaybeMessage< ::tunnelbroker::GetResponseMessage >(GetArena()); - } - return data_.responsemessage_; -} -inline ::tunnelbroker::GetResponseMessage* GetResponse::mutable_responsemessage() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.responseMessage) - return _internal_mutable_responsemessage(); -} +// NewSessionResponse -// .google.protobuf.Empty ping = 2; -inline bool GetResponse::_internal_has_ping() const { - return data_case() == kPing; -} -inline bool GetResponse::has_ping() const { - return _internal_has_ping(); -} -inline void GetResponse::set_has_ping() { - _oneof_case_[0] = kPing; -} -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::release_ping() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.ping) - if (_internal_has_ping()) { - clear_has_data(); - PROTOBUF_NAMESPACE_ID::Empty* temp = data_.ping_; - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - data_.ping_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const PROTOBUF_NAMESPACE_ID::Empty& GetResponse::_internal_ping() const { - return _internal_has_ping() - ? *data_.ping_ - : reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty&>(PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); -} -inline const PROTOBUF_NAMESPACE_ID::Empty& GetResponse::ping() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.ping) - return _internal_ping(); +// string sessionID = 1; +inline void NewSessionResponse::clear_sessionid() { + sessionid_.ClearToEmpty(); } -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::unsafe_arena_release_ping() { - // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.GetResponse.ping) - if (_internal_has_ping()) { - clear_has_data(); - PROTOBUF_NAMESPACE_ID::Empty* temp = data_.ping_; - data_.ping_ = nullptr; - return temp; - } else { - return nullptr; - } +inline const std::string& NewSessionResponse::sessionid() const { + // @@protoc_insertion_point(field_get:tunnelbroker.NewSessionResponse.sessionID) + return _internal_sessionid(); } -inline void GetResponse::unsafe_arena_set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping) { - clear_data(); - if (ping) { - set_has_ping(); - data_.ping_ = ping; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.GetResponse.ping) +inline void NewSessionResponse::set_sessionid(const std::string& value) { + _internal_set_sessionid(value); + // @@protoc_insertion_point(field_set:tunnelbroker.NewSessionResponse.sessionID) } -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::_internal_mutable_ping() { - if (!_internal_has_ping()) { - clear_data(); - set_has_ping(); - data_.ping_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); - } - return data_.ping_; +inline std::string* NewSessionResponse::mutable_sessionid() { + // @@protoc_insertion_point(field_mutable:tunnelbroker.NewSessionResponse.sessionID) + return _internal_mutable_sessionid(); } -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::mutable_ping() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.ping) - return _internal_mutable_ping(); +inline const std::string& NewSessionResponse::_internal_sessionid() const { + return sessionid_.Get(); } - -// .google.protobuf.Empty newNotifyTokenRequired = 3; -inline bool GetResponse::_internal_has_newnotifytokenrequired() const { - return data_case() == kNewNotifyTokenRequired; +inline void NewSessionResponse::_internal_set_sessionid(const std::string& value) { + + sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } -inline bool GetResponse::has_newnotifytokenrequired() const { - return _internal_has_newnotifytokenrequired(); +inline void NewSessionResponse::set_sessionid(std::string&& value) { + + sessionid_.Set( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.NewSessionResponse.sessionID) } -inline void GetResponse::set_has_newnotifytokenrequired() { - _oneof_case_[0] = kNewNotifyTokenRequired; +inline void NewSessionResponse::set_sessionid(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:tunnelbroker.NewSessionResponse.sessionID) } -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::release_newnotifytokenrequired() { - // @@protoc_insertion_point(field_release:tunnelbroker.GetResponse.newNotifyTokenRequired) - if (_internal_has_newnotifytokenrequired()) { - clear_has_data(); - PROTOBUF_NAMESPACE_ID::Empty* temp = data_.newnotifytokenrequired_; - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - data_.newnotifytokenrequired_ = nullptr; - return temp; - } else { - return nullptr; - } +inline void NewSessionResponse::set_sessionid(const char* value, + size_t size) { + + sessionid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:tunnelbroker.NewSessionResponse.sessionID) } -inline const PROTOBUF_NAMESPACE_ID::Empty& GetResponse::_internal_newnotifytokenrequired() const { - return _internal_has_newnotifytokenrequired() - ? *data_.newnotifytokenrequired_ - : reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty&>(PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); +inline std::string* NewSessionResponse::_internal_mutable_sessionid() { + + return sessionid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } -inline const PROTOBUF_NAMESPACE_ID::Empty& GetResponse::newnotifytokenrequired() const { - // @@protoc_insertion_point(field_get:tunnelbroker.GetResponse.newNotifyTokenRequired) - return _internal_newnotifytokenrequired(); +inline std::string* NewSessionResponse::release_sessionid() { + // @@protoc_insertion_point(field_release:tunnelbroker.NewSessionResponse.sessionID) + return sessionid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::unsafe_arena_release_newnotifytokenrequired() { - // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.GetResponse.newNotifyTokenRequired) - if (_internal_has_newnotifytokenrequired()) { - clear_has_data(); - PROTOBUF_NAMESPACE_ID::Empty* temp = data_.newnotifytokenrequired_; - data_.newnotifytokenrequired_ = nullptr; - return temp; +inline void NewSessionResponse::set_allocated_sessionid(std::string* sessionid) { + if (sessionid != nullptr) { + } else { - return nullptr; - } -} -inline void GetResponse::unsafe_arena_set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired) { - clear_data(); - if (newnotifytokenrequired) { - set_has_newnotifytokenrequired(); - data_.newnotifytokenrequired_ = newnotifytokenrequired; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.GetResponse.newNotifyTokenRequired) -} -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::_internal_mutable_newnotifytokenrequired() { - if (!_internal_has_newnotifytokenrequired()) { - clear_data(); - set_has_newnotifytokenrequired(); - data_.newnotifytokenrequired_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); + } - return data_.newnotifytokenrequired_; -} -inline PROTOBUF_NAMESPACE_ID::Empty* GetResponse::mutable_newnotifytokenrequired() { - // @@protoc_insertion_point(field_mutable:tunnelbroker.GetResponse.newNotifyTokenRequired) - return _internal_mutable_newnotifytokenrequired(); + sessionid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sessionid, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:tunnelbroker.NewSessionResponse.sessionID) } -inline bool GetResponse::has_data() const { - return data_case() != DATA_NOT_SET; -} -inline void GetResponse::clear_has_data() { - _oneof_case_[0] = DATA_NOT_SET; -} -inline GetResponse::DataCase GetResponse::data_case() const { - return GetResponse::DataCase(_oneof_case_[0]); -} // ------------------------------------------------------------------- // ProcessedMessages // repeated string messageID = 1; inline int ProcessedMessages::_internal_messageid_size() const { return messageid_.size(); } inline int ProcessedMessages::messageid_size() const { return _internal_messageid_size(); } inline void ProcessedMessages::clear_messageid() { messageid_.Clear(); } inline std::string* ProcessedMessages::add_messageid() { // @@protoc_insertion_point(field_add_mutable:tunnelbroker.ProcessedMessages.messageID) return _internal_add_messageid(); } inline const std::string& ProcessedMessages::_internal_messageid(int index) const { return messageid_.Get(index); } inline const std::string& ProcessedMessages::messageid(int index) const { // @@protoc_insertion_point(field_get:tunnelbroker.ProcessedMessages.messageID) return _internal_messageid(index); } inline std::string* ProcessedMessages::mutable_messageid(int index) { // @@protoc_insertion_point(field_mutable:tunnelbroker.ProcessedMessages.messageID) return messageid_.Mutable(index); } inline void ProcessedMessages::set_messageid(int index, const std::string& value) { // @@protoc_insertion_point(field_set:tunnelbroker.ProcessedMessages.messageID) messageid_.Mutable(index)->assign(value); } inline void ProcessedMessages::set_messageid(int index, std::string&& value) { // @@protoc_insertion_point(field_set:tunnelbroker.ProcessedMessages.messageID) messageid_.Mutable(index)->assign(std::move(value)); } inline void ProcessedMessages::set_messageid(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); messageid_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:tunnelbroker.ProcessedMessages.messageID) } inline void ProcessedMessages::set_messageid(int index, const char* value, size_t size) { messageid_.Mutable(index)->assign( reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.ProcessedMessages.messageID) } inline std::string* ProcessedMessages::_internal_add_messageid() { return messageid_.Add(); } inline void ProcessedMessages::add_messageid(const std::string& value) { messageid_.Add()->assign(value); // @@protoc_insertion_point(field_add:tunnelbroker.ProcessedMessages.messageID) } inline void ProcessedMessages::add_messageid(std::string&& value) { messageid_.Add(std::move(value)); // @@protoc_insertion_point(field_add:tunnelbroker.ProcessedMessages.messageID) } inline void ProcessedMessages::add_messageid(const char* value) { GOOGLE_DCHECK(value != nullptr); messageid_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:tunnelbroker.ProcessedMessages.messageID) } inline void ProcessedMessages::add_messageid(const char* value, size_t size) { messageid_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:tunnelbroker.ProcessedMessages.messageID) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& ProcessedMessages::messageid() const { // @@protoc_insertion_point(field_list:tunnelbroker.ProcessedMessages.messageID) return messageid_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* ProcessedMessages::mutable_messageid() { // @@protoc_insertion_point(field_mutable_list:tunnelbroker.ProcessedMessages.messageID) return &messageid_; } // ------------------------------------------------------------------- // MessageToTunnelbrokerStruct // string messageID = 1; inline void MessageToTunnelbrokerStruct::clear_messageid() { messageid_.ClearToEmpty(); } inline const std::string& MessageToTunnelbrokerStruct::messageid() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbrokerStruct.messageID) return _internal_messageid(); } inline void MessageToTunnelbrokerStruct::set_messageid(const std::string& value) { _internal_set_messageid(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbrokerStruct.messageID) } inline std::string* MessageToTunnelbrokerStruct::mutable_messageid() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbrokerStruct.messageID) return _internal_mutable_messageid(); } inline const std::string& MessageToTunnelbrokerStruct::_internal_messageid() const { return messageid_.Get(); } inline void MessageToTunnelbrokerStruct::_internal_set_messageid(const std::string& value) { messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToTunnelbrokerStruct::set_messageid(std::string&& value) { messageid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToTunnelbrokerStruct.messageID) } inline void MessageToTunnelbrokerStruct::set_messageid(const char* value) { GOOGLE_DCHECK(value != nullptr); messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToTunnelbrokerStruct.messageID) } inline void MessageToTunnelbrokerStruct::set_messageid(const char* value, size_t size) { messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToTunnelbrokerStruct.messageID) } inline std::string* MessageToTunnelbrokerStruct::_internal_mutable_messageid() { return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToTunnelbrokerStruct::release_messageid() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToTunnelbrokerStruct.messageID) return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MessageToTunnelbrokerStruct::set_allocated_messageid(std::string* messageid) { if (messageid != nullptr) { } else { } messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, GetArena()); // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToTunnelbrokerStruct.messageID) } // string toDeviceID = 2; inline void MessageToTunnelbrokerStruct::clear_todeviceid() { todeviceid_.ClearToEmpty(); } inline const std::string& MessageToTunnelbrokerStruct::todeviceid() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) return _internal_todeviceid(); } inline void MessageToTunnelbrokerStruct::set_todeviceid(const std::string& value) { _internal_set_todeviceid(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) } inline std::string* MessageToTunnelbrokerStruct::mutable_todeviceid() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) return _internal_mutable_todeviceid(); } inline const std::string& MessageToTunnelbrokerStruct::_internal_todeviceid() const { return todeviceid_.Get(); } inline void MessageToTunnelbrokerStruct::_internal_set_todeviceid(const std::string& value) { todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToTunnelbrokerStruct::set_todeviceid(std::string&& value) { todeviceid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) } inline void MessageToTunnelbrokerStruct::set_todeviceid(const char* value) { GOOGLE_DCHECK(value != nullptr); todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) } inline void MessageToTunnelbrokerStruct::set_todeviceid(const char* value, size_t size) { todeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) } inline std::string* MessageToTunnelbrokerStruct::_internal_mutable_todeviceid() { return todeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToTunnelbrokerStruct::release_todeviceid() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) return todeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MessageToTunnelbrokerStruct::set_allocated_todeviceid(std::string* todeviceid) { if (todeviceid != nullptr) { } else { } todeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), todeviceid, GetArena()); // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToTunnelbrokerStruct.toDeviceID) } // string payload = 3; inline void MessageToTunnelbrokerStruct::clear_payload() { payload_.ClearToEmpty(); } inline const std::string& MessageToTunnelbrokerStruct::payload() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbrokerStruct.payload) return _internal_payload(); } inline void MessageToTunnelbrokerStruct::set_payload(const std::string& value) { _internal_set_payload(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbrokerStruct.payload) } inline std::string* MessageToTunnelbrokerStruct::mutable_payload() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbrokerStruct.payload) return _internal_mutable_payload(); } inline const std::string& MessageToTunnelbrokerStruct::_internal_payload() const { return payload_.Get(); } inline void MessageToTunnelbrokerStruct::_internal_set_payload(const std::string& value) { payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToTunnelbrokerStruct::set_payload(std::string&& value) { payload_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToTunnelbrokerStruct.payload) } inline void MessageToTunnelbrokerStruct::set_payload(const char* value) { GOOGLE_DCHECK(value != nullptr); payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToTunnelbrokerStruct.payload) } inline void MessageToTunnelbrokerStruct::set_payload(const char* value, size_t size) { payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToTunnelbrokerStruct.payload) } inline std::string* MessageToTunnelbrokerStruct::_internal_mutable_payload() { return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToTunnelbrokerStruct::release_payload() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToTunnelbrokerStruct.payload) return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MessageToTunnelbrokerStruct::set_allocated_payload(std::string* payload) { if (payload != nullptr) { } else { } payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, GetArena()); // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToTunnelbrokerStruct.payload) } // repeated string blobHashes = 4; inline int MessageToTunnelbrokerStruct::_internal_blobhashes_size() const { return blobhashes_.size(); } inline int MessageToTunnelbrokerStruct::blobhashes_size() const { return _internal_blobhashes_size(); } inline void MessageToTunnelbrokerStruct::clear_blobhashes() { blobhashes_.Clear(); } inline std::string* MessageToTunnelbrokerStruct::add_blobhashes() { // @@protoc_insertion_point(field_add_mutable:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) return _internal_add_blobhashes(); } inline const std::string& MessageToTunnelbrokerStruct::_internal_blobhashes(int index) const { return blobhashes_.Get(index); } inline const std::string& MessageToTunnelbrokerStruct::blobhashes(int index) const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) return _internal_blobhashes(index); } inline std::string* MessageToTunnelbrokerStruct::mutable_blobhashes(int index) { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) return blobhashes_.Mutable(index); } inline void MessageToTunnelbrokerStruct::set_blobhashes(int index, const std::string& value) { // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) blobhashes_.Mutable(index)->assign(value); } inline void MessageToTunnelbrokerStruct::set_blobhashes(int index, std::string&& value) { // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) blobhashes_.Mutable(index)->assign(std::move(value)); } inline void MessageToTunnelbrokerStruct::set_blobhashes(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); blobhashes_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) } inline void MessageToTunnelbrokerStruct::set_blobhashes(int index, const char* value, size_t size) { blobhashes_.Mutable(index)->assign( reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) } inline std::string* MessageToTunnelbrokerStruct::_internal_add_blobhashes() { return blobhashes_.Add(); } inline void MessageToTunnelbrokerStruct::add_blobhashes(const std::string& value) { blobhashes_.Add()->assign(value); // @@protoc_insertion_point(field_add:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) } inline void MessageToTunnelbrokerStruct::add_blobhashes(std::string&& value) { blobhashes_.Add(std::move(value)); // @@protoc_insertion_point(field_add:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) } inline void MessageToTunnelbrokerStruct::add_blobhashes(const char* value) { GOOGLE_DCHECK(value != nullptr); blobhashes_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) } inline void MessageToTunnelbrokerStruct::add_blobhashes(const char* value, size_t size) { blobhashes_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& MessageToTunnelbrokerStruct::blobhashes() const { // @@protoc_insertion_point(field_list:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) return blobhashes_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* MessageToTunnelbrokerStruct::mutable_blobhashes() { // @@protoc_insertion_point(field_mutable_list:tunnelbroker.MessageToTunnelbrokerStruct.blobHashes) return &blobhashes_; } // ------------------------------------------------------------------- // MessagesToSend // repeated .tunnelbroker.MessageToTunnelbrokerStruct messages = 1; inline int MessagesToSend::_internal_messages_size() const { return messages_.size(); } inline int MessagesToSend::messages_size() const { return _internal_messages_size(); } inline void MessagesToSend::clear_messages() { messages_.Clear(); } inline ::tunnelbroker::MessageToTunnelbrokerStruct* MessagesToSend::mutable_messages(int index) { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessagesToSend.messages) return messages_.Mutable(index); } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct >* MessagesToSend::mutable_messages() { // @@protoc_insertion_point(field_mutable_list:tunnelbroker.MessagesToSend.messages) return &messages_; } inline const ::tunnelbroker::MessageToTunnelbrokerStruct& MessagesToSend::_internal_messages(int index) const { return messages_.Get(index); } inline const ::tunnelbroker::MessageToTunnelbrokerStruct& MessagesToSend::messages(int index) const { // @@protoc_insertion_point(field_get:tunnelbroker.MessagesToSend.messages) return _internal_messages(index); } inline ::tunnelbroker::MessageToTunnelbrokerStruct* MessagesToSend::_internal_add_messages() { return messages_.Add(); } inline ::tunnelbroker::MessageToTunnelbrokerStruct* MessagesToSend::add_messages() { // @@protoc_insertion_point(field_add:tunnelbroker.MessagesToSend.messages) return _internal_add_messages(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToTunnelbrokerStruct >& MessagesToSend::messages() const { // @@protoc_insertion_point(field_list:tunnelbroker.MessagesToSend.messages) return messages_; } // ------------------------------------------------------------------- // MessageToTunnelbroker // .tunnelbroker.MessagesToSend messagesToSend = 1; inline bool MessageToTunnelbroker::_internal_has_messagestosend() const { return data_case() == kMessagesToSend; } inline bool MessageToTunnelbroker::has_messagestosend() const { return _internal_has_messagestosend(); } inline void MessageToTunnelbroker::set_has_messagestosend() { _oneof_case_[0] = kMessagesToSend; } inline void MessageToTunnelbroker::clear_messagestosend() { if (_internal_has_messagestosend()) { if (GetArena() == nullptr) { delete data_.messagestosend_; } clear_has_data(); } } inline ::tunnelbroker::MessagesToSend* MessageToTunnelbroker::release_messagestosend() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToTunnelbroker.messagesToSend) if (_internal_has_messagestosend()) { clear_has_data(); ::tunnelbroker::MessagesToSend* temp = data_.messagestosend_; if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } data_.messagestosend_ = nullptr; return temp; } else { return nullptr; } } inline const ::tunnelbroker::MessagesToSend& MessageToTunnelbroker::_internal_messagestosend() const { return _internal_has_messagestosend() ? *data_.messagestosend_ : reinterpret_cast< ::tunnelbroker::MessagesToSend&>(::tunnelbroker::_MessagesToSend_default_instance_); } inline const ::tunnelbroker::MessagesToSend& MessageToTunnelbroker::messagestosend() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbroker.messagesToSend) return _internal_messagestosend(); } inline ::tunnelbroker::MessagesToSend* MessageToTunnelbroker::unsafe_arena_release_messagestosend() { // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.MessageToTunnelbroker.messagesToSend) if (_internal_has_messagestosend()) { clear_has_data(); ::tunnelbroker::MessagesToSend* temp = data_.messagestosend_; data_.messagestosend_ = nullptr; return temp; } else { return nullptr; } } inline void MessageToTunnelbroker::unsafe_arena_set_allocated_messagestosend(::tunnelbroker::MessagesToSend* messagestosend) { clear_data(); if (messagestosend) { set_has_messagestosend(); data_.messagestosend_ = messagestosend; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.MessageToTunnelbroker.messagesToSend) } inline ::tunnelbroker::MessagesToSend* MessageToTunnelbroker::_internal_mutable_messagestosend() { if (!_internal_has_messagestosend()) { clear_data(); set_has_messagestosend(); data_.messagestosend_ = CreateMaybeMessage< ::tunnelbroker::MessagesToSend >(GetArena()); } return data_.messagestosend_; } inline ::tunnelbroker::MessagesToSend* MessageToTunnelbroker::mutable_messagestosend() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbroker.messagesToSend) return _internal_mutable_messagestosend(); } // .tunnelbroker.ProcessedMessages processedMessages = 2; inline bool MessageToTunnelbroker::_internal_has_processedmessages() const { return data_case() == kProcessedMessages; } inline bool MessageToTunnelbroker::has_processedmessages() const { return _internal_has_processedmessages(); } inline void MessageToTunnelbroker::set_has_processedmessages() { _oneof_case_[0] = kProcessedMessages; } inline void MessageToTunnelbroker::clear_processedmessages() { if (_internal_has_processedmessages()) { if (GetArena() == nullptr) { delete data_.processedmessages_; } clear_has_data(); } } inline ::tunnelbroker::ProcessedMessages* MessageToTunnelbroker::release_processedmessages() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToTunnelbroker.processedMessages) if (_internal_has_processedmessages()) { clear_has_data(); ::tunnelbroker::ProcessedMessages* temp = data_.processedmessages_; if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } data_.processedmessages_ = nullptr; return temp; } else { return nullptr; } } inline const ::tunnelbroker::ProcessedMessages& MessageToTunnelbroker::_internal_processedmessages() const { return _internal_has_processedmessages() ? *data_.processedmessages_ : reinterpret_cast< ::tunnelbroker::ProcessedMessages&>(::tunnelbroker::_ProcessedMessages_default_instance_); } inline const ::tunnelbroker::ProcessedMessages& MessageToTunnelbroker::processedmessages() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbroker.processedMessages) return _internal_processedmessages(); } inline ::tunnelbroker::ProcessedMessages* MessageToTunnelbroker::unsafe_arena_release_processedmessages() { // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.MessageToTunnelbroker.processedMessages) if (_internal_has_processedmessages()) { clear_has_data(); ::tunnelbroker::ProcessedMessages* temp = data_.processedmessages_; data_.processedmessages_ = nullptr; return temp; } else { return nullptr; } } inline void MessageToTunnelbroker::unsafe_arena_set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages) { clear_data(); if (processedmessages) { set_has_processedmessages(); data_.processedmessages_ = processedmessages; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.MessageToTunnelbroker.processedMessages) } inline ::tunnelbroker::ProcessedMessages* MessageToTunnelbroker::_internal_mutable_processedmessages() { if (!_internal_has_processedmessages()) { clear_data(); set_has_processedmessages(); data_.processedmessages_ = CreateMaybeMessage< ::tunnelbroker::ProcessedMessages >(GetArena()); } return data_.processedmessages_; } inline ::tunnelbroker::ProcessedMessages* MessageToTunnelbroker::mutable_processedmessages() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbroker.processedMessages) return _internal_mutable_processedmessages(); } // string newNotifyToken = 3; inline bool MessageToTunnelbroker::_internal_has_newnotifytoken() const { return data_case() == kNewNotifyToken; } inline bool MessageToTunnelbroker::has_newnotifytoken() const { return _internal_has_newnotifytoken(); } inline void MessageToTunnelbroker::set_has_newnotifytoken() { _oneof_case_[0] = kNewNotifyToken; } inline void MessageToTunnelbroker::clear_newnotifytoken() { if (_internal_has_newnotifytoken()) { data_.newnotifytoken_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); clear_has_data(); } } inline const std::string& MessageToTunnelbroker::newnotifytoken() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToTunnelbroker.newNotifyToken) return _internal_newnotifytoken(); } inline void MessageToTunnelbroker::set_newnotifytoken(const std::string& value) { _internal_set_newnotifytoken(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbroker.newNotifyToken) } inline std::string* MessageToTunnelbroker::mutable_newnotifytoken() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToTunnelbroker.newNotifyToken) return _internal_mutable_newnotifytoken(); } inline const std::string& MessageToTunnelbroker::_internal_newnotifytoken() const { if (_internal_has_newnotifytoken()) { return data_.newnotifytoken_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void MessageToTunnelbroker::_internal_set_newnotifytoken(const std::string& value) { if (!_internal_has_newnotifytoken()) { clear_data(); set_has_newnotifytoken(); data_.newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } data_.newnotifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToTunnelbroker::set_newnotifytoken(std::string&& value) { // @@protoc_insertion_point(field_set:tunnelbroker.MessageToTunnelbroker.newNotifyToken) if (!_internal_has_newnotifytoken()) { clear_data(); set_has_newnotifytoken(); data_.newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } data_.newnotifytoken_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToTunnelbroker.newNotifyToken) } inline void MessageToTunnelbroker::set_newnotifytoken(const char* value) { GOOGLE_DCHECK(value != nullptr); if (!_internal_has_newnotifytoken()) { clear_data(); set_has_newnotifytoken(); data_.newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } data_.newnotifytoken_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToTunnelbroker.newNotifyToken) } inline void MessageToTunnelbroker::set_newnotifytoken(const char* value, size_t size) { if (!_internal_has_newnotifytoken()) { clear_data(); set_has_newnotifytoken(); data_.newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } data_.newnotifytoken_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToTunnelbroker.newNotifyToken) } inline std::string* MessageToTunnelbroker::_internal_mutable_newnotifytoken() { if (!_internal_has_newnotifytoken()) { clear_data(); set_has_newnotifytoken(); data_.newnotifytoken_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } return data_.newnotifytoken_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToTunnelbroker::release_newnotifytoken() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToTunnelbroker.newNotifyToken) if (_internal_has_newnotifytoken()) { clear_has_data(); return data_.newnotifytoken_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } else { return nullptr; } } inline void MessageToTunnelbroker::set_allocated_newnotifytoken(std::string* newnotifytoken) { if (has_data()) { clear_data(); } if (newnotifytoken != nullptr) { set_has_newnotifytoken(); data_.newnotifytoken_.UnsafeSetDefault(newnotifytoken); ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); if (arena != nullptr) { arena->Own(newnotifytoken); } } // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToTunnelbroker.newNotifyToken) } inline bool MessageToTunnelbroker::has_data() const { return data_case() != DATA_NOT_SET; } inline void MessageToTunnelbroker::clear_has_data() { _oneof_case_[0] = DATA_NOT_SET; } inline MessageToTunnelbroker::DataCase MessageToTunnelbroker::data_case() const { return MessageToTunnelbroker::DataCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // MessageToClientStruct // string messageID = 1; inline void MessageToClientStruct::clear_messageid() { messageid_.ClearToEmpty(); } inline const std::string& MessageToClientStruct::messageid() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClientStruct.messageID) return _internal_messageid(); } inline void MessageToClientStruct::set_messageid(const std::string& value) { _internal_set_messageid(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToClientStruct.messageID) } inline std::string* MessageToClientStruct::mutable_messageid() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClientStruct.messageID) return _internal_mutable_messageid(); } inline const std::string& MessageToClientStruct::_internal_messageid() const { return messageid_.Get(); } inline void MessageToClientStruct::_internal_set_messageid(const std::string& value) { messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToClientStruct::set_messageid(std::string&& value) { messageid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToClientStruct.messageID) } inline void MessageToClientStruct::set_messageid(const char* value) { GOOGLE_DCHECK(value != nullptr); messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToClientStruct.messageID) } inline void MessageToClientStruct::set_messageid(const char* value, size_t size) { messageid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToClientStruct.messageID) } inline std::string* MessageToClientStruct::_internal_mutable_messageid() { return messageid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToClientStruct::release_messageid() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClientStruct.messageID) return messageid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MessageToClientStruct::set_allocated_messageid(std::string* messageid) { if (messageid != nullptr) { } else { } messageid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), messageid, GetArena()); // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClientStruct.messageID) } // string fromDeviceID = 2; inline void MessageToClientStruct::clear_fromdeviceid() { fromdeviceid_.ClearToEmpty(); } inline const std::string& MessageToClientStruct::fromdeviceid() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClientStruct.fromDeviceID) return _internal_fromdeviceid(); } inline void MessageToClientStruct::set_fromdeviceid(const std::string& value) { _internal_set_fromdeviceid(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToClientStruct.fromDeviceID) } inline std::string* MessageToClientStruct::mutable_fromdeviceid() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClientStruct.fromDeviceID) return _internal_mutable_fromdeviceid(); } inline const std::string& MessageToClientStruct::_internal_fromdeviceid() const { return fromdeviceid_.Get(); } inline void MessageToClientStruct::_internal_set_fromdeviceid(const std::string& value) { fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToClientStruct::set_fromdeviceid(std::string&& value) { fromdeviceid_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToClientStruct.fromDeviceID) } inline void MessageToClientStruct::set_fromdeviceid(const char* value) { GOOGLE_DCHECK(value != nullptr); fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToClientStruct.fromDeviceID) } inline void MessageToClientStruct::set_fromdeviceid(const char* value, size_t size) { fromdeviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToClientStruct.fromDeviceID) } inline std::string* MessageToClientStruct::_internal_mutable_fromdeviceid() { return fromdeviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToClientStruct::release_fromdeviceid() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClientStruct.fromDeviceID) return fromdeviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MessageToClientStruct::set_allocated_fromdeviceid(std::string* fromdeviceid) { if (fromdeviceid != nullptr) { } else { } fromdeviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fromdeviceid, GetArena()); // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClientStruct.fromDeviceID) } // string payload = 3; inline void MessageToClientStruct::clear_payload() { payload_.ClearToEmpty(); } inline const std::string& MessageToClientStruct::payload() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClientStruct.payload) return _internal_payload(); } inline void MessageToClientStruct::set_payload(const std::string& value) { _internal_set_payload(value); // @@protoc_insertion_point(field_set:tunnelbroker.MessageToClientStruct.payload) } inline std::string* MessageToClientStruct::mutable_payload() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClientStruct.payload) return _internal_mutable_payload(); } inline const std::string& MessageToClientStruct::_internal_payload() const { return payload_.Get(); } inline void MessageToClientStruct::_internal_set_payload(const std::string& value) { payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); } inline void MessageToClientStruct::set_payload(std::string&& value) { payload_.Set( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); // @@protoc_insertion_point(field_set_rvalue:tunnelbroker.MessageToClientStruct.payload) } inline void MessageToClientStruct::set_payload(const char* value) { GOOGLE_DCHECK(value != nullptr); payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToClientStruct.payload) } inline void MessageToClientStruct::set_payload(const char* value, size_t size) { payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( reinterpret_cast(value), size), GetArena()); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToClientStruct.payload) } inline std::string* MessageToClientStruct::_internal_mutable_payload() { return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); } inline std::string* MessageToClientStruct::release_payload() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClientStruct.payload) return payload_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void MessageToClientStruct::set_allocated_payload(std::string* payload) { if (payload != nullptr) { } else { } payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, GetArena()); // @@protoc_insertion_point(field_set_allocated:tunnelbroker.MessageToClientStruct.payload) } // repeated string blobHashes = 4; inline int MessageToClientStruct::_internal_blobhashes_size() const { return blobhashes_.size(); } inline int MessageToClientStruct::blobhashes_size() const { return _internal_blobhashes_size(); } inline void MessageToClientStruct::clear_blobhashes() { blobhashes_.Clear(); } inline std::string* MessageToClientStruct::add_blobhashes() { // @@protoc_insertion_point(field_add_mutable:tunnelbroker.MessageToClientStruct.blobHashes) return _internal_add_blobhashes(); } inline const std::string& MessageToClientStruct::_internal_blobhashes(int index) const { return blobhashes_.Get(index); } inline const std::string& MessageToClientStruct::blobhashes(int index) const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClientStruct.blobHashes) return _internal_blobhashes(index); } inline std::string* MessageToClientStruct::mutable_blobhashes(int index) { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClientStruct.blobHashes) return blobhashes_.Mutable(index); } inline void MessageToClientStruct::set_blobhashes(int index, const std::string& value) { // @@protoc_insertion_point(field_set:tunnelbroker.MessageToClientStruct.blobHashes) blobhashes_.Mutable(index)->assign(value); } inline void MessageToClientStruct::set_blobhashes(int index, std::string&& value) { // @@protoc_insertion_point(field_set:tunnelbroker.MessageToClientStruct.blobHashes) blobhashes_.Mutable(index)->assign(std::move(value)); } inline void MessageToClientStruct::set_blobhashes(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); blobhashes_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:tunnelbroker.MessageToClientStruct.blobHashes) } inline void MessageToClientStruct::set_blobhashes(int index, const char* value, size_t size) { blobhashes_.Mutable(index)->assign( reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:tunnelbroker.MessageToClientStruct.blobHashes) } inline std::string* MessageToClientStruct::_internal_add_blobhashes() { return blobhashes_.Add(); } inline void MessageToClientStruct::add_blobhashes(const std::string& value) { blobhashes_.Add()->assign(value); // @@protoc_insertion_point(field_add:tunnelbroker.MessageToClientStruct.blobHashes) } inline void MessageToClientStruct::add_blobhashes(std::string&& value) { blobhashes_.Add(std::move(value)); // @@protoc_insertion_point(field_add:tunnelbroker.MessageToClientStruct.blobHashes) } inline void MessageToClientStruct::add_blobhashes(const char* value) { GOOGLE_DCHECK(value != nullptr); blobhashes_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:tunnelbroker.MessageToClientStruct.blobHashes) } inline void MessageToClientStruct::add_blobhashes(const char* value, size_t size) { blobhashes_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:tunnelbroker.MessageToClientStruct.blobHashes) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& MessageToClientStruct::blobhashes() const { // @@protoc_insertion_point(field_list:tunnelbroker.MessageToClientStruct.blobHashes) return blobhashes_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* MessageToClientStruct::mutable_blobhashes() { // @@protoc_insertion_point(field_mutable_list:tunnelbroker.MessageToClientStruct.blobHashes) return &blobhashes_; } // ------------------------------------------------------------------- // MessagesToDeliver // repeated .tunnelbroker.MessageToClientStruct messages = 1; inline int MessagesToDeliver::_internal_messages_size() const { return messages_.size(); } inline int MessagesToDeliver::messages_size() const { return _internal_messages_size(); } inline void MessagesToDeliver::clear_messages() { messages_.Clear(); } inline ::tunnelbroker::MessageToClientStruct* MessagesToDeliver::mutable_messages(int index) { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessagesToDeliver.messages) return messages_.Mutable(index); } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct >* MessagesToDeliver::mutable_messages() { // @@protoc_insertion_point(field_mutable_list:tunnelbroker.MessagesToDeliver.messages) return &messages_; } inline const ::tunnelbroker::MessageToClientStruct& MessagesToDeliver::_internal_messages(int index) const { return messages_.Get(index); } inline const ::tunnelbroker::MessageToClientStruct& MessagesToDeliver::messages(int index) const { // @@protoc_insertion_point(field_get:tunnelbroker.MessagesToDeliver.messages) return _internal_messages(index); } inline ::tunnelbroker::MessageToClientStruct* MessagesToDeliver::_internal_add_messages() { return messages_.Add(); } inline ::tunnelbroker::MessageToClientStruct* MessagesToDeliver::add_messages() { // @@protoc_insertion_point(field_add:tunnelbroker.MessagesToDeliver.messages) return _internal_add_messages(); } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tunnelbroker::MessageToClientStruct >& MessagesToDeliver::messages() const { // @@protoc_insertion_point(field_list:tunnelbroker.MessagesToDeliver.messages) return messages_; } // ------------------------------------------------------------------- // MessageToClient // .tunnelbroker.MessagesToDeliver messagesToDeliver = 1; inline bool MessageToClient::_internal_has_messagestodeliver() const { return data_case() == kMessagesToDeliver; } inline bool MessageToClient::has_messagestodeliver() const { return _internal_has_messagestodeliver(); } inline void MessageToClient::set_has_messagestodeliver() { _oneof_case_[0] = kMessagesToDeliver; } inline void MessageToClient::clear_messagestodeliver() { if (_internal_has_messagestodeliver()) { if (GetArena() == nullptr) { delete data_.messagestodeliver_; } clear_has_data(); } } inline ::tunnelbroker::MessagesToDeliver* MessageToClient::release_messagestodeliver() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClient.messagesToDeliver) if (_internal_has_messagestodeliver()) { clear_has_data(); ::tunnelbroker::MessagesToDeliver* temp = data_.messagestodeliver_; if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } data_.messagestodeliver_ = nullptr; return temp; } else { return nullptr; } } inline const ::tunnelbroker::MessagesToDeliver& MessageToClient::_internal_messagestodeliver() const { return _internal_has_messagestodeliver() ? *data_.messagestodeliver_ : reinterpret_cast< ::tunnelbroker::MessagesToDeliver&>(::tunnelbroker::_MessagesToDeliver_default_instance_); } inline const ::tunnelbroker::MessagesToDeliver& MessageToClient::messagestodeliver() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClient.messagesToDeliver) return _internal_messagestodeliver(); } inline ::tunnelbroker::MessagesToDeliver* MessageToClient::unsafe_arena_release_messagestodeliver() { // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.MessageToClient.messagesToDeliver) if (_internal_has_messagestodeliver()) { clear_has_data(); ::tunnelbroker::MessagesToDeliver* temp = data_.messagestodeliver_; data_.messagestodeliver_ = nullptr; return temp; } else { return nullptr; } } inline void MessageToClient::unsafe_arena_set_allocated_messagestodeliver(::tunnelbroker::MessagesToDeliver* messagestodeliver) { clear_data(); if (messagestodeliver) { set_has_messagestodeliver(); data_.messagestodeliver_ = messagestodeliver; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.MessageToClient.messagesToDeliver) } inline ::tunnelbroker::MessagesToDeliver* MessageToClient::_internal_mutable_messagestodeliver() { if (!_internal_has_messagestodeliver()) { clear_data(); set_has_messagestodeliver(); data_.messagestodeliver_ = CreateMaybeMessage< ::tunnelbroker::MessagesToDeliver >(GetArena()); } return data_.messagestodeliver_; } inline ::tunnelbroker::MessagesToDeliver* MessageToClient::mutable_messagestodeliver() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClient.messagesToDeliver) return _internal_mutable_messagestodeliver(); } // .tunnelbroker.ProcessedMessages processedMessages = 2; inline bool MessageToClient::_internal_has_processedmessages() const { return data_case() == kProcessedMessages; } inline bool MessageToClient::has_processedmessages() const { return _internal_has_processedmessages(); } inline void MessageToClient::set_has_processedmessages() { _oneof_case_[0] = kProcessedMessages; } inline void MessageToClient::clear_processedmessages() { if (_internal_has_processedmessages()) { if (GetArena() == nullptr) { delete data_.processedmessages_; } clear_has_data(); } } inline ::tunnelbroker::ProcessedMessages* MessageToClient::release_processedmessages() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClient.processedMessages) if (_internal_has_processedmessages()) { clear_has_data(); ::tunnelbroker::ProcessedMessages* temp = data_.processedmessages_; if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } data_.processedmessages_ = nullptr; return temp; } else { return nullptr; } } inline const ::tunnelbroker::ProcessedMessages& MessageToClient::_internal_processedmessages() const { return _internal_has_processedmessages() ? *data_.processedmessages_ : reinterpret_cast< ::tunnelbroker::ProcessedMessages&>(::tunnelbroker::_ProcessedMessages_default_instance_); } inline const ::tunnelbroker::ProcessedMessages& MessageToClient::processedmessages() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClient.processedMessages) return _internal_processedmessages(); } inline ::tunnelbroker::ProcessedMessages* MessageToClient::unsafe_arena_release_processedmessages() { // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.MessageToClient.processedMessages) if (_internal_has_processedmessages()) { clear_has_data(); ::tunnelbroker::ProcessedMessages* temp = data_.processedmessages_; data_.processedmessages_ = nullptr; return temp; } else { return nullptr; } } inline void MessageToClient::unsafe_arena_set_allocated_processedmessages(::tunnelbroker::ProcessedMessages* processedmessages) { clear_data(); if (processedmessages) { set_has_processedmessages(); data_.processedmessages_ = processedmessages; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.MessageToClient.processedMessages) } inline ::tunnelbroker::ProcessedMessages* MessageToClient::_internal_mutable_processedmessages() { if (!_internal_has_processedmessages()) { clear_data(); set_has_processedmessages(); data_.processedmessages_ = CreateMaybeMessage< ::tunnelbroker::ProcessedMessages >(GetArena()); } return data_.processedmessages_; } inline ::tunnelbroker::ProcessedMessages* MessageToClient::mutable_processedmessages() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClient.processedMessages) return _internal_mutable_processedmessages(); } // .google.protobuf.Empty newNotifyTokenRequired = 3; inline bool MessageToClient::_internal_has_newnotifytokenrequired() const { return data_case() == kNewNotifyTokenRequired; } inline bool MessageToClient::has_newnotifytokenrequired() const { return _internal_has_newnotifytokenrequired(); } inline void MessageToClient::set_has_newnotifytokenrequired() { _oneof_case_[0] = kNewNotifyTokenRequired; } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::release_newnotifytokenrequired() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClient.newNotifyTokenRequired) if (_internal_has_newnotifytokenrequired()) { clear_has_data(); PROTOBUF_NAMESPACE_ID::Empty* temp = data_.newnotifytokenrequired_; if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } data_.newnotifytokenrequired_ = nullptr; return temp; } else { return nullptr; } } inline const PROTOBUF_NAMESPACE_ID::Empty& MessageToClient::_internal_newnotifytokenrequired() const { return _internal_has_newnotifytokenrequired() ? *data_.newnotifytokenrequired_ : reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty&>(PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); } inline const PROTOBUF_NAMESPACE_ID::Empty& MessageToClient::newnotifytokenrequired() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClient.newNotifyTokenRequired) return _internal_newnotifytokenrequired(); } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::unsafe_arena_release_newnotifytokenrequired() { // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.MessageToClient.newNotifyTokenRequired) if (_internal_has_newnotifytokenrequired()) { clear_has_data(); PROTOBUF_NAMESPACE_ID::Empty* temp = data_.newnotifytokenrequired_; data_.newnotifytokenrequired_ = nullptr; return temp; } else { return nullptr; } } inline void MessageToClient::unsafe_arena_set_allocated_newnotifytokenrequired(PROTOBUF_NAMESPACE_ID::Empty* newnotifytokenrequired) { clear_data(); if (newnotifytokenrequired) { set_has_newnotifytokenrequired(); data_.newnotifytokenrequired_ = newnotifytokenrequired; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.MessageToClient.newNotifyTokenRequired) } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::_internal_mutable_newnotifytokenrequired() { if (!_internal_has_newnotifytokenrequired()) { clear_data(); set_has_newnotifytokenrequired(); data_.newnotifytokenrequired_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); } return data_.newnotifytokenrequired_; } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::mutable_newnotifytokenrequired() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClient.newNotifyTokenRequired) return _internal_mutable_newnotifytokenrequired(); } // .google.protobuf.Empty ping = 4; inline bool MessageToClient::_internal_has_ping() const { return data_case() == kPing; } inline bool MessageToClient::has_ping() const { return _internal_has_ping(); } inline void MessageToClient::set_has_ping() { _oneof_case_[0] = kPing; } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::release_ping() { // @@protoc_insertion_point(field_release:tunnelbroker.MessageToClient.ping) if (_internal_has_ping()) { clear_has_data(); PROTOBUF_NAMESPACE_ID::Empty* temp = data_.ping_; if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } data_.ping_ = nullptr; return temp; } else { return nullptr; } } inline const PROTOBUF_NAMESPACE_ID::Empty& MessageToClient::_internal_ping() const { return _internal_has_ping() ? *data_.ping_ : reinterpret_cast< PROTOBUF_NAMESPACE_ID::Empty&>(PROTOBUF_NAMESPACE_ID::_Empty_default_instance_); } inline const PROTOBUF_NAMESPACE_ID::Empty& MessageToClient::ping() const { // @@protoc_insertion_point(field_get:tunnelbroker.MessageToClient.ping) return _internal_ping(); } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::unsafe_arena_release_ping() { // @@protoc_insertion_point(field_unsafe_arena_release:tunnelbroker.MessageToClient.ping) if (_internal_has_ping()) { clear_has_data(); PROTOBUF_NAMESPACE_ID::Empty* temp = data_.ping_; data_.ping_ = nullptr; return temp; } else { return nullptr; } } inline void MessageToClient::unsafe_arena_set_allocated_ping(PROTOBUF_NAMESPACE_ID::Empty* ping) { clear_data(); if (ping) { set_has_ping(); data_.ping_ = ping; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tunnelbroker.MessageToClient.ping) } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::_internal_mutable_ping() { if (!_internal_has_ping()) { clear_data(); set_has_ping(); data_.ping_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(GetArena()); } return data_.ping_; } inline PROTOBUF_NAMESPACE_ID::Empty* MessageToClient::mutable_ping() { // @@protoc_insertion_point(field_mutable:tunnelbroker.MessageToClient.ping) return _internal_mutable_ping(); } inline bool MessageToClient::has_data() const { return data_case() != DATA_NOT_SET; } inline void MessageToClient::clear_has_data() { _oneof_case_[0] = DATA_NOT_SET; } inline MessageToClient::DataCase MessageToClient::data_case() const { return MessageToClient::DataCase(_oneof_case_[0]); } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) } // namespace tunnelbroker PROTOBUF_NAMESPACE_OPEN template <> struct is_proto_enum< ::tunnelbroker::NewSessionRequest_DeviceTypes> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::tunnelbroker::NewSessionRequest_DeviceTypes>() { return ::tunnelbroker::NewSessionRequest_DeviceTypes_descriptor(); } PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tunnelbroker_2eproto diff --git a/shared/protos/tunnelbroker.proto b/shared/protos/tunnelbroker.proto index fb31d471c..4f6feaab3 100644 --- a/shared/protos/tunnelbroker.proto +++ b/shared/protos/tunnelbroker.proto @@ -1,126 +1,90 @@ syntax = "proto3"; package tunnelbroker; import "google/protobuf/empty.proto"; service TunnelbrokerService { rpc SessionSignature(SessionSignatureRequest) returns (SessionSignatureResponse) {} rpc NewSession(NewSessionRequest) returns (NewSessionResponse) {} - rpc Send(SendRequest) returns (google.protobuf.Empty) {} - rpc Get(GetRequest) returns (stream GetResponse) {} - - // Replacing Send and Get with a single bidirectional streaming RPC - // The client should provide the valid `sessionID` identifier - // from the `NewSession` in the stream request metadata rpc MessagesStream(stream MessageToTunnelbroker) returns (stream MessageToClient) {} } // Session message SessionSignatureRequest { string deviceID = 1; } message SessionSignatureResponse { string toSign = 1; } message NewSessionRequest { string deviceID = 1; string publicKey = 2; string signature = 3; optional string notifyToken = 4; DeviceTypes deviceType = 5; string deviceAppVersion = 6; string deviceOS = 7; // Nested enum devices type enum DeviceTypes { MOBILE = 0; WEB = 1; KEYSERVER = 2; } } message NewSessionResponse { string sessionID = 1; } -// Send payload to device - -message SendRequest { - string sessionID = 1; - string toDeviceID = 2; - bytes payload = 3; - repeated string blobHashes = 4; -} - -// Get messages from devices - -message GetRequest { - string sessionID = 1; - optional string newNotifyToken = 2; -} - -message GetResponseMessage { - string fromDeviceID = 1; - bytes payload = 2; - repeated string blobHashes = 3; -} - -message GetResponse { - oneof data { - GetResponseMessage responseMessage = 1; - google.protobuf.Empty ping = 2; - google.protobuf.Empty newNotifyTokenRequired = 3; - } -} - // Common messages structures for the MessagesStream message ProcessedMessages { repeated string messageID = 1; } // The messages from the Client to the Tunnelbroker message MessageToTunnelbrokerStruct { string messageID = 1; string toDeviceID = 2; string payload = 3; repeated string blobHashes = 4; } message MessagesToSend { repeated MessageToTunnelbrokerStruct messages = 1; } message MessageToTunnelbroker { oneof data { MessagesToSend messagesToSend = 1; ProcessedMessages processedMessages = 2; string newNotifyToken = 3; } } // The messages from the Tunnelbroker to the Client message MessageToClientStruct { string messageID = 1; string fromDeviceID = 2; string payload = 3; repeated string blobHashes = 4; } message MessagesToDeliver { repeated MessageToClientStruct messages = 1; } message MessageToClient { oneof data { MessagesToDeliver messagesToDeliver = 1; ProcessedMessages processedMessages = 2; google.protobuf.Empty newNotifyTokenRequired = 3; google.protobuf.Empty ping = 4; } }