-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from LossyDragon/simplify-callbacks2
Simplify callback dispatching
- Loading branch information
Showing
209 changed files
with
6,824 additions
and
9,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
158 changes: 0 additions & 158 deletions
158
src/main/java/in/dragonbra/javasteam/steam/handlers/steamapps/License.java
This file was deleted.
Oops, something went wrong.
84 changes: 84 additions & 0 deletions
84
src/main/java/in/dragonbra/javasteam/steam/handlers/steamapps/License.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package `in`.dragonbra.javasteam.steam.handlers.steamapps | ||
|
||
import `in`.dragonbra.javasteam.enums.ELicenseFlags | ||
import `in`.dragonbra.javasteam.enums.ELicenseType | ||
import `in`.dragonbra.javasteam.enums.EPaymentMethod | ||
import `in`.dragonbra.javasteam.protobufs.steamclient.SteammessagesClientserver.CMsgClientLicenseList | ||
import java.util.* | ||
|
||
/** | ||
* Represents a granted license (steam3 subscription) for one or more games. | ||
*/ | ||
@Suppress("unused") | ||
class License(license: CMsgClientLicenseList.License) { | ||
|
||
/** | ||
* Gets the package ID used to identify the license. | ||
*/ | ||
val packageID: Int = license.packageId | ||
|
||
/** | ||
* Gets the last change number for this license. | ||
*/ | ||
val lastChangeNumber: Int = license.changeNumber | ||
|
||
/** | ||
* Gets the time the license was created. | ||
*/ | ||
val timeCreated: Date = Date(license.timeCreated * 1000L) | ||
|
||
/** | ||
* Gets the next process time for the license. | ||
*/ | ||
val timeNextProcess: Date = Date(license.timeNextProcess * 1000L) | ||
|
||
/** | ||
* Gets the minute limit of the license. | ||
*/ | ||
val minuteLimit: Int = license.minuteLimit | ||
|
||
/** | ||
* Gets the minutes used of the license. | ||
*/ | ||
val minutesUsed: Int = license.minutesUsed | ||
|
||
/** | ||
* Gets the payment method used when the license was created. | ||
*/ | ||
val paymentMethod: EPaymentMethod = EPaymentMethod.from(license.paymentMethod) | ||
|
||
/** | ||
* Gets the license flags. | ||
*/ | ||
val licenseFlags: EnumSet<ELicenseFlags> = ELicenseFlags.from(license.flags) | ||
|
||
/** | ||
* Gets the two-letter country code where the license was purchased. | ||
*/ | ||
val purchaseCode: String = license.purchaseCountryCode | ||
|
||
/** | ||
* Gets the type of the license. | ||
*/ | ||
val licenseType: ELicenseType = ELicenseType.from(license.licenseType) | ||
|
||
/** | ||
* Gets the territory code of the license. | ||
*/ | ||
val territoryCode: Int = license.territoryCode | ||
|
||
/** | ||
* Gets the PICS access token for this package. | ||
*/ | ||
val accessToken: Long = license.accessToken | ||
|
||
/** | ||
* Gets the owner account id of the license. | ||
*/ | ||
val ownerAccountID: Int = license.ownerId | ||
|
||
/** | ||
* Gets the master package id. | ||
*/ | ||
val masterPackageID: Int = license.masterPackageId | ||
} |
48 changes: 0 additions & 48 deletions
48
src/main/java/in/dragonbra/javasteam/steam/handlers/steamapps/PICSChangeData.java
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
src/main/java/in/dragonbra/javasteam/steam/handlers/steamapps/PICSChangeData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package `in`.dragonbra.javasteam.steam.handlers.steamapps | ||
|
||
import `in`.dragonbra.javasteam.protobufs.steamclient.SteammessagesClientserverAppinfo.CMsgClientPICSChangesSinceResponse | ||
|
||
/** | ||
* Holds the change data for a single app or package | ||
*/ | ||
@Suppress("MemberVisibilityCanBePrivate", "unused") | ||
class PICSChangeData { | ||
|
||
/** | ||
* Gets the app or package ID this change data represents | ||
*/ | ||
val id: Int | ||
|
||
/** | ||
* Gets the current change number of this app | ||
*/ | ||
val changeNumber: Int | ||
|
||
/** | ||
* Gets signals if an access token is needed for this request | ||
*/ | ||
val isNeedsToken: Boolean | ||
|
||
constructor(change: CMsgClientPICSChangesSinceResponse.AppChange) { | ||
id = change.appid | ||
changeNumber = change.changeNumber | ||
isNeedsToken = change.needsToken | ||
} | ||
|
||
constructor(change: CMsgClientPICSChangesSinceResponse.PackageChange) { | ||
id = change.packageid | ||
changeNumber = change.changeNumber | ||
isNeedsToken = change.needsToken | ||
} | ||
} |
Oops, something went wrong.