Page MenuHomePhabricator

D3152.id9497.diff
No OneTemporary

D3152.id9497.diff

diff --git a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h
--- a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h
+++ b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.h
@@ -27,5 +27,15 @@
void setOnOpenCallback(std::function<void()> callback);
void setOnCloseCallback(std::function<void()> callback);
void assignSetReadyStateCallback(std::function<void(SocketStatus)> 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/NativeModules/InternalModules/NetworkModule.cpp b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/InternalModules/NetworkModule.cpp
@@ -83,4 +83,32 @@
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

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 5, 3:30 AM (10 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615690
Default Alt Text
D3152.id9497.diff (1 KB)

Event Timeline