steamkit-protos 0.1.0

This crate is designed to be a bunch of tools for interacting with the Steam API.
Documentation
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
import "steammessages_base.proto";
import "steammessages_unified_base.steamclient.proto";

option cc_generic_services = true;

enum EBroadcastWatchLocation {
	k_EBroadcastWatchLocation_Invalid = 0;
	k_EBroadcastWatchLocation_SteamTV_Tab = 1;
	k_EBroadcastWatchLocation_SteamTV_WatchParty = 2;
	k_EBroadcastWatchLocation_Chat_Tab = 3;
	k_EBroadcastWatchLocation_Chat_WatchParty = 4;
	k_EBroadcastWatchLocation_CommunityPage = 5;
	k_EBroadcastWatchLocation_StoreAppPage = 6;
	k_EBroadcastWatchLocation_InGame = 7;
	k_EBroadcastWatchLocation_BigPicture = 8;
	k_EBroadcastWatchLocation_SalesPage = 9;
	k_EBroadcastWatchLocation_CuratorPage = 10;
	k_EBroadcastWatchLocation_DeveloperPage = 11;
	k_EBroadcastWatchLocation_Chat_Friends = 12;
	k_EBroadcastWatchLocation_SteamTV_Web = 13;
	k_EBroadcastWatchLocation_DesktopUI_Overlay = 14;
}

enum EBroadcastChatPermission {
	k_EBroadcastChatPermissionPublic = 0;
	k_EBroadcastChatPermissionOwnsApp = 1;
}

message CBroadcast_BeginBroadcastSession_Request {
	optional int32 permission = 1;
	optional uint64 gameid = 2;
	optional uint64 client_instance_id = 3;
	optional string title = 4;
	optional uint32 cellid = 5;
	optional uint64 rtmp_token = 6;
	optional bool thumbnail_upload = 7;
	optional string client_beta = 8;
	optional uint32 sysid = 9;
	optional bool allow_webrtc = 10;
}

message CBroadcast_BeginBroadcastSession_Response {
	optional fixed64 broadcast_id = 1;
	optional string thumbnail_upload_address = 2 [(description) = "Http address to upload the thumbnail data."];
	optional string thumbnail_upload_token = 3 [(description) = "token to authorize as broadcaster to upload content to the relay."];
	optional uint32 thumbnail_interval_seconds = 4 [(description) = "how many seconds between thumbnails"];
	optional uint32 heartbeat_interval_seconds = 5 [(description) = "how many seconds between session heartbeats"];
}

message CBroadcast_EndBroadcastSession_Request {
	optional fixed64 broadcast_id = 1;
}

message CBroadcast_EndBroadcastSession_Response {
}

message CBroadcast_StartBroadcastUpload_Request {
	optional fixed64 broadcast_id = 1;
	optional uint32 cellid = 2;
	optional bool as_rtmp = 3;
	optional uint32 delay_seconds = 4;
	optional uint64 rtmp_token = 5 [default = 0, (description) = "Only set during RTMP uploads; secret key from the user."];
	optional uint32 upload_ip_address = 6;
	optional bool is_replay = 7;
	optional uint32 sysid = 8;
}

message CBroadcast_StartBroadcastUpload_Response {
	optional string upload_token = 1;
	optional string upload_address = 2;
	optional fixed64 broadcast_upload_id = 3;
	optional bool enable_replay = 6;
	optional string http_address = 7;
}

message CBroadcast_NotifyBroadcastUploadStop_Notification {
	optional fixed64 broadcast_upload_id = 1;
	optional uint32 upload_result = 2;
}

message CBroadcast_WatchBroadcast_Request {
	optional fixed64 steamid = 1 [(description) = "broadcaster steamID."];
	optional fixed64 existing_broadcast_id = 2 [(description) = "broadcast session ID (optional, rejoin if specified)."];
	optional fixed64 viewer_token = 3 [(description) = "viewer token received from last WatchRequest call, from browser storage."];
	optional uint32 client_cell = 5;
	optional .EBroadcastWatchLocation watch_location = 6 [default = k_EBroadcastWatchLocation_Invalid];
	optional bool is_webrtc = 7;
}

message CBroadcast_WatchBroadcast_Response {
	enum EWatchResponse {
		k_EWatchResponseReady = 1;
		k_EWatchResponseNotAvailable = 2;
		k_EWatchResponseWaitingForApproval = 3;
		k_EWatchResponseWaitingForStart = 4;
		k_EWatchResponseInvalidSession = 5;
		k_EWatchResponseTooManyBroadcasts = 6;
		k_EWatchResponseWaitingForReconnect = 7;
		k_EWatchResponseSystemNotSupported = 8;
		k_EWatchResponseUserRestricted = 9;
		k_EWatchResponseClientOutOfDate = 10;
		k_EWatchResponsePoorUploadQuality = 11;
		k_EWatchResponseMissingSubscription = 12;
	}

	optional .CBroadcast_WatchBroadcast_Response.EWatchResponse response = 1 [default = k_EWatchResponseReady];
	optional string mpd_url = 2;
	optional fixed64 broadcast_id = 3;
	optional uint64 gameid = 4;
	optional string title = 5;
	optional uint32 num_viewers = 6;
	optional int32 permission = 7;
	optional bool is_rtmp = 8;
	optional int32 seconds_delay = 9;
	optional fixed64 viewer_token = 10;
	optional string hls_m3u8_master_url = 11;
	optional int32 heartbeat_interval = 12;
	optional string thumbnail_url = 13;
	optional bool is_webrtc = 14;
	optional fixed64 webrtc_session_id = 15;
	optional string webrtc_offer_sdp = 16;
	optional string webrtc_turn_server = 17;
	optional bool is_replay = 18;
	optional int32 duration = 19;
	optional string cdn_auth_url_parameters = 20;
}

message CBroadcast_HeartbeatBroadcast_Notification {
	optional fixed64 steamid = 1 [(description) = "broadcaster steamID."];
	optional fixed64 broadcast_id = 2 [(description) = "broadcast session ID."];
	optional fixed64 viewer_token = 3 [(description) = "viewer token received from last WatchRequest call, from browser storage."];
	optional uint32 representation = 4 [(description) = "video stream representation watching"];
}

message CBroadcast_StopWatchingBroadcast_Notification {
	optional fixed64 steamid = 1 [(description) = "broadcaster steamID."];
	optional fixed64 broadcast_id = 2 [(description) = "broadcast session ID."];
	optional fixed64 viewer_token = 3 [(description) = "viewer token received from last WatchRequest call, from browser storage."];
}

message CBroadcast_GetBroadcastStatus_Request {
	optional fixed64 steamid = 1 [(description) = "broadcaster steamID."];
	optional fixed64 broadcast_id = 2 [(description) = "broadcast session ID to proof that user is allowed to see details."];
}

message CBroadcast_GetBroadcastStatus_Response {
	optional uint64 gameid = 1;
	optional string title = 2;
	optional uint32 num_viewers = 3;
	optional int32 permission = 4;
	optional bool is_rtmp = 5;
	optional int32 seconds_delay = 6;
	optional bool is_publisher = 7;
	optional string thumbnail_url = 8;
	optional int32 update_interval = 9;
	optional bool is_uploading = 10;
	optional uint32 duration = 11;
	optional bool is_replay = 12;
	optional bool is_capturing_vod = 13;
	optional bool is_store_whitelisted = 14;
}

message CBroadcast_GetBroadcastThumbnail_Request {
	optional fixed64 steamid = 1;
	optional fixed64 broadcast_id = 2;
}

message CBroadcast_GetBroadcastThumbnail_Response {
	optional string thumbnail_url = 1;
	optional int32 update_interval = 2;
	optional int32 num_viewers = 3;
	optional int32 duration = 4;
}

message CBroadcast_InviteToBroadcast_Request {
	optional fixed64 steamid = 1;
	optional bool approval_response = 2;
}

message CBroadcast_InviteToBroadcast_Response {
	optional bool success = 1;
}

message CBroadcast_SendBroadcastStateToServer_Request {
	optional int32 permission = 1;
	optional uint64 gameid = 2;
	optional string title = 3;
	optional string game_data_config = 4;
}

message CBroadcast_SendBroadcastStateToServer_Response {
}

message CBroadcast_NotifyBroadcastSessionHeartbeat_Notification {
	optional fixed64 broadcast_id = 1;
}

message CBroadcast_GetBroadcastChatInfo_Request {
	optional fixed64 steamid = 1;
	optional fixed64 broadcast_id = 2;
	optional uint32 client_ip = 3;
	optional uint32 client_cell = 4;
}

message CBroadcast_GetBroadcastChatInfo_Response {
	optional fixed64 chat_id = 1;
	optional string view_url_template = 3;
	repeated uint32 flair_group_ids = 4;
}

message CBroadcast_PostChatMessage_Request {
	optional fixed64 chat_id = 1;
	optional string message = 2;
	optional uint32 instance_id = 3;
	optional uint32 language = 4 [default = 0, (description) = "ELanguage of the user posting the message, default is english"];
	optional string country_code = 5 [(description) = "The two letter country code"];
}

message CBroadcast_PostChatMessage_Response {
	optional string persona_name = 1;
	optional bool in_game = 2;
	optional int32 result = 3;
	optional int32 cooldown_time_seconds = 4;
}

message CBroadcast_UpdateChatMessageFlair_Request {
	optional fixed64 chat_id = 1;
	optional string flair = 2;
}

message CBroadcast_UpdateChatMessageFlair_Response {
	optional int32 result = 1;
	optional fixed64 chat_id = 2;
	optional string flair = 3;
}

message CBroadcast_MuteBroadcastChatUser_Request {
	optional fixed64 chat_id = 1;
	optional fixed64 user_steamid = 2;
	optional bool muted = 3;
}

message CBroadcast_MuteBroadcastChatUser_Response {
}

message CBroadcast_RemoveUserChatText_Request {
	optional fixed64 chat_id = 1;
	optional fixed64 user_steamid = 2;
}

message CBroadcast_RemoveUserChatText_Response {
}

message CBroadcast_GetBroadcastChatUserNames_Request {
	optional fixed64 chat_id = 1;
	repeated fixed64 user_steamid = 2;
}

message CBroadcast_GetBroadcastChatUserNames_Response {
	message PersonaName {
		optional fixed64 steam_id = 1 [(allow_field_named_steam_id) = true];
		optional string persona = 2;
	}

	repeated .CBroadcast_GetBroadcastChatUserNames_Response.PersonaName persona_names = 1;
}

message CBroadcast_StartBuildClip_Request {
	optional fixed64 steamid = 1;
	optional fixed64 broadcast_session_id = 2;
	optional int32 first_segment = 3;
	optional int32 num_segments = 4;
	optional string clip_description = 5;
}

message CBroadcast_StartBuildClip_Response {
	optional fixed64 broadcast_clip_id = 1;
}

message CBroadcast_GetBuildClipStatus_Request {
	optional fixed64 broadcast_clip_id = 1;
}

message CBroadcast_GetBuildClipStatus_Response {
}

message CBroadcast_SetClipDetails_Request {
	optional uint64 broadcast_clip_id = 1 [(description) = "Clip ID"];
	optional uint32 start_time = 2 [(description) = "start time of the clip"];
	optional uint32 end_time = 3 [(description) = "end time of the clip"];
	optional string video_description = 4;
}

message CBroadcast_SetClipDetails_Response {
}

message CBroadcast_GetClipDetails_Request {
	optional uint64 broadcast_clip_id = 1 [(description) = "List of clip IDs we want details for"];
}

message CBroadcast_GetClipDetails_Response {
	optional uint64 broadcast_clip_id = 1 [(description) = "broadcast clip ID"];
	optional uint64 video_id = 2 [(description) = "matching unique video ID"];
	optional uint64 channel_id = 3 [(description) = "Broadcast Channel ID"];
	optional uint32 app_id = 4 [(description) = "App ID stream is tagged with"];
	optional uint32 accountid_broadcaster = 5 [(description) = "Account ID of broadcaster"];
	optional uint32 accountid_clipmaker = 6 [(description) = "Account ID of clip-maker"];
	optional string video_description = 7 [(description) = "Short name or description of this clip"];
	optional uint32 start_time = 8 [(description) = "Wall time clip was broadcasted live"];
	optional uint32 length_milliseconds = 9 [(description) = "length of video in MS"];
	optional string thumbnail_path = 10 [(description) = "Path for thumbnail URL"];
}

message CBroadcast_SetRTMPInfo_Request {
	optional int32 broadcast_permission = 1;
	optional bool update_token = 2;
	optional int32 broadcast_delay = 3;
	optional uint32 app_id = 4;
	optional uint32 required_app_id = 5;
	optional .EBroadcastChatPermission broadcast_chat_permission = 6 [default = k_EBroadcastChatPermissionPublic, (description) = "Who is permitted to send a chat message during broadcast"];
	optional int32 broadcast_buffer = 7 [(description) = "Previous seconds we keep of the stream available"];
	optional fixed64 steamid = 8 [(description) = "broadcaster steamID if not logged-in user"];
	optional uint32 chat_rate_limit = 9 [(description) = "Seconds required between chat messages"];
	optional bool enable_replay = 10 [(description) = "Enable replay of last upload"];
	optional bool is_partner_chat_only = 11 [(description) = "When true, then only steamwork partner can create chat messages."];
	optional string wordban_list = 12;
}

message CBroadcast_SetRTMPInfo_Response {
}

message CBroadcast_GetRTMPInfo_Request {
	optional uint32 ip = 1;
	optional fixed64 steamid = 2 [(description) = "broadcaster steamID if not logged-in user"];
}

message CBroadcast_GetRTMPInfo_Response {
	optional int32 broadcast_permission = 1;
	optional string rtmp_host = 2;
	optional string rtmp_token = 3;
	optional int32 broadcast_delay = 4;
	optional uint32 app_id = 5;
	optional uint32 required_app_id = 6;
	optional .EBroadcastChatPermission broadcast_chat_permission = 7 [default = k_EBroadcastChatPermissionPublic, (description) = "Who is permitted to send a chat message during broadcast"];
	optional int32 broadcast_buffer = 8 [(description) = "Seconds we keep streams available"];
	optional fixed64 steamid = 9 [(description) = "broadcaster steamID"];
	optional uint32 chat_rate_limit = 10 [(description) = "Seconds required between chat messages"];
	optional bool enable_replay = 11 [(description) = "Enable replay of last upload"];
	optional bool is_partner_chat_only = 12 [(description) = "When true, then only steamwork partner can create chat messages."];
	optional string wordban_list = 13;
}

message CBroadcast_WebRTCHaveTURNServer_Notification {
	optional fixed64 broadcast_session_id = 1;
	optional string turn_server = 2;
}

message CBroadcast_WebRTCStartResult_Request {
	optional fixed64 webrtc_session_id = 1;
	optional bool started = 2;
	optional string offer = 3;
	optional uint32 resolution_x = 4;
	optional uint32 resolution_y = 5;
	optional uint32 fps = 6;
}

message CBroadcast_WebRTCStartResult_Response {
}

message CBroadcast_WebRTCStopped_Request {
	optional fixed64 webrtc_session_id = 1;
}

message CBroadcast_WebRTCStopped_Response {
}

message CBroadcast_WebRTCSetAnswer_Request {
	optional fixed64 broadcaster_steamid = 1;
	optional fixed64 webrtc_session_id = 2;
	optional string answer = 3;
}

message CBroadcast_WebRTCSetAnswer_Response {
}

message CBroadcast_WebRTCLookupTURNServer_Request {
	optional uint32 cellid = 1;
}

message CBroadcast_WebRTCLookupTURNServer_Response {
	optional string turn_server = 1;
}

message CBroadcast_WebRTC_Candidate {
	optional string sdp_mid = 1;
	optional int32 sdp_mline_index = 2;
	optional string candidate = 3;
}

message CBroadcast_WebRTCAddHostCandidate_Request {
	optional fixed64 webrtc_session_id = 1;
	optional .CBroadcast_WebRTC_Candidate candidate = 2;
}

message CBroadcast_WebRTCAddHostCandidate_Response {
}

message CBroadcast_WebRTCAddViewerCandidate_Request {
	optional fixed64 broadcaster_steamid = 1;
	optional fixed64 webrtc_session_id = 2;
	optional .CBroadcast_WebRTC_Candidate candidate = 3;
}

message CBroadcast_WebRTCAddViewerCandidate_Response {
}

message CBroadcast_WebRTCGetHostCandidates_Request {
	optional fixed64 broadcaster_steamid = 1;
	optional fixed64 webrtc_session_id = 2;
	optional uint32 candidate_generation = 3;
}

message CBroadcast_WebRTCGetHostCandidates_Response {
	optional uint32 candidate_generation = 1;
	repeated .CBroadcast_WebRTC_Candidate candidates = 2;
}

message CBroadcast_GetBroadcastUploadStats_Request {
	optional uint32 row_limit = 1 [default = 100, (description) = "How many at maximum to return."];
	optional uint32 start_time = 2 [default = 0, (description) = "Start time"];
	optional uint64 upload_id = 3 [(description) = "Optional relay upload ID - not compatible with session_id"];
	optional fixed64 steamid = 4 [(description) = "Optional the steamid whose stats you want, otherwise the user logged in - admin only"];
	optional uint64 session_id = 5 [(description) = "Optional broadcast session ID - not compatiable with upload_id"];
}

message CBroadcast_GetBroadcastUploadStats_Response {
	message UploadStats {
		optional uint32 upload_result = 1 [(description) = ""];
		optional uint32 time_stopped = 2 [(description) = "time broadcast upload stopped"];
		optional uint32 seconds_uploaded = 3 [(description) = "seconds of vido uploaded"];
		optional uint32 max_viewers = 4 [(description) = "max concurrent viewers"];
		optional uint32 resolution_x = 5 [(description) = "horizontal resultion"];
		optional uint32 resolution_y = 6 [(description) = "vertical resultion"];
		optional uint32 avg_bandwidth = 7 [(description) = ""];
		optional uint64 total_bytes = 8 [(description) = "total byte uploaded by broadcaster"];
		optional uint32 app_id = 9 [(description) = "game broadcasted"];
		optional uint32 total_unique_viewers = 10 [(description) = "total unique viewers seen"];
		optional uint64 total_seconds_watched = 11 [(description) = "total number of seconds watched by all viewers"];
		optional uint32 time_started = 12 [(description) = "time broadcast upload started"];
		optional uint64 upload_id = 13 [(description) = "broadcast relay upload id"];
		optional string local_address = 14 [(description) = "upload to server address"];
		optional string remote_address = 15 [(description) = "upload from client address"];
		optional uint32 frames_per_second = 16 [(description) = "frames per second"];
		optional uint32 num_representations = 17 [(description) = "number of video represetations"];
		optional string app_name = 18 [(description) = "game name"];
		optional bool is_replay = 19 [(description) = "replay of previous recording"];
		optional uint64 session_id = 20 [(description) = "broadcast session id"];
	}

	repeated .CBroadcast_GetBroadcastUploadStats_Response.UploadStats upload_stats = 1;
}

message CBroadcast_GetBroadcastViewerStats_Request {
	optional uint64 upload_id = 1 [(description) = "Get stats for this stream"];
	optional fixed64 steamid = 2 [(description) = "Optional: The steamid of the broadcast whose details you are requesting."];
}

message CBroadcast_GetBroadcastViewerStats_Response {
	message ViewerStats {
		optional uint32 time = 1 [(description) = "time of record"];
		optional uint32 num_viewers = 2 [(description) = "current number of viewers"];
	}

	message CountryStats {
		optional string country_code = 1 [(description) = "country code"];
		optional uint32 num_viewers = 2 [(description) = "number of viewers"];
	}

	repeated .CBroadcast_GetBroadcastViewerStats_Response.ViewerStats viewer_stats = 1;
	repeated .CBroadcast_GetBroadcastViewerStats_Response.CountryStats country_stats = 2;
}

message CBroadcast_BroadcastViewerState_Notification {
	enum EViewerState {
		k_EViewerNeedsApproval = 1;
		k_EViewerWatching = 2;
		k_EViewerLeft = 3;
	}

	optional fixed64 steamid = 1;
	optional .CBroadcast_BroadcastViewerState_Notification.EViewerState state = 2 [default = k_EViewerNeedsApproval];
}

message CBroadcast_WaitingBroadcastViewer_Notification {
	optional fixed64 broadcast_id = 1;
}

message CBroadcast_BroadcastUploadStarted_Notification {
	optional fixed64 broadcast_id = 1;
	optional string upload_token = 2;
	optional string upload_address = 3;
	optional string http_address = 4;
	optional fixed64 broadcast_upload_id = 5;
	optional uint32 heartbeat_interval_seconds = 6 [(description) = "how many seconds between session heartbeats"];
	optional bool is_rtmp = 7;
}

message CBroadcast_StopBroadcastUpload_Notification {
	optional fixed64 broadcast_id = 1;
	optional fixed64 broadcast_relay_id = 2;
	optional uint32 upload_result = 3;
	optional bool too_many_poor_uploads = 4;
}

message CBroadcast_SessionClosed_Notification {
	optional fixed64 broadcast_id = 1;
}

message CBroadcast_ViewerBroadcastInvite_Notification {
	optional fixed64 broadcaster_steamid = 1;
}

message CBroadcast_BroadcastStatus_Notification {
	optional fixed64 broadcast_id = 1;
	optional int32 num_viewers = 2;
}

message CBroadcast_BroadcastChannelLive_Notification {
	optional fixed64 broadcast_channel_id = 1;
	optional string broadcast_channel_name = 2;
	optional string broadcast_channel_avatar = 3;
}

message CBroadcast_SendThumbnailToRelay_Notification {
	optional string thumbnail_upload_token = 1;
	optional fixed64 thumbnail_broadcast_session_id = 2;
	optional bytes thumbnail_data = 3;
	optional uint32 thumbnail_width = 4;
	optional uint32 thumbnail_height = 5;
}

message CBroadcast_WebRTCNeedTURNServer_Notification {
	optional fixed64 broadcast_session_id = 1;
}

message CBroadcast_WebRTCStart_Notification {
	optional fixed64 broadcast_session_id = 1;
	optional fixed64 webrtc_session_id = 2;
	optional fixed64 viewer_steamid = 3;
	optional fixed64 viewer_token = 4;
}

message CBroadcast_WebRTCSetAnswer_Notification {
	optional fixed64 broadcast_session_id = 1;
	optional fixed64 webrtc_session_id = 2;
	optional string answer = 3;
}

message CBroadcast_WebRTCAddViewerCandidate_Notification {
	optional fixed64 broadcast_session_id = 1;
	optional fixed64 webrtc_session_id = 2;
	optional .CBroadcast_WebRTC_Candidate candidate = 3;
}

service Broadcast {
	option (service_description) = "Methods for Steam broadcast operations";

	rpc BeginBroadcastSession (.CBroadcast_BeginBroadcastSession_Request) returns (.CBroadcast_BeginBroadcastSession_Response) {
		option (method_description) = "Request from client to directory to begin a broadcast session. No data being sent to relay; just available for broadcast.";
	}

	rpc EndBroadcastSession (.CBroadcast_EndBroadcastSession_Request) returns (.CBroadcast_EndBroadcastSession_Response) {
		option (method_description) = "Request from client to stop a broadcast session. Any uploads will terminate.";
	}

	rpc StartBroadcastUpload (.CBroadcast_StartBroadcastUpload_Request) returns (.CBroadcast_StartBroadcastUpload_Response) {
		option (method_description) = "Request from client to begin sending video for a broadcast.";
	}

	rpc NotifyBroadcastUploadStop (.CBroadcast_NotifyBroadcastUploadStop_Notification) returns (.NoResponse) {
		option (method_description) = "Tells directory that client stopped uploading broadcast";
	}

	rpc WatchBroadcast (.CBroadcast_WatchBroadcast_Request) returns (.CBroadcast_WatchBroadcast_Response) {
		option (method_description) = "Request from viewer to watch a broadcast";
	}

	rpc HeartbeatBroadcast (.CBroadcast_HeartbeatBroadcast_Notification) returns (.NoResponse) {
		option (method_description) = "Notify directory that user is still watching.";
	}

	rpc StopWatchingBroadcast (.CBroadcast_StopWatchingBroadcast_Notification) returns (.NoResponse) {
		option (method_description) = "Request to immediately stop watching a broadcast. Optional Method, if not called, viewer will time out.";
	}

	rpc GetBroadcastStatus (.CBroadcast_GetBroadcastStatus_Request) returns (.CBroadcast_GetBroadcastStatus_Response) {
		option (method_description) = "Request from viewer about broadcast details";
	}

	rpc GetBroadcastThumbnail (.CBroadcast_GetBroadcastThumbnail_Request) returns (.CBroadcast_GetBroadcastThumbnail_Response) {
		option (method_description) = "Request thumbnail URL for broadcast";
	}

	rpc InviteToBroadcast (.CBroadcast_InviteToBroadcast_Request) returns (.CBroadcast_InviteToBroadcast_Response) {
		option (method_description) = "Invites another steam user to watch the caller's broadcast";
	}

	rpc SendBroadcastStateToServer (.CBroadcast_SendBroadcastStateToServer_Request) returns (.CBroadcast_SendBroadcastStateToServer_Response) {
		option (method_description) = "Sends users current broadcast state (permissions, game) to the server";
	}

	rpc NotifyBroadcastSessionHeartbeat (.CBroadcast_NotifyBroadcastSessionHeartbeat_Notification) returns (.NoResponse) {
		option (method_description) = "Tells directory broadcast session is still available";
	}

	rpc GetBroadcastChatInfo (.CBroadcast_GetBroadcastChatInfo_Request) returns (.CBroadcast_GetBroadcastChatInfo_Response) {
		option (method_description) = "Gets chat room info for a broadcast";
	}

	rpc PostChatMessage (.CBroadcast_PostChatMessage_Request) returns (.CBroadcast_PostChatMessage_Response) {
		option (method_description) = "Post chat message to specified chat room";
	}

	rpc UpdateChatMessageFlair (.CBroadcast_UpdateChatMessageFlair_Request) returns (.CBroadcast_UpdateChatMessageFlair_Response) {
		option (method_description) = "Update chat message flair in the specified chat room";
	}

	rpc MuteBroadcastChatUser (.CBroadcast_MuteBroadcastChatUser_Request) returns (.CBroadcast_MuteBroadcastChatUser_Response) {
		option (method_description) = "Mute a user in your broadcast chat";
	}

	rpc RemoveUserChatText (.CBroadcast_RemoveUserChatText_Request) returns (.CBroadcast_RemoveUserChatText_Response) {
		option (method_description) = "Tell all viewers to remove user chat text";
	}

	rpc GetBroadcastChatUserNames (.CBroadcast_GetBroadcastChatUserNames_Request) returns (.CBroadcast_GetBroadcastChatUserNames_Response) {
		option (method_description) = "Get names for list of users in chat";
	}

	rpc StartBuildClip (.CBroadcast_StartBuildClip_Request) returns (.CBroadcast_StartBuildClip_Response) {
		option (method_description) = "Start building a broadcast clip";
	}

	rpc GetBuildClipStatus (.CBroadcast_GetBuildClipStatus_Request) returns (.CBroadcast_GetBuildClipStatus_Response) {
		option (method_description) = "Start building a broadcast clip";
	}

	rpc SetClipDetails (.CBroadcast_SetClipDetails_Request) returns (.CBroadcast_SetClipDetails_Response) {
		option (method_description) = "Updates a broadcast clip";
	}

	rpc GetClipDetails (.CBroadcast_GetClipDetails_Request) returns (.CBroadcast_GetClipDetails_Response) {
		option (method_description) = "Get details for Broadcast Clips";
	}

	rpc SetRTMPInfo (.CBroadcast_SetRTMPInfo_Request) returns (.CBroadcast_SetRTMPInfo_Response) {
		option (method_description) = "Sets RTMP broadcast info";
	}

	rpc GetRTMPInfo (.CBroadcast_GetRTMPInfo_Request) returns (.CBroadcast_GetRTMPInfo_Response) {
		option (method_description) = "Gets RTMP broadcast info";
	}

	rpc NotifyWebRTCHaveTURNServer (.CBroadcast_WebRTCHaveTURNServer_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from client to server with the client's TURN server";
	}

	rpc WebRTCStartResult (.CBroadcast_WebRTCStartResult_Request) returns (.CBroadcast_WebRTCStartResult_Response) {
		option (method_description) = "Notify the server that a WebRTC session has been created by the host";
	}

	rpc WebRTCStopped (.CBroadcast_WebRTCStopped_Request) returns (.CBroadcast_WebRTCStopped_Response) {
		option (method_description) = "Notify the server that a WebRTC session has been stopped by the host";
	}

	rpc WebRTCSetAnswer (.CBroadcast_WebRTCSetAnswer_Request) returns (.CBroadcast_WebRTCSetAnswer_Response) {
		option (method_description) = "Notify the server that a WebRTC session has been created by the viewer";
	}

	rpc WebRTCLookupTURNServer (.CBroadcast_WebRTCLookupTURNServer_Request) returns (.CBroadcast_WebRTCLookupTURNServer_Response) {
		option (method_description) = "Lookup the best TURN server for this client";
	}

	rpc WebRTCAddHostCandidate (.CBroadcast_WebRTCAddHostCandidate_Request) returns (.CBroadcast_WebRTCAddHostCandidate_Response) {
		option (method_description) = "Add an ICE candidate for the host side of a WebRTC session";
	}

	rpc WebRTCAddViewerCandidate (.CBroadcast_WebRTCAddViewerCandidate_Request) returns (.CBroadcast_WebRTCAddViewerCandidate_Response) {
		option (method_description) = "Add an ICE candidate for the viewer side of a WebRTC session";
	}

	rpc WebRTCGetHostCandidates (.CBroadcast_WebRTCGetHostCandidates_Request) returns (.CBroadcast_WebRTCGetHostCandidates_Response) {
		option (method_description) = "Get the ICE candidates for the host side of a WebRTC session";
	}

	rpc GetBroadcastUploadStats (.CBroadcast_GetBroadcastUploadStats_Request) returns (.CBroadcast_GetBroadcastUploadStats_Response) {
		option (method_description) = "Gets broadcast upload stats for user";
	}

	rpc GetBroadcastViewerStats (.CBroadcast_GetBroadcastViewerStats_Request) returns (.CBroadcast_GetBroadcastViewerStats_Response) {
		option (method_description) = "Gets viewer stats for given broadcast";
	}
}

service BroadcastClient {
	option (service_execution_site) = k_EProtoExecutionSiteSteamClient;

	rpc NotifyBroadcastViewerState (.CBroadcast_BroadcastViewerState_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client that a viewers state has changed";
	}

	rpc NotifyWaitingBroadcastViewer (.CBroadcast_WaitingBroadcastViewer_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client one or more users is waiting for user to start broadcast";
	}

	rpc NotifyBroadcastUploadStarted (.CBroadcast_BroadcastUploadStarted_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client with information about a broadcast";
	}

	rpc NotifyStopBroadcastUpload (.CBroadcast_StopBroadcastUpload_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client telling it to stop uploading when the last viewer has disconnected from their broadcast";
	}

	rpc NotifySessionClosed (.CBroadcast_SessionClosed_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client telling it a session has been closed unexpectedly by the directory";
	}

	rpc NotifyViewerBroadcastInvite (.CBroadcast_ViewerBroadcastInvite_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client that a broadcaster is inviting a viewer to watch their broadcast";
	}

	rpc NotifyBroadcastStatus (.CBroadcast_BroadcastStatus_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client about current broadcast status";
	}

	rpc NotifyBroadcastChannelLive (.CBroadcast_BroadcastChannelLive_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client about current broadcast status";
	}

	rpc SendThumbnailToRelay (.CBroadcast_SendThumbnailToRelay_Notification) returns (.NoResponse) {
		option (method_description) = "Send thumbnails to relay";
	}

	rpc NotifyWebRTCNeedTURNServer (.CBroadcast_WebRTCNeedTURNServer_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client that it needs the client's TURN server";
	}

	rpc NotifyWebRTCStart (.CBroadcast_WebRTCStart_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client that it should start a WebRTC session";
	}

	rpc NotifyWebRTCSetAnswer (.CBroadcast_WebRTCSetAnswer_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client about the broadcast viewer WebRTC answer";
	}

	rpc NotifyWebRTCAddViewerCandidate (.CBroadcast_WebRTCAddViewerCandidate_Notification) returns (.NoResponse) {
		option (method_description) = "Notification from server to client about a broadcast viewer WebRTC ICE candidate";
	}
}