diff --git a/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_3debuglog/SampleDebugLog.java b/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_3debuglog/SampleDebugLog.java index 025e4936..2da84217 100644 --- a/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_3debuglog/SampleDebugLog.java +++ b/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_3debuglog/SampleDebugLog.java @@ -62,6 +62,12 @@ public void onLog(Class clazz, String message, Throwable throwable) { // for this example, we'll print the output to the console System.out.println("MyListener - " + clazz.getName() + ": " + message); } + + @Override + public void onError(Class clazz, String message, Throwable throwable) { + // for this example, we'll print errors the output to the console + System.err.println("MyListener - " + clazz.getName() + ": " + message); + } } public SampleDebugLog(String user, String pass) { diff --git a/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_8UnifiedMessages/SampleUnifiedMessages.java b/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_8UnifiedMessages/SampleUnifiedMessages.java new file mode 100644 index 00000000..6ac5e50f --- /dev/null +++ b/javasteam-samples/src/main/java/in/dragonbra/javasteamsamples/_8UnifiedMessages/SampleUnifiedMessages.java @@ -0,0 +1,264 @@ +package in.dragonbra.javasteamsamples._8UnifiedMessages; + + +import in.dragonbra.javasteam.base.ClientMsgProtobuf; +import in.dragonbra.javasteam.enums.EMsg; +import in.dragonbra.javasteam.enums.EResult; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesClientserver2.CMsgClientUIMode; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.CFriendMessages_IncomingMessage_Notification; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesPlayerSteamclient.*; +import in.dragonbra.javasteam.rpc.service.Player; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodNotification; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodResponse; +import in.dragonbra.javasteam.steam.handlers.steamuser.LogOnDetails; +import in.dragonbra.javasteam.steam.handlers.steamuser.SteamUser; +import in.dragonbra.javasteam.steam.handlers.steamuser.callback.LoggedOffCallback; +import in.dragonbra.javasteam.steam.handlers.steamuser.callback.LoggedOnCallback; +import in.dragonbra.javasteam.steam.steamclient.SteamClient; +import in.dragonbra.javasteam.steam.steamclient.callbackmgr.CallbackManager; +import in.dragonbra.javasteam.steam.steamclient.callbacks.ConnectedCallback; +import in.dragonbra.javasteam.steam.steamclient.callbacks.DisconnectedCallback; +import in.dragonbra.javasteam.types.JobID; +import in.dragonbra.javasteam.util.log.DefaultLogListener; +import in.dragonbra.javasteam.util.log.LogManager; + +/** + * @author Lossy + * @since 2023-01-04 + *

+ * Sample 8: Unified Messages + *

+ * this sample introduces the usage of the unified service API + *

+ * unified services are a type of webapi service that can be accessed with either + * HTTP requests or through the Steam network + *

+ * in this case, this sample will demonstrate using the IPlayer unified service + * through the connection to steam + */ +@SuppressWarnings({"resource", "FieldCanBeLocal"}) +public class SampleUnifiedMessages implements Runnable { + + private SteamClient steamClient; + + private CallbackManager manager; + + private SteamUser steamUser; + + private SteamUnifiedMessages steamUnifiedMessages; + + private boolean isRunning; + + private final String user; + + private final String pass; + + JobID badgeRequest; + + JobID favoriteBadge; + + public SampleUnifiedMessages(String user, String pass) { + this.user = user; + this.pass = pass; + + this.badgeRequest = JobID.INVALID; + this.favoriteBadge = JobID.INVALID; + } + + public static void main(String[] args) { + if (args.length < 2) { + System.out.println("Sample8: No username and password specified!"); + return; + } + + LogManager.addListener(new DefaultLogListener()); + + new SampleUnifiedMessages(args[0], args[1]).run(); + } + + @Override + public void run() { + + // create our steamclient instance + steamClient = new SteamClient(); + + // create the callback manager which will route callbacks to function calls + manager = new CallbackManager(steamClient); + + // get the steamuser handler, which is used for logging on after successfully connecting + steamUser = steamClient.getHandler(SteamUser.class); + + // get the steam unified messages handler, which is used for sending and receiving responses from the unified service api + steamUnifiedMessages = steamClient.getHandler(SteamUnifiedMessages.class); + + // The SteamUnifiedMessages handler can be removed if it's not needed. + // steamClient.removeHandler(SteamUnifiedMessages.class); + + // register a few callbacks we're interested in + // these are registered upon creation to a callback manager, which will then route the callbacks + // to the functions specified + manager.subscribe(ConnectedCallback.class, this::onConnected); + manager.subscribe(DisconnectedCallback.class, this::onDisconnected); + + manager.subscribe(LoggedOnCallback.class, this::onLoggedOn); + manager.subscribe(LoggedOffCallback.class, this::onLoggedOff); + + manager.subscribe(ServiceMethodResponse.class, this::onMethodResponse); + manager.subscribe(ServiceMethodNotification.class, this::onMethodNotification); + + isRunning = true; + + System.out.println("Connecting to steam..."); + + // initiate the connection + steamClient.connect(); + + // create our callback handling loop + while (isRunning) { + // in order for the callbacks to get routed, they need to be handled by the manager + manager.runWaitCallbacks(1000L); + } + } + + private void onConnected(ConnectedCallback callback) { + System.out.println("Connected to Steam! Logging in " + user + "..."); + + LogOnDetails details = new LogOnDetails(); + details.setUsername(user); + details.setPassword(pass); + + // Set LoginID to a non-zero value if you have another client connected using the same account, + // the same private ip, and same public ip. + details.setLoginID(149); + + steamUser.logOn(details); + } + + private void onDisconnected(DisconnectedCallback callback) { + System.out.println("Disconnected from Steam"); + + isRunning = false; + } + + private void onLoggedOn(LoggedOnCallback callback) { + + if (callback.getResult() != EResult.OK) { + if (callback.getResult() == EResult.AccountLogonDenied) { + // if we recieve AccountLogonDenied or one of it's flavors (AccountLogonDeniedNoMailSent, etc) + // then the account we're logging into is SteamGuard protected + // see sample 5 for how SteamGuard can be handled + System.out.println("Unable to logon to Steam: This account is SteamGuard protected."); + + isRunning = false; + return; + } + + System.out.println("Unable to logon to Steam: " + callback.getResult() + " / " + callback.getExtendedResult()); + + isRunning = false; + return; + } + + System.out.println("Successfully logged on!"); + + // at this point, we'd be able to perform actions on Steam + + // Set our chat mode in order to use unified chat features + ClientMsgProtobuf uiMode = new ClientMsgProtobuf<>(CMsgClientUIMode.class, EMsg.ClientCurrentUIMode); + uiMode.getBody().setUimode(0); + uiMode.getBody().setChatMode(2); + + // Send our ClientCurrentUIMode request + steamClient.send(uiMode); + + // first, build our request object, these are autogenerated and can normally be found in the in.dragonbra.javasteam.protobufs.steamclient package + CPlayer_GetFavoriteBadge_Request.Builder favoriteBadgeRequest = CPlayer_GetFavoriteBadge_Request.newBuilder(); + favoriteBadgeRequest.setSteamid(steamClient.getSteamID().convertToUInt64()); + + // now let's send the request, this is done by building a class based off the IPlayer interface. + Player playerService = new Player(steamUnifiedMessages); + favoriteBadge = playerService.GetFavoriteBadge(favoriteBadgeRequest.build()); + + // second, build our request object, these are autogenerated and can normally be found in the in.dragonbra.javasteam.protobufs.steamclient package + CPlayer_GetGameBadgeLevels_Request.Builder badgeLevelsRequest = CPlayer_GetGameBadgeLevels_Request.newBuilder(); + badgeLevelsRequest.setAppid(440); + + // alternatively, the request can be made using SteamUnifiedMessages directly, but then you must build the service request name manually + // the name format is in the form of .# + badgeRequest = steamUnifiedMessages.sendMessage("Player.GetGameBadgeLevels#1", badgeLevelsRequest.build()); + } + + private void onLoggedOff(LoggedOffCallback callback) { + System.out.println("Logged off of Steam: " + callback.getResult()); + + isRunning = false; + } + + private void onMethodResponse(ServiceMethodResponse callback) { + System.out.println("ServiceMethodResponse result: " + callback.getResult()); + + // and check for success + if (callback.getResult() != EResult.OK) { + System.out.println("Unified service request failed with " + callback.getResult()); + return; + } + + // retrieve the deserialized response for the request we made + // notice the naming pattern + // for requests: CMyService_Method_Request + // for responses: CMyService_Method_Response + + if (callback.getJobID().equals(badgeRequest)) { + CPlayer_GetGameBadgeLevels_Response.Builder response = callback.getDeserializedResponse(CPlayer_GetGameBadgeLevels_Response.class); + + System.out.println("Our player level is " + response.getPlayerLevel()); + + // If we have a list of badges, we'll print them out by series and level. + response.getBadgesList().forEach(x -> + System.out.println("Badge series " + x.getSeries() + " is level " + x.getLevel()) + ); + + badgeRequest = JobID.INVALID; + } + + if (callback.getJobID().equals(favoriteBadge)) { + CPlayer_GetFavoriteBadge_Response.Builder response = callback.getDeserializedResponse(CPlayer_GetFavoriteBadge_Response.class); + + System.out.println( + "Has favorite badge: " + response.hasHasFavoriteBadge() + + "\nBadge ID: " + response.getBadgeid() + + "\nCommunity item ID: " + response.getCommunityitemid() + + "\nItem Type: " + response.getItemType() + + "\nBorder Color: " + response.getBorderColor() + + "\nApp ID: " + response.getAppid() + + "\nLevel: " + response.getLevel() + ); + + favoriteBadge = JobID.INVALID; + } + } + + // This demonstrates some incoming notifications from Service Methods via Unified. + void onMethodNotification(ServiceMethodNotification callback) { + Object cbObject = callback.getBody(); + + // There's an incoming message coming. + if (cbObject instanceof CFriendMessages_IncomingMessage_Notification) { + CFriendMessages_IncomingMessage_Notification message = (CFriendMessages_IncomingMessage_Notification) cbObject; + + if (message.getChatEntryType() == 2) + System.out.println("Friend is typing..."); + + if (message.getChatEntryType() == 1) + System.out.println("Message: " + message.getMessage()); + } + + // There's a player preference change + if (cbObject instanceof CPlayer_PerFriendPreferencesChanged_Notification) { + CPlayer_PerFriendPreferencesChanged_Notification message = (CPlayer_PerFriendPreferencesChanged_Notification) cbObject; + System.out.println("SteamID: " + message.getAccountid()); + System.out.println("NickName: " + message.getPreferences().getNickname()); + } + } +} diff --git a/src/main/java/in/dragonbra/javasteam/base/ClientMsgProtobuf.java b/src/main/java/in/dragonbra/javasteam/base/ClientMsgProtobuf.java index ee929790..2c80b663 100644 --- a/src/main/java/in/dragonbra/javasteam/base/ClientMsgProtobuf.java +++ b/src/main/java/in/dragonbra/javasteam/base/ClientMsgProtobuf.java @@ -74,6 +74,7 @@ public ClientMsgProtobuf(Class clazz, EMsg eMsg) { * @param eMsg The network message type this client message represents. * @param payloadReserve The number of bytes to initialize the payload capacity to. */ + @SuppressWarnings("unchecked") public ClientMsgProtobuf(Class clazz, EMsg eMsg, int payloadReserve) { super(payloadReserve); this.clazz = clazz; @@ -122,6 +123,15 @@ public BodyType getBody() { return body; } + /** + * Sets the body of this message. + * + * @param _body the body structure of this message. + */ + public void setBody(BodyType _body) { + this.body = _body; + } + @Override public byte[] serialize() { ByteArrayOutputStream baos = new ByteArrayOutputStream(0); @@ -136,6 +146,7 @@ public byte[] serialize() { return baos.toByteArray(); } + @SuppressWarnings("unchecked") @Override public void deserialize(byte[] data) { if (data == null) { diff --git a/src/main/java/in/dragonbra/javasteam/base/PacketClientMsgProtobuf.java b/src/main/java/in/dragonbra/javasteam/base/PacketClientMsgProtobuf.java index 4f3bab92..6eca84fe 100644 --- a/src/main/java/in/dragonbra/javasteam/base/PacketClientMsgProtobuf.java +++ b/src/main/java/in/dragonbra/javasteam/base/PacketClientMsgProtobuf.java @@ -13,11 +13,9 @@ public class PacketClientMsgProtobuf implements IPacketMsg { private final EMsg msgType; - private final long targetJobID; + private byte[] payload; - private final long sourceJobID; - - private final byte[] payload; + private MsgHdrProtoBuf header; /** * Initializes a new instance of the {@link PacketClientMsgProtobuf} class. @@ -30,14 +28,20 @@ public PacketClientMsgProtobuf(EMsg eMsg, byte[] data) throws IOException { this.msgType = eMsg; this.payload = data; - MsgHdrProtoBuf protobufHeader = new MsgHdrProtoBuf(); + header = new MsgHdrProtoBuf(); try (ByteArrayInputStream stream = new ByteArrayInputStream(data)) { - protobufHeader.deserialize(stream); + header.deserialize(stream); } + } - targetJobID = protobufHeader.getProto().getJobidTarget(); - sourceJobID = protobufHeader.getProto().getJobidSource(); + /** + * Gets the header for this packet message. + * + * @return The header. + */ + public MsgHdrProtoBuf getHeader() { + return header; } @Override @@ -52,12 +56,12 @@ public EMsg getMsgType() { @Override public long getTargetJobID() { - return targetJobID; + return header.getProto().getJobidTarget(); } @Override public long getSourceJobID() { - return sourceJobID; + return header.getProto().getJobidSource(); } @Override diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IAuthentication.java b/src/main/java/in/dragonbra/javasteam/rpc/IAuthentication.java new file mode 100644 index 00000000..143f28b6 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IAuthentication.java @@ -0,0 +1,42 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-07 + */ +@SuppressWarnings("unused") +public interface IAuthentication { + + /* CAuthentication_GetPasswordRSAPublicKey_Response */ + JobID GetPasswordRSAPublicKey(CAuthentication_GetPasswordRSAPublicKey_Request request); + + /* CAuthentication_BeginAuthSessionViaQR_Response */ + JobID BeginAuthSessionViaQR(CAuthentication_BeginAuthSessionViaQR_Request request); + + /* CAuthentication_BeginAuthSessionViaCredentials_Response */ + JobID BeginAuthSessionViaCredentials(CAuthentication_BeginAuthSessionViaCredentials_Request request); + + /* CAuthentication_PollAuthSessionStatus_Response */ + JobID PollAuthSessionStatus(CAuthentication_PollAuthSessionStatus_Request request); + + /* CAuthentication_GetAuthSessionInfo_Response */ + JobID GetAuthSessionInfo(CAuthentication_GetAuthSessionInfo_Request request); + + /* CAuthentication_UpdateAuthSessionWithMobileConfirmation_Response */ + JobID UpdateAuthSessionWithMobileConfirmation(CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request request); + + /* CAuthentication_UpdateAuthSessionWithSteamGuardCode_Response */ + JobID UpdateAuthSessionWithSteamGuardCode(CAuthentication_UpdateAuthSessionWithSteamGuardCode_Request request); + + /* CAuthentication_AccessToken_GenerateForApp_Response */ + JobID GenerateAccessTokenForApp(CAuthentication_AccessToken_GenerateForApp_Request request); + + /* CAuthentication_GetAuthSessionsForAccount_Response */ + JobID GetAuthSessionsForAccount(CAuthentication_GetAuthSessionsForAccount_Request request); + + /* CAuthentication_MigrateMobileSession_Response */ + JobID MigrateMobileSession(CAuthentication_MigrateMobileSession_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IAuthenticationSupport.java b/src/main/java/in/dragonbra/javasteam/rpc/IAuthenticationSupport.java new file mode 100644 index 00000000..6d9cc47a --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IAuthenticationSupport.java @@ -0,0 +1,24 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-07 + */ +@SuppressWarnings("unused") +public interface IAuthenticationSupport { + + /* CAuthenticationSupport_QueryRefreshTokensByAccount_Response */ + JobID QueryRefreshTokensByAccount(CAuthenticationSupport_QueryRefreshTokensByAccount_Request request); + + /* CAuthenticationSupport_QueryRefreshTokenByID_Response */ + JobID QueryRefreshTokenByID(CAuthenticationSupport_QueryRefreshTokenByID_Request request); + + /* CAuthenticationSupport_RevokeToken_Response */ + JobID RevokeToken(CAuthenticationSupport_RevokeToken_Request request); + + /* CAuthenticationSupport_GetTokenHistory_Response */ + JobID GetTokenHistory(CAuthenticationSupport_GetTokenHistory_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IChat.java b/src/main/java/in/dragonbra/javasteam/rpc/IChat.java new file mode 100644 index 00000000..40e9a940 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IChat.java @@ -0,0 +1,15 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IChat { + + /* CChat_RequestFriendPersonaStates_Response */ + JobID RequestFriendPersonaStates(CChat_RequestFriendPersonaStates_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IChatRoom.java b/src/main/java/in/dragonbra/javasteam/rpc/IChatRoom.java new file mode 100644 index 00000000..cd4536a8 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IChatRoom.java @@ -0,0 +1,171 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IChatRoom { + + /* CChatRoom_CreateChatRoomGroup_Response */ + JobID CreateChatRoomGroup(CChatRoom_CreateChatRoomGroup_Request request); + + /* CChatRoom_SaveChatRoomGroup_Response */ + JobID SaveChatRoomGroup(CChatRoom_SaveChatRoomGroup_Request request); + + /* CChatRoom_RenameChatRoomGroup_Response */ + JobID RenameChatRoomGroup(CChatRoom_RenameChatRoomGroup_Request request); + + /* CChatRoom_SetChatRoomGroupTagline_Response */ + JobID SetChatRoomGroupTagline(CChatRoom_SetChatRoomGroupTagline_Request request); + + /* CChatRoom_SetChatRoomGroupAvatar_Response */ + JobID SetChatRoomGroupAvatar(CChatRoom_SetChatRoomGroupAvatar_Request request); + + /* CChatRoom_SetChatRoomGroupWatchingBroadcast_Response */ + JobID SetChatRoomGroupWatchingBroadcast(CChatRoom_SetChatRoomGroupWatchingBroadcast_Request request); + + /* CChatRoom_JoinMiniGameForChatRoomGroup_Response */ + JobID JoinMiniGameForChatRoomGroup(CChatRoom_JoinMiniGameForChatRoomGroup_Request request); + + /* CChatRoom_EndMiniGameForChatRoomGroup_Response */ + JobID EndMiniGameForChatRoomGroup(CChatRoom_EndMiniGameForChatRoomGroup_Request request); + + /* CChatRoom_MuteUser_Response */ + JobID MuteUserInGroup(CChatRoom_MuteUser_Request request); + + /* CChatRoom_KickUser_Response */ + JobID KickUserFromGroup(CChatRoom_KickUser_Request request); + + /* CChatRoom_SetUserBanState_Response */ + JobID SetUserBanState(CChatRoom_SetUserBanState_Request request); + + /* CChatRoom_RevokeInvite_Response */ + JobID RevokeInviteToGroup(CChatRoom_RevokeInvite_Request request); + + /* CChatRoom_CreateRole_Response */ + JobID CreateRole(CChatRoom_CreateRole_Request request); + + /* CChatRoom_GetRoles_Response */ + JobID GetRoles(CChatRoom_GetRoles_Request request); + + /* CChatRoom_RenameRole_Response */ + JobID RenameRole(CChatRoom_RenameRole_Request request); + + /* CChatRoom_ReorderRole_Response */ + JobID ReorderRole(CChatRoom_ReorderRole_Request request); + + /* CChatRoom_DeleteRole_Response */ + JobID DeleteRole(CChatRoom_DeleteRole_Request request); + + /* CChatRoom_GetRoleActions_Response */ + JobID GetRoleActions(CChatRoom_GetRoleActions_Request request); + + /* CChatRoom_ReplaceRoleActions_Response */ + JobID ReplaceRoleActions(CChatRoom_ReplaceRoleActions_Request request); + + /* CChatRoom_AddRoleToUser_Response */ + JobID AddRoleToUser(CChatRoom_AddRoleToUser_Request request); + + /* CChatRoom_GetRolesForUser_Response */ + JobID GetRolesForUser(CChatRoom_GetRolesForUser_Request request); + + /* CChatRoom_DeleteRoleFromUser_Response */ + JobID DeleteRoleFromUser(CChatRoom_DeleteRoleFromUser_Request request); + + /* CChatRoom_JoinChatRoomGroup_Response */ + JobID JoinChatRoomGroup(CChatRoom_JoinChatRoomGroup_Request request); + + /* CChatRoom_InviteFriendToChatRoomGroup_Response */ + JobID InviteFriendToChatRoomGroup(CChatRoom_InviteFriendToChatRoomGroup_Request request); + + /* CChatRoom_LeaveChatRoomGroup_Response */ + JobID LeaveChatRoomGroup(CChatRoom_LeaveChatRoomGroup_Request request); + + /* CChatRoom_CreateChatRoom_Response */ + JobID CreateChatRoom(CChatRoom_CreateChatRoom_Request request); + + /* CChatRoom_DeleteChatRoom_Response */ + JobID DeleteChatRoom(CChatRoom_DeleteChatRoom_Request request); + + /* CChatRoom_RenameChatRoom_Response */ + JobID RenameChatRoom(CChatRoom_RenameChatRoom_Request request); + + /* CChatRoom_ReorderChatRoom_Response */ + JobID ReorderChatRoom(CChatRoom_ReorderChatRoom_Request request); + + /* CChatRoom_SendChatMessage_Response */ + JobID SendChatMessage(CChatRoom_SendChatMessage_Request request); + + /* CChatRoom_JoinVoiceChat_Response */ + JobID JoinVoiceChat(CChatRoom_JoinVoiceChat_Request request); + + /* CChatRoom_LeaveVoiceChat_Response */ + JobID LeaveVoiceChat(CChatRoom_LeaveVoiceChat_Request request); + + /* CChatRoom_GetMessageHistory_Response */ + JobID GetMessageHistory(CChatRoom_GetMessageHistory_Request request); + + /* CChatRoom_GetMyChatRoomGroups_Response */ + JobID GetMyChatRoomGroups(CChatRoom_GetMyChatRoomGroups_Request request); + + /* CChatRoom_GetChatRoomGroupState_Response */ + JobID GetChatRoomGroupState(CChatRoom_GetChatRoomGroupState_Request request); + + /* CChatRoom_GetChatRoomGroupSummary_Response */ + JobID GetChatRoomGroupSummary(CChatRoom_GetChatRoomGroupSummary_Request request); + + /* CChatRoom_SetAppChatRoomGroupForceActive_Response */ + JobID SetAppChatRoomGroupForceActive(CChatRoom_SetAppChatRoomGroupForceActive_Request request); + + /* NoResponse */ + void SetAppChatRoomGroupStopForceActive(CChatRoom_SetAppChatRoomGroupStopForceActive_Notification request); + + /* NoResponse */ + void AckChatMessage(CChatRoom_AckChatMessage_Notification request); + + /* CChatRoom_CreateInviteLink_Response */ + JobID CreateInviteLink(CChatRoom_CreateInviteLink_Request request); + + /* CChatRoom_GetInviteLinkInfo_Response */ + JobID GetInviteLinkInfo(CChatRoom_GetInviteLinkInfo_Request request); + + /* CChatRoom_GetInviteInfo_Response */ + JobID GetInviteInfo(CChatRoom_GetInviteInfo_Request request); + + /* CChatRoom_GetInviteLinksForGroup_Response */ + JobID GetInviteLinksForGroup(CChatRoom_GetInviteLinksForGroup_Request request); + + /* CChatRoom_GetBanList_Response */ + JobID GetBanList(CChatRoom_GetBanList_Request request); + + /*CChatRoom_GetInviteList_Response */ + JobID GetInviteList(CChatRoom_GetInviteList_Request request); + + /* CChatRoom_DeleteInviteLink_Response */ + JobID DeleteInviteLink(CChatRoom_DeleteInviteLink_Request request); + + /* CChatRoom_SetSessionActiveChatRoomGroups_Response */ + JobID SetSessionActiveChatRoomGroups(CChatRoom_SetSessionActiveChatRoomGroups_Request request); + + /* CChatRoom_SetUserChatGroupPreferences_Response */ + JobID SetUserChatGroupPreferences(CChatRoom_SetUserChatGroupPreferences_Request request); + + /* CChatRoom_DeleteChatMessages_Response */ + JobID DeleteChatMessages(CChatRoom_DeleteChatMessages_Request request); + + /* NoResponse */ + void UpdateMemberListView(CChatRoom_UpdateMemberListView_Notification request); + + /* CChatRoom_SearchMembers_Response */ + JobID SearchMembers(CChatRoom_SearchMembers_Request request); + + /* CChatRoom_UpdateMessageReaction_Response */ + JobID UpdateMessageReaction(CChatRoom_UpdateMessageReaction_Request request); + + /* CChatRoom_GetMessageReactionReactors_Response */ + JobID GetMessageReactionReactors(CChatRoom_GetMessageReactionReactors_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IChatRoomClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IChatRoomClient.java new file mode 100644 index 00000000..a6bd8a4b --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IChatRoomClient.java @@ -0,0 +1,44 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.*; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IChatRoomClient { + + /* NoResponse */ + void NotifyIncomingChatMessage(CChatRoom_IncomingChatMessage_Notification request); + + /* NoResponse */ + void NotifyChatMessageModified(CChatRoom_ChatMessageModified_Notification request); + + /* NoResponse */ + void NotifyMemberStateChange(CChatRoom_MemberStateChange_Notification request); + + /* NoResponse */ + void NotifyChatRoomHeaderStateChange(CChatRoom_ChatRoomHeaderState_Notification request); + + /* NoResponse */ + void NotifyChatRoomGroupRoomsChange(CChatRoom_ChatRoomGroupRoomsChange_Notification request); + + /* NoResponse */ + void NotifyShouldRejoinChatRoomVoiceChat(CChatRoom_NotifyShouldRejoinChatRoomVoiceChat_Notification request); + + /* NoResponse */ + void NotifyChatGroupUserStateChanged(ChatRoomClient_NotifyChatGroupUserStateChanged_Notification request); + + /* NoResponse */ + void NotifyAckChatMessageEcho(CChatRoom_AckChatMessage_Notification request); + + /* NoResponse */ + void NotifyChatRoomDisconnect(ChatRoomClient_NotifyChatRoomDisconnect_Notification request); + + /* NoResponse */ + void NotifyMemberListViewUpdated(CChatRoomClient_MemberListViewUpdated_Notification request); + + /* NoResponse */ + void NotifyMessageReaction(CChatRoom_MessageReaction_Notification request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IChatUsability.java b/src/main/java/in/dragonbra/javasteam/rpc/IChatUsability.java new file mode 100644 index 00000000..3edecd4c --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IChatUsability.java @@ -0,0 +1,14 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.CChatUsability_ClientUsabilityMetrics_Notification; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IChatUsability { + + /* NoResponse */ + void NotifyClientUsabilityMetrics(CChatUsability_ClientUsabilityMetrics_Notification request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IChatUsabilityClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IChatUsabilityClient.java new file mode 100644 index 00000000..1a5f24f3 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IChatUsabilityClient.java @@ -0,0 +1,15 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.CChatUsability_RequestClientUsabilityMetrics_Notification; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IChatUsabilityClient { + + /* NoResponse */ + void NotifyRequestClientUsabilityMetrics(CChatUsability_RequestClientUsabilityMetrics_Notification request); +} + diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IClanChatRooms.java b/src/main/java/in/dragonbra/javasteam/rpc/IClanChatRooms.java new file mode 100644 index 00000000..0794ee0e --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IClanChatRooms.java @@ -0,0 +1,18 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IClanChatRooms { + + /* CClanChatRooms_GetClanChatRoomInfo_Response */ + JobID GetClanChatRoomInfo(CClanChatRooms_GetClanChatRoomInfo_Request request); + + /* CClanChatRooms_SetClanChatRoomPrivate_Response */ + JobID SetClanChatRoomPrivate(CClanChatRooms_SetClanChatRoomPrivate_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/ICloudGaming.java b/src/main/java/in/dragonbra/javasteam/rpc/ICloudGaming.java new file mode 100644 index 00000000..ed993dbf --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/ICloudGaming.java @@ -0,0 +1,19 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient.CCloudGaming_CreateNonce_Request; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient.CCloudGaming_GetTimeRemaining_Request; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-07 + */ +@SuppressWarnings("unused") +public interface ICloudGaming { + + /* CCloudGaming_CreateNonce_Response */ + JobID CreateNonce(CCloudGaming_CreateNonce_Request request); + + /* CCloudGaming_GetTimeRemaining_Response */ + JobID GetTimeRemaining(CCloudGaming_GetTimeRemaining_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IContentServerDirectory.java b/src/main/java/in/dragonbra/javasteam/rpc/IContentServerDirectory.java new file mode 100644 index 00000000..185c3c08 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IContentServerDirectory.java @@ -0,0 +1,24 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesContentsystemSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IContentServerDirectory { + + /* CContentServerDirectory_GetServersForSteamPipe_Response */ + JobID GetServersForSteamPipe(CContentServerDirectory_GetServersForSteamPipe_Request request); + + /* CContentServerDirectory_GetDepotPatchInfo_Response */ + JobID GetDepotPatchInfo(CContentServerDirectory_GetDepotPatchInfo_Request request); + + /* CContentServerDirectory_GetClientUpdateHosts_Response */ + JobID GetClientUpdateHosts(CContentServerDirectory_GetClientUpdateHosts_Request request); + + /* CContentServerDirectory_GetManifestRequestCode_Response */ + JobID GetManifestRequestCode(CContentServerDirectory_GetManifestRequestCode_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IFriendMessages.java b/src/main/java/in/dragonbra/javasteam/rpc/IFriendMessages.java new file mode 100644 index 00000000..620d7557 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IFriendMessages.java @@ -0,0 +1,30 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IFriendMessages { + + /* CFriendMessages_GetRecentMessages_Response */ + JobID GetRecentMessages(CFriendMessages_GetRecentMessages_Request request); + + /* CFriendsMessages_GetActiveMessageSessions_Response */ + JobID GetActiveMessageSessions(CFriendsMessages_GetActiveMessageSessions_Request request); + + /* CFriendMessages_SendMessage_Response */ + JobID SendMessage(CFriendMessages_SendMessage_Request request); + + /* NoResponse */ + void AckMessage(CFriendMessages_AckMessage_Notification request); + + /* CFriendMessages_IsInFriendsUIBeta_Response */ + JobID IsInFriendsUIBeta(CFriendMessages_IsInFriendsUIBeta_Request request); + + /* CFriendMessages_UpdateMessageReaction_Response */ + JobID UpdateMessageReaction(CFriendMessages_UpdateMessageReaction_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IFriendMessagesClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IFriendMessagesClient.java new file mode 100644 index 00000000..ed73d177 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IFriendMessagesClient.java @@ -0,0 +1,22 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.CFriendMessages_AckMessage_Notification; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.CFriendMessages_IncomingMessage_Notification; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.CFriendMessages_MessageReaction_Notification; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IFriendMessagesClient { + + /* NoResponse */ + void IncomingMessage(CFriendMessages_IncomingMessage_Notification request); + + /* NoResponse */ + void NotifyAckMessageEcho(CFriendMessages_AckMessage_Notification request); + + /* NoResponse */ + void MessageReaction(CFriendMessages_MessageReaction_Notification request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IParental.java b/src/main/java/in/dragonbra/javasteam/rpc/IParental.java new file mode 100644 index 00000000..fed38ddf --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IParental.java @@ -0,0 +1,42 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesParentalSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IParental { + + /* CParental_EnableParentalSettings_Response */ + JobID EnableParentalSettings(CParental_EnableParentalSettings_Request request); + + /* CParental_DisableParentalSettings_Response */ + JobID DisableParentalSettings(CParental_DisableParentalSettings_Request request); + + /* CParental_GetParentalSettings_Response */ + JobID GetParentalSettings(CParental_GetParentalSettings_Request request); + + /* CParental_GetSignedParentalSettings_Response */ + JobID GetSignedParentalSettings(CParental_GetSignedParentalSettings_Request request); + + /* CParental_SetParentalSettings_Response */ + JobID SetParentalSettings(CParental_SetParentalSettings_Request request); + + /* CParental_ValidateToken_Response */ + JobID ValidateToken(CParental_ValidateToken_Request request); + + /* CParental_ValidatePassword_Response */ + JobID ValidatePassword(CParental_ValidatePassword_Request request); + + /* CParental_LockClient_Response */ + JobID LockClient(CParental_LockClient_Request request); + + /* CParental_RequestRecoveryCode_Response */ + JobID RequestRecoveryCode(CParental_RequestRecoveryCode_Request request); + + /* CParental_DisableWithRecoveryCode_Response */ + JobID DisableWithRecoveryCode(CParental_DisableWithRecoveryCode_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IParentalClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IParentalClient.java new file mode 100644 index 00000000..7532a711 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IParentalClient.java @@ -0,0 +1,22 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesParentalSteamclient.CParental_ParentalLock_Notification; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesParentalSteamclient.CParental_ParentalSettingsChange_Notification; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesParentalSteamclient.CParental_ParentalUnlock_Notification; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IParentalClient { + + /* NoResponse */ + void NotifySettingsChange(CParental_ParentalSettingsChange_Notification request); + + /* NoResponse */ + void NotifyUnlock(CParental_ParentalUnlock_Notification request); + + /* NoResponse */ + void NotifyLock(CParental_ParentalLock_Notification request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IPlayer.java b/src/main/java/in/dragonbra/javasteam/rpc/IPlayer.java new file mode 100644 index 00000000..a6fc49e5 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IPlayer.java @@ -0,0 +1,152 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesPlayerSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IPlayer { + /* CPlayer_GetMutualFriendsForIncomingInvites_Response */ + JobID GetMutualFriendsForIncomingInvites(CPlayer_GetMutualFriendsForIncomingInvites_Request request); + + /* CPlayer_GetOwnedGames_Response */ + JobID GetOwnedGames(CPlayer_GetOwnedGames_Request request); + + /* CPlayer_GetPlayNext_Response */ + JobID GetPlayNext(CPlayer_GetPlayNext_Request request); + + /* CPlayer_GetFriendsGameplayInfo_Response */ + JobID GetFriendsGameplayInfo(CPlayer_GetFriendsGameplayInfo_Request request); + + /* CPlayer_GetGameBadgeLevels_Response */ + JobID GetGameBadgeLevels(CPlayer_GetGameBadgeLevels_Request request); + + /* CPlayer_GetProfileBackground_Response */ + JobID GetProfileBackground(CPlayer_GetProfileBackground_Request request); + + /* CPlayer_SetProfileBackground_Response */ + JobID SetProfileBackground(CPlayer_SetProfileBackground_Request request); + + /* CPlayer_GetMiniProfileBackground_Response */ + JobID GetMiniProfileBackground(CPlayer_GetMiniProfileBackground_Request request); + + /* CPlayer_SetMiniProfileBackground_Response */ + JobID SetMiniProfileBackground(CPlayer_SetMiniProfileBackground_Request request); + + /* CPlayer_GetAvatarFrame_Response */ + JobID GetAvatarFrame(CPlayer_GetAvatarFrame_Request request); + + /* CPlayer_SetAvatarFrame_Response */ + JobID SetAvatarFrame(CPlayer_SetAvatarFrame_Request request); + + /* CPlayer_GetAnimatedAvatar_Response */ + JobID GetAnimatedAvatar(CPlayer_GetAnimatedAvatar_Request request); + + /* CPlayer_SetAnimatedAvatar_Response */ + JobID SetAnimatedAvatar(CPlayer_SetAnimatedAvatar_Request request); + + /* CPlayer_GetSteamDeckKeyboardSkin_Response */ + JobID GetSteamDeckKeyboardSkin(CPlayer_GetSteamDeckKeyboardSkin_Request request); + + /* CPlayer_SetSteamDeckKeyboardSkin_Response */ + JobID SetSteamDeckKeyboardSkin(CPlayer_SetSteamDeckKeyboardSkin_Request request); + + /* CPlayer_GetProfileItemsOwned_Response */ + JobID GetProfileItemsOwned(CPlayer_GetProfileItemsOwned_Request request); + + /* CPlayer_GetProfileItemsEquipped_Response */ + JobID GetProfileItemsEquipped(CPlayer_GetProfileItemsEquipped_Request request); + + /* CPlayer_SetEquippedProfileItemFlags_Response */ + JobID SetEquippedProfileItemFlags(CPlayer_SetEquippedProfileItemFlags_Request request); + + /* CPlayer_GetEmoticonList_Response */ + JobID GetEmoticonList(CPlayer_GetEmoticonList_Request request); + + /* CPlayer_GetAchievementsProgress_Response */ + JobID GetAchievementsProgress(CPlayer_GetAchievementsProgress_Request request); + + /* CPlayer_GetFavoriteBadge_Response */ + JobID GetFavoriteBadge(CPlayer_GetFavoriteBadge_Request request); + + /* CPlayer_SetFavoriteBadge_Response */ + JobID SetFavoriteBadge(CPlayer_SetFavoriteBadge_Request request); + + /* CPlayer_GetProfileCustomization_Response */ + JobID GetProfileCustomization(CPlayer_GetProfileCustomization_Request request); + + /* CPlayer_GetPurchasedProfileCustomizations_Response */ + JobID GetPurchasedProfileCustomizations(CPlayer_GetPurchasedProfileCustomizations_Request request); + + /* CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Response */ + JobID GetPurchasedAndUpgradedProfileCustomizations(CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Request request); + + /* CPlayer_GetProfileThemesAvailable_Response */ + JobID GetProfileThemesAvailable(CPlayer_GetProfileThemesAvailable_Request request); + + /* CPlayer_SetProfileTheme_Response */ + JobID SetProfileTheme(CPlayer_SetProfileTheme_Request request); + + /* CPlayer_SetProfilePreferences_Response */ + JobID SetProfilePreferences(CPlayer_SetProfilePreferences_Request request); + + /* CPlayer_PostStatusToFriends_Response */ + JobID PostStatusToFriends(CPlayer_PostStatusToFriends_Request request); + + /* CPlayer_GetPostedStatus_Response */ + JobID GetPostedStatus(CPlayer_GetPostedStatus_Request request); + + /* CPlayer_DeletePostedStatus_Response */ + JobID DeletePostedStatus(CPlayer_DeletePostedStatus_Request request); + + /* CPlayer_GetLastPlayedTimes_Response */ + JobID ClientGetLastPlayedTimes(CPlayer_GetLastPlayedTimes_Request request); + + /* CPlayer_GetTimeSSAAccepted_Response */ + JobID GetTimeSSAAccepted(CPlayer_GetTimeSSAAccepted_Request request); + + /* CPlayer_AcceptSSA_Response */ + JobID AcceptSSA(CPlayer_AcceptSSA_Request request); + + /* CPlayer_GetNicknameList_Response */ + JobID GetNicknameList(CPlayer_GetNicknameList_Request request); + + /* CPlayer_GetPerFriendPreferences_Response */ + JobID GetPerFriendPreferences(CPlayer_GetPerFriendPreferences_Request request); + + /* CPlayer_SetPerFriendPreferences_Response */ + JobID SetPerFriendPreferences(CPlayer_SetPerFriendPreferences_Request request); + + /* CPlayer_AddFriend_Response */ + JobID AddFriend(CPlayer_AddFriend_Request request); + + /* CPlayer_RemoveFriend_Response */ + JobID RemoveFriend(CPlayer_RemoveFriend_Request request); + + /* CPlayer_IgnoreFriend_Response */ + JobID IgnoreFriend(CPlayer_IgnoreFriend_Request request); + + /* CPlayer_GetCommunityPreferences_Response */ + JobID GetCommunityPreferences(CPlayer_GetCommunityPreferences_Request request); + + /* CPlayer_SetCommunityPreferences_Response */ + JobID SetCommunityPreferences(CPlayer_SetCommunityPreferences_Request request); + + /* CPlayer_GetTextFilterWords_Response */ + JobID GetTextFilterWords(CPlayer_GetTextFilterWords_Request request); + + /* CPlayer_GetNewSteamAnnouncementState_Response */ + JobID GetNewSteamAnnouncementState(CPlayer_GetNewSteamAnnouncementState_Request request); + + /* CPlayer_UpdateSteamAnnouncementLastRead_Response */ + JobID UpdateSteamAnnouncementLastRead(CPlayer_UpdateSteamAnnouncementLastRead_Request request); + + /* CPlayer_GetPrivacySettings_Response */ + JobID GetPrivacySettings(CPlayer_GetPrivacySettings_Request request); + + /* CPlayer_GetDurationControl_Response */ + JobID GetDurationControl(CPlayer_GetDurationControl_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IPlayerClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IPlayerClient.java new file mode 100644 index 00000000..ae462afd --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IPlayerClient.java @@ -0,0 +1,35 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesPlayerSteamclient.*; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IPlayerClient { + + /* NoResponse */ + void NotifyLastPlayedTimes(CPlayer_LastPlayedTimes_Notification request); + + /* NoResponse */ + void NotifyFriendNicknameChanged(CPlayer_FriendNicknameChanged_Notification request); + + /* NoResponse */ + void NotifyFriendEquippedProfileItemsChanged(CPlayer_FriendEquippedProfileItemsChanged_Notification request); + + /* NoResponse */ + void NotifyNewSteamAnnouncementState(CPlayer_NewSteamAnnouncementState_Notification request); + + /* NoResponse */ + void NotifyCommunityPreferencesChanged(CPlayer_CommunityPreferencesChanged_Notification request); + + /* NoResponse */ + void NotifyTextFilterWordsChanged(CPlayer_TextFilterWordsChanged_Notification request); + + /* NoResponse */ + void NotifyPerFriendPreferencesChanged(CPlayer_PerFriendPreferencesChanged_Notification request); + + /* NoResponse */ + void NotifyPrivacyPrivacySettingsChanged(CPlayer_PrivacySettingsChanged_Notification request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IRemoteClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IRemoteClient.java new file mode 100644 index 00000000..09729ebc --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IRemoteClient.java @@ -0,0 +1,51 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesRemoteclientServiceMessages.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IRemoteClient { + + /* CRemoteClient_GetPairingInfo_Response */ + JobID GetPairingInfo(CRemoteClient_GetPairingInfo_Request request); + + /* NoResponse */ + void NotifyOnline(CRemoteClient_Online_Notification request); + + /* NoResponse */ + void NotifyReplyPacket(CRemoteClient_ReplyPacket_Notification request); + + /* CRemoteClient_AllocateTURNServer_Response */ + JobID AllocateTURNServer(CRemoteClient_AllocateTURNServer_Request request); + + /* CRemoteClient_AllocateRelayServer_Response */ + JobID AllocateRelayServer(CRemoteClient_AllocateRelayServer_Request request); + + /* CRemoteClient_AllocateSDR_Response */ + JobID AllocateSDR(CRemoteClient_AllocateSDR_Request request); + + /* NoResponse */ + void SendSteamBroadcastPacket(CRemoteClient_SteamBroadcast_Notification request); + + /* NoResponse */ + void SendSteamToSteamPacket(CRemoteClient_SteamToSteam_Notification request); + + /* CRemotePlay_SessionStarted_Response */ + JobID SendRemotePlaySessionStarted(CRemotePlay_SessionStarted_Request request); + + /* NoResponse */ + void SendRemotePlaySessionStopped(CRemotePlay_SessionStopped_Notification request); + + /* NoResponse */ + void SendRemotePlayTogetherPacket(CRemotePlayTogether_Notification request); + + /* CRemoteClient_CreateRemotePlayTogetherInvitation_Response */ + JobID CreateRemotePlayTogetherInvitation(CRemoteClient_CreateRemotePlayTogetherInvitation_Request request); + + /* CRemoteClient_DeleteRemotePlayTogetherInvitation_Response */ + JobID DeleteRemotePlayTogetherInvitation(CRemoteClient_DeleteRemotePlayTogetherInvitation_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/IRemoteClientSteamClient.java b/src/main/java/in/dragonbra/javasteam/rpc/IRemoteClientSteamClient.java new file mode 100644 index 00000000..412f32e1 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/IRemoteClientSteamClient.java @@ -0,0 +1,29 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesRemoteclientServiceMessages.*; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public interface IRemoteClientSteamClient { + + /* NoResponse */ + void NotifyRegisterStatusUpdate(CRemoteClient_RegisterStatusUpdate_Notification request); + + /* NoResponse */ + void NotifyUnregisterStatusUpdate(CRemoteClient_UnregisterStatusUpdate_Notification request); + + /* NoResponse */ + void NotifyRemotePacket(CRemoteClient_RemotePacket_Notification request); + + /* NoResponse */ + void NotifySteamBroadcastPacket(CRemoteClient_SteamBroadcast_Notification request); + + /* NoResponse */ + void NotifySteamToSteamPacket(CRemoteClient_SteamToSteam_Notification request); + + /* NoResponse */ + void NotifyRemotePlayTogetherPacket(CRemotePlayTogether_Notification request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/ITwoFactor.java b/src/main/java/in/dragonbra/javasteam/rpc/ITwoFactor.java new file mode 100644 index 00000000..c5b67bc7 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/ITwoFactor.java @@ -0,0 +1,45 @@ +package in.dragonbra.javasteam.rpc; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesTwofactorSteamclient.*; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-06 + */ +@SuppressWarnings("unused") +public interface ITwoFactor { + + /* CTwoFactor_Status_Response */ + JobID QueryStatus(CTwoFactor_Status_Request request); + + /* CTwoFactor_AddAuthenticator_Response */ + JobID AddAuthenticator(CTwoFactor_AddAuthenticator_Request request); + + /* CTwoFactor_SendEmail_Response */ + JobID SendEmail(CTwoFactor_SendEmail_Request request); + + /* CTwoFactor_FinalizeAddAuthenticator_Response */ + JobID FinalizeAddAuthenticator(CTwoFactor_FinalizeAddAuthenticator_Request request); + + /* CTwoFactor_UpdateTokenVersion_Response */ + JobID UpdateTokenVersion(CTwoFactor_UpdateTokenVersion_Request request); + + /* CTwoFactor_RemoveAuthenticator_Response */ + JobID RemoveAuthenticator(CTwoFactor_RemoveAuthenticator_Request request); + + /* CTwoFactor_CreateEmergencyCodes_Response */ + JobID CreateEmergencyCodes(CTwoFactor_CreateEmergencyCodes_Request request); + + /* CTwoFactor_DestroyEmergencyCodes_Response */ + JobID DestroyEmergencyCodes(CTwoFactor_DestroyEmergencyCodes_Request request); + + /* CTwoFactor_ValidateToken_Response */ + JobID ValidateToken(CTwoFactor_ValidateToken_Request request); + + /* CTwoFactor_RemoveAuthenticatorViaChallengeStart_Response */ + JobID RemoveAuthenticatorViaChallengeStart(CTwoFactor_RemoveAuthenticatorViaChallengeStart_Request request); + + /* CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Response */ + JobID RemoveAuthenticatorViaChallengeContinue(CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request request); +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/README.md b/src/main/java/in/dragonbra/javasteam/rpc/README.md new file mode 100644 index 00000000..26552582 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/README.md @@ -0,0 +1 @@ +TODO: Generate these interfaces automatically from protobuf services diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/Authentication.java b/src/main/java/in/dragonbra/javasteam/rpc/service/Authentication.java new file mode 100644 index 00000000..6d5d8a81 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/Authentication.java @@ -0,0 +1,69 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient; +import in.dragonbra.javasteam.rpc.IAuthentication; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-07 + */ +@SuppressWarnings("unused") +public class Authentication extends UnifiedService implements IAuthentication { + + public Authentication(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID GetPasswordRSAPublicKey(SteammessagesAuthSteamclient.CAuthentication_GetPasswordRSAPublicKey_Request request) { + return sendMessage(request); + } + + @Override + public JobID BeginAuthSessionViaQR(SteammessagesAuthSteamclient.CAuthentication_BeginAuthSessionViaQR_Request request) { + return sendMessage(request); + } + + @Override + public JobID BeginAuthSessionViaCredentials(SteammessagesAuthSteamclient.CAuthentication_BeginAuthSessionViaCredentials_Request request) { + return sendMessage(request); + } + + @Override + public JobID PollAuthSessionStatus(SteammessagesAuthSteamclient.CAuthentication_PollAuthSessionStatus_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetAuthSessionInfo(SteammessagesAuthSteamclient.CAuthentication_GetAuthSessionInfo_Request request) { + return sendMessage(request); + } + + @Override + public JobID UpdateAuthSessionWithMobileConfirmation(SteammessagesAuthSteamclient.CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request request) { + return sendMessage(request); + } + + @Override + public JobID UpdateAuthSessionWithSteamGuardCode(SteammessagesAuthSteamclient.CAuthentication_UpdateAuthSessionWithSteamGuardCode_Request request) { + return sendMessage(request); + } + + @Override + public JobID GenerateAccessTokenForApp(SteammessagesAuthSteamclient.CAuthentication_AccessToken_GenerateForApp_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetAuthSessionsForAccount(SteammessagesAuthSteamclient.CAuthentication_GetAuthSessionsForAccount_Request request) { + return sendMessage(request); + } + + @Override + public JobID MigrateMobileSession(SteammessagesAuthSteamclient.CAuthentication_MigrateMobileSession_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/AuthenticationSupport.java b/src/main/java/in/dragonbra/javasteam/rpc/service/AuthenticationSupport.java new file mode 100644 index 00000000..cd6f8e46 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/AuthenticationSupport.java @@ -0,0 +1,39 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient; +import in.dragonbra.javasteam.rpc.IAuthenticationSupport; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-07 + */ +@SuppressWarnings("unused") +public class AuthenticationSupport extends UnifiedService implements IAuthenticationSupport { + + public AuthenticationSupport(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID QueryRefreshTokensByAccount(SteammessagesAuthSteamclient.CAuthenticationSupport_QueryRefreshTokensByAccount_Request request) { + return sendMessage(request); + } + + @Override + public JobID QueryRefreshTokenByID(SteammessagesAuthSteamclient.CAuthenticationSupport_QueryRefreshTokenByID_Request request) { + return sendMessage(request); + } + + @Override + public JobID RevokeToken(SteammessagesAuthSteamclient.CAuthenticationSupport_RevokeToken_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetTokenHistory(SteammessagesAuthSteamclient.CAuthenticationSupport_GetTokenHistory_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/Chat.java b/src/main/java/in/dragonbra/javasteam/rpc/service/Chat.java new file mode 100644 index 00000000..7ed3a672 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/Chat.java @@ -0,0 +1,24 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.CChat_RequestFriendPersonaStates_Request; +import in.dragonbra.javasteam.rpc.IChat; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class Chat extends UnifiedService implements IChat { + + public Chat(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID RequestFriendPersonaStates(CChat_RequestFriendPersonaStates_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ChatRoom.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatRoom.java new file mode 100644 index 00000000..70b0e5f8 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatRoom.java @@ -0,0 +1,284 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.*; +import in.dragonbra.javasteam.rpc.IChatRoom; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ChatRoom extends UnifiedService implements IChatRoom { + + public ChatRoom(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID CreateChatRoomGroup(CChatRoom_CreateChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID SaveChatRoomGroup(CChatRoom_SaveChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID RenameChatRoomGroup(CChatRoom_RenameChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetChatRoomGroupTagline(CChatRoom_SetChatRoomGroupTagline_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetChatRoomGroupAvatar(CChatRoom_SetChatRoomGroupAvatar_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetChatRoomGroupWatchingBroadcast(CChatRoom_SetChatRoomGroupWatchingBroadcast_Request request) { + return sendMessage(request); + } + + @Override + public JobID JoinMiniGameForChatRoomGroup(CChatRoom_JoinMiniGameForChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID EndMiniGameForChatRoomGroup(CChatRoom_EndMiniGameForChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID MuteUserInGroup(CChatRoom_MuteUser_Request request) { + return sendMessage(request); + } + + @Override + public JobID KickUserFromGroup(CChatRoom_KickUser_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetUserBanState(CChatRoom_SetUserBanState_Request request) { + return sendMessage(request); + } + + @Override + public JobID RevokeInviteToGroup(CChatRoom_RevokeInvite_Request request) { + return sendMessage(request); + } + + @Override + public JobID CreateRole(CChatRoom_CreateRole_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetRoles(CChatRoom_GetRoles_Request request) { + return sendMessage(request); + } + + @Override + public JobID RenameRole(CChatRoom_RenameRole_Request request) { + return sendMessage(request); + } + + @Override + public JobID ReorderRole(CChatRoom_ReorderRole_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeleteRole(CChatRoom_DeleteRole_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetRoleActions(CChatRoom_GetRoleActions_Request request) { + return sendMessage(request); + } + + @Override + public JobID ReplaceRoleActions(CChatRoom_ReplaceRoleActions_Request request) { + return sendMessage(request); + } + + @Override + public JobID AddRoleToUser(CChatRoom_AddRoleToUser_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetRolesForUser(CChatRoom_GetRolesForUser_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeleteRoleFromUser(CChatRoom_DeleteRoleFromUser_Request request) { + return sendMessage(request); + } + + @Override + public JobID JoinChatRoomGroup(CChatRoom_JoinChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID InviteFriendToChatRoomGroup(CChatRoom_InviteFriendToChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID LeaveChatRoomGroup(CChatRoom_LeaveChatRoomGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID CreateChatRoom(CChatRoom_CreateChatRoom_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeleteChatRoom(CChatRoom_DeleteChatRoom_Request request) { + return sendMessage(request); + } + + @Override + public JobID RenameChatRoom(CChatRoom_RenameChatRoom_Request request) { + return sendMessage(request); + } + + @Override + public JobID ReorderChatRoom(CChatRoom_ReorderChatRoom_Request request) { + return sendMessage(request); + } + + @Override + public JobID SendChatMessage(CChatRoom_SendChatMessage_Request request) { + return sendMessage(request); + } + + @Override + public JobID JoinVoiceChat(CChatRoom_JoinVoiceChat_Request request) { + return sendMessage(request); + } + + @Override + public JobID LeaveVoiceChat(CChatRoom_LeaveVoiceChat_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetMessageHistory(CChatRoom_GetMessageHistory_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetMyChatRoomGroups(CChatRoom_GetMyChatRoomGroups_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetChatRoomGroupState(CChatRoom_GetChatRoomGroupState_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetChatRoomGroupSummary(CChatRoom_GetChatRoomGroupSummary_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetAppChatRoomGroupForceActive(CChatRoom_SetAppChatRoomGroupForceActive_Request request) { + return sendMessage(request); + } + + @Override + public void SetAppChatRoomGroupStopForceActive(CChatRoom_SetAppChatRoomGroupStopForceActive_Notification request) { + sendNotification(request); + } + + @Override + public void AckChatMessage(CChatRoom_AckChatMessage_Notification request) { + sendNotification(request); + } + + @Override + public JobID CreateInviteLink(CChatRoom_CreateInviteLink_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetInviteLinkInfo(CChatRoom_GetInviteLinkInfo_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetInviteInfo(CChatRoom_GetInviteInfo_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetInviteLinksForGroup(CChatRoom_GetInviteLinksForGroup_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetBanList(CChatRoom_GetBanList_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetInviteList(CChatRoom_GetInviteList_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeleteInviteLink(CChatRoom_DeleteInviteLink_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetSessionActiveChatRoomGroups(CChatRoom_SetSessionActiveChatRoomGroups_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetUserChatGroupPreferences(CChatRoom_SetUserChatGroupPreferences_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeleteChatMessages(CChatRoom_DeleteChatMessages_Request request) { + return sendMessage(request); + } + + @Override + public void UpdateMemberListView(CChatRoom_UpdateMemberListView_Notification request) { + sendNotification(request); + } + + @Override + public JobID SearchMembers(CChatRoom_SearchMembers_Request request) { + return sendMessage(request); + } + + @Override + public JobID UpdateMessageReaction(CChatRoom_UpdateMessageReaction_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetMessageReactionReactors(CChatRoom_GetMessageReactionReactors_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ChatRoomClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatRoomClient.java new file mode 100644 index 00000000..7e133d8d --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatRoomClient.java @@ -0,0 +1,73 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient; +import in.dragonbra.javasteam.rpc.IChatRoomClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ChatRoomClient extends UnifiedService implements IChatRoomClient { + + public ChatRoomClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void NotifyIncomingChatMessage(SteammessagesChatSteamclient.CChatRoom_IncomingChatMessage_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyChatMessageModified(SteammessagesChatSteamclient.CChatRoom_ChatMessageModified_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyMemberStateChange(SteammessagesChatSteamclient.CChatRoom_MemberStateChange_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyChatRoomHeaderStateChange(SteammessagesChatSteamclient.CChatRoom_ChatRoomHeaderState_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyChatRoomGroupRoomsChange(SteammessagesChatSteamclient.CChatRoom_ChatRoomGroupRoomsChange_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyShouldRejoinChatRoomVoiceChat(SteammessagesChatSteamclient.CChatRoom_NotifyShouldRejoinChatRoomVoiceChat_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyChatGroupUserStateChanged(SteammessagesChatSteamclient.ChatRoomClient_NotifyChatGroupUserStateChanged_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyAckChatMessageEcho(SteammessagesChatSteamclient.CChatRoom_AckChatMessage_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyChatRoomDisconnect(SteammessagesChatSteamclient.ChatRoomClient_NotifyChatRoomDisconnect_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyMemberListViewUpdated(SteammessagesChatSteamclient.CChatRoomClient_MemberListViewUpdated_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyMessageReaction(SteammessagesChatSteamclient.CChatRoom_MessageReaction_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ChatUsability.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatUsability.java new file mode 100644 index 00000000..07e81c54 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatUsability.java @@ -0,0 +1,23 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.CChatUsability_ClientUsabilityMetrics_Notification; +import in.dragonbra.javasteam.rpc.IChatUsability; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ChatUsability extends UnifiedService implements IChatUsability { + + public ChatUsability(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void NotifyClientUsabilityMetrics(CChatUsability_ClientUsabilityMetrics_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ChatUsabilityClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatUsabilityClient.java new file mode 100644 index 00000000..b7c21f9e --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ChatUsabilityClient.java @@ -0,0 +1,23 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.CChatUsability_RequestClientUsabilityMetrics_Notification; +import in.dragonbra.javasteam.rpc.IChatUsabilityClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ChatUsabilityClient extends UnifiedService implements IChatUsabilityClient { + + public ChatUsabilityClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void NotifyRequestClientUsabilityMetrics(CChatUsability_RequestClientUsabilityMetrics_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ClanChatRooms.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ClanChatRooms.java new file mode 100644 index 00000000..09686d38 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ClanChatRooms.java @@ -0,0 +1,29 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesChatSteamclient.*; +import in.dragonbra.javasteam.rpc.IClanChatRooms; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ClanChatRooms extends UnifiedService implements IClanChatRooms { + + public ClanChatRooms(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID GetClanChatRoomInfo(CClanChatRooms_GetClanChatRoomInfo_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetClanChatRoomPrivate(CClanChatRooms_SetClanChatRoomPrivate_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/CloudGaming.java b/src/main/java/in/dragonbra/javasteam/rpc/service/CloudGaming.java new file mode 100644 index 00000000..d5e5f972 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/CloudGaming.java @@ -0,0 +1,29 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesAuthSteamclient; +import in.dragonbra.javasteam.rpc.ICloudGaming; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-07 + */ +@SuppressWarnings("unused") +public class CloudGaming extends UnifiedService implements ICloudGaming { + + public CloudGaming(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID CreateNonce(SteammessagesAuthSteamclient.CCloudGaming_CreateNonce_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetTimeRemaining(SteammessagesAuthSteamclient.CCloudGaming_GetTimeRemaining_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ContentServerDirectory.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ContentServerDirectory.java new file mode 100644 index 00000000..9cb56a65 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ContentServerDirectory.java @@ -0,0 +1,39 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesContentsystemSteamclient.*; +import in.dragonbra.javasteam.rpc.IContentServerDirectory; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ContentServerDirectory extends UnifiedService implements IContentServerDirectory { + + public ContentServerDirectory(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID GetServersForSteamPipe(CContentServerDirectory_GetServersForSteamPipe_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetDepotPatchInfo(CContentServerDirectory_GetDepotPatchInfo_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetClientUpdateHosts(CContentServerDirectory_GetClientUpdateHosts_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetManifestRequestCode(CContentServerDirectory_GetManifestRequestCode_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/FriendMessages.java b/src/main/java/in/dragonbra/javasteam/rpc/service/FriendMessages.java new file mode 100644 index 00000000..8339e5d9 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/FriendMessages.java @@ -0,0 +1,49 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.*; +import in.dragonbra.javasteam.rpc.IFriendMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class FriendMessages extends UnifiedService implements IFriendMessages { + + public FriendMessages(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID GetRecentMessages(CFriendMessages_GetRecentMessages_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetActiveMessageSessions(CFriendsMessages_GetActiveMessageSessions_Request request) { + return sendMessage(request); + } + + @Override + public JobID SendMessage(CFriendMessages_SendMessage_Request request) { + return sendMessage(request); + } + + @Override + public void AckMessage(CFriendMessages_AckMessage_Notification request) { + sendNotification(request); + } + + @Override + public JobID IsInFriendsUIBeta(CFriendMessages_IsInFriendsUIBeta_Request request) { + return sendMessage(request); + } + + @Override + public JobID UpdateMessageReaction(CFriendMessages_UpdateMessageReaction_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/FriendMessagesClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/FriendMessagesClient.java new file mode 100644 index 00000000..5dc9cdc5 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/FriendMessagesClient.java @@ -0,0 +1,33 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesFriendmessagesSteamclient.*; +import in.dragonbra.javasteam.rpc.IFriendMessagesClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class FriendMessagesClient extends UnifiedService implements IFriendMessagesClient { + + public FriendMessagesClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void IncomingMessage(CFriendMessages_IncomingMessage_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyAckMessageEcho(CFriendMessages_AckMessage_Notification request) { + sendNotification(request); + } + + @Override + public void MessageReaction(CFriendMessages_MessageReaction_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/Parental.java b/src/main/java/in/dragonbra/javasteam/rpc/service/Parental.java new file mode 100644 index 00000000..24b113f3 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/Parental.java @@ -0,0 +1,69 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesParentalSteamclient.*; +import in.dragonbra.javasteam.rpc.IParental; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class Parental extends UnifiedService implements IParental { + + public Parental(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID EnableParentalSettings(CParental_EnableParentalSettings_Request request) { + return sendMessage(request); + } + + @Override + public JobID DisableParentalSettings(CParental_DisableParentalSettings_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetParentalSettings(CParental_GetParentalSettings_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetSignedParentalSettings(CParental_GetSignedParentalSettings_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetParentalSettings(CParental_SetParentalSettings_Request request) { + return sendMessage(request); + } + + @Override + public JobID ValidateToken(CParental_ValidateToken_Request request) { + return sendMessage(request); + } + + @Override + public JobID ValidatePassword(CParental_ValidatePassword_Request request) { + return sendMessage(request); + } + + @Override + public JobID LockClient(CParental_LockClient_Request request) { + return sendMessage(request); + } + + @Override + public JobID RequestRecoveryCode(CParental_RequestRecoveryCode_Request request) { + return sendMessage(request); + } + + @Override + public JobID DisableWithRecoveryCode(CParental_DisableWithRecoveryCode_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/ParentalClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/ParentalClient.java new file mode 100644 index 00000000..d4c1f4c8 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/ParentalClient.java @@ -0,0 +1,33 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesParentalSteamclient.*; +import in.dragonbra.javasteam.rpc.IParentalClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class ParentalClient extends UnifiedService implements IParentalClient { + + public ParentalClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void NotifySettingsChange(CParental_ParentalSettingsChange_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyUnlock(CParental_ParentalUnlock_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyLock(CParental_ParentalLock_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/Player.java b/src/main/java/in/dragonbra/javasteam/rpc/service/Player.java new file mode 100644 index 00000000..aecba9ef --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/Player.java @@ -0,0 +1,254 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesPlayerSteamclient.*; +import in.dragonbra.javasteam.rpc.IPlayer; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class Player extends UnifiedService implements IPlayer { + + public Player(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID GetMutualFriendsForIncomingInvites(CPlayer_GetMutualFriendsForIncomingInvites_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetOwnedGames(CPlayer_GetOwnedGames_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetPlayNext(CPlayer_GetPlayNext_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetFriendsGameplayInfo(CPlayer_GetFriendsGameplayInfo_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetGameBadgeLevels(CPlayer_GetGameBadgeLevels_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetProfileBackground(CPlayer_GetProfileBackground_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetProfileBackground(CPlayer_SetProfileBackground_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetMiniProfileBackground(CPlayer_GetMiniProfileBackground_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetMiniProfileBackground(CPlayer_SetMiniProfileBackground_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetAvatarFrame(CPlayer_GetAvatarFrame_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetAvatarFrame(CPlayer_SetAvatarFrame_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetAnimatedAvatar(CPlayer_GetAnimatedAvatar_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetAnimatedAvatar(CPlayer_SetAnimatedAvatar_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetSteamDeckKeyboardSkin(CPlayer_GetSteamDeckKeyboardSkin_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetSteamDeckKeyboardSkin(CPlayer_SetSteamDeckKeyboardSkin_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetProfileItemsOwned(CPlayer_GetProfileItemsOwned_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetProfileItemsEquipped(CPlayer_GetProfileItemsEquipped_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetEquippedProfileItemFlags(CPlayer_SetEquippedProfileItemFlags_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetEmoticonList(CPlayer_GetEmoticonList_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetAchievementsProgress(CPlayer_GetAchievementsProgress_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetFavoriteBadge(CPlayer_GetFavoriteBadge_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetFavoriteBadge(CPlayer_SetFavoriteBadge_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetProfileCustomization(CPlayer_GetProfileCustomization_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetPurchasedProfileCustomizations(CPlayer_GetPurchasedProfileCustomizations_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetPurchasedAndUpgradedProfileCustomizations(CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetProfileThemesAvailable(CPlayer_GetProfileThemesAvailable_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetProfileTheme(CPlayer_SetProfileTheme_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetProfilePreferences(CPlayer_SetProfilePreferences_Request request) { + return sendMessage(request); + } + + @Override + public JobID PostStatusToFriends(CPlayer_PostStatusToFriends_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetPostedStatus(CPlayer_GetPostedStatus_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeletePostedStatus(CPlayer_DeletePostedStatus_Request request) { + return sendMessage(request); + } + + @Override + public JobID ClientGetLastPlayedTimes(CPlayer_GetLastPlayedTimes_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetTimeSSAAccepted(CPlayer_GetTimeSSAAccepted_Request request) { + return sendMessage(request); + } + + @Override + public JobID AcceptSSA(CPlayer_AcceptSSA_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetNicknameList(CPlayer_GetNicknameList_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetPerFriendPreferences(CPlayer_GetPerFriendPreferences_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetPerFriendPreferences(CPlayer_SetPerFriendPreferences_Request request) { + return sendMessage(request); + } + + @Override + public JobID AddFriend(CPlayer_AddFriend_Request request) { + return sendMessage(request); + } + + @Override + public JobID RemoveFriend(CPlayer_RemoveFriend_Request request) { + return sendMessage(request); + } + + @Override + public JobID IgnoreFriend(CPlayer_IgnoreFriend_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetCommunityPreferences(CPlayer_GetCommunityPreferences_Request request) { + return sendMessage(request); + } + + @Override + public JobID SetCommunityPreferences(CPlayer_SetCommunityPreferences_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetTextFilterWords(CPlayer_GetTextFilterWords_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetNewSteamAnnouncementState(CPlayer_GetNewSteamAnnouncementState_Request request) { + return sendMessage(request); + } + + @Override + public JobID UpdateSteamAnnouncementLastRead(CPlayer_UpdateSteamAnnouncementLastRead_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetPrivacySettings(CPlayer_GetPrivacySettings_Request request) { + return sendMessage(request); + } + + @Override + public JobID GetDurationControl(CPlayer_GetDurationControl_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/PlayerClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/PlayerClient.java new file mode 100644 index 00000000..addc0298 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/PlayerClient.java @@ -0,0 +1,58 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesPlayerSteamclient.*; +import in.dragonbra.javasteam.rpc.IPlayerClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class PlayerClient extends UnifiedService implements IPlayerClient { + + public PlayerClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void NotifyLastPlayedTimes(CPlayer_LastPlayedTimes_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyFriendNicknameChanged(CPlayer_FriendNicknameChanged_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyFriendEquippedProfileItemsChanged(CPlayer_FriendEquippedProfileItemsChanged_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyNewSteamAnnouncementState(CPlayer_NewSteamAnnouncementState_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyCommunityPreferencesChanged(CPlayer_CommunityPreferencesChanged_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyTextFilterWordsChanged(CPlayer_TextFilterWordsChanged_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyPerFriendPreferencesChanged(CPlayer_PerFriendPreferencesChanged_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyPrivacyPrivacySettingsChanged(CPlayer_PrivacySettingsChanged_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/RemoteClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/RemoteClient.java new file mode 100644 index 00000000..42a4cd74 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/RemoteClient.java @@ -0,0 +1,86 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesRemoteclientServiceMessages.*; +import in.dragonbra.javasteam.rpc.IRemoteClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class RemoteClient extends UnifiedService implements IRemoteClient { + + public RemoteClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID GetPairingInfo(CRemoteClient_GetPairingInfo_Request request) { + return sendMessage(request); + } + + @Override + public void NotifyOnline(CRemoteClient_Online_Notification request) { + sendNotification(request); + + } + + @Override + public void NotifyReplyPacket(CRemoteClient_ReplyPacket_Notification request) { + sendNotification(request); + + } + + @Override + public JobID AllocateTURNServer(CRemoteClient_AllocateTURNServer_Request request) { + return sendMessage(request); + } + + @Override + public JobID AllocateRelayServer(CRemoteClient_AllocateRelayServer_Request request) { + return sendMessage(request); + } + + @Override + public JobID AllocateSDR(CRemoteClient_AllocateSDR_Request request) { + return sendMessage(request); + } + + @Override + public void SendSteamBroadcastPacket(CRemoteClient_SteamBroadcast_Notification request) { + sendNotification(request); + } + + @Override + public void SendSteamToSteamPacket(CRemoteClient_SteamToSteam_Notification request) { + sendNotification(request); + } + + @Override + public JobID SendRemotePlaySessionStarted(CRemotePlay_SessionStarted_Request request) { + return sendMessage(request); + } + + @Override + public void SendRemotePlaySessionStopped(CRemotePlay_SessionStopped_Notification request) { + sendNotification(request); + } + + @Override + public void SendRemotePlayTogetherPacket(CRemotePlayTogether_Notification request) { + sendNotification(request); + } + + @Override + public JobID CreateRemotePlayTogetherInvitation(CRemoteClient_CreateRemotePlayTogetherInvitation_Request request) { + return sendMessage(request); + } + + @Override + public JobID DeleteRemotePlayTogetherInvitation(CRemoteClient_DeleteRemotePlayTogetherInvitation_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/RemoteClientSteamClient.java b/src/main/java/in/dragonbra/javasteam/rpc/service/RemoteClientSteamClient.java new file mode 100644 index 00000000..84f6d19f --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/RemoteClientSteamClient.java @@ -0,0 +1,48 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesRemoteclientServiceMessages.*; +import in.dragonbra.javasteam.rpc.IRemoteClientSteamClient; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public class RemoteClientSteamClient extends UnifiedService implements IRemoteClientSteamClient { + + public RemoteClientSteamClient(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public void NotifyRegisterStatusUpdate(CRemoteClient_RegisterStatusUpdate_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyUnregisterStatusUpdate(CRemoteClient_UnregisterStatusUpdate_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyRemotePacket(CRemoteClient_RemotePacket_Notification request) { + sendNotification(request); + } + + @Override + public void NotifySteamBroadcastPacket(CRemoteClient_SteamBroadcast_Notification request) { + sendNotification(request); + } + + @Override + public void NotifySteamToSteamPacket(CRemoteClient_SteamToSteam_Notification request) { + sendNotification(request); + } + + @Override + public void NotifyRemotePlayTogetherPacket(CRemotePlayTogether_Notification request) { + sendNotification(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/rpc/service/TwoFactor.java b/src/main/java/in/dragonbra/javasteam/rpc/service/TwoFactor.java new file mode 100644 index 00000000..4abd94e6 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/rpc/service/TwoFactor.java @@ -0,0 +1,74 @@ +package in.dragonbra.javasteam.rpc.service; + +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesTwofactorSteamclient; +import in.dragonbra.javasteam.rpc.ITwoFactor; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.UnifiedService; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-06 + */ +@SuppressWarnings("unused") +public class TwoFactor extends UnifiedService implements ITwoFactor { + + public TwoFactor(SteamUnifiedMessages steamUnifiedMessages) { + super(steamUnifiedMessages); + } + + @Override + public JobID QueryStatus(SteammessagesTwofactorSteamclient.CTwoFactor_Status_Request request) { + return sendMessage(request); + } + + @Override + public JobID AddAuthenticator(SteammessagesTwofactorSteamclient.CTwoFactor_AddAuthenticator_Request request) { + return sendMessage(request); + } + + @Override + public JobID SendEmail(SteammessagesTwofactorSteamclient.CTwoFactor_SendEmail_Request request) { + return sendMessage(request); + } + + @Override + public JobID FinalizeAddAuthenticator(SteammessagesTwofactorSteamclient.CTwoFactor_FinalizeAddAuthenticator_Request request) { + return sendMessage(request); + } + + @Override + public JobID UpdateTokenVersion(SteammessagesTwofactorSteamclient.CTwoFactor_UpdateTokenVersion_Request request) { + return sendMessage(request); + } + + @Override + public JobID RemoveAuthenticator(SteammessagesTwofactorSteamclient.CTwoFactor_RemoveAuthenticator_Request request) { + return sendMessage(request); + } + + @Override + public JobID CreateEmergencyCodes(SteammessagesTwofactorSteamclient.CTwoFactor_CreateEmergencyCodes_Request request) { + return sendMessage(request); + } + + @Override + public JobID DestroyEmergencyCodes(SteammessagesTwofactorSteamclient.CTwoFactor_DestroyEmergencyCodes_Request request) { + return sendMessage(request); + } + + @Override + public JobID ValidateToken(SteammessagesTwofactorSteamclient.CTwoFactor_ValidateToken_Request request) { + return sendMessage(request); + } + + @Override + public JobID RemoveAuthenticatorViaChallengeStart(SteammessagesTwofactorSteamclient.CTwoFactor_RemoveAuthenticatorViaChallengeStart_Request request) { + return sendMessage(request); + } + + @Override + public JobID RemoveAuthenticatorViaChallengeContinue(SteammessagesTwofactorSteamclient.CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request request) { + return sendMessage(request); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/steam/CMClient.java b/src/main/java/in/dragonbra/javasteam/steam/CMClient.java index 365b36a0..1a577714 100644 --- a/src/main/java/in/dragonbra/javasteam/steam/CMClient.java +++ b/src/main/java/in/dragonbra/javasteam/steam/CMClient.java @@ -397,7 +397,7 @@ private void handleLogOnResponse(IPacketMsg packetMsg) { // restart heartbeat heartBeatFunc.stop(); - heartBeatFunc.setDelay(logonResp.getBody().getOutOfGameHeartbeatSeconds() * 1000L); + heartBeatFunc.setDelay(logonResp.getBody().getLegacyOutOfGameHeartbeatSeconds() * 1000L); heartBeatFunc.start(); } else if (logonResponse == EResult.TryAnotherCM || logonResponse == EResult.ServiceUnavailable) { getServers().tryMark(connection.getCurrentEndPoint(), connection.getProtocolTypes(), ServerQuality.BAD); diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/SteamUnifiedMessages.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/SteamUnifiedMessages.java new file mode 100644 index 00000000..8ec20e17 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/SteamUnifiedMessages.java @@ -0,0 +1,163 @@ +package in.dragonbra.javasteam.steam.handlers.steamunifiedmessages; + +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.GeneratedMessageV3; +import in.dragonbra.javasteam.base.ClientMsgProtobuf; +import in.dragonbra.javasteam.base.IPacketMsg; +import in.dragonbra.javasteam.base.PacketClientMsgProtobuf; +import in.dragonbra.javasteam.enums.EMsg; +import in.dragonbra.javasteam.handlers.ClientMsgHandler; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodNotification; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodResponse; +import in.dragonbra.javasteam.types.JobID; +import in.dragonbra.javasteam.util.Strings; +import in.dragonbra.javasteam.util.compat.Consumer; +import in.dragonbra.javasteam.util.log.LogManager; +import in.dragonbra.javasteam.util.log.Logger; + +import java.lang.reflect.Method; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * @author Lossy + * @since 2023-01-04 + *

+ * This handler is used for interacting with Steamworks unified messaging + */ +public class SteamUnifiedMessages extends ClientMsgHandler { + + private static final Logger logger = LogManager.getLogger(SteamUnifiedMessages.class); + private Map> dispatchMap; + + public SteamUnifiedMessages() { + dispatchMap = new HashMap<>(); + + dispatchMap.put(EMsg.ServiceMethodResponse, new Consumer() { + @Override + public void accept(IPacketMsg packetMsg) { + handleServiceMethodResponse(packetMsg); + } + }); + dispatchMap.put(EMsg.ServiceMethod, new Consumer() { + @Override + public void accept(IPacketMsg packetMsg) { + handleServiceMethod(packetMsg); + } + }); + + dispatchMap = Collections.unmodifiableMap(dispatchMap); + } + + @Override + public void handleMsg(IPacketMsg packetMsg) { + if (packetMsg == null) { + throw new IllegalArgumentException("packetMsg is null"); + } + + Consumer dispatcher = dispatchMap.get(packetMsg.getMsgType()); + if (dispatcher != null) { + dispatcher.accept(packetMsg); + } + } + + /** + * Sends a message. + * Results are returned in a {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodResponse}. + * + * @param rpcName Name of the RPC endpoint. Takes the format ServiceName.RpcName + * @param message The message to send. + * @param The type of protobuf object. + * @return The JobID of the request. This can be used to find the appropriate {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodResponse}. + */ + public > JobID sendMessage(String rpcName, GeneratedMessageV3 message) { + if (message == null) { + throw new IllegalArgumentException("message is null"); + } + + JobID jobID = client.getNextJobID(); + EMsg eMsg = client.getSteamID() == null ? EMsg.ServiceMethodCallFromClientNonAuthed : EMsg.ServiceMethodCallFromClient; + + ClientMsgProtobuf msg = new ClientMsgProtobuf<>(message.getClass(), eMsg); + msg.setSourceJobID(jobID); + msg.getHeader().getProto().setTargetJobName(rpcName); + msg.getBody().mergeFrom(message); + + client.send(msg); + + return jobID; + } + + /** + * Sends a notification. + * + * @param rpcName Name of the RPC endpoint. Takes the format ServiceName.RpcName + * @param message The message to send. + * @param The type of protobuf object. + */ + public > void sendNotification(String rpcName, GeneratedMessageV3 message) { + if (message == null) { + throw new IllegalArgumentException("message is null"); + } + + EMsg eMsg = client.getSteamID() == null ? EMsg.ServiceMethodCallFromClientNonAuthed : EMsg.ServiceMethodCallFromClient; + ClientMsgProtobuf msg = new ClientMsgProtobuf<>(message.getClass(), eMsg); + msg.getHeader().getProto().setTargetJobName(rpcName); + msg.getBody().mergeFrom(message); + + client.send(msg); + } + + private void handleServiceMethodResponse(IPacketMsg packetMsg) { + if (!(packetMsg instanceof PacketClientMsgProtobuf)) { + throw new IllegalArgumentException("Packet message is expected to be protobuf."); + } + + PacketClientMsgProtobuf packetMsgProto = (PacketClientMsgProtobuf) packetMsg; + + client.postCallback(new ServiceMethodResponse(packetMsgProto)); + } + + @SuppressWarnings("unchecked") + private void handleServiceMethod(IPacketMsg packetMsg) { + if (!(packetMsg instanceof PacketClientMsgProtobuf)) { + throw new IllegalArgumentException("Packet message is expected to be protobuf."); + } + + PacketClientMsgProtobuf packetMsgProto = (PacketClientMsgProtobuf) packetMsg; + + String jobName = packetMsgProto.getHeader().getProto().getTargetJobName(); + if (!Strings.isNullOrEmpty(jobName)) { + String[] splitByDot = jobName.split("\\."); + String[] splitByHash = splitByDot[1].split("#"); + + String serviceName = splitByDot[0]; + String methodName = splitByHash[0]; + + String serviceInterfaceName = "in.dragonbra.javasteam.rpc.I" + serviceName; + try { + logger.debug("Handling Service Method: " + serviceInterfaceName); + + Class serviceInterfaceType = Class.forName(serviceInterfaceName); + + Method method = null; + for (Method m : serviceInterfaceType.getDeclaredMethods()) { + if (m.getName().equals(methodName)) { + method = m; + } + } + + if (method != null) { + Class argumentType = (Class) method.getParameterTypes()[0]; + + client.postCallback(new ServiceMethodNotification(argumentType, packetMsg)); + } + } catch (ClassNotFoundException e) { + // The RPC service implementation was not implemented. + // Either the .proto is missing, or the service was not converted to an interface yet. + logger.error("Service Method: " + serviceName + ", was not found"); + } + } + } +} diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/UnifiedService.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/UnifiedService.java new file mode 100644 index 00000000..91c1d72b --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/UnifiedService.java @@ -0,0 +1,81 @@ +package in.dragonbra.javasteam.steam.handlers.steamunifiedmessages; + +import com.google.protobuf.GeneratedMessageV3; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + */ +@SuppressWarnings("unused") +public abstract class UnifiedService { + + // private static final Logger logger = LogManager.getLogger(UnifiedService.class); + + private final SteamUnifiedMessages steamUnifiedMessages; + + public UnifiedService(SteamUnifiedMessages steamUnifiedMessages) { + this.steamUnifiedMessages = steamUnifiedMessages; + } + + public String getClassName() { + return this.getClass().getSimpleName(); + } + + /** + * @param parentClassName The parent class name, ie: Player + * @param methodName The calling method name, ie: GetGameBadgeLevels + * @return The name of the RPC endpoint as formatted ServiceName.RpcName. ie: Player.GetGameBadgeLevels#1 + */ + private static String getRpcEndpoint(String parentClassName, String methodName) { + return String.format("%s.%s#%s", parentClassName, methodName, 1); + } + + /** + * Gets the calling method name. ie: GetGameBadgeLevels()... + * + * @return The calling method name. + */ + public static String getMethodName() { + return Thread.currentThread().getStackTrace()[3].getMethodName(); + } + + /** + * Sends a message. + *

+ * Results are returned in a {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodResponse}. + * + * @param message The message to send. + * @return The JobID of the message. This can be used to find the appropriate {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback.ServiceMethodResponse}. + */ + public JobID sendMessage(GeneratedMessageV3 message) { + String serviceName = getClassName(); + String rpcName = getMethodName(); + String rpcEndpoint = getRpcEndpoint(serviceName, rpcName); + + return sendMessageOrNotification(rpcEndpoint, message, false); + } + + /** + * Sends a notification. + * + * @param message The message to send. + */ + public void sendNotification(GeneratedMessageV3 message) { + String serviceName = getClassName(); + String rpcName = getMethodName(); + String rpcEndpoint = getRpcEndpoint(serviceName, rpcName); + + sendMessageOrNotification(rpcEndpoint, message, true); + } + + private JobID sendMessageOrNotification(String rpcName, GeneratedMessageV3 message, Boolean isNotification) { + + if (isNotification) { + steamUnifiedMessages.sendNotification(rpcName, message); + return null; + } + + return steamUnifiedMessages.sendMessage(rpcName, message); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/callback/ServiceMethodNotification.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/callback/ServiceMethodNotification.java new file mode 100644 index 00000000..f20b3c03 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/callback/ServiceMethodNotification.java @@ -0,0 +1,58 @@ +package in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback; + +import com.google.protobuf.AbstractMessage; +import in.dragonbra.javasteam.base.ClientMsgProtobuf; +import in.dragonbra.javasteam.base.IPacketMsg; +import in.dragonbra.javasteam.steam.steamclient.callbackmgr.CallbackMsg; + +/** + * @author Lossy + * @since 2023-01-04 + *

+ * This callback represents a service notification received though {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages}. + */ +@SuppressWarnings("unused") +public class ServiceMethodNotification extends CallbackMsg { + + private final String methodName; + + private final Object body; + + public ServiceMethodNotification(Class messageType, IPacketMsg packetMsg) { + // Bounce into generic-land. + ClientMsgProtobuf clientMsg = new ClientMsgProtobuf<>(messageType, packetMsg); + + // Note: JobID will be -1 + + this.methodName = clientMsg.getHeader().getProto().getTargetJobName(); + this.body = clientMsg.getBody().build(); + } + + /** + * @return Gets the name of the Service. + */ + public String getServiceName() { + return methodName.split("\\.")[0]; + } + + /** + * @return Gets the name of the RPC method. + */ + public String getRpcName() { + return methodName.substring(getServiceName().length() + 1).split("#")[0]; + } + + /** + * @return Gets the full name of the service method. + */ + public String getMethodName() { + return methodName; + } + + /** + * @return Gets the protobuf notification body. + */ + public Object getBody() { + return body; + } +} diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/callback/ServiceMethodResponse.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/callback/ServiceMethodResponse.java new file mode 100644 index 00000000..57333304 --- /dev/null +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamunifiedmessages/callback/ServiceMethodResponse.java @@ -0,0 +1,77 @@ +package in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.callback; + +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.GeneratedMessageV3; +import in.dragonbra.javasteam.base.ClientMsgProtobuf; +import in.dragonbra.javasteam.base.PacketClientMsgProtobuf; +import in.dragonbra.javasteam.enums.EResult; +import in.dragonbra.javasteam.protobufs.steamclient.SteammessagesBase.CMsgProtoBufHeader; +import in.dragonbra.javasteam.steam.steamclient.callbackmgr.CallbackMsg; +import in.dragonbra.javasteam.types.JobID; + +/** + * @author Lossy + * @since 2023-01-04 + *

+ * This callback is returned in response to a service method sent through {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages}. + */ +@SuppressWarnings("unused") +public class ServiceMethodResponse extends CallbackMsg { + + private final EResult result; + + private final String methodName; + + private final PacketClientMsgProtobuf packetMsg; + + public ServiceMethodResponse(PacketClientMsgProtobuf packetMsg) { + CMsgProtoBufHeader protoHeader = packetMsg.getHeader().getProto().build(); + + JobID jobID = new JobID(protoHeader.getJobidTarget()); + setJobID(jobID); + + this.result = EResult.from(protoHeader.getEresult()); + this.methodName = protoHeader.getTargetJobName(); + this.packetMsg = packetMsg; + } + + /** + * @return Gets the result of the message. + */ + public EResult getResult() { + return result; + } + + /** + * @return Gets the name of the Service. + */ + public String getServiceName() { + return methodName.split("\\.")[0]; + } + + /** + * @return Gets the name of the RPC method. + */ + public String getRpcName() { + return methodName.substring(getServiceName().length() + 1).split("#")[0]; + } + + /** + * @return Gets the full name of the service method. + */ + public String getMethodName() { + return methodName; + } + + /** + * Deserializes the response into a protobuf object. + * + * @param clazz The message class, type erasure. + * @param Protobuf type of the response message. + * @return The response to the message sent through {@link in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages}. + */ + public > T getDeserializedResponse(Class clazz) { + ClientMsgProtobuf msg = new ClientMsgProtobuf<>(clazz, packetMsg); + return msg.getBody(); + } +} diff --git a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/callback/LoggedOnCallback.java b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/callback/LoggedOnCallback.java index 35a0daec..0b53a01d 100644 --- a/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/callback/LoggedOnCallback.java +++ b/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/callback/LoggedOnCallback.java @@ -62,8 +62,8 @@ public LoggedOnCallback(CMsgClientLogonResponse.Builder resp) { result = EResult.from(resp.getEresult()); extendedResult = EResult.from(resp.getEresultExtended()); - outOfGameSecsPerHeartbeat = resp.getOutOfGameHeartbeatSeconds(); - inGameSecsPerHeartbeat = resp.getInGameHeartbeatSeconds(); + outOfGameSecsPerHeartbeat = resp.getLegacyOutOfGameHeartbeatSeconds(); + inGameSecsPerHeartbeat = resp.getHeartbeatSeconds(); publicIP = NetHelpers.getIPAddress(resp.getPublicIp().getV4()); // Has ipV6 support, but still using ipV4 serverTime = new Date(resp.getRtime32ServerTime() * 1000L); diff --git a/src/main/java/in/dragonbra/javasteam/steam/steamclient/SteamClient.java b/src/main/java/in/dragonbra/javasteam/steam/steamclient/SteamClient.java index 30305c48..b6b7906d 100644 --- a/src/main/java/in/dragonbra/javasteam/steam/steamclient/SteamClient.java +++ b/src/main/java/in/dragonbra/javasteam/steam/steamclient/SteamClient.java @@ -15,6 +15,7 @@ import in.dragonbra.javasteam.steam.handlers.steamnotifications.SteamNotifications; import in.dragonbra.javasteam.steam.handlers.steamscreenshots.SteamScreenshots; import in.dragonbra.javasteam.steam.handlers.steamtrading.SteamTrading; +import in.dragonbra.javasteam.steam.handlers.steamunifiedmessages.SteamUnifiedMessages; import in.dragonbra.javasteam.steam.handlers.steamuser.SteamUser; import in.dragonbra.javasteam.steam.handlers.steamuserstats.SteamUserStats; import in.dragonbra.javasteam.steam.handlers.steamworkshop.SteamWorkshop; @@ -81,6 +82,7 @@ public SteamClient(SteamConfiguration configuration) { addHandler(new SteamMasterServer()); addHandler(new SteamGameServer()); addHandler(new SteamGameCoordinator()); + addHandler(new SteamUnifiedMessages()); processStartTime = new Date(); diff --git a/src/main/java/in/dragonbra/javasteam/util/log/DefaultLogListener.java b/src/main/java/in/dragonbra/javasteam/util/log/DefaultLogListener.java index b5578ca1..7a3b3e55 100644 --- a/src/main/java/in/dragonbra/javasteam/util/log/DefaultLogListener.java +++ b/src/main/java/in/dragonbra/javasteam/util/log/DefaultLogListener.java @@ -30,4 +30,23 @@ public void onLog(Class clazz, String message, Throwable throwable) { throwable.printStackTrace(); } } + + public void onError(Class clazz, String message, Throwable throwable) { + if (clazz == null) { + throw new IllegalArgumentException("class is null"); + } + String threadName = Thread.currentThread().getName(); + threadName = threadName.substring(0, Math.min(10, threadName.length())); + String className = clazz.getName(); + + if (message == null) { + System.err.printf("%s [%10s] %s%n", FORMAT.format(new Date()), threadName, className); + } else { + System.err.printf("%s [%10s] %s - %s%n", FORMAT.format(new Date()), threadName, className, message); + } + + if (throwable != null) { + throwable.printStackTrace(); + } + } } diff --git a/src/main/java/in/dragonbra/javasteam/util/log/LogListener.java b/src/main/java/in/dragonbra/javasteam/util/log/LogListener.java index 70a357d9..d1c8a900 100644 --- a/src/main/java/in/dragonbra/javasteam/util/log/LogListener.java +++ b/src/main/java/in/dragonbra/javasteam/util/log/LogListener.java @@ -5,5 +5,7 @@ * @since 2018-03-02 */ public interface LogListener { - void onLog(Class clazz, String message, Throwable throwable); + void onLog(Class clazz, String message, Throwable throwable); + + void onError(Class clazz, String message, Throwable throwable); } diff --git a/src/main/java/in/dragonbra/javasteam/util/log/Logger.java b/src/main/java/in/dragonbra/javasteam/util/log/Logger.java index b59bd97e..0118585b 100644 --- a/src/main/java/in/dragonbra/javasteam/util/log/Logger.java +++ b/src/main/java/in/dragonbra/javasteam/util/log/Logger.java @@ -30,4 +30,20 @@ public void debug(String message, Throwable throwable) { } } } + + public void error(Throwable throwable) { + error(null, throwable); + } + + public void error(String message) { + error(message, null); + } + + public void error(String message, Throwable throwable) { + for (LogListener listener : LogManager.LOG_LISTENERS) { + if (listener != null) { + listener.onError(clazz, message, throwable); + } + } + } } diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/enums.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/enums.proto new file mode 100644 index 00000000..232182c6 --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/enums.proto @@ -0,0 +1,385 @@ +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto"; + +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +enum EPublishedFileQueryType { + k_PublishedFileQueryType_RankedByVote = 0; + k_PublishedFileQueryType_RankedByPublicationDate = 1; + k_PublishedFileQueryType_AcceptedForGameRankedByAcceptanceDate = 2; + k_PublishedFileQueryType_RankedByTrend = 3; + k_PublishedFileQueryType_FavoritedByFriendsRankedByPublicationDate = 4; + k_PublishedFileQueryType_CreatedByFriendsRankedByPublicationDate = 5; + k_PublishedFileQueryType_RankedByNumTimesReported = 6; + k_PublishedFileQueryType_CreatedByFollowedUsersRankedByPublicationDate = 7; + k_PublishedFileQueryType_NotYetRated = 8; + k_PublishedFileQueryType_RankedByTotalUniqueSubscriptions = 9; + k_PublishedFileQueryType_RankedByTotalVotesAsc = 10; + k_PublishedFileQueryType_RankedByVotesUp = 11; + k_PublishedFileQueryType_RankedByTextSearch = 12; + k_PublishedFileQueryType_RankedByPlaytimeTrend = 13; + k_PublishedFileQueryType_RankedByTotalPlaytime = 14; + k_PublishedFileQueryType_RankedByAveragePlaytimeTrend = 15; + k_PublishedFileQueryType_RankedByLifetimeAveragePlaytime = 16; + k_PublishedFileQueryType_RankedByPlaytimeSessionsTrend = 17; + k_PublishedFileQueryType_RankedByLifetimePlaytimeSessions = 18; + k_PublishedFileQueryType_RankedByInappropriateContentRating = 19; + k_PublishedFileQueryType_RankedByBanContentCheck = 20; + k_PublishedFileQueryType_RankedByLastUpdatedDate = 21; +} + +enum EPublishedFileInappropriateProvider { + k_EPublishedFileInappropriateProvider_Invalid = 0; + k_EPublishedFileInappropriateProvider_Google = 1; + k_EPublishedFileInappropriateProvider_Amazon = 2; +} + +enum EPublishedFileInappropriateResult { + k_EPublishedFileInappropriateResult_NotScanned = 0; + k_EPublishedFileInappropriateResult_VeryUnlikely = 1; + k_EPublishedFileInappropriateResult_Unlikely = 30; + k_EPublishedFileInappropriateResult_Possible = 50; + k_EPublishedFileInappropriateResult_Likely = 75; + k_EPublishedFileInappropriateResult_VeryLikely = 100; +} + +enum EPersonaStateFlag { + k_EPersonaStateFlag_HasRichPresence = 1; + k_EPersonaStateFlag_InJoinableGame = 2; + k_EPersonaStateFlag_Golden = 4; + k_EPersonaStateFlag_RemotePlayTogether = 8; + k_EPersonaStateFlag_ClientTypeWeb = 256; + k_EPersonaStateFlag_ClientTypeMobile = 512; + k_EPersonaStateFlag_ClientTypeTenfoot = 1024; + k_EPersonaStateFlag_ClientTypeVR = 2048; + k_EPersonaStateFlag_LaunchTypeGamepad = 4096; + k_EPersonaStateFlag_LaunchTypeCompatTool = 8192; +} + +enum EContentCheckProvider { + k_EContentCheckProvider_Invalid = 0; + k_EContentCheckProvider_Google = 1; + k_EContentCheckProvider_Amazon = 2; + k_EContentCheckProvider_Local = 3; +} + +enum EProfileCustomizationType { + k_EProfileCustomizationTypeInvalid = 0; + k_EProfileCustomizationTypeRareAchievementShowcase = 1; + k_EProfileCustomizationTypeGameCollector = 2; + k_EProfileCustomizationTypeItemShowcase = 3; + k_EProfileCustomizationTypeTradeShowcase = 4; + k_EProfileCustomizationTypeBadges = 5; + k_EProfileCustomizationTypeFavoriteGame = 6; + k_EProfileCustomizationTypeScreenshotShowcase = 7; + k_EProfileCustomizationTypeCustomText = 8; + k_EProfileCustomizationTypeFavoriteGroup = 9; + k_EProfileCustomizationTypeRecommendation = 10; + k_EProfileCustomizationTypeWorkshopItem = 11; + k_EProfileCustomizationTypeMyWorkshop = 12; + k_EProfileCustomizationTypeArtworkShowcase = 13; + k_EProfileCustomizationTypeVideoShowcase = 14; + k_EProfileCustomizationTypeGuides = 15; + k_EProfileCustomizationTypeMyGuides = 16; + k_EProfileCustomizationTypeAchievements = 17; + k_EProfileCustomizationTypeGreenlight = 18; + k_EProfileCustomizationTypeMyGreenlight = 19; + k_EProfileCustomizationTypeSalien = 20; + k_EProfileCustomizationTypeLoyaltyRewardReactions = 21; + k_EProfileCustomizationTypeSingleArtworkShowcase = 22; + k_EProfileCustomizationTypeAchievementsCompletionist = 23; +} + +enum EPublishedFileStorageSystem { + k_EPublishedFileStorageSystemInvalid = 0; + k_EPublishedFileStorageSystemLegacyCloud = 1; + k_EPublishedFileStorageSystemDepot = 2; + k_EPublishedFileStorageSystemUGCCloud = 3; +} + +enum ECloudStoragePersistState { + k_ECloudStoragePersistStatePersisted = 0; + k_ECloudStoragePersistStateForgotten = 1; + k_ECloudStoragePersistStateDeleted = 2; +} + +enum ESDCardFormatStage { + k_ESDCardFormatStage_Invalid = 0; + k_ESDCardFormatStage_Starting = 1; + k_ESDCardFormatStage_Testing = 2; + k_ESDCardFormatStage_Rescuing = 3; + k_ESDCardFormatStage_Formatting = 4; + k_ESDCardFormatStage_Finalizing = 5; +} + +enum ESystemFanControlMode { + k_SystemFanControlMode_Invalid = 0; + k_SystemFanControlMode_Disabled = 1; + k_SystemFanControlMode_Default = 2; +} + +enum EColorProfile { + k_EColorProfile_Invalid = 0; + k_EColorProfile_Native = 1; + k_EColorProfile_Standard = 2; + k_EColorProfile_Vivid = 3; +} + +enum EBluetoothDeviceType { + k_BluetoothDeviceType_Invalid = 0; + k_BluetoothDeviceType_Unknown = 1; + k_BluetoothDeviceType_Phone = 2; + k_BluetoothDeviceType_Computer = 3; + k_BluetoothDeviceType_Headset = 4; + k_BluetoothDeviceType_Headphones = 5; + k_BluetoothDeviceType_Speakers = 6; + k_BluetoothDeviceType_OtherAudio = 7; + k_BluetoothDeviceType_Mouse = 8; + k_BluetoothDeviceType_Joystick = 9; + k_BluetoothDeviceType_Gamepad = 10; + k_BluetoothDeviceType_Keyboard = 11; +} + +enum ESystemAudioDirection { + k_SystemAudioDirection_Invalid = 0; + k_SystemAudioDirection_Input = 1; + k_SystemAudioDirection_Output = 2; +} + +enum ESystemAudioChannel { + k_SystemAudioChannel_Invalid = 0; + k_SystemAudioChannel_Aggregated = 1; + k_SystemAudioChannel_FrontLeft = 2; + k_SystemAudioChannel_FrontRight = 3; + k_SystemAudioChannel_LFE = 4; + k_SystemAudioChannel_BackLeft = 5; + k_SystemAudioChannel_BackRight = 6; + k_SystemAudioChannel_FrontCenter = 7; + k_SystemAudioChannel_Unknown = 8; + k_SystemAudioChannel_Mono = 9; +} + +enum ESystemAudioPortType { + k_SystemAudioPortType_Invalid = 0; + k_SystemAudioPortType_Unknown = 1; + k_SystemAudioPortType_Audio32f = 2; + k_SystemAudioPortType_Midi8b = 3; + k_SystemAudioPortType_Video32RGBA = 4; +} + +enum ESystemAudioPortDirection { + k_SystemAudioPortDirection_Invalid = 0; + k_SystemAudioPortDirection_Input = 1; + k_SystemAudioPortDirection_Output = 2; +} + +enum ESystemServiceState { + k_ESystemServiceState_Unavailable = 0; + k_ESystemServiceState_Disabled = 1; + k_ESystemServiceState_Enabled = 2; +} + +enum EGraphicsPerfOverlayLevel { + k_EGraphicsPerfOverlayLevel_Hidden = 0; + k_EGraphicsPerfOverlayLevel_Basic = 1; + k_EGraphicsPerfOverlayLevel_Medium = 2; + k_EGraphicsPerfOverlayLevel_Full = 3; + k_EGraphicsPerfOverlayLevel_Minimal = 4; +} + +enum EGPUPerformanceLevel { + k_EGPUPerformanceLevel_Invalid = 0; + k_EGPUPerformanceLevel_Auto = 1; + k_EGPUPerformanceLevel_Manual = 2; + k_EGPUPerformanceLevel_Low = 3; + k_EGPUPerformanceLevel_High = 4; + k_EGPUPerformanceLevel_Profiling = 5; +} + +enum EScalingFilter { + k_EScalingFilter_Invalid = 0; + k_EScalingFilter_FSR = 1; + k_EScalingFilter_Nearest = 2; + k_EScalingFilter_Integer = 3; + k_EScalingFilter_Linear = 4; + k_EScalingFilter_NIS = 5; +} + +enum ESplitScalingFilter { + k_ESplitScalingFilter_Invalid = 0; + k_ESplitScalingFilter_Linear = 1; + k_ESplitScalingFilter_Nearest = 2; + k_ESplitScalingFilter_FSR = 3; + k_ESplitScalingFilter_NIS = 4; +} + +enum ESplitScalingScaler { + k_ESplitScalingScaler_Invalid = 0; + k_ESplitScalingScaler_Auto = 1; + k_ESplitScalingScaler_Integer = 2; + k_ESplitScalingScaler_Fit = 3; + k_ESplitScalingScaler_Fill = 4; + k_ESplitScalingScaler_Stretch = 5; +} + +enum ECPUGovernor { + k_ECPUGovernor_Invalid = 0; + k_ECPUGovernor_Perf = 1; + k_ECPUGovernor_Powersave = 2; + k_ECPUGovernor_Manual = 3; +} + +enum EUpdaterType { + k_EUpdaterType_Invalid = 0; + k_EUpdaterType_Client = 1; + k_EUpdaterType_OS = 2; + k_EUpdaterType_BIOS = 3; + k_EUpdaterType_Aggregated = 4; + k_EUpdaterType_Test1 = 5; + k_EUpdaterType_Test2 = 6; + k_EUpdaterType_Dummy = 7; +} + +enum EUpdaterState { + k_EUpdaterState_Invalid = 0; + k_EUpdaterState_UpToDate = 2; + k_EUpdaterState_Checking = 3; + k_EUpdaterState_Available = 4; + k_EUpdaterState_Applying = 5; + k_EUpdaterState_ClientRestartPending = 6; + k_EUpdaterState_SystemRestartPending = 7; +} + +enum EStorageBlockContentType { + k_EStorageBlockContentType_Invalid = 0; + k_EStorageBlockContentType_Unknown = 1; + k_EStorageBlockContentType_FileSystem = 2; + k_EStorageBlockContentType_Crypto = 3; + k_EStorageBlockContentType_Raid = 4; +} + +enum EStorageBlockFileSystemType { + k_EStorageBlockFileSystemType_Invalid = 0; + k_EStorageBlockFileSystemType_Unknown = 1; + k_EStorageBlockFileSystemType_VFat = 2; + k_EStorageBlockFileSystemType_Ext4 = 3; +} + +enum EStorageDriveMediaType { + k_EStorageDriveMediaType_Invalid = 0; + k_EStorageDriveMediaType_Unknown = 1; + k_EStorageDriveMediaType_HDD = 2; + k_EStorageDriveMediaType_SSD = 3; + k_EStorageDriveMediaType_Removable = 4; +} + +enum ESystemDisplayCompatibilityMode { + k_ESystemDisplayCompatibilityMode_Invalid = 0; + k_ESystemDisplayCompatibilityMode_None = 1; + k_ESystemDisplayCompatibilityMode_MinimalBandwith = 2; +} + +enum ESteamDeckCompatibilityCategory { + k_ESteamDeckCompatibilityCategory_Unknown = 0; + k_ESteamDeckCompatibilityCategory_Unsupported = 1; + k_ESteamDeckCompatibilityCategory_Playable = 2; + k_ESteamDeckCompatibilityCategory_Verified = 3; +} + +enum ESteamDeckCompatibilityResultDisplayType { + k_ESteamDeckCompatibilityResultDisplayType_Invisible = 0; + k_ESteamDeckCompatibilityResultDisplayType_Informational = 1; + k_ESteamDeckCompatibilityResultDisplayType_Unsupported = 2; + k_ESteamDeckCompatibilityResultDisplayType_Playable = 3; + k_ESteamDeckCompatibilityResultDisplayType_Verified = 4; +} + +enum EACState { + k_EACState_Unknown = 0; + k_EACState_Disconnected = 1; + k_EACState_Connected = 2; + k_EACState_ConnectedSlow = 3; +} + +enum EBatteryState { + k_EBatteryState_Unknown = 0; + k_EBatteryState_Discharging = 1; + k_EBatteryState_Charging = 2; + k_EBatteryState_Full = 3; +} + +enum EOSBranch { + k_EOSBranch_Unknown = 0; + k_EOSBranch_Release = 1; + k_EOSBranch_ReleaseCandidate = 2; + k_EOSBranch_Beta = 3; + k_EOSBranch_BetaCandidate = 4; + k_EOSBranch_Main = 5; + k_EOSBranch_Staging = 6; +} + +enum ECommunityItemClass { + k_ECommunityItemClass_Invalid = 0; + k_ECommunityItemClass_Badge = 1; + k_ECommunityItemClass_GameCard = 2; + k_ECommunityItemClass_ProfileBackground = 3; + k_ECommunityItemClass_Emoticon = 4; + k_ECommunityItemClass_BoosterPack = 5; + k_ECommunityItemClass_Consumable = 6; + k_ECommunityItemClass_GameGoo = 7; + k_ECommunityItemClass_ProfileModifier = 8; + k_ECommunityItemClass_Scene = 9; + k_ECommunityItemClass_SalienItem = 10; + k_ECommunityItemClass_Sticker = 11; + k_ECommunityItemClass_ChatEffect = 12; + k_ECommunityItemClass_MiniProfileBackground = 13; + k_ECommunityItemClass_AvatarFrame = 14; + k_ECommunityItemClass_AnimatedAvatar = 15; + k_ECommunityItemClass_SteamDeckKeyboardSkin = 16; + k_ECommunityItemClass_SteamDeckStartupMovie = 17; +} + +enum ESteamDeckCompatibilityFeedback { + k_ESteamDeckCompatibilityFeedback_Unset = 0; + k_ESteamDeckCompatibilityFeedback_Agree = 1; + k_ESteamDeckCompatibilityFeedback_Disagree = 2; + k_ESteamDeckCompatibilityFeedback_Ignore = 3; +} + +enum EProvideDeckFeedbackPreference { + k_EProvideDeckFeedbackPreference_Unset = 0; + k_EProvideDeckFeedbackPreference_Yes = 1; + k_EProvideDeckFeedbackPreference_No = 2; +} + +enum ETouchGesture { + k_ETouchGestureNone = 0; + k_ETouchGestureTouch = 1; + k_ETouchGestureTap = 2; + k_ETouchGestureDoubleTap = 3; + k_ETouchGestureShortPress = 4; + k_ETouchGestureLongPress = 5; + k_ETouchGestureLongTap = 6; + k_ETouchGestureTwoFingerTap = 7; + k_ETouchGestureTapCancelled = 8; + k_ETouchGesturePinchBegin = 9; + k_ETouchGesturePinchUpdate = 10; + k_ETouchGesturePinchEnd = 11; + k_ETouchGestureFlingStart = 12; + k_ETouchGestureFlingCancelled = 13; +} + +enum ESessionPersistence { + k_ESessionPersistence_Invalid = -1; + k_ESessionPersistence_Ephemeral = 0; + k_ESessionPersistence_Persistent = 1; +} + +enum ENewSteamAnnouncementState { + k_ENewSteamAnnouncementState_Invalid = 0; + k_ENewSteamAnnouncementState_AllRead = 1; + k_ENewSteamAnnouncementState_NewAnnouncement = 2; + k_ENewSteamAnnouncementState_FeaturedAnnouncement = 3; +} diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_auth.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_auth.steamclient.proto new file mode 100644 index 00000000..759107b0 --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_auth.steamclient.proto @@ -0,0 +1,410 @@ +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base.steamclient.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/enums.proto"; + +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +enum EAuthTokenPlatformType { + k_EAuthTokenPlatformType_Unknown = 0; + k_EAuthTokenPlatformType_SteamClient = 1; + k_EAuthTokenPlatformType_WebBrowser = 2; + k_EAuthTokenPlatformType_MobileApp = 3; +} + +enum EAuthSessionGuardType { + k_EAuthSessionGuardType_Unknown = 0; + k_EAuthSessionGuardType_None = 1; + k_EAuthSessionGuardType_EmailCode = 2; + k_EAuthSessionGuardType_DeviceCode = 3; + k_EAuthSessionGuardType_DeviceConfirmation = 4; + k_EAuthSessionGuardType_EmailConfirmation = 5; + k_EAuthSessionGuardType_MachineToken = 6; +} + +enum EAuthSessionSecurityHistory { + k_EAuthSessionSecurityHistory_Invalid = 0; + k_EAuthSessionSecurityHistory_UsedPreviously = 1; + k_EAuthSessionSecurityHistory_NoPriorHistory = 2; +} + +enum EAuthTokenRevokeAction { + k_EAuthTokenRevokeLogout = 0; + k_EAuthTokenRevokePermanent = 1; + k_EAuthTokenRevokeReplaced = 2; + k_EAuthTokenRevokeSupport = 3; + k_EAuthTokenRevokeConsume = 4; +} + +enum EAuthTokenState { + k_EAuthTokenState_Invalid = 0; + k_EAuthTokenState_New = 1; + k_EAuthTokenState_Confirmed = 2; + k_EAuthTokenState_Issued = 3; + k_EAuthTokenState_Denied = 4; + k_EAuthTokenState_LoggedOut = 5; + k_EAuthTokenState_Consumed = 6; + k_EAuthTokenState_Revoked = 99; +} + +message CAuthentication_GetPasswordRSAPublicKey_Request { + optional string account_name = 1 [(description) = "user-provided account name to get an RSA key for"]; +} + +message CAuthentication_GetPasswordRSAPublicKey_Response { + optional string publickey_mod = 1 [(description) = "the public key modulus"]; + optional string publickey_exp = 2 [(description) = "the public key exponent"]; + optional uint64 timestamp = 3 [(description) = "the timestamp the key was generated"]; +} + +message CAuthentication_DeviceDetails { + optional string device_friendly_name = 1 [(description) = "User-supplied, or client-supplied, friendly name of device"]; + optional .EAuthTokenPlatformType platform_type = 2 [default = k_EAuthTokenPlatformType_Unknown, (description) = "EAuthTokenPlatformType, claimed, of device"]; + optional int32 os_type = 3 [(description) = "EOSType, claimed, of authorized device"]; + optional uint32 gaming_device_type = 4 [(description) = "EGamingDeviceType, claimed, of authorized device for steam client-type devices"]; +} + +message CAuthentication_BeginAuthSessionViaQR_Request { + optional string device_friendly_name = 1; + optional .EAuthTokenPlatformType platform_type = 2 [default = k_EAuthTokenPlatformType_Unknown]; + optional .CAuthentication_DeviceDetails device_details = 3 [(description) = "User-supplied details about the device attempting to sign in"]; + optional string website_id = 4 [default = "Unknown", (description) = "(EMachineAuthWebDomain) identifier of client requesting auth"]; +} + +message CAuthentication_AllowedConfirmation { + optional .EAuthSessionGuardType confirmation_type = 1 [default = k_EAuthSessionGuardType_Unknown, (description) = "authentication can proceed with this confirmation type"]; + optional string associated_message = 2 [(description) = "message to be interpreted depending on the confirmation type. for email confirmation, this might be the redacted email address to which email was sent."]; +} + +message CAuthentication_BeginAuthSessionViaQR_Response { + optional uint64 client_id = 1 [(description) = "unique identifier of requestor, also used for routing, portion of QR code"]; + optional string challenge_url = 2 [(description) = "URL based on client ID, which will be rendered as QR code"]; + optional bytes request_id = 3 [(description) = "unique request ID to be presented by requestor at poll time - must not be rendered in QR"]; + optional float interval = 4 [(description) = "refresh interval with which requestor should call PollAuthSessionStatus"]; + repeated .CAuthentication_AllowedConfirmation allowed_confirmations = 5 [(description) = "the confirmation types that will be able to confirm the request"]; + optional int32 version = 6 [(description) = "version of the QR data"]; +} + +message CAuthentication_BeginAuthSessionViaCredentials_Request { + optional string device_friendly_name = 1; + optional string account_name = 2; + optional string encrypted_password = 3 [(description) = "password, RSA encrypted client side"]; + optional uint64 encryption_timestamp = 4 [(description) = "timestamp to map to a key - STime"]; + optional bool remember_login = 5 [(description) = "deprecated"]; + optional .EAuthTokenPlatformType platform_type = 6 [default = k_EAuthTokenPlatformType_Unknown]; + optional .ESessionPersistence persistence = 7 [default = k_ESessionPersistence_Persistent, (description) = "whether we are requesting a persistent or an ephemeral session"]; + optional string website_id = 8 [default = "Unknown", (description) = "(EMachineAuthWebDomain) identifier of client requesting auth"]; + optional .CAuthentication_DeviceDetails device_details = 9 [(description) = "User-supplied details about the device attempting to sign in"]; + optional string guard_data = 10 [(description) = "steam guard data for client login"]; + optional uint32 language = 11; +} + +message CAuthentication_BeginAuthSessionViaCredentials_Response { + optional uint64 client_id = 1 [(description) = "unique identifier of requestor, also used for routing"]; + optional bytes request_id = 2 [(description) = "unique request ID to be presented by requestor at poll time - must not be transferred or displayed"]; + optional float interval = 3 [(description) = "refresh interval with which requestor should call PollAuthSessionStatus"]; + repeated .CAuthentication_AllowedConfirmation allowed_confirmations = 4 [(description) = "the confirmation types that will be able to confirm the request"]; + optional uint64 steamid = 5 [(description) = "steamid of the account logging in - will only be included if the credentials were correct"]; + optional string weak_token = 6 [(description) = "partial-authentication token - limited lifetime and scope, included only if credentials were valid"]; + optional string agreement_session_url = 7 [(description) = "agreement the user needs to agree to"]; + optional string extended_error_message = 8 [(description) = "error string to display if supported by the client"]; +} + +message CAuthentication_PollAuthSessionStatus_Request { + optional uint64 client_id = 1; + optional bytes request_id = 2; + optional fixed64 token_to_revoke = 3 [(description) = "If this is set to a token owned by this user, that token will be retired"]; +} + +message CAuthentication_PollAuthSessionStatus_Response { + optional uint64 new_client_id = 1 [(description) = "if challenge is old, this is the new client id"]; + optional string new_challenge_url = 2 [(description) = "if challenge is old, this is the new challenge ID to re-render for mobile confirmation"]; + optional string refresh_token = 3 [(description) = "if login has been confirmed, this is the requestor's new refresh token"]; + optional string access_token = 4 [(description) = "if login has been confirmed, this is a new token subordinate to refresh_token"]; + optional bool had_remote_interaction = 5 [(description) = "whether or not the auth session appears to have had remote interaction from a potential confirmer"]; + optional string account_name = 6 [(description) = "account name of authenticating account, for use by UI layer"]; + optional string new_guard_data = 7 [(description) = "if login has been confirmed, may contain remembered machine ID for future login"]; +} + +message CAuthentication_GetAuthSessionInfo_Request { + optional uint64 client_id = 1 [(description) = "client ID from scanned QR Code, used for routing"]; +} + +message CAuthentication_GetAuthSessionInfo_Response { + optional string ip = 1 [(description) = "IP address of requestor"]; + optional string geoloc = 2 [(description) = "geoloc info of requestor"]; + optional string city = 3 [(description) = "city of requestor"]; + optional string state = 4 [(description) = "state of requestor"]; + optional string country = 5 [(description) = "country of requestor"]; + optional .EAuthTokenPlatformType platform_type = 6 [default = k_EAuthTokenPlatformType_Unknown, (description) = "platform type of requestor"]; + optional string device_friendly_name = 7 [(description) = "name of requestor device"]; + optional int32 version = 8 [(description) = "version field"]; + optional .EAuthSessionSecurityHistory login_history = 9 [default = k_EAuthSessionSecurityHistory_Invalid, (description) = "whether the ip has previuously been used on the account successfully"]; + optional bool requestor_location_mismatch = 10 [(description) = "whether the requestor location matches this requests location"]; + optional bool high_usage_login = 11 [(description) = "whether this login has seen high usage recently"]; + optional .ESessionPersistence requested_persistence = 12 [default = k_ESessionPersistence_Invalid, (description) = "session persistence requestor has indicated they want"]; +} + +message CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request { + optional int32 version = 1 [(description) = "version field"]; + optional uint64 client_id = 2 [(description) = "pending client ID, from scanned QR Code"]; + optional fixed64 steamid = 3 [(description) = "user who wants to login"]; + optional bytes signature = 4 [(description) = "HMAC digest over {version,client_id,steamid} via user's private key"]; + optional bool confirm = 5 [default = false, (description) = "Whether to confirm the login (true) or deny the login (false)"]; + optional .ESessionPersistence persistence = 6 [default = k_ESessionPersistence_Persistent, (description) = "whether we are requesting a persistent or an ephemeral session"]; +} + +message CAuthentication_UpdateAuthSessionWithMobileConfirmation_Response { +} + +message CAuthentication_UpdateAuthSessionWithSteamGuardCode_Request { + optional uint64 client_id = 1 [(description) = "pending client ID, from initialized session"]; + optional fixed64 steamid = 2 [(description) = "user who wants to login"]; + optional string code = 3 [(description) = "confirmation code"]; + optional .EAuthSessionGuardType code_type = 4 [default = k_EAuthSessionGuardType_Unknown, (description) = "type of confirmation code"]; +} + +message CAuthentication_UpdateAuthSessionWithSteamGuardCode_Response { + optional string agreement_session_url = 7 [(description) = "agreement the user needs to agree to"]; +} + +message CAuthentication_AccessToken_GenerateForApp_Request { + optional string refresh_token = 1; + optional fixed64 steamid = 2; +} + +message CAuthentication_AccessToken_GenerateForApp_Response { + optional string access_token = 1; +} + +message CAuthentication_RefreshToken_Enumerate_Request { +} + +message CAuthentication_RefreshToken_Enumerate_Response { + message TokenUsageEvent { + optional uint32 time = 1 [(description) = "Approximate time of history event (may be deliberately fuzzed or omitted)"]; + optional .CMsgIPAddress ip = 2 [(description) = "IP at which event was observed"]; + optional string locale = 3; + optional string country = 4 [(description) = "Location (country code) of event, as inferred from IP"]; + optional string state = 5 [(description) = "Location (state code) of event, as inferred from IP"]; + optional string city = 6 [(description) = "Location (city) of event, as inferred from IP"]; + } + + message RefreshTokenDescription { + optional fixed64 token_id = 1 [(description) = "Persistent token/device identifier"]; + optional string token_description = 2 [(description) = "client-supplied friendly name for the device"]; + optional uint32 time_updated = 3; + optional .EAuthTokenPlatformType platform_type = 4 [default = k_EAuthTokenPlatformType_Unknown, (description) = "gross platform type (mobile/client/browser)"]; + optional bool logged_in = 5 [(description) = "If true, this token is currently valid. False indicates it is a machine token - ok for steamguard if you know the credential"]; + optional uint32 os_platform = 6 [(description) = "EPlatformType - rough classification of device OS, if known"]; + optional uint32 auth_type = 7 [(description) = "EAuthTokenGuardType - device authorization mechanism, if known"]; + optional uint32 gaming_device_type = 8 [(description) = "EGamingDeviceType - classify console/PC/SteamDeck, if known; applies only for Steam Client devices"]; + optional .CAuthentication_RefreshToken_Enumerate_Response.TokenUsageEvent first_seen = 9 [(description) = "Information about original authorization event"]; + optional .CAuthentication_RefreshToken_Enumerate_Response.TokenUsageEvent last_seen = 10 [(description) = "Information about most-recently seen, if known for this device"]; + optional int32 os_type = 11 [(description) = "EOSType - specific device OS, if known"]; + } + + repeated .CAuthentication_RefreshToken_Enumerate_Response.RefreshTokenDescription refresh_tokens = 1; + optional fixed64 requesting_token = 2; +} + +message CAuthentication_GetAuthSessionsForAccount_Request { +} + +message CAuthentication_GetAuthSessionsForAccount_Response { + repeated uint64 client_ids = 1 [(description) = "unique identifier of requestor, also used for routing"]; +} + +message CAuthentication_MigrateMobileSession_Request { + optional fixed64 steamid = 1 [(description) = "Steam ID of the user to migrate"]; + optional string token = 2 [(description) = "WG Token to migrate"]; + optional string signature = 3 [(description) = "Signature over the wg token using the user's 2FA token"]; +} + +message CAuthentication_MigrateMobileSession_Response { + optional string refresh_token = 1; + optional string access_token = 2; +} + +message CAuthentication_RefreshToken_Revoke_Request { + optional fixed64 token_id = 1; + optional fixed64 steamid = 2 [(description) = "Token holder if an admin action on behalf of another user"]; + optional .EAuthTokenRevokeAction revoke_action = 3 [default = k_EAuthTokenRevokePermanent, (description) = "Select between logout and logout-and-forget-machine"]; + optional bytes signature = 4 [(description) = "required signature over token_id"]; +} + +message CAuthentication_RefreshToken_Revoke_Response { +} + +message CAuthenticationSupport_QueryRefreshTokensByAccount_Request { + optional fixed64 steamid = 1 [(description) = "SteamID of the account to query (required)"]; + optional bool include_revoked_tokens = 2 [(description) = "Includes tokens that are revoked or expired in the query"]; +} + +message CSupportRefreshTokenDescription { + message TokenUsageEvent { + optional uint32 time = 1 [(description) = "Approximate time of history event (may be deliberately fuzzed or omitted)"]; + optional .CMsgIPAddress ip = 2 [(description) = "IP at which event was observed"]; + optional string country = 3 [(description) = "Location (country code) of event, as inferred from IP"]; + optional string state = 4 [(description) = "Location (state code) of event, as inferred from IP"]; + optional string city = 5 [(description) = "Location (city) of event, as inferred from IP"]; + } + + optional fixed64 token_id = 1; + optional string token_description = 2; + optional uint32 time_updated = 3; + optional .EAuthTokenPlatformType platform_type = 4 [default = k_EAuthTokenPlatformType_Unknown]; + optional .EAuthTokenState token_state = 5 [default = k_EAuthTokenState_Invalid]; + optional fixed64 owner_steamid = 6; + optional uint32 os_platform = 7 [(description) = "EPlatformType - rough classification of device OS, if known"]; + optional int32 os_type = 8 [(description) = "EOSType - specific device OS, if known"]; + optional uint32 auth_type = 9 [(description) = "EAuthTokenGuardType - device authorization mechanism, if known"]; + optional uint32 gaming_device_type = 10 [(description) = "EGamingDeviceType - classify console/PC/SteamDeck, if known; applies only for Steam Client devices"]; + optional .CSupportRefreshTokenDescription.TokenUsageEvent first_seen = 11 [(description) = "Information about original authorization event"]; + optional .CSupportRefreshTokenDescription.TokenUsageEvent last_seen = 12 [(description) = "Information about most-recently seen, if known for this device"]; +} + +message CAuthenticationSupport_QueryRefreshTokensByAccount_Response { + repeated .CSupportRefreshTokenDescription refresh_tokens = 1; +} + +message CAuthenticationSupport_QueryRefreshTokenByID_Request { + optional fixed64 token_id = 1 [(description) = "Token ID of the token to look up (required)"]; +} + +message CAuthenticationSupport_QueryRefreshTokenByID_Response { + repeated .CSupportRefreshTokenDescription refresh_tokens = 1; +} + +message CAuthenticationSupport_RevokeToken_Request { + optional fixed64 token_id = 1 [(description) = "Token ID of the token to revoke (required)"]; + optional fixed64 steamid = 2 [(description) = "Steam ID of the owner of that token (required)"]; +} + +message CAuthenticationSupport_RevokeToken_Response { +} + +message CAuthenticationSupport_GetTokenHistory_Request { + optional fixed64 token_id = 1 [(description) = "Token ID of the token to get history for (required)"]; +} + +message CSupportRefreshTokenAudit { + optional int32 action = 1; + optional uint32 time = 2; + optional .CMsgIPAddress ip = 3; + optional fixed64 actor = 4; +} + +message CAuthenticationSupport_GetTokenHistory_Response { + repeated .CSupportRefreshTokenAudit history = 1; +} + +message CCloudGaming_CreateNonce_Request { + optional string platform = 1; + optional uint32 appid = 2; +} + +message CCloudGaming_CreateNonce_Response { + optional string nonce = 1; + optional uint32 expiry = 2; +} + +message CCloudGaming_GetTimeRemaining_Request { + optional string platform = 1; + repeated uint32 appid_list = 2; +} + +message CCloudGaming_TimeRemaining { + optional uint32 appid = 1; + optional uint32 minutes_remaining = 2; +} + +message CCloudGaming_GetTimeRemaining_Response { + repeated .CCloudGaming_TimeRemaining entries = 2; +} + +service Authentication { + option (service_description) = "Authentication Service"; + + rpc GetPasswordRSAPublicKey (.CAuthentication_GetPasswordRSAPublicKey_Request) returns (.CAuthentication_GetPasswordRSAPublicKey_Response) { + option (method_description) = "Fetches RSA public key to use to encrypt passwords for a given account name"; + } + + rpc BeginAuthSessionViaQR (.CAuthentication_BeginAuthSessionViaQR_Request) returns (.CAuthentication_BeginAuthSessionViaQR_Response) { + option (method_description) = "start authentication process"; + } + + rpc BeginAuthSessionViaCredentials (.CAuthentication_BeginAuthSessionViaCredentials_Request) returns (.CAuthentication_BeginAuthSessionViaCredentials_Response) { + option (method_description) = "start authentication process"; + } + + rpc PollAuthSessionStatus (.CAuthentication_PollAuthSessionStatus_Request) returns (.CAuthentication_PollAuthSessionStatus_Response) { + option (method_description) = "poll during authentication process"; + } + + rpc GetAuthSessionInfo (.CAuthentication_GetAuthSessionInfo_Request) returns (.CAuthentication_GetAuthSessionInfo_Response) { + option (method_description) = "get metadata of specific auth session, this will also implicitly bind the calling account"; + } + + rpc UpdateAuthSessionWithMobileConfirmation (.CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request) returns (.CAuthentication_UpdateAuthSessionWithMobileConfirmation_Response) { + option (method_description) = "approve an authentication session via mobile 2fa"; + } + + rpc UpdateAuthSessionWithSteamGuardCode (.CAuthentication_UpdateAuthSessionWithSteamGuardCode_Request) returns (.CAuthentication_UpdateAuthSessionWithSteamGuardCode_Response) { + option (method_description) = "approve an authentication session via steam guard code"; + } + + rpc GenerateAccessTokenForApp (.CAuthentication_AccessToken_GenerateForApp_Request) returns (.CAuthentication_AccessToken_GenerateForApp_Response) { + option (method_description) = "Given a refresh token for a client app audience (e.g. desktop client / mobile client), generate an access token"; + } + + rpc EnumerateTokens (.CAuthentication_RefreshToken_Enumerate_Request) returns (.CAuthentication_RefreshToken_Enumerate_Response) { + option (method_description) = "Enumerate durable (refresh) tokens for the given subject account"; + } + + rpc GetAuthSessionsForAccount (.CAuthentication_GetAuthSessionsForAccount_Request) returns (.CAuthentication_GetAuthSessionsForAccount_Response) { + option (method_description) = "Gets all active auth sessions for an account for reference by the mobile app"; + } + + rpc MigrateMobileSession (.CAuthentication_MigrateMobileSession_Request) returns (.CAuthentication_MigrateMobileSession_Response) { + option (method_description) = "Migrates a WG token to an access and refresh token using a signature generated with the user's 2FA secret"; + } + + rpc RevokeRefreshToken (.CAuthentication_RefreshToken_Revoke_Request) returns (.CAuthentication_RefreshToken_Revoke_Response) { + option (method_description) = "Mark the given refresh token as revoked"; + } +} + +service AuthenticationSupport { + option (service_description) = "Authentication Support Service"; + + rpc QueryRefreshTokensByAccount (.CAuthenticationSupport_QueryRefreshTokensByAccount_Request) returns (.CAuthenticationSupport_QueryRefreshTokensByAccount_Response) { + option (method_description) = "Asks the server for a list of refresh tokens associated with an account"; + } + + rpc QueryRefreshTokenByID (.CAuthenticationSupport_QueryRefreshTokenByID_Request) returns (.CAuthenticationSupport_QueryRefreshTokenByID_Response) { + option (method_description) = "Asks the server for a list of refresh tokens associated with an account"; + } + + rpc RevokeToken (.CAuthenticationSupport_RevokeToken_Request) returns (.CAuthenticationSupport_RevokeToken_Response) { + option (method_description) = "Revokes a user's auth token"; + } + + rpc GetTokenHistory (.CAuthenticationSupport_GetTokenHistory_Request) returns (.CAuthenticationSupport_GetTokenHistory_Response) { + option (method_description) = "Gets the audit history for a user's auth token"; + } +} + +service CloudGaming { + option (service_description) = "Methods for Steam cloud gaming operations"; + + rpc CreateNonce (.CCloudGaming_CreateNonce_Request) returns (.CCloudGaming_CreateNonce_Response) { + option (method_description) = "Create a nonce for a cloud gaming service session"; + } + + rpc GetTimeRemaining (.CCloudGaming_GetTimeRemaining_Request) returns (.CCloudGaming_GetTimeRemaining_Response) { + option (method_description) = "Get the amount of streaming time remaining for a set of apps"; + } +} diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto index 9336f579..ddff3d46 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto @@ -3,7 +3,7 @@ import "google/protobuf/descriptor.proto"; option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; option optimize_for = SPEED; -option java_generic_services = true; +option java_generic_services = false; option (force_php_generation) = true; extend .google.protobuf.MessageOptions { @@ -20,6 +20,17 @@ extend .google.protobuf.FieldOptions { optional bool allow_field_named_steam_id = 50024 [default = false]; } +enum EBanContentCheckResult { + k_EBanContentCheckResult_NotScanned = 0; + k_EBanContentCheckResult_Reset = 1; + k_EBanContentCheckResult_NeedsChecking = 2; + k_EBanContentCheckResult_VeryUnlikely = 5; + k_EBanContentCheckResult_Unlikely = 30; + k_EBanContentCheckResult_Possible = 50; + k_EBanContentCheckResult_Likely = 75; + k_EBanContentCheckResult_VeryLikely = 100; +} + enum EProtoClanEventType { k_EClanOtherEvent = 1; k_EClanGameEvent = 2; @@ -77,6 +88,11 @@ message CMsgIPAddressBucket { optional fixed64 bucket = 2; } +message CMsgGCRoutingProtoBufHeader { + optional uint64 dst_gcid_queue = 1; + optional uint32 dst_gc_dir_index = 2; +} + message CMsgProtoBufHeader { optional fixed64 steamid = 1; optional int32 client_sessionid = 2; @@ -99,9 +115,13 @@ 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; optional uint32 launcher_type = 31 [default = 0]; optional uint32 realm = 32 [default = 0]; + optional int32 timeout_ms = 33 [default = -1]; + optional string debug_source = 34; + optional uint32 debug_source_string_index = 35; + optional uint64 token_id = 36; + optional .CMsgGCRoutingProtoBufHeader routing_gc = 37; oneof ip_addr { uint32 ip = 15; @@ -126,14 +146,13 @@ message CMsgAuthTicket { optional uint32 h_steam_pipe = 5; optional uint32 ticket_crc = 6; optional bytes ticket = 7; + optional bytes server_secret = 8; } message CCDDBAppDetailCommon { optional uint32 appid = 1; optional string name = 2; optional string icon = 3; - optional string logo = 4; - optional string logo_small = 5; optional bool tool = 6; optional bool demo = 7; optional bool media = 8; @@ -142,6 +161,9 @@ message CCDDBAppDetailCommon { optional string propagation = 11; optional bool has_adult_content = 12; optional bool is_visible_in_steam_china = 13; + optional uint32 app_type = 14; + optional bool has_adult_content_sex = 15; + optional bool has_adult_content_violence = 16; } message CMsgAppRights { @@ -222,6 +244,8 @@ message CCommunity_ClanAnnouncementInfo { optional fixed64 event_gid = 13; optional int32 voteupcount = 14; optional int32 votedowncount = 15; + optional .EBanContentCheckResult ban_check_result = 16 [default = k_EBanContentCheckResult_NotScanned]; + optional bool banned = 17; } message CClanEventData { @@ -280,3 +304,12 @@ message CPackageReservationStatus { optional uint32 time_expires = 7; optional uint32 time_reserved = 8; } + +message CMsgKeyValuePair { + optional string name = 1; + optional string value = 2; +} + +message CMsgKeyValueSet { + repeated .CMsgKeyValuePair pairs = 1; +} diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_chat.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_chat.steamclient.proto index ab98eddd..9f7ec371 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_chat.steamclient.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_chat.steamclient.proto @@ -3,7 +3,8 @@ import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_ option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; -option java_generic_services = true; +option optimize_for = SPEED; +option java_generic_services = false; enum EChatRoomJoinState { k_EChatRoomJoinState_Default = 0; diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver.proto index dbea200b..a68b8588 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver.proto @@ -88,6 +88,12 @@ message CMsgClientGameConnectTokens { } message CMsgClientGamesPlayed { + message ProcessInfo { + optional uint32 process_id = 1; + optional uint32 process_id_parent = 2; + optional bool parent_is_steam = 3; + } + message GamePlayed { optional uint64 steam_id_gs = 1; optional fixed64 game_id = 2; @@ -114,11 +120,19 @@ message CMsgClientGamesPlayed { optional .CMsgIPAddress game_ip_address = 23; optional uint32 controller_connection_type = 24 [default = 0]; optional int32 game_os_platform = 25; + optional uint32 game_build_id = 26; + optional uint32 compat_tool_id = 27 [default = 0]; + optional string compat_tool_cmd = 28; + optional uint32 compat_tool_build_id = 29; + optional string beta_name = 30; + optional uint32 dlc_context = 31; + repeated .CMsgClientGamesPlayed.ProcessInfo process_id_list = 32; } repeated .CMsgClientGamesPlayed.GamePlayed games_played = 1; optional uint32 client_os_type = 2; optional uint32 cloud_gaming_platform = 3; + optional bool recent_reauthentication = 4; } message CMsgGSApprove { @@ -233,6 +247,10 @@ message CMsgClientConnectionStats { optional uint32 seconds_running = 5; optional uint32 msec_tologonthistime = 6; optional uint32 count_bad_cms = 7; + optional bool no_udp_connectivity = 8; + optional bool no_tcp_connectivity = 9; + optional bool no_websocket_443_connectivity = 10; + optional bool no_websocket_non_443_connectivity = 11; } message Stats_UDP { diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_2.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_2.proto index e0df78d1..aad3d5bf 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_2.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_2.proto @@ -607,8 +607,8 @@ message CMsgClientServiceMethodLegacyResponse { } message CMsgClientUIMode { - optional uint32 uimode = 1; - optional uint32 chat_mode = 2; + optional uint32 uimode = 1; // uimode set value: 1 = Big Picture, 0 = Desktop + optional uint32 chat_mode = 2; // chat_mode set value: 2 = Steam Unified Chat } message CMsgClientVanityURLChangedNotification { @@ -776,3 +776,14 @@ message CMsgBadgeCraftedNotification { optional uint32 appid = 1; optional uint32 badge_level = 2; } + +message CMsgClientStartPeerContentServer { + optional fixed64 steamid = 1; + optional fixed64 client_remote_id = 2; + optional uint32 app_id = 3; +} + +message CMsgClientStartPeerContentServerResponse { + optional uint32 result = 1; + optional uint32 server_port = 2; +} diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_gameservers.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_gameservers.proto index d13e9075..51538859 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_gameservers.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_gameservers.proto @@ -50,7 +50,6 @@ message CMsgGameServerData { } optional uint32 revision = 24; - optional fixed64 steam_id_gs = 1; optional uint32 query_port = 3; optional uint32 game_port = 4; optional uint32 spectator_port = 5; @@ -58,6 +57,7 @@ message CMsgGameServerData { optional string game_description = 29; optional string spectator_server_name = 27; optional fixed32 fake_ip = 28; + optional string sdr_ping_location = 30; optional uint32 app_id = 6; optional string gamedir = 7; optional string version = 8; @@ -99,6 +99,7 @@ message CMsgGMSClientServerQueryResponse { optional uint32 players = 8; optional uint32 game_port = 9; optional fixed32 sdr_popid = 10; + optional string sdr_ping_location = 32; optional uint32 flags = 11; optional uint32 app_id = 12; optional uint32 max_players = 13; diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_login.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_login.proto index 0377d7b9..68910464 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_login.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_login.proto @@ -26,6 +26,10 @@ message CMsgClientSecret { optional bytes hmac = 5; } +message CMsgClientHello { + optional uint32 protocol_version = 1; +} + message CMsgClientLogon { optional uint32 protocol_version = 1; optional uint32 deprecated_obfustucated_private_ip = 2; @@ -80,12 +84,16 @@ message CMsgClientLogon { optional int32 priority_reason = 104; optional .CMsgClientSecret embedded_client_secret = 105; optional bool disable_partner_autogrants = 106; + optional bool is_steam_deck = 107; + optional string access_token = 108; + optional bool is_chrome_os = 109; + optional bool is_tesla = 110; } message CMsgClientLogonResponse { optional int32 eresult = 1 [default = 2]; - optional int32 out_of_game_heartbeat_seconds = 2; - optional int32 in_game_heartbeat_seconds = 3; + optional int32 legacy_out_of_game_heartbeat_seconds = 2; + optional int32 heartbeat_seconds = 3; optional uint32 deprecated_public_ip = 4; optional fixed32 rtime32_server_time = 5; optional uint32 account_flags = 6; @@ -108,6 +116,7 @@ message CMsgClientLogonResponse { optional uint64 client_instance_id = 27; optional bool force_client_update_check = 28; optional string agreement_session_url = 29; + optional uint64 token_id = 30; } message CMsgClientRequestWebAPIAuthenticateUserNonce { @@ -143,7 +152,6 @@ message CMsgClientAccountInfo { optional uint32 account_flags = 7; optional uint64 facebook_id = 8; optional string facebook_name = 9; - optional bool steamguard_notify_newmachines = 14; optional string steamguard_machine_name_user_chosen = 15; optional bool is_phone_verified = 16; optional uint32 two_factor_state = 17; diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_uds.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_uds.proto index 52043417..a1f12e2b 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_uds.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_clientserver_uds.proto @@ -34,13 +34,14 @@ message CMsgClientGetClientDetailsResponse { } optional uint32 package_version = 1; - optional uint32 protocol_version = 8; optional string os = 2; optional string machine_name = 3; optional string ip_public = 4; optional string ip_private = 5; - optional uint64 bytes_available = 7; repeated .CMsgClientGetClientDetailsResponse.Game games_running = 6; + optional uint64 bytes_available = 7; + optional uint32 protocol_version = 8; + optional uint32 clientcomm_version = 9; } message CMsgClientGetClientAppList { @@ -50,6 +51,7 @@ message CMsgClientGetClientAppList { optional bool only_installed = 4; optional bool only_changing = 5; optional bool comics = 6; + optional bool include_client_info = 7; } message CMsgClientGetClientAppListResponse { @@ -66,18 +68,28 @@ message CMsgClientGetClientAppListResponse { optional bool installed = 4; optional bool auto_update = 5; optional uint64 bytes_downloaded = 6; - optional uint64 bytes_needed = 7; + optional uint64 bytes_to_download = 7; optional uint32 bytes_download_rate = 8; + repeated .CMsgClientGetClientAppListResponse.App.DLC dlcs = 9; optional bool download_paused = 11; optional uint32 num_downloading = 12; optional uint32 num_paused = 13; optional bool changing = 14; optional bool available_on_platform = 15; - repeated .CMsgClientGetClientAppListResponse.App.DLC dlcs = 9; + optional uint64 bytes_staged = 16; + optional uint64 bytes_to_stage = 17; + optional uint64 bytes_required = 18; + optional uint32 source_buildid = 19; + optional uint32 target_buildid = 20; + optional uint32 estimated_seconds_remaining = 21; + optional int32 queue_position = 22; + optional bool uninstalling = 23; + optional uint32 rt_time_scheduled = 24; } repeated .CMsgClientGetClientAppListResponse.App apps = 1; optional uint64 bytes_available = 2; + optional .CMsgClientGetClientDetailsResponse client_info = 3; } message CMsgClientInstallClientApp { @@ -104,3 +116,11 @@ message CMsgClientSetClientAppUpdateState { message CMsgClientSetClientAppUpdateStateResponse { optional uint32 result = 1; } + +message CMsgClientEnableOrDisableDownloads { + optional bool enable = 1; +} + +message CMsgClientEnableOrDisableDownloadsResponse { + optional uint32 result = 1; +} diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_contentsystem.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_contentsystem.steamclient.proto new file mode 100644 index 00000000..27aa4c9a --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_contentsystem.steamclient.proto @@ -0,0 +1,104 @@ +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base.steamclient.proto"; + +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +message CContentServerDirectory_GetServersForSteamPipe_Request { + optional uint32 cell_id = 1 [(description) = "client Cell ID"]; + optional uint32 max_servers = 2 [default = 20, (description) = "max servers in response list"]; + optional string ip_override = 3 [(description) = "client IP address"]; + optional int32 launcher_type = 4 [default = 0, (description) = "launcher type"]; + optional string ipv6_public = 5 [(description) = "client public ipv6 address if it knows it"]; +} + +message CContentServerDirectory_ServerInfo { + optional string type = 1; + optional int32 source_id = 2; + optional int32 cell_id = 3; + optional int32 load = 4; + optional float weighted_load = 5; + optional int32 num_entries_in_client_list = 6; + optional bool steam_china_only = 7; + optional string host = 8; + optional string vhost = 9; + optional bool use_as_proxy = 10; + optional string proxy_request_path_template = 11; + optional string https_support = 12; + repeated uint32 allowed_app_ids = 13; + optional bool preferred_server = 14; +} + +message CContentServerDirectory_GetServersForSteamPipe_Response { + repeated .CContentServerDirectory_ServerInfo servers = 1; +} + +message CContentServerDirectory_GetDepotPatchInfo_Request { + optional uint32 appid = 1; + optional uint32 depotid = 2; + optional uint64 source_manifestid = 3; + optional uint64 target_manifestid = 4; +} + +message CContentServerDirectory_GetDepotPatchInfo_Response { + optional bool is_available = 1; + optional uint64 patch_size = 2; + optional uint64 patched_chunks_size = 3; +} + +message CContentServerDirectory_GetClientUpdateHosts_Request { + optional string cached_signature = 1; +} + +message CContentServerDirectory_GetClientUpdateHosts_Response { + optional string hosts_kv = 1; + optional uint64 valid_until_time = 2; + optional string ip_country = 3; +} + +message CContentServerDirectory_GetManifestRequestCode_Request { + optional uint32 app_id = 1; + optional uint32 depot_id = 2; + optional uint64 manifest_id = 3; + optional string app_branch = 4; + optional string branch_password_hash = 5; +} + +message CContentServerDirectory_GetManifestRequestCode_Response { + optional uint64 manifest_request_code = 1; +} + +message CContentServerDirectory_GetCDNAuthToken_Request { + optional uint32 depot_id = 1; + optional string host_name = 2; + optional uint32 app_id = 3; +} + +message CContentServerDirectory_GetCDNAuthToken_Response { + optional string token = 1; + optional uint32 expiration_time = 2; +} + +message CContentServerDirectory_RequestPeerContentServer_Request { + optional uint64 remote_client_id = 1; + optional uint64 server_steam_id = 2; + optional uint64 server_remote_client_id = 3; + optional uint32 app_id = 4; +} + +message CContentServerDirectory_RequestPeerContentServer_Response { + optional uint32 server_port = 1; +} + +service ContentServerDirectory { + option (service_description) = "Content Server and CDN directory"; + + rpc GetServersForSteamPipe (.CContentServerDirectory_GetServersForSteamPipe_Request) returns (.CContentServerDirectory_GetServersForSteamPipe_Response); + rpc GetDepotPatchInfo (.CContentServerDirectory_GetDepotPatchInfo_Request) returns (.CContentServerDirectory_GetDepotPatchInfo_Response); + rpc GetClientUpdateHosts (.CContentServerDirectory_GetClientUpdateHosts_Request) returns (.CContentServerDirectory_GetClientUpdateHosts_Response); + rpc GetManifestRequestCode (.CContentServerDirectory_GetManifestRequestCode_Request) returns (.CContentServerDirectory_GetManifestRequestCode_Response); + rpc GetCDNAuthToken (.CContentServerDirectory_GetCDNAuthToken_Request) returns (.CContentServerDirectory_GetCDNAuthToken_Response); + rpc RequestPeerContentServer (.CContentServerDirectory_RequestPeerContentServer_Request) returns (.CContentServerDirectory_RequestPeerContentServer_Response); +} \ No newline at end of file diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_friendmessages.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_friendmessages.steamclient.proto index f66d9584..e4142543 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_friendmessages.steamclient.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_friendmessages.steamclient.proto @@ -2,7 +2,8 @@ import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base. option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; -option java_generic_services = true; +option optimize_for = SPEED; +option java_generic_services = false; enum EMessageReactionType { k_EMessageReactionType_Invalid = 0; diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_parental.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_parental.steamclient.proto index e56529d4..4e3be3ce 100644 --- a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_parental.steamclient.proto +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_parental.steamclient.proto @@ -2,7 +2,8 @@ import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base. option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; -option java_generic_services = true; +option optimize_for = SPEED; +option java_generic_services = false; message ParentalApp { optional uint32 appid = 1; diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_player.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_player.steamclient.proto new file mode 100644 index 00000000..f2057785 --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_player.steamclient.proto @@ -0,0 +1,986 @@ +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base.steamclient.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/enums.proto"; + +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +enum EProfileCustomizationStyle { + k_EProfileCustomizationStyleDefault = 0; + k_EProfileCustomizationStyleSelected = 1; + k_EProfileCustomizationStyleRarest = 2; + k_EProfileCustomizationStyleMostRecent = 3; + k_EProfileCustomizationStyleRandom = 4; + k_EProfileCustomizationStyleHighestRated = 5; +} + +enum EAgreementType { + k_EAgreementType_Invalid = -1; + k_EAgreementType_GlobalSSA = 0; + k_EAgreementType_ChinaSSA = 1; +} + +enum ENotificationSetting { + k_ENotificationSettingNotifyUseDefault = 0; + k_ENotificationSettingAlways = 1; + k_ENotificationSettingNever = 2; +} + +enum ETextFilterSetting { + k_ETextFilterSettingSteamLabOptedOut = 0; + k_ETextFilterSettingEnabled = 1; + k_ETextFilterSettingEnabledAllowProfanity = 2; + k_ETextFilterSettingDisabled = 3; +} + +message CPlayer_GetMutualFriendsForIncomingInvites_Request { +} + +message CPlayer_IncomingInviteMutualFriendList { + optional fixed64 steamid = 1; + repeated uint32 mutual_friend_account_ids = 2; +} + +message CPlayer_GetMutualFriendsForIncomingInvites_Response { + repeated .CPlayer_IncomingInviteMutualFriendList incoming_invite_mutual_friends_lists = 1; +} + +message CPlayer_GetOwnedGames_Request { + optional uint64 steamid = 1 [(description) = "The player we're asking about"]; + optional bool include_appinfo = 2 [(description) = "true if we want additional details (name, icon) about each game"]; + optional bool include_played_free_games = 3 [(description) = "Free games are excluded by default. If this is set, free games the user has played will be returned."]; + repeated uint32 appids_filter = 4 [(description) = "if set, restricts result set to the passed in apps"]; + optional bool include_free_sub = 5 [(description) = "Some games are in the free sub, which are excluded by default."]; + optional bool skip_unvetted_apps = 6 [default = true, (description) = "if set, skip unvetted store apps"]; + optional string language = 7 [(description) = "Will return appinfo in this language"]; + optional bool include_extended_appinfo = 8 [(description) = "true if we want even more details (capsule, sortas, and capabilities) about each game. include_appinfo must also be true."]; +} + +message CPlayer_GetOwnedGames_Response { + message Game { + optional int32 appid = 1; + optional string name = 2; + optional int32 playtime_2weeks = 3; + optional int32 playtime_forever = 4; + optional string img_icon_url = 5; + optional bool has_community_visible_stats = 7; + optional int32 playtime_windows_forever = 8; + optional int32 playtime_mac_forever = 9; + optional int32 playtime_linux_forever = 10; + optional uint32 rtime_last_played = 11; + optional string capsule_filename = 12; + optional string sort_as = 13; + optional bool has_workshop = 14; + optional bool has_market = 15; + optional bool has_dlc = 16; + optional bool has_leaderboards = 17; + } + + optional uint32 game_count = 1; + repeated .CPlayer_GetOwnedGames_Response.Game games = 2; +} + +message CPlayer_GetPlayNext_Request { + optional uint32 max_age_seconds = 1; + repeated uint32 ignore_appids = 2; +} + +message CPlayer_GetPlayNext_Response { + optional uint32 last_update_time = 1; + repeated uint32 appids = 2; +} + +message CPlayer_GetFriendsGameplayInfo_Request { + optional uint32 appid = 1; +} + +message CPlayer_GetFriendsGameplayInfo_Response { + message FriendsGameplayInfo { + optional fixed64 steamid = 1; + optional uint32 minutes_played = 2; + optional uint32 minutes_played_forever = 3; + } + + message OwnGameplayInfo { + optional fixed64 steamid = 1; + optional uint32 minutes_played = 2; + optional uint32 minutes_played_forever = 3; + optional bool in_wishlist = 4; + optional bool owned = 5; + } + + optional .CPlayer_GetFriendsGameplayInfo_Response.OwnGameplayInfo your_info = 1; + repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo in_game = 2; + repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo played_recently = 3; + repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo played_ever = 4; + repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo owns = 5; + repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo in_wishlist = 6; +} + +message CPlayer_GetGameBadgeLevels_Request { + optional uint32 appid = 1; +} + +message CPlayer_GetGameBadgeLevels_Response { + message Badge { + optional int32 level = 1; + optional int32 series = 2; + optional uint32 border_color = 3; + } + + optional uint32 player_level = 1; + repeated .CPlayer_GetGameBadgeLevels_Response.Badge badges = 2; +} + +message CPlayer_GetProfileBackground_Request { + optional fixed64 steamid = 1 [(description) = "The player we're asking about"]; + optional string language = 2; +} + +message ProfileItem { + message ProfileColor { + optional string style_name = 1 [(description) = "EProfileColorStyle string version"]; + optional string color = 2 [(description) = "hex color to apply"]; + } + + optional uint64 communityitemid = 1; + optional string image_small = 2 [(description) = "small image used in backpack or selection"]; + optional string image_large = 3 [(description) = "the image itself"]; + optional string name = 4 [(description) = "english name"]; + optional string item_title = 5 [(description) = "localized title"]; + optional string item_description = 6 [(description) = "localized description"]; + optional uint32 appid = 7; + optional uint32 item_type = 8; + optional uint32 item_class = 9; + optional string movie_webm = 10 [(description) = "URL to webm, if any"]; + optional string movie_mp4 = 11 [(description) = "URL to mp4, if any"]; + optional string movie_webm_small = 13 [(description) = "URL to small webm, if any"]; + optional string movie_mp4_small = 14 [(description) = "URL to small mp4, if any"]; + optional uint32 equipped_flags = 12 [(description) = "Special flags set when equipped (EProfileItemEquippedFlag)"]; + repeated .ProfileItem.ProfileColor profile_colors = 15 [(description) = "Game profile css colors"]; +} + +message CPlayer_GetProfileBackground_Response { + optional .ProfileItem profile_background = 1; +} + +message CPlayer_SetProfileBackground_Request { + optional uint64 communityitemid = 1; +} + +message CPlayer_SetProfileBackground_Response { +} + +message CPlayer_GetMiniProfileBackground_Request { + optional fixed64 steamid = 1 [(description) = "The player we're asking about"]; + optional string language = 2; +} + +message CPlayer_GetMiniProfileBackground_Response { + optional .ProfileItem profile_background = 1; +} + +message CPlayer_SetMiniProfileBackground_Request { + optional uint64 communityitemid = 1; +} + +message CPlayer_SetMiniProfileBackground_Response { +} + +message CPlayer_GetAvatarFrame_Request { + optional fixed64 steamid = 1 [(description) = "The player we're asking about"]; + optional string language = 2; +} + +message CPlayer_GetAvatarFrame_Response { + optional .ProfileItem avatar_frame = 1; +} + +message CPlayer_SetAvatarFrame_Request { + optional uint64 communityitemid = 1; +} + +message CPlayer_SetAvatarFrame_Response { +} + +message CPlayer_GetAnimatedAvatar_Request { + optional fixed64 steamid = 1 [(description) = "The player we're asking about"]; + optional string language = 2; +} + +message CPlayer_GetAnimatedAvatar_Response { + optional .ProfileItem avatar = 1; +} + +message CPlayer_SetAnimatedAvatar_Request { + optional uint64 communityitemid = 1; +} + +message CPlayer_SetAnimatedAvatar_Response { +} + +message CPlayer_GetSteamDeckKeyboardSkin_Request { + optional fixed64 steamid = 1 [(description) = "The player we're asking about"]; + optional string language = 2; +} + +message CPlayer_GetSteamDeckKeyboardSkin_Response { + optional .ProfileItem steam_deck_keyboard_skin = 1; +} + +message CPlayer_SetSteamDeckKeyboardSkin_Request { + optional uint64 communityitemid = 1; +} + +message CPlayer_SetSteamDeckKeyboardSkin_Response { +} + +message CPlayer_GetProfileItemsOwned_Request { + optional string language = 1; + repeated .ECommunityItemClass filters = 2; +} + +message CPlayer_GetProfileItemsOwned_Response { + repeated .ProfileItem profile_backgrounds = 1; + repeated .ProfileItem mini_profile_backgrounds = 2; + repeated .ProfileItem avatar_frames = 3; + repeated .ProfileItem animated_avatars = 4; + repeated .ProfileItem profile_modifiers = 5; + repeated .ProfileItem steam_deck_keyboard_skins = 6; + repeated .ProfileItem steam_deck_startup_movies = 7; +} + +message CPlayer_GetProfileItemsEquipped_Request { + optional fixed64 steamid = 1; + optional string language = 2; +} + +message CPlayer_GetProfileItemsEquipped_Response { + optional .ProfileItem profile_background = 1; + optional .ProfileItem mini_profile_background = 2; + optional .ProfileItem avatar_frame = 3; + optional .ProfileItem animated_avatar = 4; + optional .ProfileItem profile_modifier = 5; + optional .ProfileItem steam_deck_keyboard_skin = 6; +} + +message CPlayer_SetEquippedProfileItemFlags_Request { + optional uint64 communityitemid = 1; + optional uint32 flags = 2 [(description) = "Set of EProfileItemEquippedFlag"]; +} + +message CPlayer_SetEquippedProfileItemFlags_Response { +} + +message CPlayer_GetEmoticonList_Request { +} + +message CPlayer_GetEmoticonList_Response { + message Emoticon { + optional string name = 1; + optional int32 count = 2; + optional uint32 time_last_used = 3; + optional uint32 use_count = 4; + optional uint32 time_received = 5; + optional uint32 appid = 6; + } + + repeated .CPlayer_GetEmoticonList_Response.Emoticon emoticons = 1; +} + +message CPlayer_GetTopAchievementsForGames_Request { + optional uint64 steamid = 1; + optional string language = 2; + optional uint32 max_achievements = 3 [(description) = "The max achievements to load. Max 8"]; + repeated uint32 appids = 4; +} + +message CPlayer_GetTopAchievementsForGames_Response { + message Achievement { + optional uint32 statid = 1; + optional uint32 bit = 2; + optional string name = 3; + optional string desc = 4; + optional string icon = 5; + optional string icon_gray = 6; + optional bool hidden = 7; + optional string player_percent_unlocked = 8 [(description) = "Formatted to one decimal place, min value is 0.1, max value 100"]; + } + + message Game { + optional uint32 appid = 1; + optional uint32 total_achievements = 2; + repeated .CPlayer_GetTopAchievementsForGames_Response.Achievement achievements = 3; + } + + repeated .CPlayer_GetTopAchievementsForGames_Response.Game games = 1; +} + +message CPlayer_GetAchievementsProgress_Request { + optional uint64 steamid = 1; + optional string language = 2; + repeated uint32 appids = 3; +} + +message CPlayer_GetAchievementsProgress_Response { + message AchievementProgress { + optional uint32 appid = 1; + optional uint32 unlocked = 2; + optional uint32 total = 3; + optional float percentage = 4; + optional bool all_unlocked = 5; + optional uint32 cache_time = 6; + } + + repeated .CPlayer_GetAchievementsProgress_Response.AchievementProgress achievement_progress = 1; +} + +message CPlayer_GetGameAchievements_Request { + optional uint32 appid = 1; + optional string language = 2 [(description) = "Lowercase, language shortnames"]; +} + +message CPlayer_GetGameAchievements_Response { + message Achievement { + optional string internal_name = 1 [(description) = "Will come uppercase, internal facing name set by the partner; needed to associate with user unlock"]; + optional string localized_name = 2; + optional string localized_desc = 3; + optional string icon = 4; + optional string icon_gray = 5; + optional bool hidden = 6; + optional string player_percent_unlocked = 7 [(description) = "Formatted to one decimal place, min value is 0.1, max value 100"]; + } + + repeated .CPlayer_GetGameAchievements_Response.Achievement achievements = 1; +} + +message CPlayer_GetFavoriteBadge_Request { + optional uint64 steamid = 1; +} + +message CPlayer_GetFavoriteBadge_Response { + optional bool has_favorite_badge = 1; + optional uint32 badgeid = 2; + optional uint64 communityitemid = 3; + optional uint32 item_type = 4; + optional uint32 border_color = 5; + optional uint32 appid = 6; + optional uint32 level = 7; +} + +message CPlayer_SetFavoriteBadge_Request { + optional uint64 communityitemid = 1; + optional uint32 badgeid = 2; +} + +message CPlayer_SetFavoriteBadge_Response { +} + +message CPlayer_GetProfileCustomization_Request { + optional fixed64 steamid = 1; + optional bool include_inactive_customizations = 2; + optional bool include_purchased_customizations = 3; +} + +message ProfileCustomizationSlot { + optional uint32 slot = 1; + optional uint32 appid = 2; + optional uint64 publishedfileid = 3; + optional uint64 item_assetid = 4; + optional uint64 item_contextid = 5; + optional string notes = 6; + optional string title = 7; + optional uint32 accountid = 8; + optional uint32 badgeid = 9; + optional uint32 border_color = 10; + optional uint64 item_classid = 11; + optional uint64 item_instanceid = 12; + optional .EBanContentCheckResult ban_check_result = 13 [default = k_EBanContentCheckResult_NotScanned]; +} + +message ProfileCustomization { + optional .EProfileCustomizationType customization_type = 1 [default = k_EProfileCustomizationTypeInvalid]; + optional bool large = 2; + repeated .ProfileCustomizationSlot slots = 3; + optional bool active = 4; + optional .EProfileCustomizationStyle customization_style = 5 [default = k_EProfileCustomizationStyleDefault]; + optional uint64 purchaseid = 6; + optional uint32 level = 7; +} + +message ProfileTheme { + optional string theme_id = 1; + optional string title = 2; +} + +message ProfilePreferences { + optional bool hide_profile_awards = 1; +} + +message CPlayer_GetProfileCustomization_Response { + message PurchasedCustomization { + optional uint64 purchaseid = 1; + optional .EProfileCustomizationType customization_type = 2 [default = k_EProfileCustomizationTypeInvalid]; + optional uint32 level = 3; + } + + repeated .ProfileCustomization customizations = 1; + optional uint32 slots_available = 2; + optional .ProfileTheme profile_theme = 3; + repeated .CPlayer_GetProfileCustomization_Response.PurchasedCustomization purchased_customizations = 4; + optional .ProfilePreferences profile_preferences = 5; +} + +message CPlayer_GetPurchasedProfileCustomizations_Request { + optional fixed64 steamid = 1; +} + +message CPlayer_GetPurchasedProfileCustomizations_Response { + message PurchasedCustomization { + optional uint64 purchaseid = 1; + optional .EProfileCustomizationType customization_type = 2 [default = k_EProfileCustomizationTypeInvalid]; + } + + repeated .CPlayer_GetPurchasedProfileCustomizations_Response.PurchasedCustomization purchased_customizations = 1; +} + +message CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Request { + optional fixed64 steamid = 1; +} + +message CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Response { + message PurchasedCustomization { + optional .EProfileCustomizationType customization_type = 1 [default = k_EProfileCustomizationTypeInvalid]; + optional uint32 count = 2; + } + + message UpgradedCustomization { + optional .EProfileCustomizationType customization_type = 1 [default = k_EProfileCustomizationTypeInvalid]; + optional uint32 level = 2; + } + + repeated .CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Response.PurchasedCustomization purchased_customizations = 1; + repeated .CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Response.UpgradedCustomization upgraded_customizations = 2; +} + +message CPlayer_GetProfileThemesAvailable_Request { +} + +message CPlayer_GetProfileThemesAvailable_Response { + repeated .ProfileTheme profile_themes = 1; +} + +message CPlayer_SetProfileTheme_Request { + optional string theme_id = 1; +} + +message CPlayer_SetProfileTheme_Response { +} + +message CPlayer_SetProfilePreferences_Request { + optional .ProfilePreferences profile_preferences = 1; +} + +message CPlayer_SetProfilePreferences_Response { +} + +message CPlayer_PostStatusToFriends_Request { + optional uint32 appid = 1; + optional string status_text = 2; +} + +message CPlayer_PostStatusToFriends_Response { +} + +message CPlayer_GetPostedStatus_Request { + optional uint64 steamid = 1 [(description) = "The player we're asking about"]; + optional uint64 postid = 2; +} + +message CPlayer_GetPostedStatus_Response { + optional uint32 accountid = 1; + optional uint64 postid = 2; + optional string status_text = 3; + optional bool deleted = 4; + optional uint32 appid = 5; +} + +message CPlayer_DeletePostedStatus_Request { + optional uint64 postid = 1; +} + +message CPlayer_DeletePostedStatus_Response { +} + +message CPlayer_GetLastPlayedTimes_Request { + optional uint32 min_last_played = 1 [(description) = "The most recent last-played time the client already knows about"]; +} + +message CPlayer_GetLastPlayedTimes_Response { + message Game { + optional int32 appid = 1; + optional uint32 last_playtime = 2; + optional int32 playtime_2weeks = 3; + optional int32 playtime_forever = 4; + optional uint32 first_playtime = 5; + optional int32 playtime_windows_forever = 6; + optional int32 playtime_mac_forever = 7; + optional int32 playtime_linux_forever = 8; + optional uint32 first_windows_playtime = 9; + optional uint32 first_mac_playtime = 10; + optional uint32 first_linux_playtime = 11; + optional uint32 last_windows_playtime = 12; + optional uint32 last_mac_playtime = 13; + optional uint32 last_linux_playtime = 14; + } + + repeated .CPlayer_GetLastPlayedTimes_Response.Game games = 1; +} + +message CPlayer_GetTimeSSAAccepted_Request { +} + +message CPlayer_GetTimeSSAAccepted_Response { + optional uint32 time_ssa_accepted = 1; + optional uint32 time_ssa_updated = 2; + optional uint32 time_chinassa_accepted = 3; +} + +message CPlayer_AcceptSSA_Request { + optional .EAgreementType agreement_type = 1 [default = k_EAgreementType_Invalid]; + optional uint32 time_signed_utc = 2; +} + +message CPlayer_AcceptSSA_Response { +} + +message CPlayer_GetNicknameList_Request { +} + +message CPlayer_GetNicknameList_Response { + message PlayerNickname { + optional fixed32 accountid = 1; + optional string nickname = 2; + } + + repeated .CPlayer_GetNicknameList_Response.PlayerNickname nicknames = 1; +} + +message CPlayer_GetPerFriendPreferences_Request { +} + +message PerFriendPreferences { + optional fixed32 accountid = 1; + optional string nickname = 2; + optional .ENotificationSetting notifications_showingame = 3 [default = k_ENotificationSettingNotifyUseDefault]; + optional .ENotificationSetting notifications_showonline = 4 [default = k_ENotificationSettingNotifyUseDefault]; + optional .ENotificationSetting notifications_showmessages = 5 [default = k_ENotificationSettingNotifyUseDefault]; + optional .ENotificationSetting sounds_showingame = 6 [default = k_ENotificationSettingNotifyUseDefault]; + optional .ENotificationSetting sounds_showonline = 7 [default = k_ENotificationSettingNotifyUseDefault]; + optional .ENotificationSetting sounds_showmessages = 8 [default = k_ENotificationSettingNotifyUseDefault]; + optional .ENotificationSetting notifications_sendmobile = 9 [default = k_ENotificationSettingNotifyUseDefault]; +} + +message CPlayer_GetPerFriendPreferences_Response { + repeated .PerFriendPreferences preferences = 1; +} + +message CPlayer_SetPerFriendPreferences_Request { + optional .PerFriendPreferences preferences = 1; +} + +message CPlayer_SetPerFriendPreferences_Response { +} + +message CPlayer_AddFriend_Request { + optional fixed64 steamid = 1 [(description) = "Steam ID of user to whom to send a friend invite."]; +} + +message CPlayer_AddFriend_Response { + optional bool invite_sent = 1 [(description) = "True if the operation was successful, false otherwise."]; + optional uint32 friend_relationship = 2 [(description) = "the resulting relationship. Depending on state, may move directly to friends rather than invite sent"]; + optional int32 result = 3; +} + +message CPlayer_RemoveFriend_Request { + optional fixed64 steamid = 1 [(description) = "Steam ID of friend to remove."]; +} + +message CPlayer_RemoveFriend_Response { + optional uint32 friend_relationship = 1 [(description) = "the resulting relationship"]; +} + +message CPlayer_IgnoreFriend_Request { + optional fixed64 steamid = 1; + optional bool unignore = 2 [(description) = "If set, remove from ignore/block list instead of adding "]; +} + +message CPlayer_IgnoreFriend_Response { + optional uint32 friend_relationship = 1 [(description) = "the resulting relationship"]; +} + +message CPlayer_GetCommunityPreferences_Request { +} + +message CPlayer_CommunityPreferences { + optional bool hide_adult_content_violence = 1 [default = true]; + optional bool hide_adult_content_sex = 2 [default = true]; + optional bool parenthesize_nicknames = 4 [default = false]; + optional .ETextFilterSetting text_filter_setting = 5 [default = k_ETextFilterSettingSteamLabOptedOut]; + optional bool text_filter_ignore_friends = 6 [default = true]; + optional uint32 text_filter_words_revision = 7; + optional uint32 timestamp_updated = 3; +} + +message CPlayer_GetCommunityPreferences_Response { + optional .CPlayer_CommunityPreferences preferences = 1; +} + +message CPlayer_SetCommunityPreferences_Request { + optional .CPlayer_CommunityPreferences preferences = 1; +} + +message CPlayer_SetCommunityPreferences_Response { +} + +message CPlayer_GetTextFilterWords_Request { +} + +message CPlayer_TextFilterWords { + repeated string text_filter_custom_banned_words = 1; + repeated string text_filter_custom_clean_words = 2; + optional uint32 text_filter_words_revision = 3; +} + +message CPlayer_GetTextFilterWords_Response { + optional .CPlayer_TextFilterWords words = 1; +} + +message CPlayer_GetNewSteamAnnouncementState_Request { + optional int32 language = 1; +} + +message CPlayer_GetNewSteamAnnouncementState_Response { + optional .ENewSteamAnnouncementState state = 1 [default = k_ENewSteamAnnouncementState_Invalid]; + optional string announcement_headline = 2; + optional string announcement_url = 3; + optional uint32 time_posted = 4; + optional uint64 announcement_gid = 5; +} + +message CPlayer_UpdateSteamAnnouncementLastRead_Request { + optional uint64 announcement_gid = 1; + optional uint32 time_posted = 2; +} + +message CPlayer_UpdateSteamAnnouncementLastRead_Response { +} + +message CPlayer_GetPrivacySettings_Request { +} + +message CPrivacySettings { + optional int32 privacy_state = 1; + optional int32 privacy_state_inventory = 2; + optional int32 privacy_state_gifts = 3; + optional int32 privacy_state_ownedgames = 4; + optional int32 privacy_state_playtime = 5; + optional int32 privacy_state_friendslist = 6; +} + +message CPlayer_GetPrivacySettings_Response { + optional .CPrivacySettings privacy_settings = 1; +} + +message CPlayer_GetDurationControl_Request { + optional uint32 appid = 1; +} + +message CPlayer_GetDurationControl_Response { + optional bool is_enabled = 1; + optional int32 seconds = 2; + optional int32 seconds_today = 3; + optional bool is_steamchina_account = 4; + optional bool is_age_verified = 5; + optional uint32 seconds_allowed_today = 6; + optional bool age_verification_pending = 7; + optional bool block_minors = 8; +} + +message CPlayer_LastPlayedTimes_Notification { + repeated .CPlayer_GetLastPlayedTimes_Response.Game games = 1; +} + +message CPlayer_FriendNicknameChanged_Notification { + optional fixed32 accountid = 1; + optional string nickname = 2; + optional bool is_echo_to_self = 3; +} + +message CPlayer_FriendEquippedProfileItemsChanged_Notification { + optional fixed32 accountid = 1; +} + +message CPlayer_NewSteamAnnouncementState_Notification { + optional .ENewSteamAnnouncementState state = 1 [default = k_ENewSteamAnnouncementState_Invalid]; + optional string announcement_headline = 2; + optional string announcement_url = 3; + optional uint32 time_posted = 4; + optional uint64 announcement_gid = 5; +} + +message CPlayer_CommunityPreferencesChanged_Notification { + optional .CPlayer_CommunityPreferences preferences = 1; +} + +message CPlayer_TextFilterWordsChanged_Notification { + optional .CPlayer_TextFilterWords words = 1; +} + +message CPlayer_PerFriendPreferencesChanged_Notification { + optional fixed32 accountid = 1; + optional .PerFriendPreferences preferences = 2; +} + +message CPlayer_PrivacySettingsChanged_Notification { + optional .CPrivacySettings privacy_settings = 1; +} + +service Player { + option (service_description) = "A service for accessing Steam player data"; + + rpc GetMutualFriendsForIncomingInvites (.CPlayer_GetMutualFriendsForIncomingInvites_Request) returns (.CPlayer_GetMutualFriendsForIncomingInvites_Response) { + option (method_description) = "Get me the mutual friends for each of my pending incoming invites (individuals and clans)."; + } + + rpc GetOwnedGames (.CPlayer_GetOwnedGames_Request) returns (.CPlayer_GetOwnedGames_Response) { + option (method_description) = "Return a list of games owned by the player"; + } + + rpc GetPlayNext (.CPlayer_GetPlayNext_Request) returns (.CPlayer_GetPlayNext_Response) { + option (method_description) = "Return suggested games for player to play next."; + } + + rpc GetFriendsGameplayInfo (.CPlayer_GetFriendsGameplayInfo_Request) returns (.CPlayer_GetFriendsGameplayInfo_Response) { + option (method_description) = "Get a list of friends who are playing, have played, own, or want a game"; + } + + rpc GetGameBadgeLevels (.CPlayer_GetGameBadgeLevels_Request) returns (.CPlayer_GetGameBadgeLevels_Response) { + option (method_description) = "Returns the Steam Level of a user, the Badge level for the game, and if it's foil"; + } + + rpc GetProfileBackground (.CPlayer_GetProfileBackground_Request) returns (.CPlayer_GetProfileBackground_Response) { + option (method_description) = "Gets which profile background is active for a specific user"; + } + + rpc SetProfileBackground (.CPlayer_SetProfileBackground_Request) returns (.CPlayer_SetProfileBackground_Response) { + option (method_description) = "Sets the user's profile background"; + } + + rpc GetMiniProfileBackground (.CPlayer_GetMiniProfileBackground_Request) returns (.CPlayer_GetMiniProfileBackground_Response) { + option (method_description) = "Gets which mini profile background is active for a specific user"; + } + + rpc SetMiniProfileBackground (.CPlayer_SetMiniProfileBackground_Request) returns (.CPlayer_SetMiniProfileBackground_Response) { + option (method_description) = "Sets the user's mini profile background"; + } + + rpc GetAvatarFrame (.CPlayer_GetAvatarFrame_Request) returns (.CPlayer_GetAvatarFrame_Response) { + option (method_description) = "Gets which avatar frame is active for a specific user"; + } + + rpc SetAvatarFrame (.CPlayer_SetAvatarFrame_Request) returns (.CPlayer_SetAvatarFrame_Response) { + option (method_description) = "Sets the user's avatar frame for their profile"; + } + + rpc GetAnimatedAvatar (.CPlayer_GetAnimatedAvatar_Request) returns (.CPlayer_GetAnimatedAvatar_Response) { + option (method_description) = "Gets which animated avatar is active for a specific user"; + } + + rpc SetAnimatedAvatar (.CPlayer_SetAnimatedAvatar_Request) returns (.CPlayer_SetAnimatedAvatar_Response) { + option (method_description) = "Sets the user's animated avatar for their profile"; + } + + rpc GetSteamDeckKeyboardSkin (.CPlayer_GetSteamDeckKeyboardSkin_Request) returns (.CPlayer_GetSteamDeckKeyboardSkin_Response) { + option (method_description) = "Gets which Steam Deck keyboard skin is active for a specific user"; + } + + rpc SetSteamDeckKeyboardSkin (.CPlayer_SetSteamDeckKeyboardSkin_Request) returns (.CPlayer_SetSteamDeckKeyboardSkin_Response) { + option (method_description) = "Sets the user's current Steam Deck keyboard skin"; + } + + rpc GetProfileItemsOwned (.CPlayer_GetProfileItemsOwned_Request) returns (.CPlayer_GetProfileItemsOwned_Response) { + option (method_description) = "Returns the items the user can equip on their profile"; + } + + rpc GetProfileItemsEquipped (.CPlayer_GetProfileItemsEquipped_Request) returns (.CPlayer_GetProfileItemsEquipped_Response) { + option (method_description) = "Returns the items the user has equipped on their profile"; + } + + rpc SetEquippedProfileItemFlags (.CPlayer_SetEquippedProfileItemFlags_Request) returns (.CPlayer_SetEquippedProfileItemFlags_Response) { + option (method_description) = "Sets special flags on the equipped item"; + } + + rpc GetEmoticonList (.CPlayer_GetEmoticonList_Request) returns (.CPlayer_GetEmoticonList_Response) { + option (method_description) = "Gets a list of the emoticons a user has with metadata"; + } + + rpc GetTopAchievementsForGames (.CPlayer_GetTopAchievementsForGames_Request) returns (.CPlayer_GetTopAchievementsForGames_Response) { + option (method_description) = "Gets the best achievements the user has gotten for the specified list of apps."; + } + + rpc GetAchievementsProgress (.CPlayer_GetAchievementsProgress_Request) returns (.CPlayer_GetAchievementsProgress_Response) { + option (method_description) = "Gets the achievement completion stats for the specified list of apps."; + } + + rpc GetGameAchievements (.CPlayer_GetGameAchievements_Request) returns (.CPlayer_GetGameAchievements_Response) { + option (method_description) = "Get a games available achievements for display purposes."; + } + + rpc GetFavoriteBadge (.CPlayer_GetFavoriteBadge_Request) returns (.CPlayer_GetFavoriteBadge_Response) { + option (method_description) = "Gets the badge the user has set as their favorite"; + } + + rpc SetFavoriteBadge (.CPlayer_SetFavoriteBadge_Request) returns (.CPlayer_SetFavoriteBadge_Response) { + option (method_description) = "Sets the badge as the users favorite"; + } + + rpc GetProfileCustomization (.CPlayer_GetProfileCustomization_Request) returns (.CPlayer_GetProfileCustomization_Response) { + option (method_description) = "Returns the customizations (if any) for a profile"; + } + + rpc GetPurchasedProfileCustomizations (.CPlayer_GetPurchasedProfileCustomizations_Request) returns (.CPlayer_GetPurchasedProfileCustomizations_Response) { + option (method_description) = "Returns the purchased profile customizations"; + } + + rpc GetPurchasedAndUpgradedProfileCustomizations (.CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Request) returns (.CPlayer_GetPurchasedAndUpgradedProfileCustomizations_Response) { + option (method_description) = "Returns the purchased and upgraded profile customizations"; + } + + rpc GetProfileThemesAvailable (.CPlayer_GetProfileThemesAvailable_Request) returns (.CPlayer_GetProfileThemesAvailable_Response) { + option (method_description) = "Gets themes available for the user."; + } + + rpc SetProfileTheme (.CPlayer_SetProfileTheme_Request) returns (.CPlayer_SetProfileTheme_Response) { + option (method_description) = "Selects a theme for the profile"; + } + + rpc SetProfilePreferences (.CPlayer_SetProfilePreferences_Request) returns (.CPlayer_SetProfilePreferences_Response) { + option (method_description) = "Sets profile preferences"; + } + + rpc PostStatusToFriends (.CPlayer_PostStatusToFriends_Request) returns (.CPlayer_PostStatusToFriends_Response) { + option (method_description) = "Posts custom status text into the blotter"; + } + + rpc GetPostedStatus (.CPlayer_GetPostedStatus_Request) returns (.CPlayer_GetPostedStatus_Response) { + option (method_description) = "Gets a posted status text for a user by id"; + } + + rpc DeletePostedStatus (.CPlayer_DeletePostedStatus_Request) returns (.CPlayer_DeletePostedStatus_Response) { + option (method_description) = "Deletes a posted status text for a user by id"; + } + + rpc ClientGetLastPlayedTimes (.CPlayer_GetLastPlayedTimes_Request) returns (.CPlayer_GetLastPlayedTimes_Response) { + option (method_description) = "Gets the last-played times for the account"; + } + + rpc GetTimeSSAAccepted (.CPlayer_GetTimeSSAAccepted_Request) returns (.CPlayer_GetTimeSSAAccepted_Response) { + option (method_description) = "Gets the time when the user accepted the SSA"; + } + + rpc AcceptSSA (.CPlayer_AcceptSSA_Request) returns (.CPlayer_AcceptSSA_Response) { + option (method_description) = "User is accepting the SSA"; + } + + rpc GetNicknameList (.CPlayer_GetNicknameList_Request) returns (.CPlayer_GetNicknameList_Response) { + option (method_description) = "Gets the list of nicknames this user has for other users"; + } + + rpc GetPerFriendPreferences (.CPlayer_GetPerFriendPreferences_Request) returns (.CPlayer_GetPerFriendPreferences_Response) { + option (method_description) = "Gets the list of per-friend preferences this user has set for other users"; + } + + rpc SetPerFriendPreferences (.CPlayer_SetPerFriendPreferences_Request) returns (.CPlayer_SetPerFriendPreferences_Response) { + option (method_description) = "Sets the logged in user's per-friend preferences for the given user"; + } + + rpc AddFriend (.CPlayer_AddFriend_Request) returns (.CPlayer_AddFriend_Response) { + option (method_description) = "Invites another Steam user to be a friend"; + } + + rpc RemoveFriend (.CPlayer_RemoveFriend_Request) returns (.CPlayer_RemoveFriend_Response) { + option (method_description) = "Removes a friend or ignores a friend suggestion"; + } + + rpc IgnoreFriend (.CPlayer_IgnoreFriend_Request) returns (.CPlayer_IgnoreFriend_Response) { + option (method_description) = "Blocks or unblocks communication with the user. Despite name, can be a non-friend."; + } + + rpc GetCommunityPreferences (.CPlayer_GetCommunityPreferences_Request) returns (.CPlayer_GetCommunityPreferences_Response) { + option (method_description) = "Returns the player's community preferences"; + } + + rpc SetCommunityPreferences (.CPlayer_SetCommunityPreferences_Request) returns (.CPlayer_SetCommunityPreferences_Response) { + option (method_description) = "Sets the player's community preferences"; + } + + rpc GetTextFilterWords (.CPlayer_GetTextFilterWords_Request) returns (.CPlayer_GetTextFilterWords_Response) { + option (method_description) = "Get the custom text filtering dictionary for this user"; + } + + rpc GetNewSteamAnnouncementState (.CPlayer_GetNewSteamAnnouncementState_Request) returns (.CPlayer_GetNewSteamAnnouncementState_Response) { + option (method_description) = "Calculates and returns what to display for UI that renders new steam announcement available"; + } + + rpc UpdateSteamAnnouncementLastRead (.CPlayer_UpdateSteamAnnouncementLastRead_Request) returns (.CPlayer_UpdateSteamAnnouncementLastRead_Response) { + option (method_description) = "Marks latest announcement timestamp read by user"; + } + + rpc GetPrivacySettings (.CPlayer_GetPrivacySettings_Request) returns (.CPlayer_GetPrivacySettings_Response) { + option (method_description) = "Get current privacy settings."; + } + + rpc GetDurationControl (.CPlayer_GetDurationControl_Request) returns (.CPlayer_GetDurationControl_Response) { + option (method_description) = "Get gameplay duration control settings."; + } +} + +service PlayerClient { + option (service_description) = "Steam player data client notifications"; + option (service_execution_site) = k_EProtoExecutionSiteSteamClient; + + rpc NotifyLastPlayedTimes (.CPlayer_LastPlayedTimes_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server to client of more recent play time"; + } + + rpc NotifyFriendNicknameChanged (.CPlayer_FriendNicknameChanged_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server to client that a friend's nickname has changed"; + } + + rpc NotifyFriendEquippedProfileItemsChanged (.CPlayer_FriendEquippedProfileItemsChanged_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server to client that a friend's equipped profile items have changed"; + } + + rpc NotifyNewSteamAnnouncementState (.CPlayer_NewSteamAnnouncementState_Notification) returns (.NoResponse) { + option (method_description) = "Notifies client of changes to steam announcement state for user"; + } + + rpc NotifyCommunityPreferencesChanged (.CPlayer_CommunityPreferencesChanged_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server to client that their community preferences have changed"; + } + + rpc NotifyTextFilterWordsChanged (.CPlayer_TextFilterWordsChanged_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server to client that their text filtering dictionary has changed"; + } + + rpc NotifyPerFriendPreferencesChanged (.CPlayer_PerFriendPreferencesChanged_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server that per-friend preferences have changed"; + } + + rpc NotifyPrivacyPrivacySettingsChanged (.CPlayer_PrivacySettingsChanged_Notification) returns (.NoResponse) { + option (method_description) = "Notification from server that privacy settings changed"; + } +} diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service.steamclient.proto new file mode 100644 index 00000000..f16df2cc --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service.steamclient.proto @@ -0,0 +1,93 @@ +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base.steamclient.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service_messages.proto"; + +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +service RemoteClient { + option (service_description) = "Methods for Steam remote client operations"; + + rpc GetPairingInfo (.CRemoteClient_GetPairingInfo_Request) returns (.CRemoteClient_GetPairingInfo_Response) { + option (method_description) = "Get pairing info for an entered PIN"; + } + + rpc NotifyOnline (.CRemoteClient_Online_Notification) returns (.NoResponse) { + option (method_description) = "Let the service know we're available for status listeners"; + } + + rpc NotifyReplyPacket (.CRemoteClient_ReplyPacket_Notification) returns (.NoResponse) { + option (method_description) = "Send a reply to a remote client"; + } + + rpc AllocateTURNServer (.CRemoteClient_AllocateTURNServer_Request) returns (.CRemoteClient_AllocateTURNServer_Response) { + option (method_description) = "Allocate a TURN server for a streaming session"; + } + + rpc AllocateRelayServer (.CRemoteClient_AllocateRelayServer_Request) returns (.CRemoteClient_AllocateRelayServer_Response) { + option (method_description) = "Allocate a UDP relay server for a streaming session"; + } + + rpc AllocateSDR (.CRemoteClient_AllocateSDR_Request) returns (.CRemoteClient_AllocateSDR_Response) { + option (method_description) = "Allocate SDR resources for an app"; + } + + rpc SendSteamBroadcastPacket (.CRemoteClient_SteamBroadcast_Notification) returns (.NoResponse) { + option (method_description) = "Broadcast a packet to remote Steam clients"; + } + + rpc SendSteamToSteamPacket (.CRemoteClient_SteamToSteam_Notification) returns (.NoResponse) { + option (method_description) = "Send a packet to a remote Steam client"; + } + + rpc SendRemotePlaySessionStarted (.CRemotePlay_SessionStarted_Request) returns (.CRemotePlay_SessionStarted_Response) { + option (method_description) = "Let the server know that we started a Remote Play session"; + } + + rpc SendRemotePlaySessionStopped (.CRemotePlay_SessionStopped_Notification) returns (.NoResponse) { + option (method_description) = "Let the server know that we stopped a Remote Play session"; + } + + rpc SendRemotePlayTogetherPacket (.CRemotePlayTogether_Notification) returns (.NoResponse) { + option (method_description) = "Send a Remote Play Together packet to a Steam client"; + } + + rpc CreateRemotePlayTogetherInvitation (.CRemoteClient_CreateRemotePlayTogetherInvitation_Request) returns (.CRemoteClient_CreateRemotePlayTogetherInvitation_Response) { + option (method_description) = "Create a Remote Play Together invitation"; + } + + rpc DeleteRemotePlayTogetherInvitation (.CRemoteClient_DeleteRemotePlayTogetherInvitation_Request) returns (.CRemoteClient_DeleteRemotePlayTogetherInvitation_Response) { + option (method_description) = "Delete a Remote Play Together invitation"; + } +} + +service RemoteClientSteamClient { + option (service_description) = "Methods for Steam remote client operations"; + option (service_execution_site) = k_EProtoExecutionSiteSteamClient; + + rpc NotifyRegisterStatusUpdate (.CRemoteClient_RegisterStatusUpdate_Notification) returns (.NoResponse) { + option (method_description) = "Register for status updates with a Steam client"; + } + + rpc NotifyUnregisterStatusUpdate (.CRemoteClient_UnregisterStatusUpdate_Notification) returns (.NoResponse) { + option (method_description) = "Unregister for status updates with a Steam client"; + } + + rpc NotifyRemotePacket (.CRemoteClient_RemotePacket_Notification) returns (.NoResponse) { + option (method_description) = "Send a packet to a Steam client"; + } + + rpc NotifySteamBroadcastPacket (.CRemoteClient_SteamBroadcast_Notification) returns (.NoResponse) { + option (method_description) = "Broadcast a packet to remote Steam clients"; + } + + rpc NotifySteamToSteamPacket (.CRemoteClient_SteamToSteam_Notification) returns (.NoResponse) { + option (method_description) = "Send a packet to a Steam client from a remote Steam client"; + } + + rpc NotifyRemotePlayTogetherPacket (.CRemotePlayTogether_Notification) returns (.NoResponse) { + option (method_description) = "Send a Remote Play Together packet to a Steam client"; + } +} \ No newline at end of file diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service_messages.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service_messages.proto new file mode 100644 index 00000000..a5c89e16 --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_remoteclient_service_messages.proto @@ -0,0 +1,201 @@ +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +message CRemoteClient_CreateSession_Request { +} + +message CRemoteClient_CreateSession_Response { + optional fixed64 session_id = 1; + optional int32 euniverse = 2; +} + +message CRemoteClient_StartPairing_Request { + optional fixed64 session_id = 1; +} + +message CRemoteClient_StartPairing_Response { + optional uint32 pin = 1; +} + +message CRemoteClient_SetPairingInfo_Request { + optional fixed64 session_id = 1; + optional fixed64 device_id = 2; + optional bytes request = 3; +} + +message CRemoteClient_SetPairingInfo_Response { +} + +message CRemoteClient_GetPairingInfo_Request { + optional uint32 pin = 1; +} + +message CRemoteClient_GetPairingInfo_Response { + optional fixed64 session_id = 1; + optional fixed64 device_id = 2; + optional bytes request = 3; +} + +message CRemoteClient_CancelPairing_Request { + optional fixed64 session_id = 1; +} + +message CRemoteClient_CancelPairing_Response { +} + +message CRemoteClient_RegisterStatusUpdate_Notification { + optional fixed64 session_id = 1; + optional fixed64 steamid = 2; + optional fixed64 device_id = 3; +} + +message CRemoteClient_UnregisterStatusUpdate_Notification { + optional fixed64 session_id = 1; + optional fixed64 steamid = 2; +} + +message CRemoteClient_Online_Notification { + optional fixed64 steamid = 1; +} + +message CRemoteClient_RemotePacket_Notification { + optional fixed64 session_id = 1; + optional fixed64 steamid = 2; + optional bytes payload = 4; +} + +message CRemoteClient_ReplyPacket_Notification { + optional fixed64 session_id = 1; + optional bytes payload = 2; +} + +message CRemoteClient_GetReplies_Request { + optional fixed64 session_id = 1; +} + +message CRemoteClient_GetReplies_Response { + repeated bytes payload = 1; +} + +message CRemoteClient_AllocateTURNServer_Request { + optional uint32 cellid = 1; + optional string credentials = 2; +} + +message CRemoteClient_AllocateTURNServer_Response { + optional string turn_server = 1; +} + +message CRemoteClient_AllocateRelayServer_Request { + optional uint32 cellid = 1; + optional string credentials = 2; +} + +message CRemoteClient_AllocateRelayServer_Response { + optional string relay_server = 1; +} + +message CRemoteClient_AllocateSDR_Request { + optional uint32 appid = 1; +} + +message CRemoteClient_AllocateSDR_Response { +} + +message CRemoteClient_SteamBroadcast_Notification { + optional fixed64 steamid = 1; + optional fixed64 clientid = 2; + optional bytes payload = 3; +} + +message CRemoteClient_SteamToSteam_Notification { + optional fixed64 steamid = 1; + optional fixed64 src_clientid = 2; + optional fixed64 dst_clientid = 3; + optional uint32 secretid = 4; + optional bytes encrypted_payload = 5; +} + +message CRemotePlay_SessionStarted_Request { + optional uint32 host_account_id = 1; + optional uint32 client_account_id = 2; + optional uint32 appid = 3; + optional int32 device_form_factor = 4; + optional bool remote_play_together = 5; + optional bool guest_session = 6; +} + +message CRemotePlay_SessionStarted_Response { + optional fixed64 record_id = 1; +} + +message CRemotePlay_SessionStopped_Notification { + optional fixed64 record_id = 1; + optional bool used_x264 = 2; + optional bool used_h264 = 3; + optional bool used_hevc = 4; +} + +message CRemotePlayTogether_Notification { + message Player { + optional fixed64 steamid = 1; + optional uint32 guestid = 2; + optional bytes avatar_hash = 3; + optional bool keyboard_enabled = 4; + optional bool mouse_enabled = 5; + optional bool controller_enabled = 6; + } + + message ControllerSlot_obsolete { + optional uint32 slotid = 1; + optional fixed64 steamid = 2; + } + + message ControllerSlot { + optional uint32 slotid = 1; + optional .CRemotePlayTogether_Notification.Player player = 2; + } + + message GroupUpdated { + optional fixed64 host_steamid = 1; + optional fixed64 host_clientid = 2; + repeated fixed64 players_obsolete = 3; + optional fixed64 host_gameid = 4; + repeated .CRemotePlayTogether_Notification.ControllerSlot_obsolete controller_slots_obsolete = 5; + optional bool has_new_players = 6; + repeated .CRemotePlayTogether_Notification.Player player_slots = 7; + repeated .CRemotePlayTogether_Notification.ControllerSlot controller_slots = 8; + } + + optional fixed64 steamid = 1; + + oneof Message { + .CRemotePlayTogether_Notification.GroupUpdated group_updated = 2; + } +} + +message CRemoteClient_CreateRemotePlayTogetherInvitation_Request { + optional uint32 appid = 1; + optional string launch_parameters = 2; +} + +message CRemoteClient_CreateRemotePlayTogetherInvitation_Response { + optional string invitation_code = 1; +} + +message CRemoteClient_DeleteRemotePlayTogetherInvitation_Request { + optional string invitation_code = 1; +} + +message CRemoteClient_DeleteRemotePlayTogetherInvitation_Response { +} + +message CRemoteClient_LookupRemotePlayTogetherInvitation_Request { + optional string invitation_code = 1; +} + +message CRemoteClient_LookupRemotePlayTogetherInvitation_Response { + optional string invitation_url = 1; +} \ No newline at end of file diff --git a/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_twofactor.steamclient.proto b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_twofactor.steamclient.proto new file mode 100644 index 00000000..84161417 --- /dev/null +++ b/src/main/proto/in/dragonbra/javasteam/protobufs/steamclient/steammessages_twofactor.steamclient.proto @@ -0,0 +1,204 @@ +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_base.proto"; +import "in/dragonbra/javasteam/protobufs/steamclient/steammessages_unified_base.steamclient.proto"; + +option java_package = "in.dragonbra.javasteam.protobufs.steamclient"; + +option optimize_for = SPEED; +option java_generic_services = false; + +message CTwoFactor_Status_Request { + optional fixed64 steamid = 1 [(description) = "steamid to use"]; +} + +message CTwoFactor_Status_Response { + optional uint32 state = 1 [(description) = "Authenticator state"]; + optional uint32 inactivation_reason = 2 [(description) = "Inactivation reason (if any)"]; + optional uint32 authenticator_type = 3 [(description) = "Type of authenticator"]; + optional bool authenticator_allowed = 4 [(description) = "Account allowed to have an authenticator?"]; + optional uint32 steamguard_scheme = 5 [(description) = "Steam Guard scheme in effect"]; + optional string token_gid = 6 [(description) = "String rep of token GID assigned by server"]; + optional bool email_validated = 7 [(description) = "Account has verified email capability"]; + optional string device_identifier = 8 [(description) = "Authenticator (phone) identifier"]; + optional uint32 time_created = 9 [(description) = "When the token was created"]; + optional uint32 revocation_attempts_remaining = 10 [(description) = "Number of revocation code attempts remaining"]; + optional string classified_agent = 11 [(description) = "Agent that added the authenticator (e.g., ios / android / other)"]; + optional bool allow_external_authenticator = 12 [(description) = "Allow a third-party authenticator (in addition to two-factor)"]; + optional uint32 time_transferred = 13 [(description) = "When the token was transferred from another device, if applicable"]; + optional uint32 version = 14 [(description) = "Current token version"]; +} + +message CTwoFactor_AddAuthenticator_Request { + optional fixed64 steamid = 1 [(description) = "steamid to use"]; + optional uint64 authenticator_time = 2 [(description) = "Current authenticator time"]; + optional fixed64 serial_number = 3 [(description) = "locally computed serial (deprecated)"]; + optional uint32 authenticator_type = 4 [(description) = "Authenticator type"]; + optional string device_identifier = 5 [(description) = "Authenticator identifier"]; + optional string sms_phone_id = 6 [(description) = "ID of phone to use for SMS verification"]; + repeated string http_headers = 7 [(description) = "HTTP headers alternating by K/V"]; + optional uint32 version = 8 [default = 1, (description) = "What the version of our token should be"]; +} + +message CTwoFactor_AddAuthenticator_Response { + optional bytes shared_secret = 1 [(description) = "Shared secret between server and authenticator"]; + optional fixed64 serial_number = 2 [(description) = "Authenticator serial number (unique per token)"]; + optional string revocation_code = 3 [(description) = "code used to revoke authenticator"]; + optional string uri = 4 [(description) = "URI for QR code generation"]; + optional uint64 server_time = 5 [(description) = "Current server time"]; + optional string account_name = 6 [(description) = "Account name to display on token client"]; + optional string token_gid = 7 [(description) = "Token GID assigned by server"]; + optional bytes identity_secret = 8 [(description) = "Secret used for identity attestation (e.g., for eventing)"]; + optional bytes secret_1 = 9 [(description) = "Spare shared secret"]; + optional int32 status = 10 [(description) = "Result code"]; + optional string phone_number_hint = 11 [(description) = "a portion of the phone number the SMS code was sent to"]; +} + +message CTwoFactor_SendEmail_Request { + optional fixed64 steamid = 1 [(description) = "Steamid to use"]; + optional uint32 email_type = 2 [(description) = "Type of email to send (ETwoFactorEmailType::*)"]; + optional bool include_activation_code = 3 [(description) = "Include activation code in email parameters"]; +} + +message CTwoFactor_SendEmail_Response { +} + +message CTwoFactor_FinalizeAddAuthenticator_Request { + optional fixed64 steamid = 1 [(description) = "steamid to use"]; + optional string authenticator_code = 2 [(description) = "Current auth code"]; + optional uint64 authenticator_time = 3 [(description) = "Current authenticator time"]; + optional string activation_code = 4 [(description) = "Activation code from out-of-band message"]; + repeated string http_headers = 5 [(description) = "HTTP headers alternating by K/V"]; + optional bool validate_sms_code = 6 [(description) = "When finalizing with an SMS code, pass the request on to the PhoneService to update its state too."]; +} + +message CTwoFactor_FinalizeAddAuthenticator_Response { + optional bool success = 1 [(description) = "True if succeeded, or want more tries"]; + optional bool want_more = 2 [(description) = "True if want more tries"]; + optional uint64 server_time = 3 [(description) = "Current server time"]; + optional int32 status = 4 [(description) = "Result code"]; +} + +message CTwoFactor_UpdateTokenVersion_Request { + optional fixed64 steamid = 1; + optional uint32 version = 2 [(description) = "What the version of our token should be"]; + optional bytes signature = 3 [(description) = "HMAC digest over user's private key"]; +} + +message CTwoFactor_UpdateTokenVersion_Response { +} + +message CTwoFactor_RemoveAuthenticator_Request { + optional string revocation_code = 2 [(description) = "Password needed to remove token"]; + optional uint32 revocation_reason = 5 [(description) = "Reason the authenticator is being removed"]; + optional uint32 steamguard_scheme = 6 [(description) = "Type of Steam Guard to use once token is removed"]; + optional bool remove_all_steamguard_cookies = 7 [(description) = "Remove all steamguard cookies"]; +} + +message CTwoFactor_RemoveAuthenticator_Response { + optional bool success = 1 [(description) = "True if request succeeeded. The mobile app checks this."]; + optional uint64 server_time = 3 [(description) = "Current server time"]; + optional uint32 revocation_attempts_remaining = 5 [(description) = "Number of revocation code attempts remaining"]; +} + +message CTwoFactor_CreateEmergencyCodes_Request { + optional string code = 1; +} + +message CTwoFactor_CreateEmergencyCodes_Response { + repeated string codes = 1 [(description) = "Emergency codes"]; +} + +message CTwoFactor_DestroyEmergencyCodes_Request { + optional fixed64 steamid = 1 [(description) = "steamid to use"]; +} + +message CTwoFactor_DestroyEmergencyCodes_Response { +} + +message CTwoFactor_ValidateToken_Request { + optional string code = 1 [(description) = "code to validate"]; +} + +message CTwoFactor_ValidateToken_Response { + optional bool valid = 1 [(description) = "result of validation"]; +} + +message CTwoFactor_RemoveAuthenticatorViaChallengeStart_Request { +} + +message CTwoFactor_RemoveAuthenticatorViaChallengeStart_Response { + optional bool success = 1 [(description) = "True if succeeded, or want more tries with an authenticator_code"]; +} + +message CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request { + optional string sms_code = 1 [(description) = "Code from SMS"]; + optional bool generate_new_token = 2 [(description) = "Generate new token (instead of removing old one)"]; + optional uint32 version = 3 [default = 1, (description) = "What the version of our token should be"]; +} + +message CRemoveAuthenticatorViaChallengeContinue_Replacement_Token { + optional bytes shared_secret = 1 [(description) = "Shared secret between server and authenticator"]; + optional fixed64 serial_number = 2 [(description) = "Authenticator serial number (unique per token)"]; + optional string revocation_code = 3 [(description) = "code used to revoke authenticator"]; + optional string uri = 4 [(description) = "URI for QR code generation"]; + optional uint64 server_time = 5 [(description) = "Current server time"]; + optional string account_name = 6 [(description) = "Account name to display on token client"]; + optional string token_gid = 7 [(description) = "Token GID assigned by server"]; + optional bytes identity_secret = 8 [(description) = "Secret used for identity attestation (e.g., for eventing)"]; + optional bytes secret_1 = 9 [(description) = "Spare shared secret"]; + optional int32 status = 10 [(description) = "Result code"]; + optional uint32 steamguard_scheme = 11 [(description) = "Type of Steam Guard to use once token is removed"]; + optional fixed64 steamid = 12 [(description) = "steamid that owns the secret"]; +} + +message CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Response { + optional bool success = 1 [(description) = "True if succeeded, or want more tries with an authenticator_code"]; + optional .CRemoveAuthenticatorViaChallengeContinue_Replacement_Token replacement_token = 2 [(description) = "Fresh secret to install"]; +} + +service TwoFactor { + option (service_description) = "Two Factor Authentication Service"; + + rpc QueryStatus (.CTwoFactor_Status_Request) returns (.CTwoFactor_Status_Response) { + option (method_description) = "Get two-factor authentication settings for the logged-in account"; + } + + rpc AddAuthenticator (.CTwoFactor_AddAuthenticator_Request) returns (.CTwoFactor_AddAuthenticator_Response) { + option (method_description) = "Add two-factor authenticator to the logged-in account"; + } + + rpc SendEmail (.CTwoFactor_SendEmail_Request) returns (.CTwoFactor_SendEmail_Response) { + option (method_description) = "Send email to the account"; + } + + rpc FinalizeAddAuthenticator (.CTwoFactor_FinalizeAddAuthenticator_Request) returns (.CTwoFactor_FinalizeAddAuthenticator_Response) { + option (method_description) = "Finalize two-factor authentication addition to the logged-in account"; + } + + rpc UpdateTokenVersion (.CTwoFactor_UpdateTokenVersion_Request) returns (.CTwoFactor_UpdateTokenVersion_Response) { + option (method_description) = "Update the version for my token"; + } + + rpc RemoveAuthenticator (.CTwoFactor_RemoveAuthenticator_Request) returns (.CTwoFactor_RemoveAuthenticator_Response) { + option (method_description) = "Remove two-factor authentication addition from the logged-in account"; + } + + rpc CreateEmergencyCodes (.CTwoFactor_CreateEmergencyCodes_Request) returns (.CTwoFactor_CreateEmergencyCodes_Response) { + option (method_description) = "Generate emergency authenticator codes"; + } + + rpc DestroyEmergencyCodes (.CTwoFactor_DestroyEmergencyCodes_Request) returns (.CTwoFactor_DestroyEmergencyCodes_Response) { + option (method_description) = "Destroy emergency authenticator codes for the account"; + } + + rpc ValidateToken (.CTwoFactor_ValidateToken_Request) returns (.CTwoFactor_ValidateToken_Response) { + option (method_description) = "Validate (and consume) a token"; + } + + rpc RemoveAuthenticatorViaChallengeStart (.CTwoFactor_RemoveAuthenticatorViaChallengeStart_Request) returns (.CTwoFactor_RemoveAuthenticatorViaChallengeStart_Response) { + option (method_description) = "Start challenge-based authenticator removal"; + } + + rpc RemoveAuthenticatorViaChallengeContinue (.CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request) returns (.CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Response) { + option (method_description) = "Continue challenge-based authenticator removal"; + } +} diff --git a/src/main/steamd/in/dragonbra/javasteam/emsg.steamd b/src/main/steamd/in/dragonbra/javasteam/emsg.steamd index bc934bd2..9426b044 100644 --- a/src/main/steamd/in/dragonbra/javasteam/emsg.steamd +++ b/src/main/steamd/in/dragonbra/javasteam/emsg.steamd @@ -70,6 +70,7 @@ enum EMsg UpdateScheduledTaskEnableState_TEST = 244; UpdateScheduledTaskEnableStateResponse_TEST = 245; ContentDescriptionDeltaUpdate = 246; + GMShellAndServerAddressUpdates = 247; BaseGM = 300; Heartbeat = 300; @@ -100,6 +101,7 @@ enum EMsg GMTestNextBuildSchemaConversionResponse = 335; ExpectShellRestart = 336; HotFixProgress = 337; + GMStatsForwardToAdminConnections = 338; BaseAIS = 400; AISRefreshContentDescription = 401; removed @@ -705,6 +707,12 @@ enum EMsg GCHAccountPhoneNumberChange = 2236; GCHAccountTwoFactorChange = 2237; GCHInviteUserToLobby = 2238; + GCHUpdateMultipleSessions = 2239; + GCHMarkAppSessionsAuthoritative = 2240; + GCHRecurringSubscriptionStatusChange = 2241; + GCHAppCheersReceived = 2242; + GCHAppCheersGetAllowedTypes = 2243; + GCHAppCheersGetAllowedTypesResponse = 2244; BaseP2P = 2500; P2PIntroducerMessage = 2502; @@ -1222,6 +1230,8 @@ enum EMsg AMRequestPersonaUpdateForChatServer = 4420; AMPerfectWorldPayment = 4421; AMPerfectWorldPaymentResponse = 4422; + AMECommPayPayment = 4423; + AMECommPayPaymentResponse = 4424; BasePSRange = 5000; PSCreateShoppingCart = 5001; @@ -1987,6 +1997,8 @@ enum EMsg ClientVoiceCallPreAuthorizeResponse = 9801; ClientServerTimestampRequest = 9802; ClientServerTimestampResponse = 9803; + ServiceMethodCallFromClientNonAuthed = 9804; + ClientHello = 9805; ClientLANP2PBase = 9900; ClientLANP2PRequestChunk = 9900;