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
[x] Code compiles correctly
[x] All tests passing
[x] Samples run successfully
[x] Extended the README / documentation, if necessary
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.
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.
runBlock()
torunBlocking()
to be more clear on what it does.For example for either Java and Kotlin, to use the UnifiedService, you would so something like:
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 aresendNotificationCompat()
andsendMessageCompat()
respectively.This also begins development on 1.6.0
Checklist