TimelineManager
open class TimelineManager
Undocumented
-
Undocumented
Declaration
Swift
open var store: TimelineStore
-
Undocumented
Declaration
Swift
private(set) open var classifier: TimelineClassifier? = TimelineClassifier.highlander
-
Undocumented
Declaration
Swift
public let processingQueue = DispatchQueue(label: "TimelineProcessing")
-
Undocumented
Declaration
Swift
public init()
-
The target number of samples to record per minute.
Note
The actual number of samples recorded per minute may be less than this, depending on data availability.Declaration
Swift
public var samplesPerMinute: Double = 10
-
Undocumented
Declaration
Swift
public var activityTypeClassifySamples = true
-
The current (most recent) timeline item, representing the user’s current activity while recording.
Note
This value is equivalent toactiveItems.last
.Declaration
Swift
public var currentItem: TimelineItem?
-
The timeline items that are still being considered for modification by the processing engine, in ascending date order.
Note
Once a timeline item is finalised it will no longer be modified by the processing engine.Declaration
Swift
private(set) public var activeItems: [TimelineItem] = []
-
Undocumented
Declaration
Swift
public func startRecording()
-
Undocumented
Declaration
Swift
public func stopRecording()
-
Undocumented
Declaration
Swift
public var recording: Bool = false
-
Undocumented
Declaration
Swift
private(set) public var lastRecorded: Date?
-
Undocumented
Declaration
Swift
public func add(_ timelineItem: TimelineItem)
-
Undocumented
Declaration
Swift
public func remove(_ timelineItem: TimelineItem)
-
Undocumented
Declaration
Swift
public func remove(_ timelineItems: [TimelineItem])
-
Undocumented
Declaration
Swift
public func sampleUpdated()
-
Processing timeline items from an arbitrary point in the timeline.
Declaration
Swift
public func processTimelineItems(from fromItem: TimelineItem)
-
Attempt to safely delete a timeline item by merging it into a neighbouring item.
Declaration
Swift
public func delete(_ deadman: TimelineItem)