-
Notifications
You must be signed in to change notification settings - Fork 10
/
webrtc.pb.go
3968 lines (3777 loc) · 92.8 KB
/
webrtc.pb.go
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go-lite. DO NOT EDIT.
// protoc-gen-go-lite version: v0.6.5
// source: github.com/aperturerobotics/bifrost/transport/webrtc/webrtc.proto
package webrtc
import (
fmt "fmt"
io "io"
strconv "strconv"
strings "strings"
_ "github.com/aperturerobotics/bifrost/stream/srpc/client"
dialer "github.com/aperturerobotics/bifrost/transport/common/dialer"
quic "github.com/aperturerobotics/bifrost/transport/common/quic"
protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
json "github.com/aperturerobotics/protobuf-go-lite/json"
backoff "github.com/aperturerobotics/util/backoff"
)
// IceTransportPolicy contains the set of allowed ICE transport policies.
type IceTransportPolicy int32
const (
// IceTransportPolicy_ALL allows any kind of ICE candidate.
IceTransportPolicy_IceTransportPolicy_ALL IceTransportPolicy = 0
// IceTransportPolicy_RELAY allows only media relay candidates (TURN).
IceTransportPolicy_IceTransportPolicy_RELAY IceTransportPolicy = 1
)
// Enum value maps for IceTransportPolicy.
var (
IceTransportPolicy_name = map[int32]string{
0: "IceTransportPolicy_ALL",
1: "IceTransportPolicy_RELAY",
}
IceTransportPolicy_value = map[string]int32{
"IceTransportPolicy_ALL": 0,
"IceTransportPolicy_RELAY": 1,
}
)
func (x IceTransportPolicy) Enum() *IceTransportPolicy {
p := new(IceTransportPolicy)
*p = x
return p
}
func (x IceTransportPolicy) String() string {
name, valid := IceTransportPolicy_name[int32(x)]
if valid {
return name
}
return strconv.Itoa(int(x))
}
// Config is the configuration for the WebRTC Signal RPC transport.
type Config struct {
unknownFields []byte
// SignalingId is the signaling channel identifier.
// Cannot be empty.
SignalingId string `protobuf:"bytes,1,opt,name=signaling_id,json=signalingId,proto3" json:"signalingId,omitempty"`
// TransportPeerId sets the peer ID to attach the transport to.
// If unset, attaches to any running peer with a private key.
// Must match the transport peer ID of the signaling transport.
TransportPeerId string `protobuf:"bytes,2,opt,name=transport_peer_id,json=transportPeerId,proto3" json:"transportPeerId,omitempty"`
// TransportType overrides the transport type id for dial addresses.
// Defaults to "webrtc"
// Configures the scheme for addr matching to this transport.
// E.x.: webrtc://
TransportType string `protobuf:"bytes,3,opt,name=transport_type,json=transportType,proto3" json:"transportType,omitempty"`
// Quic contains the quic protocol options.
//
// The WebRTC transport always disables FEC and several other UDP-centric
// features which are unnecessary due to the "reliable" nature of WebRTC.
Quic *quic.Opts `protobuf:"bytes,4,opt,name=quic,proto3" json:"quic,omitempty"`
// WebRtc contains the WebRTC protocol options.
WebRtc *WebRtcConfig `protobuf:"bytes,5,opt,name=web_rtc,json=webRtc,proto3" json:"webRtc,omitempty"`
// Backoff is the backoff config for connecting to a PeerConnection.
// If unset, defaults to reasonable defaults.
Backoff *backoff.Backoff `protobuf:"bytes,6,opt,name=backoff,proto3" json:"backoff,omitempty"`
// Dialers maps peer IDs to dialers.
// This allows mapping which peer ID should be dialed via this transport.
Dialers map[string]*dialer.DialerOpts `protobuf:"bytes,7,rep,name=dialers,proto3" json:"dialers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// AllPeers tells the transport to attempt to negotiate a WebRTC session with
// any peer, even those not listed in the Dialers map.
AllPeers bool `protobuf:"varint,8,opt,name=all_peers,json=allPeers,proto3" json:"allPeers,omitempty"`
// DisableListen disables listening for incoming Links.
// If set, we will only dial out, not accept incoming links.
DisableListen bool `protobuf:"varint,9,opt,name=disable_listen,json=disableListen,proto3" json:"disableListen,omitempty"`
// BlockPeers is a list of peer ids that will not be contacted via this transport.
BlockPeers []string `protobuf:"bytes,10,rep,name=block_peers,json=blockPeers,proto3" json:"blockPeers,omitempty"`
// Verbose enables very verbose logging.
Verbose bool `protobuf:"varint,11,opt,name=verbose,proto3" json:"verbose,omitempty"`
}
func (x *Config) Reset() {
*x = Config{}
}
func (*Config) ProtoMessage() {}
func (x *Config) GetSignalingId() string {
if x != nil {
return x.SignalingId
}
return ""
}
func (x *Config) GetTransportPeerId() string {
if x != nil {
return x.TransportPeerId
}
return ""
}
func (x *Config) GetTransportType() string {
if x != nil {
return x.TransportType
}
return ""
}
func (x *Config) GetQuic() *quic.Opts {
if x != nil {
return x.Quic
}
return nil
}
func (x *Config) GetWebRtc() *WebRtcConfig {
if x != nil {
return x.WebRtc
}
return nil
}
func (x *Config) GetBackoff() *backoff.Backoff {
if x != nil {
return x.Backoff
}
return nil
}
func (x *Config) GetDialers() map[string]*dialer.DialerOpts {
if x != nil {
return x.Dialers
}
return nil
}
func (x *Config) GetAllPeers() bool {
if x != nil {
return x.AllPeers
}
return false
}
func (x *Config) GetDisableListen() bool {
if x != nil {
return x.DisableListen
}
return false
}
func (x *Config) GetBlockPeers() []string {
if x != nil {
return x.BlockPeers
}
return nil
}
func (x *Config) GetVerbose() bool {
if x != nil {
return x.Verbose
}
return false
}
// WebRtcConfig configures the WebRTC PeerConnection.
type WebRtcConfig struct {
unknownFields []byte
// IceServers contains the list of ICE servers to use.
IceServers []*IceServerConfig `protobuf:"bytes,1,rep,name=ice_servers,json=iceServers,proto3" json:"iceServers,omitempty"`
// IceTransportPolicy defines the policy for permitted ICE candidates.
// Optional.
IceTransportPolicy IceTransportPolicy `protobuf:"varint,2,opt,name=ice_transport_policy,json=iceTransportPolicy,proto3" json:"iceTransportPolicy,omitempty"`
// IceCandidatePoolSize defines the size of the prefetched ICE pool.
// Optional.
IceCandidatePoolSize uint32 `protobuf:"varint,3,opt,name=ice_candidate_pool_size,json=iceCandidatePoolSize,proto3" json:"iceCandidatePoolSize,omitempty"`
}
func (x *WebRtcConfig) Reset() {
*x = WebRtcConfig{}
}
func (*WebRtcConfig) ProtoMessage() {}
func (x *WebRtcConfig) GetIceServers() []*IceServerConfig {
if x != nil {
return x.IceServers
}
return nil
}
func (x *WebRtcConfig) GetIceTransportPolicy() IceTransportPolicy {
if x != nil {
return x.IceTransportPolicy
}
return IceTransportPolicy_IceTransportPolicy_ALL
}
func (x *WebRtcConfig) GetIceCandidatePoolSize() uint32 {
if x != nil {
return x.IceCandidatePoolSize
}
return 0
}
// IceServer is a WebRTC ICE server config.
type IceServerConfig struct {
unknownFields []byte
// Urls is the list of URLs for the ICE server.
//
// Format: stun:{url} or turn:{url} or turns:{url}?transport=tcp
// Examples:
// - stun:stun.l.google.com:19302
// - stun:stun.stunprotocol.org:3478
// - turns:google.de?transport=tcp
Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"`
// Username is the username for the ICE server.
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// Credential contains the ice server credential, if any.
//
// Types that are assignable to Credential:
//
// *IceServerConfig_Password
// *IceServerConfig_Oauth
Credential isIceServerConfig_Credential `protobuf_oneof:"credential"`
}
func (x *IceServerConfig) Reset() {
*x = IceServerConfig{}
}
func (*IceServerConfig) ProtoMessage() {}
func (x *IceServerConfig) GetUrls() []string {
if x != nil {
return x.Urls
}
return nil
}
func (x *IceServerConfig) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (m *IceServerConfig) GetCredential() isIceServerConfig_Credential {
if m != nil {
return m.Credential
}
return nil
}
func (x *IceServerConfig) GetPassword() string {
if x, ok := x.GetCredential().(*IceServerConfig_Password); ok {
return x.Password
}
return ""
}
func (x *IceServerConfig) GetOauth() *IceServerConfig_OauthCredential {
if x, ok := x.GetCredential().(*IceServerConfig_Oauth); ok {
return x.Oauth
}
return nil
}
type isIceServerConfig_Credential interface {
isIceServerConfig_Credential()
}
type IceServerConfig_Password struct {
// Password contains the ICE server password.
Password string `protobuf:"bytes,3,opt,name=password,proto3,oneof"`
}
type IceServerConfig_Oauth struct {
// Oauth contains an OAuth credential.
Oauth *IceServerConfig_OauthCredential `protobuf:"bytes,4,opt,name=oauth,proto3,oneof"`
}
func (*IceServerConfig_Password) isIceServerConfig_Credential() {}
func (*IceServerConfig_Oauth) isIceServerConfig_Credential() {}
// WebRtcSignal is a WebRTC Signaling message sent via the Signaling channel.
type WebRtcSignal struct {
unknownFields []byte
// Body is the body of the message.
//
// Types that are assignable to Body:
//
// *WebRtcSignal_RequestOffer
// *WebRtcSignal_Sdp
// *WebRtcSignal_Ice
Body isWebRtcSignal_Body `protobuf_oneof:"body"`
}
func (x *WebRtcSignal) Reset() {
*x = WebRtcSignal{}
}
func (*WebRtcSignal) ProtoMessage() {}
func (m *WebRtcSignal) GetBody() isWebRtcSignal_Body {
if m != nil {
return m.Body
}
return nil
}
func (x *WebRtcSignal) GetRequestOffer() uint64 {
if x, ok := x.GetBody().(*WebRtcSignal_RequestOffer); ok {
return x.RequestOffer
}
return 0
}
func (x *WebRtcSignal) GetSdp() *WebRtcSdp {
if x, ok := x.GetBody().(*WebRtcSignal_Sdp); ok {
return x.Sdp
}
return nil
}
func (x *WebRtcSignal) GetIce() *WebRtcIce {
if x, ok := x.GetBody().(*WebRtcSignal_Ice); ok {
return x.Ice
}
return nil
}
type isWebRtcSignal_Body interface {
isWebRtcSignal_Body()
}
type WebRtcSignal_RequestOffer struct {
// RequestOffer requests a new offer from the offerer with the local session seqno.
// Incremented when negotiation is needed (something changes about the session).
RequestOffer uint64 `protobuf:"varint,1,opt,name=request_offer,json=requestOffer,proto3,oneof"`
}
type WebRtcSignal_Sdp struct {
// Sdp contains the sdp offer or answer.
Sdp *WebRtcSdp `protobuf:"bytes,2,opt,name=sdp,proto3,oneof"`
}
type WebRtcSignal_Ice struct {
// Ice contains an ICE candidate.
Ice *WebRtcIce `protobuf:"bytes,3,opt,name=ice,proto3,oneof"`
}
func (*WebRtcSignal_RequestOffer) isWebRtcSignal_Body() {}
func (*WebRtcSignal_Sdp) isWebRtcSignal_Body() {}
func (*WebRtcSignal_Ice) isWebRtcSignal_Body() {}
// WebRtcSdp contains the SDP offer or answer.
type WebRtcSdp struct {
unknownFields []byte
// TxSeqno is the sequence number of the transmitting peer.
// The receiver should update the local seqno to match.
TxSeqno uint64 `protobuf:"varint,1,opt,name=tx_seqno,json=txSeqno,proto3" json:"txSeqno,omitempty"`
// SdpType is the string encoded type of the sdp.
// Examples: "offer" "answer"
SdpType string `protobuf:"bytes,2,opt,name=sdp_type,json=sdpType,proto3" json:"sdpType,omitempty"`
// Sdp contains the WebRTC session description.
Sdp string `protobuf:"bytes,3,opt,name=sdp,proto3" json:"sdp,omitempty"`
}
func (x *WebRtcSdp) Reset() {
*x = WebRtcSdp{}
}
func (*WebRtcSdp) ProtoMessage() {}
func (x *WebRtcSdp) GetTxSeqno() uint64 {
if x != nil {
return x.TxSeqno
}
return 0
}
func (x *WebRtcSdp) GetSdpType() string {
if x != nil {
return x.SdpType
}
return ""
}
func (x *WebRtcSdp) GetSdp() string {
if x != nil {
return x.Sdp
}
return ""
}
// WebRtcIce contains an ICE candidate.
type WebRtcIce struct {
unknownFields []byte
// Candidate contains the JSON-encoded ICE candidate.
Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
}
func (x *WebRtcIce) Reset() {
*x = WebRtcIce{}
}
func (*WebRtcIce) ProtoMessage() {}
func (x *WebRtcIce) GetCandidate() string {
if x != nil {
return x.Candidate
}
return ""
}
type Config_DialersEntry struct {
unknownFields []byte
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value *dialer.DialerOpts `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *Config_DialersEntry) Reset() {
*x = Config_DialersEntry{}
}
func (*Config_DialersEntry) ProtoMessage() {}
func (x *Config_DialersEntry) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Config_DialersEntry) GetValue() *dialer.DialerOpts {
if x != nil {
return x.Value
}
return nil
}
// OauthCredential is an OAuth credential information for the ICE server.
type IceServerConfig_OauthCredential struct {
unknownFields []byte
// MacKey is a base64-url format.
MacKey string `protobuf:"bytes,1,opt,name=mac_key,json=macKey,proto3" json:"macKey,omitempty"`
// AccessToken is the access token in base64-encoded format.
AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"accessToken,omitempty"`
}
func (x *IceServerConfig_OauthCredential) Reset() {
*x = IceServerConfig_OauthCredential{}
}
func (*IceServerConfig_OauthCredential) ProtoMessage() {}
func (x *IceServerConfig_OauthCredential) GetMacKey() string {
if x != nil {
return x.MacKey
}
return ""
}
func (x *IceServerConfig_OauthCredential) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
func (m *Config) CloneVT() *Config {
if m == nil {
return (*Config)(nil)
}
r := new(Config)
r.SignalingId = m.SignalingId
r.TransportPeerId = m.TransportPeerId
r.TransportType = m.TransportType
r.WebRtc = m.WebRtc.CloneVT()
r.AllPeers = m.AllPeers
r.DisableListen = m.DisableListen
r.Verbose = m.Verbose
if rhs := m.Quic; rhs != nil {
r.Quic = rhs.CloneVT()
}
if rhs := m.Backoff; rhs != nil {
r.Backoff = rhs.CloneVT()
}
if rhs := m.Dialers; rhs != nil {
tmpContainer := make(map[string]*dialer.DialerOpts, len(rhs))
for k, v := range rhs {
tmpContainer[k] = v.CloneVT()
}
r.Dialers = tmpContainer
}
if rhs := m.BlockPeers; rhs != nil {
tmpContainer := make([]string, len(rhs))
copy(tmpContainer, rhs)
r.BlockPeers = tmpContainer
}
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (m *WebRtcConfig) CloneVT() *WebRtcConfig {
if m == nil {
return (*WebRtcConfig)(nil)
}
r := new(WebRtcConfig)
r.IceTransportPolicy = m.IceTransportPolicy
r.IceCandidatePoolSize = m.IceCandidatePoolSize
if rhs := m.IceServers; rhs != nil {
tmpContainer := make([]*IceServerConfig, len(rhs))
for k, v := range rhs {
tmpContainer[k] = v.CloneVT()
}
r.IceServers = tmpContainer
}
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *WebRtcConfig) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (m *IceServerConfig_OauthCredential) CloneVT() *IceServerConfig_OauthCredential {
if m == nil {
return (*IceServerConfig_OauthCredential)(nil)
}
r := new(IceServerConfig_OauthCredential)
r.MacKey = m.MacKey
r.AccessToken = m.AccessToken
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *IceServerConfig_OauthCredential) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (m *IceServerConfig) CloneVT() *IceServerConfig {
if m == nil {
return (*IceServerConfig)(nil)
}
r := new(IceServerConfig)
r.Username = m.Username
if rhs := m.Urls; rhs != nil {
tmpContainer := make([]string, len(rhs))
copy(tmpContainer, rhs)
r.Urls = tmpContainer
}
if m.Credential != nil {
r.Credential = m.Credential.(interface {
CloneOneofVT() isIceServerConfig_Credential
}).CloneOneofVT()
}
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *IceServerConfig) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (m *IceServerConfig_Password) CloneVT() *IceServerConfig_Password {
if m == nil {
return (*IceServerConfig_Password)(nil)
}
r := new(IceServerConfig_Password)
r.Password = m.Password
return r
}
func (m *IceServerConfig_Password) CloneOneofVT() isIceServerConfig_Credential {
return m.CloneVT()
}
func (m *IceServerConfig_Oauth) CloneVT() *IceServerConfig_Oauth {
if m == nil {
return (*IceServerConfig_Oauth)(nil)
}
r := new(IceServerConfig_Oauth)
r.Oauth = m.Oauth.CloneVT()
return r
}
func (m *IceServerConfig_Oauth) CloneOneofVT() isIceServerConfig_Credential {
return m.CloneVT()
}
func (m *WebRtcSignal) CloneVT() *WebRtcSignal {
if m == nil {
return (*WebRtcSignal)(nil)
}
r := new(WebRtcSignal)
if m.Body != nil {
r.Body = m.Body.(interface{ CloneOneofVT() isWebRtcSignal_Body }).CloneOneofVT()
}
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *WebRtcSignal) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (m *WebRtcSignal_RequestOffer) CloneVT() *WebRtcSignal_RequestOffer {
if m == nil {
return (*WebRtcSignal_RequestOffer)(nil)
}
r := new(WebRtcSignal_RequestOffer)
r.RequestOffer = m.RequestOffer
return r
}
func (m *WebRtcSignal_RequestOffer) CloneOneofVT() isWebRtcSignal_Body {
return m.CloneVT()
}
func (m *WebRtcSignal_Sdp) CloneVT() *WebRtcSignal_Sdp {
if m == nil {
return (*WebRtcSignal_Sdp)(nil)
}
r := new(WebRtcSignal_Sdp)
r.Sdp = m.Sdp.CloneVT()
return r
}
func (m *WebRtcSignal_Sdp) CloneOneofVT() isWebRtcSignal_Body {
return m.CloneVT()
}
func (m *WebRtcSignal_Ice) CloneVT() *WebRtcSignal_Ice {
if m == nil {
return (*WebRtcSignal_Ice)(nil)
}
r := new(WebRtcSignal_Ice)
r.Ice = m.Ice.CloneVT()
return r
}
func (m *WebRtcSignal_Ice) CloneOneofVT() isWebRtcSignal_Body {
return m.CloneVT()
}
func (m *WebRtcSdp) CloneVT() *WebRtcSdp {
if m == nil {
return (*WebRtcSdp)(nil)
}
r := new(WebRtcSdp)
r.TxSeqno = m.TxSeqno
r.SdpType = m.SdpType
r.Sdp = m.Sdp
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *WebRtcSdp) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (m *WebRtcIce) CloneVT() *WebRtcIce {
if m == nil {
return (*WebRtcIce)(nil)
}
r := new(WebRtcIce)
r.Candidate = m.Candidate
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
}
return r
}
func (m *WebRtcIce) CloneMessageVT() protobuf_go_lite.CloneMessage {
return m.CloneVT()
}
func (this *Config) EqualVT(that *Config) bool {
if this == that {
return true
} else if this == nil || that == nil {
return false
}
if this.SignalingId != that.SignalingId {
return false
}
if this.TransportPeerId != that.TransportPeerId {
return false
}
if this.TransportType != that.TransportType {
return false
}
if !this.Quic.EqualVT(that.Quic) {
return false
}
if !this.WebRtc.EqualVT(that.WebRtc) {
return false
}
if !this.Backoff.EqualVT(that.Backoff) {
return false
}
if len(this.Dialers) != len(that.Dialers) {
return false
}
for i, vx := range this.Dialers {
vy, ok := that.Dialers[i]
if !ok {
return false
}
if p, q := vx, vy; p != q {
if p == nil {
p = &dialer.DialerOpts{}
}
if q == nil {
q = &dialer.DialerOpts{}
}
if !p.EqualVT(q) {
return false
}
}
}
if this.AllPeers != that.AllPeers {
return false
}
if this.DisableListen != that.DisableListen {
return false
}
if len(this.BlockPeers) != len(that.BlockPeers) {
return false
}
for i, vx := range this.BlockPeers {
vy := that.BlockPeers[i]
if vx != vy {
return false
}
}
if this.Verbose != that.Verbose {
return false
}
return string(this.unknownFields) == string(that.unknownFields)
}
func (this *Config) EqualMessageVT(thatMsg any) bool {
that, ok := thatMsg.(*Config)
if !ok {
return false
}
return this.EqualVT(that)
}
func (this *WebRtcConfig) EqualVT(that *WebRtcConfig) bool {
if this == that {
return true
} else if this == nil || that == nil {
return false
}
if len(this.IceServers) != len(that.IceServers) {
return false
}
for i, vx := range this.IceServers {
vy := that.IceServers[i]
if p, q := vx, vy; p != q {
if p == nil {
p = &IceServerConfig{}
}
if q == nil {
q = &IceServerConfig{}
}
if !p.EqualVT(q) {
return false
}
}
}
if this.IceTransportPolicy != that.IceTransportPolicy {
return false
}
if this.IceCandidatePoolSize != that.IceCandidatePoolSize {
return false
}
return string(this.unknownFields) == string(that.unknownFields)
}
func (this *WebRtcConfig) EqualMessageVT(thatMsg any) bool {
that, ok := thatMsg.(*WebRtcConfig)
if !ok {
return false
}
return this.EqualVT(that)
}
func (this *IceServerConfig_OauthCredential) EqualVT(that *IceServerConfig_OauthCredential) bool {
if this == that {
return true
} else if this == nil || that == nil {
return false
}
if this.MacKey != that.MacKey {
return false
}
if this.AccessToken != that.AccessToken {
return false
}
return string(this.unknownFields) == string(that.unknownFields)
}
func (this *IceServerConfig_OauthCredential) EqualMessageVT(thatMsg any) bool {
that, ok := thatMsg.(*IceServerConfig_OauthCredential)
if !ok {
return false
}
return this.EqualVT(that)
}
func (this *IceServerConfig) EqualVT(that *IceServerConfig) bool {
if this == that {
return true
} else if this == nil || that == nil {
return false
}
if this.Credential == nil && that.Credential != nil {
return false
} else if this.Credential != nil {
if that.Credential == nil {
return false
}
if !this.Credential.(interface {
EqualVT(isIceServerConfig_Credential) bool
}).EqualVT(that.Credential) {
return false
}
}
if len(this.Urls) != len(that.Urls) {
return false
}
for i, vx := range this.Urls {
vy := that.Urls[i]
if vx != vy {
return false
}
}
if this.Username != that.Username {
return false
}
return string(this.unknownFields) == string(that.unknownFields)
}
func (this *IceServerConfig) EqualMessageVT(thatMsg any) bool {
that, ok := thatMsg.(*IceServerConfig)
if !ok {
return false
}
return this.EqualVT(that)
}
func (this *IceServerConfig_Password) EqualVT(thatIface isIceServerConfig_Credential) bool {
that, ok := thatIface.(*IceServerConfig_Password)
if !ok {
return false
}
if this == that {
return true
}
if this == nil && that != nil || this != nil && that == nil {
return false
}
if this.Password != that.Password {
return false
}
return true
}
func (this *IceServerConfig_Oauth) EqualVT(thatIface isIceServerConfig_Credential) bool {
that, ok := thatIface.(*IceServerConfig_Oauth)
if !ok {
return false
}
if this == that {
return true
}
if this == nil && that != nil || this != nil && that == nil {
return false
}
if p, q := this.Oauth, that.Oauth; p != q {
if p == nil {
p = &IceServerConfig_OauthCredential{}
}
if q == nil {
q = &IceServerConfig_OauthCredential{}
}
if !p.EqualVT(q) {
return false
}
}
return true
}
func (this *WebRtcSignal) EqualVT(that *WebRtcSignal) bool {
if this == that {
return true
} else if this == nil || that == nil {
return false
}
if this.Body == nil && that.Body != nil {
return false
} else if this.Body != nil {
if that.Body == nil {
return false
}
if !this.Body.(interface {
EqualVT(isWebRtcSignal_Body) bool
}).EqualVT(that.Body) {
return false
}
}
return string(this.unknownFields) == string(that.unknownFields)
}
func (this *WebRtcSignal) EqualMessageVT(thatMsg any) bool {
that, ok := thatMsg.(*WebRtcSignal)
if !ok {
return false
}
return this.EqualVT(that)
}
func (this *WebRtcSignal_RequestOffer) EqualVT(thatIface isWebRtcSignal_Body) bool {
that, ok := thatIface.(*WebRtcSignal_RequestOffer)
if !ok {
return false
}
if this == that {
return true
}
if this == nil && that != nil || this != nil && that == nil {
return false
}
if this.RequestOffer != that.RequestOffer {
return false
}
return true
}
func (this *WebRtcSignal_Sdp) EqualVT(thatIface isWebRtcSignal_Body) bool {
that, ok := thatIface.(*WebRtcSignal_Sdp)
if !ok {
return false
}
if this == that {
return true
}
if this == nil && that != nil || this != nil && that == nil {
return false
}
if p, q := this.Sdp, that.Sdp; p != q {
if p == nil {
p = &WebRtcSdp{}
}
if q == nil {
q = &WebRtcSdp{}
}
if !p.EqualVT(q) {
return false
}