Skip to content

Commit 1c0aecc

Browse files
committed
Upgrade pigeon to 25.2.0 and regenerate files
1 parent 8381a28 commit 1c0aecc

File tree

5 files changed

+345
-387
lines changed

5 files changed

+345
-387
lines changed

packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/sk2_pigeon.g.swift

Lines changed: 11 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2013 The Flutter Authors
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
// Autogenerated from Pigeon (v25.5.0), do not edit directly.
4+
// Autogenerated from Pigeon (v25.2.0), do not edit directly.
55
// See also: https://pub.dev/packages/pigeon
66

77
import Foundation
@@ -73,68 +73,6 @@ private func nilOrValue<T>(_ value: Any?) -> T? {
7373
return value as! T?
7474
}
7575

76-
func deepEqualssk2_pigeon(_ lhs: Any?, _ rhs: Any?) -> Bool {
77-
let cleanLhs = nilOrValue(lhs) as Any?
78-
let cleanRhs = nilOrValue(rhs) as Any?
79-
switch (cleanLhs, cleanRhs) {
80-
case (nil, nil):
81-
return true
82-
83-
case (nil, _), (_, nil):
84-
return false
85-
86-
case is (Void, Void):
87-
return true
88-
89-
case let (cleanLhsHashable, cleanRhsHashable) as (AnyHashable, AnyHashable):
90-
return cleanLhsHashable == cleanRhsHashable
91-
92-
case let (cleanLhsArray, cleanRhsArray) as ([Any?], [Any?]):
93-
guard cleanLhsArray.count == cleanRhsArray.count else { return false }
94-
for (index, element) in cleanLhsArray.enumerated() {
95-
if !deepEqualssk2_pigeon(element, cleanRhsArray[index]) {
96-
return false
97-
}
98-
}
99-
return true
100-
101-
case let (cleanLhsDictionary, cleanRhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
102-
guard cleanLhsDictionary.count == cleanRhsDictionary.count else { return false }
103-
for (key, cleanLhsValue) in cleanLhsDictionary {
104-
guard cleanRhsDictionary.index(forKey: key) != nil else { return false }
105-
if !deepEqualssk2_pigeon(cleanLhsValue, cleanRhsDictionary[key]!) {
106-
return false
107-
}
108-
}
109-
return true
110-
111-
default:
112-
// Any other type shouldn't be able to be used with pigeon. File an issue if you find this to be untrue.
113-
return false
114-
}
115-
}
116-
117-
func deepHashsk2_pigeon(value: Any?, hasher: inout Hasher) {
118-
if let valueList = value as? [AnyHashable] {
119-
for item in valueList { deepHashsk2_pigeon(value: item, hasher: &hasher) }
120-
return
121-
}
122-
123-
if let valueDict = value as? [AnyHashable: AnyHashable] {
124-
for key in valueDict.keys {
125-
hasher.combine(key)
126-
deepHashsk2_pigeon(value: valueDict[key]!, hasher: &hasher)
127-
}
128-
return
129-
}
130-
131-
if let hashableValue = value as? AnyHashable {
132-
hasher.combine(hashableValue.hashValue)
133-
}
134-
135-
return hasher.combine(String(describing: value))
136-
}
137-
13876
enum SK2ProductTypeMessage: Int {
13977
/// A consumable in-app purchase.
14078
case consumable = 0
@@ -173,7 +111,7 @@ enum SK2ProductPurchaseResultMessage: Int {
173111
}
174112

175113
/// Generated class from Pigeon that represents data sent in messages.
176-
struct SK2SubscriptionOfferMessage: Hashable {
114+
struct SK2SubscriptionOfferMessage {
177115
var id: String? = nil
178116
var price: Double
179117
var type: SK2SubscriptionOfferTypeMessage
@@ -209,16 +147,10 @@ struct SK2SubscriptionOfferMessage: Hashable {
209147
paymentMode,
210148
]
211149
}
212-
static func == (lhs: SK2SubscriptionOfferMessage, rhs: SK2SubscriptionOfferMessage) -> Bool {
213-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
214-
}
215-
func hash(into hasher: inout Hasher) {
216-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
217-
}
218150
}
219151

220152
/// Generated class from Pigeon that represents data sent in messages.
221-
struct SK2SubscriptionPeriodMessage: Hashable {
153+
struct SK2SubscriptionPeriodMessage {
222154
/// The number of units that the period represents.
223155
var value: Int64
224156
/// The unit of time that this period represents.
@@ -240,16 +172,10 @@ struct SK2SubscriptionPeriodMessage: Hashable {
240172
unit,
241173
]
242174
}
243-
static func == (lhs: SK2SubscriptionPeriodMessage, rhs: SK2SubscriptionPeriodMessage) -> Bool {
244-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
245-
}
246-
func hash(into hasher: inout Hasher) {
247-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
248-
}
249175
}
250176

251177
/// Generated class from Pigeon that represents data sent in messages.
252-
struct SK2SubscriptionInfoMessage: Hashable {
178+
struct SK2SubscriptionInfoMessage {
253179
/// An array of all the promotional offers configured for this subscription.
254180
var promotionalOffers: [SK2SubscriptionOfferMessage]
255181
/// The group identifier for this subscription.
@@ -276,19 +202,13 @@ struct SK2SubscriptionInfoMessage: Hashable {
276202
subscriptionPeriod,
277203
]
278204
}
279-
static func == (lhs: SK2SubscriptionInfoMessage, rhs: SK2SubscriptionInfoMessage) -> Bool {
280-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
281-
}
282-
func hash(into hasher: inout Hasher) {
283-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
284-
}
285205
}
286206

287207
/// A Pigeon message class representing a Product
288208
/// https://developer.apple.com/documentation/storekit/product
289209
///
290210
/// Generated class from Pigeon that represents data sent in messages.
291-
struct SK2ProductMessage: Hashable {
211+
struct SK2ProductMessage {
292212
/// The unique product identifier.
293213
var id: String
294214
/// The localized display name of the product, if it exists.
@@ -340,16 +260,10 @@ struct SK2ProductMessage: Hashable {
340260
priceLocale,
341261
]
342262
}
343-
static func == (lhs: SK2ProductMessage, rhs: SK2ProductMessage) -> Bool {
344-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
345-
}
346-
func hash(into hasher: inout Hasher) {
347-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
348-
}
349263
}
350264

351265
/// Generated class from Pigeon that represents data sent in messages.
352-
struct SK2PriceLocaleMessage: Hashable {
266+
struct SK2PriceLocaleMessage {
353267
var currencyCode: String
354268
var currencySymbol: String
355269

@@ -369,19 +283,13 @@ struct SK2PriceLocaleMessage: Hashable {
369283
currencySymbol,
370284
]
371285
}
372-
static func == (lhs: SK2PriceLocaleMessage, rhs: SK2PriceLocaleMessage) -> Bool {
373-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
374-
}
375-
func hash(into hasher: inout Hasher) {
376-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
377-
}
378286
}
379287

380288
/// A Pigeon message class representing a Signature
381289
/// https://developer.apple.com/documentation/storekit/product/subscriptionoffer/signature
382290
///
383291
/// Generated class from Pigeon that represents data sent in messages.
384-
struct SK2SubscriptionOfferSignatureMessage: Hashable {
292+
struct SK2SubscriptionOfferSignatureMessage {
385293
var keyID: String
386294
var nonce: String
387295
var timestamp: Int64
@@ -409,18 +317,10 @@ struct SK2SubscriptionOfferSignatureMessage: Hashable {
409317
signature,
410318
]
411319
}
412-
static func == (
413-
lhs: SK2SubscriptionOfferSignatureMessage, rhs: SK2SubscriptionOfferSignatureMessage
414-
) -> Bool {
415-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
416-
}
417-
func hash(into hasher: inout Hasher) {
418-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
419-
}
420320
}
421321

422322
/// Generated class from Pigeon that represents data sent in messages.
423-
struct SK2SubscriptionOfferPurchaseMessage: Hashable {
323+
struct SK2SubscriptionOfferPurchaseMessage {
424324
var promotionalOfferId: String
425325
var promotionalOfferSignature: SK2SubscriptionOfferSignatureMessage
426326

@@ -440,18 +340,10 @@ struct SK2SubscriptionOfferPurchaseMessage: Hashable {
440340
promotionalOfferSignature,
441341
]
442342
}
443-
static func == (
444-
lhs: SK2SubscriptionOfferPurchaseMessage, rhs: SK2SubscriptionOfferPurchaseMessage
445-
) -> Bool {
446-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
447-
}
448-
func hash(into hasher: inout Hasher) {
449-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
450-
}
451343
}
452344

453345
/// Generated class from Pigeon that represents data sent in messages.
454-
struct SK2ProductPurchaseOptionsMessage: Hashable {
346+
struct SK2ProductPurchaseOptionsMessage {
455347
var appAccountToken: String? = nil
456348
var quantity: Int64? = nil
457349
var promotionalOffer: SK2SubscriptionOfferPurchaseMessage? = nil
@@ -479,18 +371,10 @@ struct SK2ProductPurchaseOptionsMessage: Hashable {
479371
winBackOfferId,
480372
]
481373
}
482-
static func == (lhs: SK2ProductPurchaseOptionsMessage, rhs: SK2ProductPurchaseOptionsMessage)
483-
-> Bool
484-
{
485-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
486-
}
487-
func hash(into hasher: inout Hasher) {
488-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
489-
}
490374
}
491375

492376
/// Generated class from Pigeon that represents data sent in messages.
493-
struct SK2TransactionMessage: Hashable {
377+
struct SK2TransactionMessage {
494378
var id: Int64
495379
var originalId: Int64
496380
var productId: String
@@ -546,16 +430,10 @@ struct SK2TransactionMessage: Hashable {
546430
jsonRepresentation,
547431
]
548432
}
549-
static func == (lhs: SK2TransactionMessage, rhs: SK2TransactionMessage) -> Bool {
550-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
551-
}
552-
func hash(into hasher: inout Hasher) {
553-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
554-
}
555433
}
556434

557435
/// Generated class from Pigeon that represents data sent in messages.
558-
struct SK2ErrorMessage: Hashable {
436+
struct SK2ErrorMessage {
559437
var code: Int64
560438
var domain: String
561439
var userInfo: [String: Any]? = nil
@@ -579,12 +457,6 @@ struct SK2ErrorMessage: Hashable {
579457
userInfo,
580458
]
581459
}
582-
static func == (lhs: SK2ErrorMessage, rhs: SK2ErrorMessage) -> Bool {
583-
return deepEqualssk2_pigeon(lhs.toList(), rhs.toList())
584-
}
585-
func hash(into hasher: inout Hasher) {
586-
deepHashsk2_pigeon(value: toList(), hasher: &hasher)
587-
}
588460
}
589461

590462
private class Sk2PigeonPigeonCodecReader: FlutterStandardReader {

0 commit comments

Comments
 (0)