PlacesConnection
open class PlacesConnection:
PlacesConnectionProtocol
-
Declaration
Swift
required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer)
-
url
is astring
and not aURL
becauseaccept_result
handles malformed urlsDeclaration
Swift
open func acceptResult(searchString: String, url: String) throws
-
Declaration
Swift
open func applyObservation(visit: VisitObservation) throws
-
Counts the number of bookmarks in the bookmark tree under the specified GUID. Does not count the passed item, so an empty folder will return zero, as will a non-existing GUID or the guid of a non-folder item. Counts only bookmark items - ie, sub-folders and separators are not counted.
Declaration
Swift
open func bookmarksCountBookmarksInTrees(folderGuids: [Guid]) throws -> UInt32
-
Declaration
Swift
open func bookmarksDelete(id: Guid) throws -> Bool
-
Declaration
Swift
open func bookmarksDeleteEverything() throws
-
Declaration
Swift
open func bookmarksGetAllWithUrl(url: String) throws -> [BookmarkItem]
-
Declaration
Swift
open func bookmarksGetByGuid(guid: Guid, getDirectChildren: Bool) throws -> BookmarkItem?
-
Declaration
Swift
open func bookmarksGetRecent(limit: Int32) throws -> [BookmarkItem]
-
Declaration
Swift
open func bookmarksGetTree(itemGuid: Guid) throws -> BookmarkItem?
-
Declaration
Swift
open func bookmarksGetUrlForKeyword(keyword: String) throws -> Url?
-
Declaration
Swift
open func bookmarksInsert(bookmark: InsertableBookmarkItem) throws -> Guid
-
Declaration
Swift
open func bookmarksSearch(query: String, limit: Int32) throws -> [BookmarkItem]
-
Declaration
Swift
open func bookmarksUpdate(data: BookmarkUpdateInfo) throws
-
Declaration
Swift
open func deleteEverythingHistory() throws
-
Declaration
Swift
open func deleteVisit(url: String, timestamp: PlacesTimestamp) throws
-
Declaration
Swift
open func deleteVisitsBetween(start: PlacesTimestamp, end: PlacesTimestamp) throws
-
Declaration
Swift
open func deleteVisitsFor(url: String) throws
-
Declaration
Swift
open func getHistoryHighlights(weights: HistoryHighlightWeights, limit: Int32) throws -> [HistoryHighlight]
-
Declaration
Swift
open func getHistoryMetadataBetween(start: PlacesTimestamp, end: PlacesTimestamp) throws -> [HistoryMetadata]
-
Declaration
Swift
open func getHistoryMetadataSince(since: PlacesTimestamp) throws -> [HistoryMetadata]
-
Declaration
Swift
open func getLatestHistoryMetadataForUrl(url: Url) throws -> HistoryMetadata?
-
Declaration
Swift
open func getTopFrecentSiteInfos(numItems: Int32, thresholdOption: FrecencyThresholdOption) throws -> [TopFrecentSiteInfo]
-
Declaration
Swift
open func getVisitCount(excludeTypes: VisitTransitionSet) throws -> Int64
-
Declaration
Swift
open func getVisitInfos(startDate: PlacesTimestamp, endDate: PlacesTimestamp, excludeTypes: VisitTransitionSet) throws -> [HistoryVisitInfo]
-
Declaration
Swift
open func getVisitPage(offset: Int64, count: Int64, excludeTypes: VisitTransitionSet) throws -> [HistoryVisitInfo]
-
Declaration
Swift
open func getVisitPageWithBound(bound: Int64, offset: Int64, count: Int64, excludeTypes: VisitTransitionSet) throws -> HistoryVisitInfosWithBound
-
Declaration
Swift
open func getVisited(urls: [String]) throws -> [Bool]
-
Declaration
Swift
open func getVisitedUrlsInRange(start: PlacesTimestamp, end: PlacesTimestamp, includeRemote: Bool) throws -> [Url]
-
Declaration
Swift
open func matchUrl(query: String) throws -> Url?
-
Declaration
Swift
open func metadataDeleteOlderThan(olderThan: PlacesTimestamp) throws
-
Declaration
Swift
open func newInterruptHandle() -> SqlInterruptHandle
-
Declaration
Swift
open func noteHistoryMetadataObservation(data: HistoryMetadataObservation, options: NoteHistoryMetadataObservationOptions) throws
-
Declaration
Swift
open func placesHistoryImportFromIos(dbPath: String, lastSyncTimestamp: Int64) throws -> HistoryMigrationResult
-
Declaration
Swift
open func queryAutocomplete(search: String, limit: Int32) throws -> [SearchResult]
-
Declaration
Swift
open func queryHistoryMetadata(query: String, limit: Int32) throws -> [HistoryMetadata]
-
Run maintenance on the places DB (checkpoint step)
The
run_maintenance_*()
functions are intended to be run during idle time and will take steps to clean up / shrink the database. They’re split up so that we can time each one in the Kotlin wrapper code (This is needed because we only have access to the Glean API in Kotlin and it supports a stop-watch style API, not recording specific values).Declaration
Swift
open func runMaintenanceCheckpoint() throws
-
Run maintenance on the places DB (optimize step)
The
run_maintenance_*()
functions are intended to be run during idle time and will take steps to clean up / shrink the database. They’re split up so that we can time each one in the Kotlin wrapper code (This is needed because we only have access to the Glean API in Kotlin and it supports a stop-watch style API, not recording specific values).Declaration
Swift
open func runMaintenanceOptimize() throws
-
Run maintenance on the places DB (prune step)
The
run_maintenance_*()
functions are intended to be run during idle time and will take steps to clean up / shrink the database. They’re split up so that we can time each one in the Kotlin wrapper code (This is needed because we only have access to the Glean API in Kotlin and it supports a stop-watch style API, not recording specific values).db_size_limit is the approximate storage limit in bytes. If the database is using more space than this, some older visits will be deleted to free up space. Pass in a 0 to skip this.
prune_limit is the maximum number of visits to prune if the database is over db_size_limit
Declaration
Swift
open func runMaintenancePrune(dbSizeLimit: UInt32, pruneLimit: UInt32) throws -> RunMaintenanceMetrics
-
Run maintenance on the places DB (vacuum step)
The
run_maintenance_*()
functions are intended to be run during idle time and will take steps to clean up / shrink the database. They’re split up so that we can time each one in the Kotlin wrapper code (This is needed because we only have access to the Glean API in Kotlin and it supports a stop-watch style API, not recording specific values).Declaration
Swift
open func runMaintenanceVacuum() throws