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
//! Steam client protocol library for depot downloading, manifest parsing, and CDN access.
//!
//! This crate provides the low-level building blocks for interacting with Steam:
//!
//! - [`client`] -- Connect, encrypt, authenticate, and send/receive Steam protocol messages
//! - [`depot`] -- Manifest parsing, chunk decryption/decompression, and checksum verification
//! - [`cdn`] -- Download content from Steam's CDN with server pooling and rate-limit handling
//! - [`auth`] -- Credential and QR code authentication flows
//! - [`types`] -- KeyValue format parsing (binary and text) with serde deserialization
//!
//! # Quick start
//!
//! ```rust,no_run
//! use steamroom::client::SteamClient;
//! use steamroom::connection::CmServer;
//! use steamroom::transport::websocket::WebSocketTransport;
//! use steamroom::depot::{AppId, DepotId};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Discover CM servers and connect
//! let servers = CmServer::fetch().await?;
//! let ws_server = servers.iter()
//! .find(|s| s.protocol == steamroom::connection::Protocol::WebSocket)
//! .expect("no WebSocket server");
//! let transport = WebSocketTransport::connect(ws_server).await?;
//! let (client, _rx) = SteamClient::connect_ws(transport).await?;
//! let client = client.prepare().await?;
//!
//! // For authenticated downloads, build a logon message and call client.login().
//! // For anonymous access (free apps like Spacewar), use an anonymous logon.
//!
//! // After login, request product info, depot keys, and manifests:
//! // let tokens = client.get_access_tokens(&[AppId(480)]).await?;
//! // let key = client.get_depot_decryption_key(DepotId(481), AppId(480)).await?;
//! # Ok(())
//! # }
//! ```
//!
//! For a higher-level download API with retry, delta patching, and progress events,
//! see the [`steamroom-client`](https://crates.io/crates/steamroom-client) crate.
/// PICS app info, access tokens, and product metadata.
/// Credential and QR code authentication flows.
/// CDN client, server pool, and lancache support.
/// Steam CM client with typestate connection lifecycle.
/// CM server discovery, encryption, and packet framing.
/// CDN auth token types.
/// AES-256, RSA, and other cryptographic primitives.
/// Depot manifests, chunk decryption/decompression, and ID types.
/// Steam protocol enums (EResult, file flags, etc.).
/// Error types for all operations.
/// Raw Steam protocol message IDs and header parsing.
/// Transport implementations (TCP, WebSocket) and capture/replay for testing.
/// KeyValue format parsing, SteamID, GameID, and serde integration.
/// Checksum and compression utilities.
/// Auto-generated protobuf message types from Steam's `.proto` definitions.
pub use Error;
pub use Result;