File: sharing_message.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (153 lines) | stat: -rw-r--r-- 4,568 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

option java_multiple_files = true;
option java_package = "org.chromium.components.sharing_message.proto";

import "click_to_call_message.proto";
import "optimization_guide_push_notification.proto";
import "peer_connection_messages.proto";
import "remote_copy_message.proto";
import "shared_clipboard_message.proto";
import "sms_fetch_message_test_proto3_optional.proto";

package components_sharing_message;

// Required in Chrome.
option optimize_for = LITE_RUNTIME;

// Message for sending between devices in Sharing.
// Next tag: 17
message SharingMessage {
  // Identifier of sender. required unless any of the following is true:
  // 1. payload is a AckMessage
  // 2. ack_channel_configuration is a ServerChannelConfiguration
  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;
    SmsFetchRequest sms_fetch_request = 8;
    RemoteCopyMessage remote_copy_message = 9;
    PeerConnectionOfferMessage peer_connection_offer_message = 10;
    PeerConnectionIceCandidatesMessage peer_connection_ice_candidates_message =
        11;
    DiscoveryRequest discovery_request = 13;
    WebRtcSignalingMessage web_rtc_signaling_frame = 14;
    OptimizationGuidePushNotification optimization_guide_push_notification = 16;
  }

  oneof ack_channel_configuration {
    // FCM channel configuration. Ack message will be delivered as a FCM
    // message. optional.
    FCMChannelConfiguration fcm_channel_configuration = 6;

    // Server channel configuration. Ack message will be delivered through
    // server channel. optional.
    ServerChannelConfiguration server_channel_configuration = 12;
  }

  // The name of the device sending this message. optional.
  string sender_device_name = 7;

  // Identifier of the message.
  // required for message sent via Sync.
  string message_id = 15;
}

// Message for pinging the receiver expecting an acknowledgement.
message PingMessage {
  // Intentionally empty.
}

// Message for acknowledging the sender after a non-AckMessage is received.
// Next tag: 4
message AckMessage {
  reserved 2;

  // required.
  string original_message_id = 1;

  // Response of the message, optional.
  ResponseMessage response_message = 3;
}

// Message for responding to a SharingMessage.
message ResponseMessage {
  // Payload of the response, contains one of the messages below. required.
  oneof payload {
    SmsFetchResponse sms_fetch_response = 1;
    PeerConnectionAnswerMessage peer_connection_answer_message_response = 2;
    DiscoveryResponse discovery_response = 3;
  }
}

// FCM channel configuration. Message will be delivered as a FCM message.
message FCMChannelConfiguration {
  reserved 1, 2, 3;
  reserved "vapid_fcm_token", "vapid_p256dh", "vapid_auth_secret";

  // FCM registration token of device subscribed using sender ID. required.
  string sender_id_fcm_token = 4;

  // Subscription public key required for RFC 8291 using sender ID.
  bytes sender_id_p256dh = 5;

  // Auth secret key required for RFC 8291 using sender ID.
  bytes sender_id_auth_secret = 6;
}

// Server channel configuration. Message will be delivered through server
// channel.
message ServerChannelConfiguration {
  reserved 1, 2;

  // Opaque server channel configuration. required.
  bytes configuration = 3;

  // Subscription public key required for RFC 8291 using VAPID key. required.
  bytes p256dh = 4;

  // Auth secret key required for RFC 8291 using VAPID key. required.
  bytes auth_secret = 5;
}

// 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;
}

// Message for sending data between devices using webRTC.
message WebRtcMessage {
  // Randomly generated guid. Required for messages other than AckMessage.
  string message_guid = 1;

  // The actual SharingMessage to be sent across the two remote devices.
  // Required.
  SharingMessage message = 2;
}