Skip to content

Commit 5f6f7af

Browse files
author
Firefox Sync Engineering
committed
Nightly auto-update (124.0.20240207050252)
1 parent 7692189 commit 5f6f7af

File tree

5 files changed

+162
-7
lines changed

5 files changed

+162
-7
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 = "2f79c950cf878d594017900d030739f8626f9c4c7195179749b99ed42a41800e"
5-
let version = "124.0.20240206050329"
6-
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240206050329/artifacts/public/build/MozillaRustComponents.xcframework.zip"
4+
let checksum = "98e5595dfd1b3a09c30c38ae3d13214a40c11edf1d17016d60430040d84f3dee"
5+
let version = "124.0.20240207050252"
6+
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240207050252/artifacts/public/build/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "4feb078c3dfc5c71588ed6f2b61fe3b5371916837dcfb706801a0dc06b9cbb0e"
10-
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240206050329/artifacts/public/build/FocusRustComponents.xcframework.zip"
9+
let focusChecksum = "58937eed90dd39d67dd6f7e9c53fbf79de00d338df7ad06846da63d2c2309cc7"
10+
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240207050252/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
@@ -25,7 +25,7 @@ extension GleanMetrics {
2525
// Intentionally left private, no external user can instantiate a new global object.
2626
}
2727

28-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 6, hour: 5, minute: 22, second: 58))
28+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 7, hour: 5, minute: 12, second: 56))
2929
}
3030

3131
enum NimbusEvents {

swift-source/all/Generated/suggest.swift

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ fileprivate struct FfiConverterString: FfiConverter {
424424

425425
public protocol SuggestStoreProtocol {
426426
func clear() throws
427+
func fetchGlobalConfig() throws -> SuggestGlobalConfig
428+
func fetchProviderConfig(provider: SuggestionProvider) throws -> SuggestProviderConfig?
427429
func ingest(constraints: SuggestIngestionConstraints) throws
428430
func interrupt()
429431
func query(query: SuggestionQuery) throws -> [Suggestion]
@@ -464,6 +466,27 @@ public class SuggestStore: SuggestStoreProtocol {
464466
}
465467
}
466468

469+
public func fetchGlobalConfig() throws -> SuggestGlobalConfig {
470+
return try FfiConverterTypeSuggestGlobalConfig.lift(
471+
try
472+
rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
473+
uniffi_suggest_fn_method_suggeststore_fetch_global_config(self.pointer, $0
474+
)
475+
}
476+
)
477+
}
478+
479+
public func fetchProviderConfig(provider: SuggestionProvider) throws -> SuggestProviderConfig? {
480+
return try FfiConverterOptionTypeSuggestProviderConfig.lift(
481+
try
482+
rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
483+
uniffi_suggest_fn_method_suggeststore_fetch_provider_config(self.pointer,
484+
FfiConverterTypeSuggestionProvider.lower(provider),$0
485+
)
486+
}
487+
)
488+
}
489+
467490
public func ingest(constraints: SuggestIngestionConstraints) throws {
468491
try
469492
rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
@@ -653,6 +676,53 @@ public func FfiConverterTypeSuggestStoreBuilder_lower(_ value: SuggestStoreBuild
653676
}
654677

655678

679+
public struct SuggestGlobalConfig {
680+
public var showLessFrequentlyCap: Int32
681+
682+
// Default memberwise initializers are never public by default, so we
683+
// declare one manually.
684+
public init(showLessFrequentlyCap: Int32) {
685+
self.showLessFrequentlyCap = showLessFrequentlyCap
686+
}
687+
}
688+
689+
690+
extension SuggestGlobalConfig: Equatable, Hashable {
691+
public static func ==(lhs: SuggestGlobalConfig, rhs: SuggestGlobalConfig) -> Bool {
692+
if lhs.showLessFrequentlyCap != rhs.showLessFrequentlyCap {
693+
return false
694+
}
695+
return true
696+
}
697+
698+
public func hash(into hasher: inout Hasher) {
699+
hasher.combine(showLessFrequentlyCap)
700+
}
701+
}
702+
703+
704+
public struct FfiConverterTypeSuggestGlobalConfig: FfiConverterRustBuffer {
705+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SuggestGlobalConfig {
706+
return try SuggestGlobalConfig(
707+
showLessFrequentlyCap: FfiConverterInt32.read(from: &buf)
708+
)
709+
}
710+
711+
public static func write(_ value: SuggestGlobalConfig, into buf: inout [UInt8]) {
712+
FfiConverterInt32.write(value.showLessFrequentlyCap, into: &buf)
713+
}
714+
}
715+
716+
717+
public func FfiConverterTypeSuggestGlobalConfig_lift(_ buf: RustBuffer) throws -> SuggestGlobalConfig {
718+
return try FfiConverterTypeSuggestGlobalConfig.lift(buf)
719+
}
720+
721+
public func FfiConverterTypeSuggestGlobalConfig_lower(_ value: SuggestGlobalConfig) -> RustBuffer {
722+
return FfiConverterTypeSuggestGlobalConfig.lower(value)
723+
}
724+
725+
656726
public struct SuggestIngestionConstraints {
657727
public var maxSuggestions: UInt64?
658728

@@ -836,6 +906,54 @@ extension SuggestApiError: Equatable, Hashable {}
836906

837907
extension SuggestApiError: Error { }
838908

909+
// Note that we don't yet support `indirect` for enums.
910+
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
911+
public enum SuggestProviderConfig {
912+
913+
case weather(minKeywordLength: Int32)
914+
}
915+
916+
public struct FfiConverterTypeSuggestProviderConfig: FfiConverterRustBuffer {
917+
typealias SwiftType = SuggestProviderConfig
918+
919+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SuggestProviderConfig {
920+
let variant: Int32 = try readInt(&buf)
921+
switch variant {
922+
923+
case 1: return .weather(
924+
minKeywordLength: try FfiConverterInt32.read(from: &buf)
925+
)
926+
927+
default: throw UniffiInternalError.unexpectedEnumCase
928+
}
929+
}
930+
931+
public static func write(_ value: SuggestProviderConfig, into buf: inout [UInt8]) {
932+
switch value {
933+
934+
935+
case let .weather(minKeywordLength):
936+
writeInt(&buf, Int32(1))
937+
FfiConverterInt32.write(minKeywordLength, into: &buf)
938+
939+
}
940+
}
941+
}
942+
943+
944+
public func FfiConverterTypeSuggestProviderConfig_lift(_ buf: RustBuffer) throws -> SuggestProviderConfig {
945+
return try FfiConverterTypeSuggestProviderConfig.lift(buf)
946+
}
947+
948+
public func FfiConverterTypeSuggestProviderConfig_lower(_ value: SuggestProviderConfig) -> RustBuffer {
949+
return FfiConverterTypeSuggestProviderConfig.lower(value)
950+
}
951+
952+
953+
extension SuggestProviderConfig: Equatable, Hashable {}
954+
955+
956+
839957
// Note that we don't yet support `indirect` for enums.
840958
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
841959
public enum Suggestion {
@@ -1152,6 +1270,27 @@ fileprivate struct FfiConverterOptionString: FfiConverterRustBuffer {
11521270
}
11531271
}
11541272

1273+
fileprivate struct FfiConverterOptionTypeSuggestProviderConfig: FfiConverterRustBuffer {
1274+
typealias SwiftType = SuggestProviderConfig?
1275+
1276+
public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
1277+
guard let value = value else {
1278+
writeInt(&buf, Int8(0))
1279+
return
1280+
}
1281+
writeInt(&buf, Int8(1))
1282+
FfiConverterTypeSuggestProviderConfig.write(value, into: &buf)
1283+
}
1284+
1285+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
1286+
switch try readInt(&buf) as Int8 {
1287+
case 0: return nil
1288+
case 1: return try FfiConverterTypeSuggestProviderConfig.read(from: &buf)
1289+
default: throw UniffiInternalError.unexpectedOptionalTag
1290+
}
1291+
}
1292+
}
1293+
11551294
fileprivate struct FfiConverterOptionSequenceUInt8: FfiConverterRustBuffer {
11561295
typealias SwiftType = [UInt8]?
11571296

@@ -1293,6 +1432,12 @@ private var initializationResult: InitializationResult {
12931432
if (uniffi_suggest_checksum_method_suggeststore_clear() != 23581) {
12941433
return InitializationResult.apiChecksumMismatch
12951434
}
1435+
if (uniffi_suggest_checksum_method_suggeststore_fetch_global_config() != 62773) {
1436+
return InitializationResult.apiChecksumMismatch
1437+
}
1438+
if (uniffi_suggest_checksum_method_suggeststore_fetch_provider_config() != 37376) {
1439+
return InitializationResult.apiChecksumMismatch
1440+
}
12961441
if (uniffi_suggest_checksum_method_suggeststore_ingest() != 53781) {
12971442
return InitializationResult.apiChecksumMismatch
12981443
}

swift-source/all/Generated/suggestFFI.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ void*_Nonnull uniffi_suggest_fn_constructor_suggeststore_new(RustBuffer path, Ru
6969
);
7070
void uniffi_suggest_fn_method_suggeststore_clear(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
7171
);
72+
RustBuffer uniffi_suggest_fn_method_suggeststore_fetch_global_config(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
73+
);
74+
RustBuffer uniffi_suggest_fn_method_suggeststore_fetch_provider_config(void*_Nonnull ptr, RustBuffer provider, RustCallStatus *_Nonnull out_status
75+
);
7276
void uniffi_suggest_fn_method_suggeststore_ingest(void*_Nonnull ptr, RustBuffer constraints, RustCallStatus *_Nonnull out_status
7377
);
7478
void uniffi_suggest_fn_method_suggeststore_interrupt(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
@@ -209,6 +213,12 @@ uint16_t uniffi_suggest_checksum_func_raw_suggestion_url_matches(void
209213
);
210214
uint16_t uniffi_suggest_checksum_method_suggeststore_clear(void
211215

216+
);
217+
uint16_t uniffi_suggest_checksum_method_suggeststore_fetch_global_config(void
218+
219+
);
220+
uint16_t uniffi_suggest_checksum_method_suggeststore_fetch_provider_config(void
221+
212222
);
213223
uint16_t uniffi_suggest_checksum_method_suggeststore_ingest(void
214224

swift-source/focus/Generated/Metrics/Metrics.swift

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

28-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 6, hour: 5, minute: 23, second: 1))
28+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 7, hour: 5, minute: 12, second: 59))
2929
}
3030

3131
enum NimbusEvents {

0 commit comments

Comments
 (0)