All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.wendigo.chrome.domain.schema.SchemaDomain.kt Maven / Gradle / Ivy

There is a newer version: 0.7.4
Show newest version
package pl.wendigo.chrome.domain.schema

/**
 * Provides information about the protocol schema.
 */
class SchemaDomain internal constructor(private val connectionRemote : pl.wendigo.chrome.DebuggerProtocol) {
    /**
     * Returns supported domains.
     */
    fun getDomains() : io.reactivex.Single {
        return connectionRemote.runAndCaptureResponse("Schema.getDomains", null, GetDomainsResponse::class.java).map {
            it.value()
        }
    }

    /**
     * Returns flowable capturing all Schema domains events.
     */
    fun events() : io.reactivex.Flowable {
        return connectionRemote.captureAllEvents().map { it.value() }.filter {
            it.protocolDomain() == "Schema"
        }
    }
}

/**
 * Represents response frame for Schema.getDomains method call.
 *
 * Returns supported domains.
 */
data class GetDomainsResponse(
  /**
   * List of supported domains.
   */
  val domains : List

)





© 2015 - 2024 Weber Informatics LLC | Privacy Policy