Classes

The following classes are available globally.

  • Declaration

    Swift

    open class MozAdsClient : MozAdsClientProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class MozAdsClientBuilder : MozAdsClientBuilderProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class MozAdsContextIdProviderImpl : MozAdsContextIdProvider, @unchecked Sendable
  • Each OHTTP request-reply exchange needs to create an OhttpSession object to manage encryption state.

    See more

    Declaration

    Swift

    open class OhttpSession : OhttpSessionProtocol, @unchecked Sendable
  • A testing interface for decrypting and responding to OHTTP messages. This should only be used for testing.

    See more

    Declaration

    Swift

    open class OhttpTestServer : OhttpTestServerProtocol, @unchecked Sendable
  • The bridged sync engine for addresses. The canonical docs are in services/interfaces/mozIBridgedSyncEngine.idl. NOTE: all timestamps here are milliseconds.

    See more

    Declaration

    Swift

    open class AddressesBridgedEngine : AddressesBridgedEngineProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class Store : StoreProtocol, @unchecked Sendable
  • Top-level API for the context_id component

    See more

    Declaration

    Swift

    open class ContextIdComponent : ContextIdComponentProtocol, @unchecked Sendable
  • Object representing the signed-in state of an application.

    The FirefoxAccount object is the main interface provided by this crate. It represents the signed-in state of an application that may be connected to user’s Firefox Account, and provides methods for inspecting the state of the account and accessing other services on behalf of the user.

    See more

    Declaration

    Swift

    open class FirefoxAccount : FirefoxAccountProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class EncryptorDecryptorImpl : EncryptorDecryptor, @unchecked Sendable
  • Declaration

    Swift

    open class KeyManagerImpl : KeyManager, @unchecked Sendable
  • Declaration

    Swift

    open class LoginStore : LoginStoreProtocol, @unchecked Sendable
  • The Desktop-facing bridged sync engine - a thin wrapper over the sync15::engine::SyncEngine implemented by this component (see sync15::engine::BridgedEngineWrapper). It’s only actually used on Desktop, but it’s fine to expose this everywhere. NOTE: all timestamps here are milliseconds.

    See more

    Declaration

    Swift

    open class LoginsBridgedEngine : LoginsBridgedEngineProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class ManagedEncryptorDecryptor : ManagedEncryptorDecryptorProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class StaticKeyManager : StaticKeyManagerProtocol, @unchecked Sendable
  • Client for fetching curated recommendations from the Merino service.

    Construct using [CuratedRecommendationsClient::new] with a [CuratedRecommendationsConfig], then call get_curated_recommendations to fetch recommendations.

    See more

    Declaration

    Swift

    open class CuratedRecommendationsClient : CuratedRecommendationsClientProtocol, @unchecked Sendable
  • A client for the merino suggest endpoint.

    Use [SuggestClient::new] to create an instance, then call [SuggestClient::get_suggestions] to fetch suggestions for a query.

    See more

    Declaration

    Swift

    open class SuggestClient : SuggestClientProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class GeckoPrefHandlerImpl : GeckoPrefHandler, @unchecked Sendable
  • Declaration

    Swift

    open class MetricsHandlerImpl : MetricsHandler, @unchecked Sendable
  • Declaration

    Swift

    open class NimbusClient : NimbusClientProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class NimbusStringHelper : NimbusStringHelperProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class NimbusTargetingHelper : NimbusTargetingHelperProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class RecordedContextImpl : RecordedContext, @unchecked Sendable
  • Declaration

    Swift

    open class PlacesApi : PlacesApiProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class PlacesConnection : PlacesConnectionProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class SqlInterruptHandle : SqlInterruptHandleProtocol, @unchecked Sendable
  • Object representing the PushManager used to manage subscriptions

    The PushManager object is the main interface provided by this crate it allow consumers to manage push subscriptions. It exposes methods that interact with the autopush server and persists state representing subscriptions.

    See more

    Declaration

    Swift

    open class PushManager : PushManagerProtocol, @unchecked Sendable
  • Represents a client for the Relay API.

    Use this struct to connect and authenticate with a Relay server, managing authorization to call protected endpoints.

    # Authorization

    • Clients should use the [fxa_client::FirefoxAccount::getAccessToken()] function to obtain a relay-scoped access token (scope: https://identity.mozilla.com/apps/relay).
    • Then, construct the [RelayClient] with the access token. All requests will then be authenticated to the Relay server via Authorization: Bearer {fxa-access-token}.
    • The Relay server verifies this token with the FxA OAuth /verify endpoint.
    • Clients are responsible for getting a new access token when needed.
    See more

    Declaration

    Swift

    open class RelayClient : RelayClientProtocol, @unchecked Sendable
  • Client for fetching Relay data from Remote Settings

    This struct holds separate Remote Settings clients for the allowlist and denylist collections. It follows the same pattern as SuggestRemoteSettingsClient.

    See more

    Declaration

    Swift

    open class RelayRemoteSettingsClient : RelayRemoteSettingsClientProtocol, @unchecked Sendable
  • Client for a single Remote Settings collection

    Use [RemoteSettingsService::make_client] to create these.

    See more

    Declaration

    Swift

    open class RemoteSettingsClient : RemoteSettingsClientProtocol, @unchecked Sendable
  • Application-level Remote Settings manager.

    This handles application-level operations, like syncing all the collections, and acts as a factory for creating clients.

    See more

    Declaration

    Swift

    open class RemoteSettingsService : RemoteSettingsServiceProtocol, @unchecked Sendable
  • Trait implemented by consumers to record Remote Settings metrics with Glean.

    Consumers should implement this trait and pass it to [crate::RemoteSettingsService::set_telemetry].

    Consumers implement the trait like this (Kotlin example):

     /* Import the UniFFI-generated bindings
    
    See more

    Declaration

    Swift

    open class RemoteSettingsTelemetryImpl : RemoteSettingsTelemetry, @unchecked Sendable
  • SearchEngineSelector parses the JSON configuration for search engines and returns the applicable engines depending on their region + locale.

    See more

    Declaration

    Swift

    open class SearchEngineSelector : SearchEngineSelectorProtocol, @unchecked Sendable
  • The store is the entry point to the Suggest component. It incrementally downloads suggestions from the Remote Settings service, stores them in a local database, and returns them in response to user queries.

    Your application should create a single store, and manage it as a singleton. The store is thread-safe, and supports concurrent queries and ingests. We expect that your application will call [SuggestStore::query()] to show suggestions as the user types into the address bar, and periodically call [SuggestStore::ingest()] in the background to update the database with new suggestions from Remote Settings.

    For responsiveness, we recommend always calling query() on a worker thread. When the user types new input into the address bar, call [SuggestStore::interrupt()] on the main thread to cancel the query for the old input, and unblock the worker thread for the new query.

    The store keeps track of the state needed to support incremental ingestion, but doesn’t schedule the ingestion work itself, or decide how many suggestions to ingest at once. This is for two reasons:

    1. The primitives for scheduling background work vary between platforms, and aren’t available to the lower-level Rust layer. You might use an idle timer on Desktop, WorkManager on Android, or BGTaskScheduler on iOS.
    2. Ingestion constraints can change, depending on the platform and the needs of your application. A mobile device on a metered connection might want to request a small subset of the Suggest data and download the rest later, while a desktop on a fast link might download the entire dataset on the first launch.
    See more

    Declaration

    Swift

    open class SuggestStore : SuggestStoreProtocol, @unchecked Sendable
  • Builder for [SuggestStore]

    Using a builder is preferred to calling the constructor directly since it’s harder to confuse the data_path and cache_path strings.

    See more

    Declaration

    Swift

    open class SuggestStoreBuilder : SuggestStoreBuilderProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class SyncManager : SyncManagerProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class RemoteCommandStore : RemoteCommandStoreProtocol, @unchecked Sendable
  • The Desktop-facing bridged sync engine - a thin wrapper over the sync15::engine::SyncEngine implemented by this component (see sync15::engine::BridgedEngineWrapper). It’s only actually used in desktop, but it’s fine to expose this everywhere. NOTE: all timestamps here are milliseconds.

    See more

    Declaration

    Swift

    open class TabsBridgedEngine : TabsBridgedEngineProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class TabsStore : TabsStoreProtocol, @unchecked Sendable
  • Declaration

    Swift

    open class BackendImpl : Backend, @unchecked Sendable