Commit 62e5d7a6 authored by Himanshu Jaju's avatar Himanshu Jaju Committed by Commit Bot

Add Discovery to SharingMessage proto

Add Discovery request/response and WebRtcSignalingFrame to SharingMessage
protos.

Bug: 1043149
Change-Id: I025365006d96c188308b85cc62064d48a6617f6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007575Reviewed-by: default avatarAlex Chau <alexchau@chromium.org>
Commit-Queue: Himanshu Jaju <himanshujaju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732938}
parent 3e058c0b
...@@ -32,10 +32,12 @@ enum MessageType { ...@@ -32,10 +32,12 @@ enum MessageType {
REMOTE_COPY_MESSAGE = 6; REMOTE_COPY_MESSAGE = 6;
SIGNALLING_MESSAGE = 7; SIGNALLING_MESSAGE = 7;
ICE_CANDIDATE_MESSAGE = 8; ICE_CANDIDATE_MESSAGE = 8;
DISCOVERY_REQUEST = 9;
WEB_RTC_SIGNALING_FRAME = 10;
} }
// Message for sending between devices in Sharing. // Message for sending between devices in Sharing.
// Next tag: 13 // Next tag: 15
message SharingMessage { message SharingMessage {
// Identifier of sender. required except for AckMessage. // Identifier of sender. required except for AckMessage.
string sender_guid = 1; string sender_guid = 1;
...@@ -50,6 +52,8 @@ message SharingMessage { ...@@ -50,6 +52,8 @@ message SharingMessage {
RemoteCopyMessage remote_copy_message = 9; RemoteCopyMessage remote_copy_message = 9;
SignallingMessage signalling_message = 10; SignallingMessage signalling_message = 10;
IceCandidateMessage ice_candidate_message = 11; IceCandidateMessage ice_candidate_message = 11;
DiscoveryRequest discovery_request = 13;
WebRtcSignalingMessage web_rtc_signaling_frame = 14;
} }
oneof ack_channel_configuration { oneof ack_channel_configuration {
...@@ -89,6 +93,7 @@ message ResponseMessage { ...@@ -89,6 +93,7 @@ message ResponseMessage {
oneof payload { oneof payload {
SmsFetchResponse sms_fetch_response = 1; SmsFetchResponse sms_fetch_response = 1;
SignallingMessage signalling_message_response = 2; SignallingMessage signalling_message_response = 2;
DiscoveryResponse discovery_response = 3;
} }
} }
...@@ -113,3 +118,27 @@ message ServerChannelConfiguration { ...@@ -113,3 +118,27 @@ message ServerChannelConfiguration {
// Optional cookie set on the original request. optional. // Optional cookie set on the original request. optional.
bytes session_cookie = 2; bytes session_cookie = 2;
} }
// Request for Sharing Discovery.
message DiscoveryRequest {
// required
string service_id = 1;
}
// Response for Sharing Discovery.
message DiscoveryResponse {
// required
string service_id = 1;
// required
string endpoint_id = 2;
// required
bytes endpoint_info = 3;
}
// Request for WebRTC signalling for Discovery.
message WebRtcSignalingMessage {
// required
bytes web_rtc_signaling_frame = 1;
}
...@@ -112,6 +112,10 @@ chrome_browser_sharing::MessageType SharingPayloadCaseToMessageType( ...@@ -112,6 +112,10 @@ chrome_browser_sharing::MessageType SharingPayloadCaseToMessageType(
return chrome_browser_sharing::SIGNALLING_MESSAGE; return chrome_browser_sharing::SIGNALLING_MESSAGE;
case chrome_browser_sharing::SharingMessage::kIceCandidateMessage: case chrome_browser_sharing::SharingMessage::kIceCandidateMessage:
return chrome_browser_sharing::ICE_CANDIDATE_MESSAGE; return chrome_browser_sharing::ICE_CANDIDATE_MESSAGE;
case chrome_browser_sharing::SharingMessage::kDiscoveryRequest:
return chrome_browser_sharing::DISCOVERY_REQUEST;
case chrome_browser_sharing::SharingMessage::kWebRtcSignalingFrame:
return chrome_browser_sharing::WEB_RTC_SIGNALING_FRAME;
} }
// For proto3 enums unrecognized enum values are kept when parsing, and a new // For proto3 enums unrecognized enum values are kept when parsing, and a new
// payload case received over the network would not default to // payload case received over the network would not default to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment