Skip to main content

steam_protos/messages/
clientserver.rs

1//! Client-server miscellaneous protobuf messages
2
3use prost::Message;
4
5use super::base::{CMsgAuthTicket, CMsgIPAddress};
6
7/// License list
8#[derive(Clone, PartialEq, Message)]
9pub struct CMsgClientLicenseList {
10    #[prost(int32, optional, tag = "1")]
11    pub eresult: Option<i32>,
12    #[prost(message, repeated, tag = "2")]
13    pub licenses: Vec<cmsg_client_license_list::License>,
14}
15
16pub mod cmsg_client_license_list {
17    use prost::Message;
18
19    #[derive(Clone, PartialEq, Message)]
20    pub struct License {
21        #[prost(uint32, optional, tag = "1")]
22        pub package_id: Option<u32>,
23        #[prost(fixed32, optional, tag = "2")]
24        pub time_created: Option<u32>,
25        #[prost(fixed32, optional, tag = "3")]
26        pub time_next_process: Option<u32>,
27        #[prost(int32, optional, tag = "4")]
28        pub minute_limit: Option<i32>,
29        #[prost(int32, optional, tag = "5")]
30        pub minutes_used: Option<i32>,
31        #[prost(uint32, optional, tag = "6")]
32        pub payment_method: Option<u32>,
33        #[prost(uint32, optional, tag = "7")]
34        pub flags: Option<u32>,
35        #[prost(string, optional, tag = "8")]
36        pub purchase_country_code: Option<String>,
37        #[prost(uint32, optional, tag = "9")]
38        pub license_type: Option<u32>,
39        #[prost(int32, optional, tag = "10")]
40        pub territory_code: Option<i32>,
41        #[prost(int32, optional, tag = "11")]
42        pub change_number: Option<i32>,
43        #[prost(uint32, optional, tag = "12")]
44        pub owner_id: Option<u32>,
45        #[prost(uint32, optional, tag = "13")]
46        pub initial_period: Option<u32>,
47        #[prost(uint32, optional, tag = "14")]
48        pub initial_time_unit: Option<u32>,
49        #[prost(uint32, optional, tag = "15")]
50        pub renewal_period: Option<u32>,
51        #[prost(uint32, optional, tag = "16")]
52        pub renewal_time_unit: Option<u32>,
53        #[prost(uint64, optional, tag = "17")]
54        pub access_token: Option<u64>,
55        #[prost(uint32, optional, tag = "18")]
56        pub master_package_id: Option<u32>,
57    }
58}
59
60/// Games played message
61#[derive(Clone, PartialEq, Message)]
62pub struct CMsgClientGamesPlayed {
63    #[prost(message, repeated, tag = "1")]
64    pub games_played: Vec<cmsg_client_games_played::GamePlayed>,
65    #[prost(uint32, optional, tag = "2")]
66    pub client_os_type: Option<u32>,
67    #[prost(uint32, optional, tag = "3")]
68    pub cloud_gaming_platform: Option<u32>,
69    #[prost(bool, optional, tag = "4")]
70    pub recent_reauthentication: Option<bool>,
71}
72
73pub mod cmsg_client_games_played {
74    use prost::Message;
75
76    use super::CMsgIPAddress;
77
78    #[derive(Clone, PartialEq, Message)]
79    pub struct GamePlayed {
80        #[prost(uint64, optional, tag = "1")]
81        pub steam_id_gs: Option<u64>,
82        #[prost(fixed64, optional, tag = "2")]
83        pub game_id: Option<u64>,
84        #[prost(uint32, optional, tag = "3")]
85        pub deprecated_game_ip_address: Option<u32>,
86        #[prost(uint32, optional, tag = "4")]
87        pub game_port: Option<u32>,
88        #[prost(bool, optional, tag = "5")]
89        pub is_secure: Option<bool>,
90        #[prost(bytes = "vec", optional, tag = "6")]
91        pub token: Option<Vec<u8>>,
92        #[prost(string, optional, tag = "7")]
93        pub game_extra_info: Option<String>,
94        #[prost(bytes = "vec", optional, tag = "8")]
95        pub game_data_blob: Option<Vec<u8>>,
96        #[prost(uint32, optional, tag = "9")]
97        pub process_id: Option<u32>,
98        #[prost(uint32, optional, tag = "10")]
99        pub streaming_provider_id: Option<u32>,
100        #[prost(uint32, optional, tag = "11")]
101        pub game_flags: Option<u32>,
102        #[prost(uint32, optional, tag = "12")]
103        pub owner_id: Option<u32>,
104        #[prost(string, optional, tag = "13")]
105        pub vr_hmd_vendor: Option<String>,
106        #[prost(string, optional, tag = "14")]
107        pub vr_hmd_model: Option<String>,
108        #[prost(uint32, optional, tag = "15")]
109        pub launch_option_type: Option<u32>,
110        #[prost(int32, optional, tag = "16")]
111        pub primary_controller_type: Option<i32>,
112        #[prost(string, optional, tag = "17")]
113        pub primary_steam_controller_serial: Option<String>,
114        #[prost(uint32, optional, tag = "18")]
115        pub total_steam_controller_count: Option<u32>,
116        #[prost(uint32, optional, tag = "19")]
117        pub total_non_steam_controller_count: Option<u32>,
118        #[prost(uint64, optional, tag = "20")]
119        pub controller_workshop_file_id: Option<u64>,
120        #[prost(uint32, optional, tag = "21")]
121        pub launch_source: Option<u32>,
122        #[prost(uint32, optional, tag = "22")]
123        pub vr_hmd_runtime: Option<u32>,
124        #[prost(message, optional, tag = "23")]
125        pub game_ip_address: Option<CMsgIPAddress>,
126        #[prost(uint32, optional, tag = "24")]
127        pub controller_connection_type: Option<u32>,
128        #[prost(int32, optional, tag = "25")]
129        pub game_os_platform: Option<i32>,
130        #[prost(uint32, optional, tag = "26")]
131        pub game_build_id: Option<u32>,
132        #[prost(uint32, optional, tag = "27")]
133        pub compat_tool_id: Option<u32>,
134        #[prost(string, optional, tag = "28")]
135        pub compat_tool_cmd: Option<String>,
136        #[prost(uint32, optional, tag = "29")]
137        pub compat_tool_build_id: Option<u32>,
138        #[prost(string, optional, tag = "30")]
139        pub beta_name: Option<String>,
140        #[prost(uint32, optional, tag = "31")]
141        pub dlc_context: Option<u32>,
142    }
143}
144
145/// Service method legacy request
146#[derive(Clone, PartialEq, Message)]
147pub struct CMsgClientServiceMethodLegacy {
148    #[prost(string, optional, tag = "1")]
149    pub method_name: Option<String>,
150    #[prost(bytes = "vec", optional, tag = "2")]
151    pub serialized_method: Option<Vec<u8>>,
152    #[prost(bool, optional, tag = "3")]
153    pub is_notification: Option<bool>,
154}
155
156/// Service method legacy response
157#[derive(Clone, PartialEq, Message)]
158pub struct CMsgClientServiceMethodLegacyResponse {
159    #[prost(string, optional, tag = "1")]
160    pub method_name: Option<String>,
161    #[prost(bytes = "vec", optional, tag = "2")]
162    pub serialized_method_response: Option<Vec<u8>>,
163}
164
165/// CM list message
166#[derive(Clone, PartialEq, Message)]
167pub struct CMsgClientCMList {
168    #[prost(uint32, repeated, packed = "false", tag = "1")]
169    pub cm_addresses: Vec<u32>,
170    #[prost(uint32, repeated, packed = "false", tag = "2")]
171    pub cm_ports: Vec<u32>,
172    #[prost(string, repeated, tag = "3")]
173    pub cm_websocket_addresses: Vec<String>,
174    #[prost(uint32, optional, tag = "4")]
175    pub percent_default_to_websocket: Option<u32>,
176}
177
178/// Auth list message
179#[derive(Clone, PartialEq, Message)]
180pub struct CMsgClientAuthList {
181    #[prost(uint32, optional, tag = "1")]
182    pub tokens_left: Option<u32>,
183    #[prost(uint32, optional, tag = "2")]
184    pub last_request_seq: Option<u32>,
185    #[prost(uint32, optional, tag = "3")]
186    pub last_request_seq_from_server: Option<u32>,
187    #[prost(message, repeated, tag = "4")]
188    pub tickets: Vec<CMsgAuthTicket>,
189    #[prost(uint32, repeated, packed = "false", tag = "5")]
190    pub app_ids: Vec<u32>,
191    #[prost(uint32, optional, tag = "6")]
192    pub message_sequence: Option<u32>,
193    #[prost(bool, optional, tag = "7")]
194    pub filtered: Option<bool>,
195}
196
197/// Auth list ack
198#[derive(Clone, PartialEq, Message)]
199pub struct CMsgClientAuthListAck {
200    #[prost(uint32, repeated, packed = "false", tag = "1")]
201    pub ticket_crc: Vec<u32>,
202    #[prost(uint32, repeated, packed = "false", tag = "2")]
203    pub app_ids: Vec<u32>,
204    #[prost(uint32, optional, tag = "3")]
205    pub message_sequence: Option<u32>,
206}
207
208/// Ticket auth complete
209#[derive(Clone, PartialEq, Message)]
210pub struct CMsgClientTicketAuthComplete {
211    #[prost(fixed64, optional, tag = "1")]
212    pub steam_id: Option<u64>,
213    #[prost(fixed64, optional, tag = "2")]
214    pub game_id: Option<u64>,
215    #[prost(uint32, optional, tag = "3")]
216    pub estate: Option<u32>,
217    #[prost(uint32, optional, tag = "4")]
218    pub eauth_session_response: Option<u32>,
219    #[prost(uint32, optional, tag = "6")]
220    pub ticket_crc: Option<u32>,
221    #[prost(uint32, optional, tag = "7")]
222    pub ticket_sequence: Option<u32>,
223    #[prost(fixed64, optional, tag = "8")]
224    pub owner_steam_id: Option<u64>,
225}
226
227/// Device auth add authorized borrowers request
228#[derive(Clone, PartialEq, Message)]
229pub struct CDeviceAuthAddAuthorizedBorrowersRequest {
230    #[prost(fixed64, optional, tag = "1")]
231    pub steamid: Option<u64>,
232    #[prost(fixed64, repeated, packed = "false", tag = "2")]
233    pub steamid_borrower: Vec<u64>,
234}
235
236/// Device auth remove authorized borrowers request
237#[derive(Clone, PartialEq, Message)]
238pub struct CDeviceAuthRemoveAuthorizedBorrowersRequest {
239    #[prost(fixed64, optional, tag = "1")]
240    pub steamid: Option<u64>,
241    #[prost(fixed64, repeated, packed = "false", tag = "2")]
242    pub steamid_borrower: Vec<u64>,
243}
244
245/// Device auth get authorized borrowers request
246#[derive(Clone, PartialEq, Message)]
247pub struct CDeviceAuthGetAuthorizedBorrowersRequest {
248    #[prost(fixed64, optional, tag = "1")]
249    pub steamid: Option<u64>,
250    #[prost(bool, optional, tag = "2")]
251    pub include_canceled: Option<bool>,
252    #[prost(bool, optional, tag = "3")]
253    pub include_pending: Option<bool>,
254}
255
256/// Device auth get own authorized devices request
257#[derive(Clone, PartialEq, Message)]
258pub struct CDeviceAuthGetOwnAuthorizedDevicesRequest {
259    #[prost(fixed64, optional, tag = "1")]
260    pub steamid: Option<u64>,
261    #[prost(bool, optional, tag = "2")]
262    pub include_canceled: Option<bool>,
263}
264
265/// Device auth authorize local device request
266#[derive(Clone, PartialEq, Message)]
267pub struct CDeviceAuthAuthorizeLocalDeviceRequest {
268    #[prost(fixed64, optional, tag = "1")]
269    pub steamid: Option<u64>,
270    #[prost(fixed64, optional, tag = "2")]
271    pub deviceid: Option<u64>,
272}
273
274/// Device auth deauthorize device request
275#[derive(Clone, PartialEq, Message)]
276pub struct CDeviceAuthDeauthorizeDeviceRequest {
277    #[prost(fixed64, optional, tag = "1")]
278    pub steamid: Option<u64>,
279    #[prost(fixed64, optional, tag = "2")]
280    pub deviceid: Option<u64>,
281}
282
283/// Request validation email
284#[derive(Clone, PartialEq, Message)]
285pub struct CMsgClientRequestValidationEmail {}
286
287/// Email address info
288#[derive(Clone, PartialEq, Message)]
289pub struct CMsgClientEmailAddrInfo {
290    #[prost(string, optional, tag = "1")]
291    pub email_address: Option<String>,
292    #[prost(bool, optional, tag = "2")]
293    pub email_is_validated: Option<bool>,
294    #[prost(bool, optional, tag = "3")]
295    pub email_validation_changed: Option<bool>,
296    #[prost(bool, optional, tag = "4")]
297    pub credential_change_requires_code: Option<bool>,
298    #[prost(bool, optional, tag = "5")]
299    pub password_or_secretqa_change_requires_code: Option<bool>,
300}
301
302/// Account limitation status
303#[derive(Clone, PartialEq, Message)]
304pub struct CMsgClientIsLimitedAccount {
305    #[prost(bool, optional, tag = "1")]
306    pub bis_limited_account: Option<bool>,
307    #[prost(bool, optional, tag = "2")]
308    pub bis_community_banned: Option<bool>,
309    #[prost(bool, optional, tag = "3")]
310    pub bis_locked_account: Option<bool>,
311    #[prost(bool, optional, tag = "4")]
312    pub bis_limited_account_allowed_to_invite_friends: Option<bool>,
313}
314
315/// Wallet info update
316#[derive(Clone, PartialEq, Message)]
317pub struct CMsgClientWalletInfoUpdate {
318    #[prost(bool, optional, tag = "1")]
319    pub has_wallet: Option<bool>,
320    #[prost(int32, optional, tag = "2")]
321    pub balance: Option<i32>,
322    #[prost(int32, optional, tag = "3")]
323    pub currency: Option<i32>,
324    #[prost(int32, optional, tag = "4")]
325    pub balance_delayed: Option<i32>,
326    #[prost(int64, optional, tag = "5")]
327    pub balance64: Option<i64>,
328    #[prost(int64, optional, tag = "6")]
329    pub balance64_delayed: Option<i64>,
330    #[prost(int32, optional, tag = "7")]
331    pub realm: Option<i32>,
332}
333
334/// Playing session state - indicates if game playing is blocked by another
335/// session
336#[derive(Clone, PartialEq, Message)]
337pub struct CMsgClientPlayingSessionState {
338    /// True if playing is blocked because this account is playing a game
339    /// elsewhere
340    #[prost(bool, optional, tag = "2")]
341    pub playing_blocked: Option<bool>,
342    /// The app ID currently being played (elsewhere if blocked, or by us if not
343    /// blocked)
344    #[prost(uint32, optional, tag = "3")]
345    pub playing_app: Option<u32>,
346}
347
348/// Game connect tokens
349#[derive(Clone, PartialEq, Message)]
350pub struct CMsgClientGameConnectTokens {
351    #[prost(uint32, optional, tag = "1", default = "10")]
352    pub max_tokens_to_keep: Option<u32>,
353    #[prost(bytes = "vec", repeated, tag = "2")]
354    pub tokens: Vec<Vec<u8>>,
355}
356
357/// Register product key
358#[derive(Clone, PartialEq, Message)]
359pub struct CMsgClientRegisterKey {
360    #[prost(string, optional, tag = "1")]
361    pub key: Option<String>,
362}
363
364/// Request free license
365#[derive(Clone, PartialEq, Message)]
366pub struct CMsgClientRequestFreeLicense {
367    #[prost(uint32, repeated, packed = "false", tag = "1")]
368    pub app_ids: Vec<u32>,
369}
370
371/// Get legacy game key
372#[derive(Clone, PartialEq, Message)]
373pub struct CMsgClientGetLegacyGameKey {
374    #[prost(uint32, optional, tag = "1")]
375    pub app_id: Option<u32>,
376}
377
378// ============================================================================
379// New structs added for Family Sharing
380// ============================================================================
381
382/// Device auth get authorized borrowers response
383#[derive(Clone, PartialEq, Message)]
384pub struct CDeviceAuthGetAuthorizedBorrowersResponse {
385    #[prost(message, repeated, tag = "1")]
386    pub borrowers: Vec<c_device_auth_get_authorized_borrowers_response::Borrower>,
387}
388
389pub mod c_device_auth_get_authorized_borrowers_response {
390    use prost::Message;
391    #[derive(Clone, PartialEq, Message)]
392    pub struct Borrower {
393        #[prost(fixed64, optional, tag = "1")]
394        pub steamid: Option<u64>,
395        #[prost(bool, optional, tag = "2")]
396        pub is_pending: Option<bool>,
397        #[prost(bool, optional, tag = "3")]
398        pub is_canceled: Option<bool>,
399        #[prost(uint32, optional, tag = "4")]
400        pub time_created: Option<u32>,
401    }
402}
403
404/// Device auth get own authorized devices response
405#[derive(Clone, PartialEq, Message)]
406pub struct CDeviceAuthGetOwnAuthorizedDevicesResponse {
407    #[prost(message, repeated, tag = "1")]
408    pub devices: Vec<c_device_auth_get_own_authorized_devices_response::Device>,
409}
410
411pub mod c_device_auth_get_own_authorized_devices_response {
412    use prost::Message;
413    #[derive(Clone, PartialEq, Message)]
414    pub struct Device {
415        #[prost(fixed64, optional, tag = "1")]
416        pub auth_device_token: Option<u64>,
417        #[prost(string, optional, tag = "2")]
418        pub device_name: Option<String>,
419        #[prost(bool, optional, tag = "3")]
420        pub is_pending: Option<bool>,
421        #[prost(bool, optional, tag = "4")]
422        pub is_canceled: Option<bool>,
423        #[prost(uint32, optional, tag = "5")]
424        pub last_time_used: Option<u32>,
425        #[prost(fixed64, optional, tag = "6")]
426        pub last_borrower_id: Option<u64>,
427        #[prost(uint32, optional, tag = "7")]
428        pub last_app_played: Option<u32>,
429        #[prost(bool, optional, tag = "8")]
430        pub is_limited: Option<bool>,
431    }
432}
433
434/// Client authorize local device request
435#[derive(Clone, PartialEq, Message)]
436pub struct CMsgClientAuthorizeLocalDeviceRequest {
437    #[prost(string, optional, tag = "1")]
438    pub device_description: Option<String>,
439    #[prost(uint32, optional, tag = "2")]
440    pub owner_account_id: Option<u32>,
441    #[prost(uint64, optional, tag = "3")]
442    pub local_device_token: Option<u64>,
443}
444
445/// Client authorize local device response
446#[derive(Clone, PartialEq, Message)]
447pub struct CMsgClientAuthorizeLocalDevice {
448    #[prost(int32, optional, tag = "1", default = "2")]
449    pub eresult: Option<i32>,
450    #[prost(uint32, optional, tag = "2")]
451    pub owner_account_id: Option<u32>,
452    #[prost(uint64, optional, tag = "3")]
453    pub authed_device_token: Option<u64>,
454}
455
456/// Client deauthorize device request
457#[derive(Clone, PartialEq, Message)]
458pub struct CMsgClientDeauthorizeDeviceRequest {
459    #[prost(uint32, optional, tag = "1")]
460    pub deauthorization_account_id: Option<u32>,
461    #[prost(uint64, optional, tag = "2")]
462    pub deauthorization_device_token: Option<u64>,
463}
464
465/// Client deauthorize device response
466#[derive(Clone, PartialEq, Message)]
467pub struct CMsgClientDeauthorizeDevice {
468    #[prost(int32, optional, tag = "1", default = "2")]
469    pub eresult: Option<i32>,
470    #[prost(uint32, optional, tag = "2")]
471    pub deauthorization_account_id: Option<u32>,
472}
473
474/// Client use local device authorizations
475#[derive(Clone, PartialEq, Message)]
476pub struct CMsgClientUseLocalDeviceAuthorizations {
477    #[prost(uint32, repeated, packed = "false", tag = "1")]
478    pub authorization_account_id: Vec<u32>,
479    #[prost(message, repeated, tag = "2")]
480    pub device_tokens: Vec<c_msg_client_use_local_device_authorizations::DeviceToken>,
481}
482
483pub mod c_msg_client_use_local_device_authorizations {
484    use prost::Message;
485    #[derive(Clone, PartialEq, Message)]
486    pub struct DeviceToken {
487        #[prost(uint32, optional, tag = "1")]
488        pub owner_account_id: Option<u32>,
489        #[prost(uint64, optional, tag = "2")]
490        pub token_id: Option<u64>,
491    }
492}
493
494/// Device auth add authorized borrowers response
495#[derive(Clone, PartialEq, Message)]
496pub struct CDeviceAuthAddAuthorizedBorrowersResponse {
497    #[prost(int32, optional, tag = "1")]
498    pub seconds_to_wait: Option<i32>,
499}
500
501/// Device auth remove authorized borrowers response
502#[derive(Clone, PartialEq, Message)]
503pub struct CDeviceAuthRemoveAuthorizedBorrowersResponse {}
504
505/// Request free license response
506#[derive(Clone, PartialEq, Message)]
507pub struct CMsgClientRequestFreeLicenseResponse {
508    #[prost(uint32, optional, tag = "1", default = "2")]
509    pub eresult: Option<u32>,
510    #[prost(uint32, repeated, packed = "false", tag = "2")]
511    pub granted_packageids: Vec<u32>,
512    #[prost(uint32, repeated, packed = "false", tag = "3")]
513    pub granted_appids: Vec<u32>,
514}