Skip to content

Commit

Permalink
Update protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterPhoenix committed Feb 21, 2025
1 parent ff506e2 commit 77eeb98
Show file tree
Hide file tree
Showing 224 changed files with 22,704 additions and 132,587 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test:

webauth_gen:
rm -f vcr/webauth*
python tests/generete_webauth_vcr.py
python3 tests/generete_webauth_vcr.py

pylint:
pylint -r n -f colorized steam || true
Expand All @@ -59,29 +59,29 @@ clean:
rm -rf dist steam.egg-info steam/*.pyc

dist: clean
python setup.py sdist
python3 setup.py sdist

upload: dist
twine upload -r pypi dist/*

pb_fetch:
wget -nv --show-progress -N -P ./protobufs/ -i protobuf_list.txt || exit 0
for FN in protobufs/{steammessages_{physicalgoods,webui_friends},gc,test_messages}.proto; do \
mv "$${FN}" "$${FN}.notouch"; \
done;
#for FN in protobufs/{steammessages_{physicalgoods,webui_friends},gc,test_messages}.proto; do \
# mv "$${FN}" "$${FN}.notouch"; \
#done;
for FN in protobufs/*.steamclient.proto; do \
mv "$${FN}" "$${FN/.steamclient.proto/.proto}"; \
done;
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
for FN in protobufs/*.proto.notouch; do \
mv "$${FN}" "$${FN%.notouch}"; \
done;
#for FN in protobufs/*.proto.notouch; do \
# mv "$${FN}" "$${FN%.notouch}"; \
#done;

pb_compile:
for filepath in ./protobufs/*.proto; do \
protoc3 --python_out ./steam/protobufs/ --proto_path=./protobufs "$$filepath"; \
protoc --python_out ./steam/protobufs/ --proto_path=./protobufs "$$filepath"; \
done;
sed -i '/^import sys/! s/^import /import steam.protobufs./' steam/protobufs/*_pb2.py

Expand All @@ -95,6 +95,6 @@ pb_services:
mv steam/core/msg/unified.py.tmp steam/core/msg/unified.py

pb_gen_enums:
python generate_enums_from_proto.py > steam/enums/proto.py
python3 generate_enums_from_proto.py > steam/enums/proto.py

pb_update: pb_fetch pb_compile pb_services pb_gen_enums
49 changes: 3 additions & 46 deletions generate_enums_from_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,12 @@
from keyword import kwlist
from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper
from steam.enums import common as common_enums
from os import listdir
from os.path import isfile, join

kwlist = set(kwlist + ['None'])

_proto_modules = [
'enums_pb2',
'steammessages_auth_pb2',
'steammessages_broadcast_pb2',
'steammessages_chat_pb2',
'steammessages_cloud_pb2',
'steammessages_contentsystem_pb2',
'steammessages_credentials_pb2',
'steammessages_datapublisher_pb2',
'steammessages_depotbuilder_pb2',
'steammessages_deviceauth_pb2',
'steammessages_econ_pb2',
'steammessages_friendmessages_pb2',
'steammessages_gamenotifications_pb2',
'steammessages_gameservers_pb2',
'steammessages_inventory_pb2',
'steammessages_linkfilter_pb2',
'steammessages_lobbymatchmaking_pb2',
'steammessages_marketingmessages_pb2',
'steammessages_market_pb2',
'steammessages_offline_pb2',
'steammessages_parental_pb2',
'steammessages_parties_pb2',
'steammessages_partnerapps_pb2',
'steammessages_physicalgoods_pb2',
'steammessages_player_pb2',
'steammessages_publishedfile_pb2',
'steammessages_qms_pb2',
'steammessages_remoteplay_pb2',
'steammessages_secrets_pb2',
'steammessages_shader_pb2',
'steammessages_site_license_pb2',
'steammessages_star_pb2',
'steammessages_steamtv_pb2',
'steammessages_storebrowse_pb2',
'steammessages_store_pb2',
'steammessages_timedtrial_pb2',
'steammessages_twofactor_pb2',
'steammessages_unified_base_pb2',
'steammessages_unified_test_pb2',
'steammessages_useraccount_pb2',
'steammessages_video_pb2',
'steammessages_webui_friends_pb2',
'steammessages_workshop_pb2',
]

_proto_modules = [file.replace(".py", "") for file in listdir(join("steam", "protobufs")) if isfile(join("steam", "protobufs", file)) and file != "__init__.py"]
_proto_module = __import__("steam.protobufs", globals(), locals(), _proto_modules, 0)

classes = {}
Expand Down
67 changes: 57 additions & 10 deletions protobuf_list.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/clientmetrics.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/contenthubs.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/enums.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/enums_clientserver.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/enums_productinfo.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/htmlmessages.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/offline_ticket.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steamdatagram_messages_auth.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steamdatagram_messages_sdr.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_accounthardware.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_appoverview.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_auth.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_base.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_client_objects.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_broadcast.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_chat.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_childprocessquery.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientlanp2p.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientmetrics.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientnotificationtypes.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_2.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_friends.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_appinfo.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_friends.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_gameservers.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_lbs.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_login.proto
Expand All @@ -15,36 +31,50 @@ https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/s
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_uds.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_ufs.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_userstats.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_remoteplay.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_auth.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_broadcast.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_chat.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientserver_video.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_clientsettings.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_client_objects.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_cloud.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_community.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_contentsystem.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_credentials.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_datapublisher.steamclient.proto
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_familygroups.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_friendmessages.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gamenetworking.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gamenetworkingui.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gamenotifications.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gamerecording.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gamerecording_objects.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_gameservers.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_hiddevices.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_lobbymatchmaking.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_market.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_marketingmessages.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_notifications.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_parental_objects.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_parties.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_partnerapps.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_qms.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_remoteclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_remoteclient_discovery.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_remoteclient_service.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_remoteclient_service_messages.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_remoteplay.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_secrets.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_shader.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_sitelicenseclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_siteserverui.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_site_license.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_star.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_steamtv.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_store.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_storebrowse.steamclient.proto
Expand All @@ -53,8 +83,25 @@ https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/s
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_unified_base.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_unified_test.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_useraccount.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_vac.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_video.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_virtualcontroller.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steammessages_workshop.steamclient.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/enums.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/enums_clientserver.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/enums_productinfo.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steamnetworkingsockets_messages.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steamnetworkingsockets_messages_certs.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/steamnetworkingsockets_messages_udp.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_achievements.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_base.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_bluetooth.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_gamenotes.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_gamerecording.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_gamerecordingfiles.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_gamescope.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_sharedjscontext.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_steamengine.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_steaminput.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_steamos.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_storagedevicemanager.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_systemmanager.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_transport.proto
https://raw.githubusercontent.com/SteamDatabase/SteamTracking/master/Protobufs/webuimessages_transportvalidation.proto
46 changes: 46 additions & 0 deletions protobufs/clientmetrics.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto2";
option optimize_for = SPEED;
option py_generic_services = false;

message CClientMetrics_ClientBootstrap_RequestInfo {
optional string original_hostname = 1;
optional string actual_hostname = 2;
optional string path = 3;
optional string base_name = 4;
optional bool success = 5;
optional uint32 status_code = 6;
optional string address_of_request_url = 7;
optional uint32 response_time_ms = 8;
optional uint64 bytes_received = 9;
optional uint32 num_retries = 10;
}

message CClientMetrics_ClientBootstrap_Summary {
optional uint32 launcher_type = 1;
optional uint32 steam_realm = 2;
optional string beta_name = 3;
optional bool download_completed = 4;
optional uint32 total_time_ms = 6;
repeated .CClientMetrics_ClientBootstrap_RequestInfo manifest_requests = 7;
repeated .CClientMetrics_ClientBootstrap_RequestInfo package_requests = 8;
}

message CClientMetrics_ContentDownloadResponse_Counts {
optional uint32 class_100 = 1;
optional uint32 class_200 = 2;
optional uint32 class_300 = 3;
optional uint32 class_400 = 4;
optional uint32 class_500 = 5;
optional uint32 no_response = 6;
optional uint32 class_unknown = 7;
}

message CClientMetrics_ContentDownloadResponse_HostCounts {
optional string hostname = 1;
optional uint32 source_type = 2;
optional .CClientMetrics_ContentDownloadResponse_Counts counts = 3;
}

message CClientMetrics_ContentDownloadResponse_Hosts {
repeated .CClientMetrics_ContentDownloadResponse_HostCounts hosts = 1;
}
42 changes: 42 additions & 0 deletions protobufs/contenthubs.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
syntax = "proto2";
import "steammessages_base.proto";

option optimize_for = SPEED;
option py_generic_services = true;
option (force_php_generation) = true;

enum EContentHubDiscountFilterType {
k_EContentHubDiscountFilterType_None = 0;
k_EContentHubDiscountFilterType_DiscountsOnly = 1;
k_EContentHubDiscountFilterType_PrioritizeDiscounts = 2;
}

message CStorePageFilter {
message SalePageFilter {
optional uint32 sale_tagid = 1;
}

message ContentHubFilter {
message OptInInfo {
optional string name = 1;
optional uint32 optin_tagid = 2;
optional uint32 prune_tagid = 3;
optional bool optin_only = 4;
}

optional string hub_type = 1;
optional string hub_category = 2;
optional uint32 hub_tagid = 3;
optional .EContentHubDiscountFilterType discount_filter = 4 [default = k_EContentHubDiscountFilterType_None];
optional .CStorePageFilter.ContentHubFilter.OptInInfo optin = 5;
}

message StoreFilter {
optional string filter_json = 1;
optional string cache_key = 2;
}

optional .CStorePageFilter.SalePageFilter sale_filter = 1;
optional .CStorePageFilter.ContentHubFilter content_hub_filter = 2;
repeated .CStorePageFilter.StoreFilter store_filters = 3;
}
Loading

0 comments on commit 77eeb98

Please sign in to comment.