Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3406836
D3152.id9497.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3152.id9497.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3152: [CommCoreModule] Add `sessionSignature` & `newSession` boilerplate to `NetworkModule`
Attached
Detach File
Event Timeline
Log In to Comment