Skip to content

Commit

Permalink
change OptionalQRCodeInfo to data class
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed May 25, 2023
1 parent 964a677 commit 9037db0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ class OnboardingPayloadParser {

/** Get QR code string from [OnboardingPayload]. */
@Throws(OnboardingPayloadException::class)
external fun getQrCodeFromPayload(payload: OnboardingPayload): String?
external fun getQrCodeFromPayload(payload: OnboardingPayload): String

/** Get Manual Pairing Code string from [OnboardingPayload]. */
@Throws(OnboardingPayloadException::class)
external fun getManualPairingCodeFromPayload(payload: OnboardingPayload): String?
external fun getManualPairingCodeFromPayload(payload: OnboardingPayload): String

@Throws(UnrecognizedQrCodeException::class, OnboardingPayloadException::class)
private external fun fetchPayloadFromQrCode(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package chip.onboardingpayload

class OptionalQRCodeInfo {
data class OptionalQRCodeInfo(
var tag: Int = 0,
var type: OptionalQRCodeInfoType = OptionalQRCodeInfoType.TYPE_UNKNOWN,
var data: String? = null,
var int32: Int = 0
) {
enum class OptionalQRCodeInfoType {
TYPE_UNKNOWN,
TYPE_STRING,
Expand All @@ -9,9 +14,4 @@ class OptionalQRCodeInfo {
TYPE_UINT32,
TYPE_UINT64
}

var tag = 0
var type: OptionalQRCodeInfoType? = null
var data: String? = null
var int32 = 0
}

0 comments on commit 9037db0

Please sign in to comment.