Page MenuHomePhabricator

D3143.id9416.diff
No OneTemporary

D3143.id9416.diff

diff --git a/native/cpp/CommonCpp/grpc/Client.h b/native/cpp/CommonCpp/grpc/Client.h
--- a/native/cpp/CommonCpp/grpc/Client.h
+++ b/native/cpp/CommonCpp/grpc/Client.h
@@ -46,6 +46,8 @@
void setOnCloseCallback(std::function<void()> callback);
void closeGetStream();
void assignSetReadyStateCallback(std::function<void(SocketStatus)> callback);
+
+ std::string sessionSignature(std::string deviceID);
};
} // namespace network
diff --git a/native/cpp/CommonCpp/grpc/Client.cpp b/native/cpp/CommonCpp/grpc/Client.cpp
--- a/native/cpp/CommonCpp/grpc/Client.cpp
+++ b/native/cpp/CommonCpp/grpc/Client.cpp
@@ -127,5 +127,18 @@
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 NULL;
+ }
+ return response.tosign();
+}
+
} // namespace network
} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 4:15 AM (21 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2536689
Default Alt Text
D3143.id9416.diff (1 KB)

Event Timeline