Skip to content

Commit c471620

Browse files
author
Firefox Sync Engineering
committed
Nightly auto-update (132.0.20240917050325)
1 parent 00abd3e commit c471620

21 files changed

+2949
-25
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// swift-tools-version:5.4
22
import PackageDescription
33

4-
let checksum = "2046e549e195840711331d1b4e0f0bd49da7440c2af04f9f60e0ac273aa5320a"
5-
let version = "132.0.20240914050334"
6-
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240914050334/artifacts/public/build/MozillaRustComponents.xcframework.zip"
4+
let checksum = "ad7dce1fc832b47f901f1530dd2399199368788cdb37c2fd5f39891b1c1b76b8"
5+
let version = "132.0.20240917050325"
6+
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240917050325/artifacts/public/build/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "b662f56fba5b77f71470f40941a132933c22f9cdc9772afd300f856b34cf5901"
10-
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240914050334/artifacts/public/build/FocusRustComponents.xcframework.zip"
9+
let focusChecksum = "cf4c13334b157ec2142a39e49565c8e16b5fc9d6f7592c0737780afb162bf07e"
10+
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.132.20240917050325/artifacts/public/build/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",
1313
platforms: [.iOS(.v14)],

swift-source/all/Generated/Metrics/Metrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension GleanMetrics {
2323
// Intentionally left private, no external user can instantiate a new global object.
2424
}
2525

26-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 9, day: 14, hour: 5, minute: 18, second: 32))
26+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 9, day: 17, hour: 5, minute: 14, second: 53))
2727
}
2828

2929
enum NimbusEvents {

swift-source/all/Generated/as_ohttp_client.swift

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,12 +445,30 @@ private struct FfiConverterString: FfiConverter {
445445
}
446446
}
447447

448+
/**
449+
* Each OHTTP request-reply exchange needs to create an OhttpSession
450+
* object to manage encryption state.
451+
*/
448452
public protocol OhttpSessionProtocol: AnyObject {
453+
/**
454+
* Decypt and unpack the response from the Relay for the previously
455+
* encapsulated request. You must use the same OhttpSession that
456+
* generated the request message.
457+
*/
449458
func decapsulate(encoded: [UInt8]) throws -> OhttpResponse
450459

460+
/**
461+
* Encapsulate an HTTP request as Binary HTTP and then encrypt that
462+
* payload using HPKE. The caller is responsible for sending the
463+
* resulting message to the Relay.
464+
*/
451465
func encapsulate(method: String, scheme: String, server: String, endpoint: String, headers: [String: String], payload: [UInt8]) throws -> [UInt8]
452466
}
453467

468+
/**
469+
* Each OHTTP request-reply exchange needs to create an OhttpSession
470+
* object to manage encryption state.
471+
*/
454472
open class OhttpSession:
455473
OhttpSessionProtocol
456474
{
@@ -481,6 +499,9 @@ open class OhttpSession:
481499
return try! rustCall { uniffi_as_ohttp_client_fn_clone_ohttpsession(self.pointer, $0) }
482500
}
483501

502+
/**
503+
* Initialize encryption state based on specific Gateway key config
504+
*/
484505
public convenience init(config: [UInt8]) throws {
485506
let pointer =
486507
try rustCallWithError(FfiConverterTypeOhttpError.lift) {
@@ -499,13 +520,23 @@ open class OhttpSession:
499520
try! rustCall { uniffi_as_ohttp_client_fn_free_ohttpsession(pointer, $0) }
500521
}
501522

523+
/**
524+
* Decypt and unpack the response from the Relay for the previously
525+
* encapsulated request. You must use the same OhttpSession that
526+
* generated the request message.
527+
*/
502528
open func decapsulate(encoded: [UInt8]) throws -> OhttpResponse {
503529
return try FfiConverterTypeOhttpResponse.lift(rustCallWithError(FfiConverterTypeOhttpError.lift) {
504530
uniffi_as_ohttp_client_fn_method_ohttpsession_decapsulate(self.uniffiClonePointer(),
505531
FfiConverterSequenceUInt8.lower(encoded), $0)
506532
})
507533
}
508534

535+
/**
536+
* Encapsulate an HTTP request as Binary HTTP and then encrypt that
537+
* payload using HPKE. The caller is responsible for sending the
538+
* resulting message to the Relay.
539+
*/
509540
open func encapsulate(method: String, scheme: String, server: String, endpoint: String, headers: [String: String], payload: [UInt8]) throws -> [UInt8] {
510541
return try FfiConverterSequenceUInt8.lift(rustCallWithError(FfiConverterTypeOhttpError.lift) {
511542
uniffi_as_ohttp_client_fn_method_ohttpsession_encapsulate(self.uniffiClonePointer(),
@@ -557,14 +588,25 @@ public func FfiConverterTypeOhttpSession_lower(_ value: OhttpSession) -> UnsafeM
557588
return FfiConverterTypeOhttpSession.lower(value)
558589
}
559590

591+
/**
592+
* A testing interface for decrypting and responding to OHTTP messages. This
593+
* should only be used for testing.
594+
*/
560595
public protocol OhttpTestServerProtocol: AnyObject {
596+
/**
597+
* Return the unique encryption key config for this instance of test server.
598+
*/
561599
func getConfig() -> [UInt8]
562600

563601
func receive(message: [UInt8]) throws -> TestServerRequest
564602

565603
func respond(response: OhttpResponse) throws -> [UInt8]
566604
}
567605

606+
/**
607+
* A testing interface for decrypting and responding to OHTTP messages. This
608+
* should only be used for testing.
609+
*/
568610
open class OhttpTestServer:
569611
OhttpTestServerProtocol
570612
{
@@ -612,6 +654,9 @@ open class OhttpTestServer:
612654
try! rustCall { uniffi_as_ohttp_client_fn_free_ohttptestserver(pointer, $0) }
613655
}
614656

657+
/**
658+
* Return the unique encryption key config for this instance of test server.
659+
*/
615660
open func getConfig() -> [UInt8] {
616661
return try! FfiConverterSequenceUInt8.lift(try! rustCall {
617662
uniffi_as_ohttp_client_fn_method_ohttptestserver_get_config(self.uniffiClonePointer(), $0)
@@ -671,6 +716,9 @@ public func FfiConverterTypeOhttpTestServer_lower(_ value: OhttpTestServer) -> U
671716
return FfiConverterTypeOhttpTestServer.lower(value)
672717
}
673718

719+
/**
720+
* The decrypted response from the Gateway/Target
721+
*/
674722
public struct OhttpResponse {
675723
public var statusCode: UInt16
676724
public var headers: [String: String]

swift-source/all/Generated/autofill.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,9 @@ public func FfiConverterTypeStore_lower(_ value: Store) -> UnsafeMutableRawPoint
660660
return FfiConverterTypeStore.lower(value)
661661
}
662662

663+
/**
664+
* What you get back as an address.
665+
*/
663666
public struct Address {
664667
public var guid: String
665668
public var name: String
@@ -816,6 +819,9 @@ public func FfiConverterTypeAddress_lower(_ value: Address) -> RustBuffer {
816819
return FfiConverterTypeAddress.lower(value)
817820
}
818821

822+
/**
823+
* What you get back as a credit-card.
824+
*/
819825
public struct CreditCard {
820826
public var guid: String
821827
public var ccName: String
@@ -940,6 +946,9 @@ public func FfiConverterTypeCreditCard_lower(_ value: CreditCard) -> RustBuffer
940946
return FfiConverterTypeCreditCard.lower(value)
941947
}
942948

949+
/**
950+
* What you pass to create or update an address.
951+
*/
943952
public struct UpdatableAddressFields {
944953
public var name: String
945954
public var organization: String
@@ -1056,6 +1065,9 @@ public func FfiConverterTypeUpdatableAddressFields_lower(_ value: UpdatableAddre
10561065
return FfiConverterTypeUpdatableAddressFields.lower(value)
10571066
}
10581067

1068+
/**
1069+
* What you pass to create or update a credit-card.
1070+
*/
10591071
public struct UpdatableCreditCardFields {
10601072
public var ccName: String
10611073
public var ccNumberEnc: String
@@ -1273,13 +1285,20 @@ private struct FfiConverterSequenceTypeCreditCard: FfiConverterRustBuffer {
12731285
}
12741286
}
12751287

1288+
/**
1289+
* Create a new, random, encryption key.
1290+
*/
12761291
public func createAutofillKey() throws -> String {
12771292
return try FfiConverterString.lift(rustCallWithError(FfiConverterTypeAutofillApiError.lift) {
12781293
uniffi_autofill_fn_func_create_autofill_key($0
12791294
)
12801295
})
12811296
}
12821297

1298+
/**
1299+
* Decrypt an arbitrary string - `key` must have come from `create_key()`
1300+
* and `ciphertext` must have come from `encrypt_string()`
1301+
*/
12831302
public func decryptString(key: String, ciphertext: String) throws -> String {
12841303
return try FfiConverterString.lift(rustCallWithError(FfiConverterTypeAutofillApiError.lift) {
12851304
uniffi_autofill_fn_func_decrypt_string(
@@ -1289,6 +1308,9 @@ public func decryptString(key: String, ciphertext: String) throws -> String {
12891308
})
12901309
}
12911310

1311+
/**
1312+
* Encrypt an arbitrary string - `key` must have come from `create_key()`
1313+
*/
12921314
public func encryptString(key: String, cleartext: String) throws -> String {
12931315
return try FfiConverterString.lift(rustCallWithError(FfiConverterTypeAutofillApiError.lift) {
12941316
uniffi_autofill_fn_func_encrypt_string(

swift-source/all/Generated/errorsupport.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,13 +545,20 @@ extension FfiConverterCallbackInterfaceApplicationErrorReporter: FfiConverter {
545545
}
546546
}
547547

548+
/**
549+
* Set the global error reporter. This is typically done early in startup.
550+
*/
548551
public func setApplicationErrorReporter(errorReporter: ApplicationErrorReporter) { try! rustCall {
549552
uniffi_error_support_fn_func_set_application_error_reporter(
550553
FfiConverterCallbackInterfaceApplicationErrorReporter.lower(errorReporter), $0
551554
)
552555
}
553556
}
554557

558+
/**
559+
* Unset the global error reporter. This is typically done at shutdown for
560+
* platforms that want to cleanup references like Desktop.
561+
*/
555562
public func unsetApplicationErrorReporter() { try! rustCall {
556563
uniffi_error_support_fn_func_unset_application_error_reporter($0
557564
)

0 commit comments

Comments
 (0)