| // Copyright 2019 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| import "click_to_call_message.proto"; |
| import "shared_clipboard_message.proto"; |
| |
| package chrome_browser_sharing; |
| |
| // Required in Chrome. |
| option optimize_for = LITE_RUNTIME; |
| |
| // Message for sending between devices in Sharing. |
| message SharingMessage { |
| // Identifier of sender. required. |
| string sender_guid = 1; |
| |
| // Payload of the message, contains one of the messages below. required. |
| oneof payload { |
| PingMessage ping_message = 2; |
| AckMessage ack_message = 3; |
| ClickToCallMessage click_to_call_message = 4; |
| SharedClipboardMessage shared_clipboard_message = 5; |
| } |
| |
| // RecipientInfo for responding an AckMessage to the sender. optional. |
| RecipientInfo sender_info = 6; |
| |
| // The name of the device sending this message. optional. |
| string sender_device_name = 7; |
| } |
| |
| // Message for pinging the receiver expecting an acknowledgement. |
| message PingMessage { |
| // Intentionally empty. |
| } |
| |
| // Message for acknowledging the sender after a non-AckMessage is received. |
| message AckMessage { |
| // required. |
| string original_message_id = 1; |
| } |
| |
| // Message for data necessary to send an AckMessage to the sender. |
| message RecipientInfo { |
| // FCM registration token of device. required. |
| string fcm_token = 1; |
| |
| // Subscription public key required for RFC 8291. |
| bytes p256dh = 2; |
| |
| // Auth secret key required for RFC 8291. |
| bytes auth_secret = 3; |
| } |