gi-webkit2-4.0.22: WebKit2 bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2.Structs.SecurityOrigin

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype SecurityOrigin Source #

Memory-managed wrapper type.

Methods

getHost

securityOriginGetHost Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: a SecurityOrigin

-> m (Maybe Text)

Returns: The host of the SecurityOrigin

Gets the hostname of origin, or Nothing if origin is opaque or if its protocol does not require a host component.

Since: 2.16

getPort

securityOriginGetPort Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: a SecurityOrigin

-> m Word16

Returns: The port of the SecurityOrigin.

Gets the port of origin. This function will always return 0 if the port is the default port for the given protocol. For example, http://example.com has the same security origin as http://example.com:80, and this function will return 0 for a SecurityOrigin constructed from either URI. It will also return 0 if origin is opaque.

Since: 2.16

getProtocol

securityOriginGetProtocol Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: a SecurityOrigin

-> m (Maybe Text)

Returns: The protocol of the SecurityOrigin

Gets the protocol of origin, or Nothing if origin is opaque.

Since: 2.16

isOpaque

securityOriginIsOpaque Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: a SecurityOrigin

-> m Bool

Returns: True if origin is opaque.

Gets whether origin is an opaque security origin, which does not possess an associated protocol, host, or port.

Since: 2.16

new

securityOriginNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

protocol: The protocol for the new origin

-> Text

host: The host for the new origin

-> Word16

port: The port number for the new origin, or 0 to indicate the default port for protocol

-> m SecurityOrigin

Returns: A SecurityOrigin.

Create a new security origin from the provided protocol, host and port.

Since: 2.16

newForUri

securityOriginNewForUri Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

uri: The URI for the new origin

-> m SecurityOrigin

Returns: A SecurityOrigin.

Create a new security origin from the provided URI. Components of uri other than protocol, host, and port do not affect the created SecurityOrigin.

Since: 2.16

ref

securityOriginRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: a SecurityOrigin

-> m SecurityOrigin

Returns: The passed SecurityOrigin

Atomically increments the reference count of origin by one. This function is MT-safe and may be called from any thread.

Since: 2.16

toString

securityOriginToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: a SecurityOrigin

-> m (Maybe Text)

Returns: a URI representing origin.

Gets a string representation of origin. The string representation is a valid URI with only protocol, host, and port components. It may be Nothing, but usually only if origin is opaque.

Since: 2.16

unref

securityOriginUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SecurityOrigin

origin: A SecurityOrigin

-> m () 

Atomically decrements the reference count of origin by one. If the reference count drops to 0, all memory allocated by SecurityOrigin is released. This function is MT-safe and may be called from any thread.

Since: 2.16