From ba92101e0611d7a08e2105e3842a12496ddf0d2f Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Wed, 28 Aug 2024 02:41:36 +0000 Subject: [PATCH] List apps --- daemon/src/main.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/daemon/src/main.rs b/daemon/src/main.rs index 2df9363..ff30c0c 100644 --- a/daemon/src/main.rs +++ b/daemon/src/main.rs @@ -11,6 +11,7 @@ use vapore_proto::{ CAuthentication_PollAuthSessionStatus_Response, EAuthTokenPlatformType, }, steammessages_base::{cmsg_ipaddress, CMsgIPAddress}, + steammessages_clientserver::CMsgClientLicenseList, steammessages_clientserver_login::{CMsgClientHello, CMsgClientLogon, CMsgClientLogonResponse}, }; @@ -155,6 +156,20 @@ pub async fn main() -> eyre::Result<()> { }, )?; + let mut session_cloned = session.clone(); + tokio::spawn(async move { + let license_list_raw = session_cloned + .subscribe_message_type(EMsg::k_EMsgClientLicenseList) + .recv() + .await + .unwrap(); + let license_list: CMProtoBufMessage = + CMProtoBufMessage::deserialize(license_list_raw).unwrap(); + for license in &license_list.body.licenses { + log::info!("Own package ID: {}", license.package_id()); + } + }); + let mut finish_receiver = session.subscribe_message_type(EMsg::k_EMsgClientLogOnResponse); let raw_response = finish_receiver.recv().await?;