PlacesConnectionProtocol
public protocol PlacesConnectionProtocol : AnyObject
-
url
is astring
and not aURL
becauseaccept_result
handles malformed urlsDeclaration
Swift
func acceptResult(searchString: String, url: String) throws
-
Declaration
Swift
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
func bookmarksCountBookmarksInTrees(folderGuids: [Guid]) throws -> UInt32
-
Declaration
Swift
func bookmarksDelete(id: Guid) throws -> Bool
-
Declaration
Swift
func bookmarksDeleteEverything() throws
-
Declaration
Swift
func bookmarksGetAllWithUrl(url: String) throws -> [BookmarkItem]
-
Declaration
Swift
func bookmarksGetByGuid(guid: Guid, getDirectChildren: Bool) throws -> BookmarkItem?
-
Declaration
Swift
func bookmarksGetRecent(limit: Int32) throws -> [BookmarkItem]
-
Declaration
Swift
func bookmarksGetTree(itemGuid: Guid) throws -> BookmarkItem?
-
Declaration
Swift
func bookmarksGetUrlForKeyword(keyword: String) throws -> Url?
-
Declaration
Swift
func bookmarksInsert(bookmark: InsertableBookmarkItem) throws -> Guid
-
Declaration
Swift
func bookmarksSearch(query: String, limit: Int32) throws -> [BookmarkItem]
-
Declaration
Swift
func bookmarksUpdate(data: BookmarkUpdateInfo) throws
-
Declaration
Swift
func deleteEverythingHistory() throws
-
Declaration
Swift
func deleteVisit(url: String, timestamp: PlacesTimestamp) throws
-
Declaration
Swift
func deleteVisitsBetween(start: PlacesTimestamp, end: PlacesTimestamp) throws
-
Declaration
Swift
func deleteVisitsFor(url: String) throws
-
Declaration
Swift
func getHistoryHighlights(weights: HistoryHighlightWeights, limit: Int32) throws -> [HistoryHighlight]
-
Declaration
Swift
func getHistoryMetadataBetween(start: PlacesTimestamp, end: PlacesTimestamp) throws -> [HistoryMetadata]
-
Declaration
Swift
func getHistoryMetadataSince(since: PlacesTimestamp) throws -> [HistoryMetadata]
-
Declaration
Swift
func getLatestHistoryMetadataForUrl(url: Url) throws -> HistoryMetadata?
-
Declaration
Swift
func getTopFrecentSiteInfos(numItems: Int32, thresholdOption: FrecencyThresholdOption) throws -> [TopFrecentSiteInfo]
-
Declaration
Swift
func getVisitCount(excludeTypes: VisitTransitionSet) throws -> Int64
-
Declaration
Swift
func getVisitInfos(startDate: PlacesTimestamp, endDate: PlacesTimestamp, excludeTypes: VisitTransitionSet) throws -> [HistoryVisitInfo]
-
Declaration
Swift
func getVisitPage(offset: Int64, count: Int64, excludeTypes: VisitTransitionSet) throws -> [HistoryVisitInfo]
-
Declaration
Swift
func getVisitPageWithBound(bound: Int64, offset: Int64, count: Int64, excludeTypes: VisitTransitionSet) throws -> HistoryVisitInfosWithBound
-
Declaration
Swift
func getVisited(urls: [String]) throws -> [Bool]
-
Declaration
Swift
func getVisitedUrlsInRange(start: PlacesTimestamp, end: PlacesTimestamp, includeRemote: Bool) throws -> [Url]
-
Declaration
Swift
func matchUrl(query: String) throws -> Url?
-
Declaration
Swift
func metadataDeleteOlderThan(olderThan: PlacesTimestamp) throws
-
Declaration
Swift
func newInterruptHandle() -> SqlInterruptHandle
-
Declaration
Swift
func noteHistoryMetadataObservation(data: HistoryMetadataObservation, options: NoteHistoryMetadataObservationOptions) throws
-
Declaration
Swift
func placesHistoryImportFromIos(dbPath: String, lastSyncTimestamp: Int64) throws -> HistoryMigrationResult
-
Declaration
Swift
func queryAutocomplete(search: String, limit: Int32) throws -> [SearchResult]
-
Declaration
Swift
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
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
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
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
func runMaintenanceVacuum() throws