EventListener

@ObjCName(name = "EventListener", exact = true)
open class EventListener

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Creates new instances of EventListener.

Functions

Link copied to clipboard
open fun bindService(name: String, service: ZiplineService)

Invoked when something calls Zipline.bind, or a service is sent via an API.

Link copied to clipboard
open fun callEnd(call: Call, result: CallResult, startValue: Any?)

Invoked when a service function call completes.

Link copied to clipboard
open fun callStart(call: Call): Any?

Invoked when a service function is called. This may be invoked for either suspending or non-suspending functions.

Link copied to clipboard
open fun codeLoadFailed(exception: Exception, startValue: Any?)

Invoked when a code load fails.

Link copied to clipboard
open fun codeLoadSkipped(startValue: Any?)

Invoked when a code load is skipped because the code hasn't changed.

Link copied to clipboard
open fun codeLoadSkippedNotFresh(startValue: Any?)

Invoked when a code load is skipped because the cached code isn't up-to-date.

Link copied to clipboard
open fun codeLoadStart(): Any?

Invoked for each attempt at loading code. This will be followed by a codeLoadSuccess, codeLoadFailed, or codeLoadSkipped if the code is unchanged.

Link copied to clipboard
open fun codeLoadSuccess(manifest: ZiplineManifest, zipline: Zipline, startValue: Any?)

Invoked when code is successfully downloaded and initialized.

Link copied to clipboard
open fun codeUnloaded()

Invoked when code is unloaded because it is no longer needed. Typically this occurs when a hot code update is applied.

Link copied to clipboard
open fun downloadFailed(url: String, exception: Exception, startValue: Any?)

Invoked when a network download fails.

Link copied to clipboard
open fun downloadStart(url: String): Any?

Invoked when a network download starts. This will be followed by downloadSuccess or downloadFailed.

Link copied to clipboard
open fun downloadSuccess(url: String, startValue: Any?)

Invoked when a network download completes successfully.

Link copied to clipboard
open fun initializerEnd(applicationName: String, startValue: Any?)

Invoked after the host-side initializer completes.

Link copied to clipboard
open fun initializerStart(applicationName: String): Any?

Invoked before Zipline runs the host-side initializer for an application.

Link copied to clipboard
open fun mainFunctionEnd(applicationName: String, startValue: Any?)

Invoked after Zipline runs the downloaded code's main function.

Link copied to clipboard
open fun mainFunctionStart(applicationName: String): Any?

Invoked before Zipline runs the downloaded code's main function.

Link copied to clipboard
open fun manifestParseFailed(exception: Exception)

Invoked when the manifest couldn't be decoded as JSON. For example, this might occur if there's a captive portal on the network.

Link copied to clipboard
open fun manifestReady(manifest: ZiplineManifest)

Invoked when the loader has successfully fetched a manifest, verified it (if necessary), and will proceed to download and load each of its modules.

Link copied to clipboard
open fun manifestVerified(manifest: ZiplineManifest, verifiedKey: String)

Invoked when a the manifest verifier successfully verifies a key. Manifest verification failures are signaled with codeLoadFailed.

Link copied to clipboard
open fun moduleLoadEnd(moduleId: String, startValue: Any?)

Invoked when a module load completes.

Link copied to clipboard
open fun moduleLoadStart(moduleId: String): Any?

Invoked when a module load starts. This is the process of loading code into QuickJS.

Link copied to clipboard
open fun serviceLeaked(name: String)

Invoked when a service is garbage collected without being closed.

Link copied to clipboard
open fun takeService(name: String, service: ZiplineService)

Invoked when something calls Zipline.take, or a service is received via an API.

Link copied to clipboard
open fun uncaughtException(exception: Throwable)

Invoked when app has thrown an uncaught exception.

Link copied to clipboard
open fun unknownChildren(widgetTag: WidgetTag, tag: ChildrenTag)

Invoked on a request to manipulate unknown children with tag for a widget with widgetTag. This is a schema mismatch and the child nodes are ignored.

Link copied to clipboard
open fun unknownEvent(widgetTag: WidgetTag, tag: EventTag)

Invoked on a request to process an unknown event with tag for a widget with widgetTag. This is a schema mismatch and the event is dropped.

Link copied to clipboard
open fun unknownEventNode(id: Id, tag: EventTag)

Invoked when an event is received on a widget that no longer exists.

Link copied to clipboard

Invoked on a request to create an unknown modifier with tag. This is a schema mismatch and the modifier is ignored.

Link copied to clipboard
open fun unknownProperty(widgetTag: WidgetTag, tag: PropertyTag)

Invoked on a request to set an unknown property with tag for a widget with widgetTag. This is a schema mismatch and the property is ignored.

Link copied to clipboard
open fun unknownWidget(tag: WidgetTag)

Invoked on a request to create an unknown widget with tag. This is a schema mismatch and the widget is ignored.

Link copied to clipboard
open fun ziplineCreated(zipline: Zipline)

Invoked when a Zipline is created, after codeLoadStart and before any application code is loaded.