Skip to main content
Version: v1

IDebuggerUI Interface

Signature

export interface IDebuggerUI

Methods

MethodReturn TypeDescription
addVersions(version)voidVersion information is provided. Expect updates (information about seq#, timestamp) through updateVersion() calls
disableNextOpButton(disable)voidCalled by controller in response to new ops being downloaded Called with disable = true if there are no (currently) ops to play
updateLastOpText(lastKnownOp, stillLoading)voidCalled periodically to notify about last known op
updateNextOpText(ops)voidCalled by controller when new ops arrive (or we are done playing previous batch) Indicates next batch of ops that would be played when UI calls controller's onOpButtonClick() Called with ops=[] when there are no ops to play.
updateVersion(index, version, seqNumber)voidCall when new version is downloaded from storage Expect multiple callbacks.
updateVersionText(versionsLeft)voidCalled periodically when new versions are downloaded from server
versionSelected(seqNumber, version)voidCalled in response to successful onVersionSelection() or onSnapshotFileSelection() call and provides extra information about selection. It expected that UI layer would change its mode as result of this call, i.e. switch to displaying op playback controls (if this is supported) Note: There maybe no call to versionSelected() in response to onSnapshotFileSelection() call if file does not exist, has wrong name of wrong format.

Method Details

addVersions

Version information is provided. Expect updates (information about seq#, timestamp) through updateVersion() calls

Signature

addVersions(version: IVersion[]): void;

Parameters

ParameterTypeDescription
versionIVersion[]

disableNextOpButton

Called by controller in response to new ops being downloaded Called with disable = true if there are no (currently) ops to play

Signature

disableNextOpButton(disable: boolean): void;

Parameters

ParameterTypeDescription
disableboolean

updateLastOpText

Called periodically to notify about last known op

Signature

updateLastOpText(lastKnownOp: number, stillLoading: boolean): void;

Parameters

ParameterTypeDescription
lastKnownOpnumberseq number of last known op. -1 if can't play ops in this mode (load from file)
stillLoadingbooleantrue if we did not reach yet the end of the stream

updateNextOpText

Called by controller when new ops arrive (or we are done playing previous batch) Indicates next batch of ops that would be played when UI calls controller's onOpButtonClick() Called with ops=[] when there are no ops to play.

Signature

updateNextOpText(ops: ISequencedDocumentMessage[]): void;

Parameters

ParameterTypeDescription
opsISequencedDocumentMessage[]

updateVersion

Call when new version is downloaded from storage Expect multiple callbacks.

Signature

updateVersion(index: number, version: IVersion, seqNumber: number): void;

Parameters

ParameterTypeDescription
indexnumber
versionIVersion
seqNumbernumber

updateVersionText

Called periodically when new versions are downloaded from server

Signature

updateVersionText(versionsLeft: number): void;

Parameters

ParameterTypeDescription
versionsLeftnumber

versionSelected

Called in response to successful onVersionSelection() or onSnapshotFileSelection() call and provides extra information about selection. It expected that UI layer would change its mode as result of this call, i.e. switch to displaying op playback controls (if this is supported) Note: There maybe no call to versionSelected() in response to onSnapshotFileSelection() call if file does not exist, has wrong name of wrong format.

Signature

versionSelected(seqNumber: number, version: IVersion | string): void;

Parameters

ParameterTypeDescription
seqNumbernumber
versionIVersion | stringversion, file name, or undefined if playing ops.