Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified Messaging v2 #282

Closed
wants to merge 6 commits into from
Closed

Conversation

LossyDragon
Copy link
Collaborator

Description

This is a rework of the Unified Messaging Service. While this class exercises kotlin features, the goal is to still maintain strong Java Compatibility without the need to import the kotlin-stdlib dependency.

  • [Breaking] Majorly rework the UnifiedService class.
  • [Breaking] Rename Async runBlock() to runBlocking() to be more clear on what it does.
  • Slight code formatting tweaks and readbility
  • Update Interface Tests
  • Update Interface generation (ProtoParser)

For example for either Java and Kotlin, to use the UnifiedService, you would so something like:

// All available RPC methods wil be located in: in.dragonbra.javasteam.rpc.interfaces
 var playService = steamUnifiedMessages.createService(IPlayer.class);
 playService.sendMessage(api ->
          api.GetFavoriteBadge(favoriteBadgeRequest.build())
  ).runBlocking(); // Returns a ServiceMethodResponse

// or playService.sendNotification(); for RPC method's that do not return anything. Those actually return `NoResponse` from protobufs. 

Sample 13 (SampleUnifiedMessages) touches over the use of this.

There are even compat methods that hopefully shouldn't be used. But there just incase Java complains about Function1 not being able to be accessed. Those are sendNotificationCompat() and sendMessageCompat() respectively.

This also begins development on 1.6.0

Checklist

  • Code compiles correctly
  • All tests passing
  • Samples run successfully
  • Extended the README / documentation, if necessary

@LossyDragon
Copy link
Collaborator Author

Closing this.

SteamKit recently has an open PR made after I started this fork to rework unified. They're going at it a different way which all this would be scrapped anyways.

@LossyDragon LossyDragon deleted the unified-v2 branch November 5, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant