Skip to content

Commit

Permalink
protobuf update + UMs for new chat
Browse files Browse the repository at this point in the history
  • Loading branch information
rossengeorgiev committed Feb 18, 2019
1 parent 44fca27 commit 146197c
Show file tree
Hide file tree
Showing 20 changed files with 4,813 additions and 1,043 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@ upload: dist register

pb_fetch:
wget -nv --show-progress -N -P ./protobufs/ -i protobuf_list.txt || exit 0
rename -v '.proto' '.proto.notouch' protobufs/{steammessages_physicalgoods,gc,test_messages}.proto
rename -v '.steamclient' '' protobufs/*.proto
sed -i '1d' protobufs/{steammessages_physicalgoods,test_messages}.proto
sed -i '1s/^/package foobar;\n/' protobufs/gc.proto
sed -i 's/optional \./optional foobar./' protobufs/gc.proto
sed -i '1s/^/syntax = "proto2"\;\n/' protobufs/*.proto
sed -i 's/cc_generic_services/py_generic_services/' protobufs/*.proto
sed -i 's/\.steamclient\.proto/.proto/' protobufs/*.proto
rename -v '.notouch' '' protobufs/*.proto.notouch

pb_compile:
for filepath in `ls ./protobufs/*.proto`; do \
for filepath in ./protobufs/*.proto; do \
protoc3 --python_out ./steam/protobufs/ --proto_path=./protobufs "$$filepath"; \
done;
sed -i '/^import sys/! s/^import /import steam.protobufs./' steam/protobufs/*_pb2.py
Expand Down
3 changes: 1 addition & 2 deletions protobuf_list.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
https://github.com/SteamRE/SteamKit/raw/master/Resources/Protobufs/gc/gc.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/content_manifest.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/encrypted_app_ticket.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_base.proto
Expand All @@ -14,14 +13,14 @@ https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/s
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_depotbuilder.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_deviceauth.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_econ.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_friendmessages.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gamenotifications.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gameservers.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_inventory.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_linkfilter.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_offline.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_parental.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_partnerapps.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_physicalgoods.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_player.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_publishedfile.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_secrets.steamclient.proto
Expand Down
41 changes: 21 additions & 20 deletions protobufs/gc.proto
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
syntax = "proto2";
package foobar;
enum GCProtoBufMsgSrc {
GCProtoBufMsgSrc_Unspecified = 0;
GCProtoBufMsgSrc_FromSystem = 1;
GCProtoBufMsgSrc_FromSteamID = 2;
GCProtoBufMsgSrc_FromGC = 3;
GCProtoBufMsgSrc_ReplySystem = 4;
}

message CMsgProtoBufHeader {
optional fixed64 client_steam_id = 1;
optional int32 client_session_id = 2;
optional uint32 source_app_id = 3;
optional fixed64 job_id_source = 10 [default = 18446744073709551615];
optional fixed64 job_id_target = 11 [default = 18446744073709551615];
optional string target_job_name = 12;
optional int32 eresult = 13 [default = 2];
optional string error_message = 14;
optional foobar.GCProtoBufMsgSrc gc_msg_src = 200 [default = GCProtoBufMsgSrc_Unspecified];
optional uint32 gc_dir_index_source = 201;
}

enum GCProtoBufMsgSrc {
GCProtoBufMsgSrc_Unspecified = 0;
GCProtoBufMsgSrc_FromSystem = 1;
GCProtoBufMsgSrc_FromSteamID = 2;
GCProtoBufMsgSrc_FromGC = 3;
GCProtoBufMsgSrc_ReplySystem = 4;
}

message CMsgProtoBufHeader {
optional fixed64 client_steam_id = 1;
optional int32 client_session_id = 2;
optional uint32 source_app_id = 3;
optional fixed64 job_id_source = 10 [default = 18446744073709551615];
optional fixed64 job_id_target = 11 [default = 18446744073709551615];
optional string target_job_name = 12;
optional int32 eresult = 13 [default = 2];
optional string error_message = 14;
optional foobar.GCProtoBufMsgSrc gc_msg_src = 200 [default = GCProtoBufMsgSrc_Unspecified];
optional uint32 gc_dir_index_source = 201;
}
13 changes: 12 additions & 1 deletion protobufs/steammessages_base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ extend .google.protobuf.FieldOptions {
optional bool php_output_always_number = 50020 [default = false];
}

message CMsgIPAddress {
oneof ip {
fixed32 v4 = 1;
bytes v6 = 2;
}
}

message CMsgProtoBufHeader {
optional fixed64 steamid = 1;
optional int32 client_sessionid = 2;
Expand All @@ -27,7 +34,6 @@ message CMsgProtoBufHeader {
optional int32 seq_num = 24;
optional int32 eresult = 13 [default = 2];
optional string error_message = 14;
optional uint32 ip = 15;
optional uint32 auth_account_flags = 16;
optional uint32 token_source = 22;
optional bool admin_spoofing_user = 23;
Expand All @@ -40,6 +46,11 @@ message CMsgProtoBufHeader {
optional bool is_from_external_source = 26;
repeated uint32 forward_to_sysid = 27;
optional uint32 cm_sysid = 28;
optional string wg_token = 30;
oneof ip_addr {
uint32 ip = 15;
bytes ip_v6 = 29;
}
}

message CMsgMulti {
Expand Down
191 changes: 190 additions & 1 deletion protobufs/steammessages_broadcast.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ enum EBroadcastWatchLocation {
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;
}

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

message CBroadcast_BeginBroadcastSession_Request {
Expand Down Expand Up @@ -45,6 +55,7 @@ message CBroadcast_StartBroadcastUpload_Request {
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;
}

message CBroadcast_StartBroadcastUpload_Response {
Expand All @@ -56,7 +67,7 @@ message CBroadcast_StartBroadcastUpload_Response {
}

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

Expand All @@ -67,6 +78,7 @@ message CBroadcast_WatchBroadcast_Request {
optional uint32 client_ip = 4;
optional uint32 client_cell = 5;
optional .EBroadcastWatchLocation watch_location = 6 [default = k_EBroadcastWatchLocation_Invalid];
optional bool is_webrtc = 7;
}

message CBroadcast_WatchBroadcast_Response {
Expand Down Expand Up @@ -98,6 +110,10 @@ message CBroadcast_WatchBroadcast_Response {
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;
}

message CBroadcast_HeartbeatBroadcast_Notification {
Expand Down Expand Up @@ -223,6 +239,114 @@ message CBroadcast_GetBroadcastChatUserNames_Response {
repeated .CBroadcast_GetBroadcastChatUserNames_Response.PersonaName persona_names = 1;
}

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"];
}

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"];
}

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_BroadcastViewerState_Notification {
enum EViewerState {
k_EViewerNeedsApproval = 1;
Expand Down Expand Up @@ -266,6 +390,29 @@ message CBroadcast_SendThumbnailToRelay_Notification {
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) {
Expand Down Expand Up @@ -319,6 +466,36 @@ service Broadcast {
rpc GetBroadcastChatUserNames (.CBroadcast_GetBroadcastChatUserNames_Request) returns (.CBroadcast_GetBroadcastChatUserNames_Response) {
option (method_description) = "Get names for list of users in chat";
}
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";
}
}
service BroadcastClient {
option (service_execution_site) = k_EProtoExecutionSiteSteamClient;
Expand All @@ -343,4 +520,16 @@ service BroadcastClient {
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";
}
}
11 changes: 11 additions & 0 deletions protobufs/steammessages_clientserver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ message CMsgClientGamesPlayed {
optional uint32 total_steam_controller_count = 18 [default = 0];
optional uint32 total_non_steam_controller_count = 19 [default = 0];
optional uint64 controller_workshop_file_id = 20 [default = 0];
optional uint32 launch_source = 21 [default = 0];
}

repeated .CMsgClientGamesPlayed.GamePlayed games_played = 1;
Expand Down Expand Up @@ -1172,3 +1173,13 @@ message CMsgClientClanState {
optional bool chat_room_private = 8;
}

message CMsgClientUnsignedInstallScript {
optional uint32 app_id = 1;
optional string file_name = 2;
optional uint32 file_size = 3;
optional bool signature_broken = 4;
optional uint32 depot_id = 5;
optional uint64 manifest_id = 6;
optional uint32 file_flags = 7;
}

Loading

0 comments on commit 146197c

Please sign in to comment.