Struct
WebKit2SecurityOrigin
Description [src]
struct WebKitSecurityOrigin {
/* No available fields */
}
A security boundary for websites.
WebKitSecurityOrigin is a representation of a security domain
defined by websites. A security origin consists of a protocol, a
hostname, and an optional port number.
Resources with the same security origin can generally access each
other for client-side scripting or database access. When comparing
origins, beware that if both protocol and host are NULL, the origins
should not be treated as equal.
| Available since: | 2.16 |
Constructors
webkit_security_origin_new
Create a new security origin from the provided protocol, host and port.
Available since: 2.16
webkit_security_origin_new_for_uri
Create a new security origin from the provided URI. Components of
uri other than protocol, host, and port do not affect the created
WebKitSecurityOrigin.
Available since: 2.16
Instance methods
webkit_security_origin_get_host
Gets the hostname of origin. It is reasonable for this to be NULL
if its protocol does not require a host component.
Available since: 2.16
webkit_security_origin_get_port
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
WebKitSecurityOrigin constructed from either URI.
Available since: 2.16
webkit_security_origin_is_opaque
This function returns FALSE. WebKitSecurityOrigin is now a simple
wrapper around a <protocol, host, port> triplet, and no longer
represents an origin as defined by web standards that may be opaque.
Available since: 2.16
Deprecated since: 2.32
webkit_security_origin_ref
Atomically increments the reference count of origin by one.
This function is MT-safe and may be called from any thread.
Available since: 2.16
webkit_security_origin_to_string
Gets a string representation of origin. The string representation
is a valid URI with only protocol, host, and port components, or
NULL.
Available since: 2.16
webkit_security_origin_unref
Atomically decrements the reference count of origin by one.
If the reference count drops to 0, all memory allocated by
WebKitSecurityOrigin is released. This function is MT-safe and may be
called from any thread.
Available since: 2.16