Struct xpcom::interfaces::nsIHttpServerIdentity
[−]
[src]
#[repr(C)]pub struct nsIHttpServerIdentity { /* fields omitted */ }
interface nsIHttpServerIdentity : nsISupports
Methods
impl nsIHttpServerIdentity
[src]
pub fn coerce<T: nsIHttpServerIdentityCoerce>(&self) -> &T
[src]
Cast this nsIHttpServerIdentity
to one of its base interfaces.
impl nsIHttpServerIdentity
[src]
pub unsafe fn GetPrimaryScheme(
&self,
aPrimaryScheme: *mut *const c_char
) -> nsresult
[src]
&self,
aPrimaryScheme: *mut *const c_char
) -> nsresult
/**
* Represents a set of names for a server, one of which is the primary name for
* the server and the rest of which are secondary. By default every server will
* contain ("http", "localhost", port) and ("http", "127.0.0.1", port) as names,
* where port is what was provided to the corresponding server when started;
* however, except for their being removed when the corresponding server stops
* they have no special importance.
*/
/**
* The primary scheme at which the corresponding server is located, defaulting
* to 'http'. This name will be the value of nsIHttpRequest.scheme for
* HTTP/1.0 requests.
*
* This value is always set when the corresponding server is running. If the
* server is not running, this value is set only if it has been set to a
* non-default name using setPrimary. In this case reading this value will
* throw NS_ERROR_NOT_INITIALIZED.
*/
readonly attribute string primaryScheme;
pub unsafe fn GetPrimaryHost(
&self,
aPrimaryHost: *mut *const c_char
) -> nsresult
[src]
&self,
aPrimaryHost: *mut *const c_char
) -> nsresult
/**
* The primary name by which the corresponding server is known, defaulting to
* 'localhost'. This name will be the value of nsIHttpRequest.host for
* HTTP/1.0 requests.
*
* This value is always set when the corresponding server is running. If the
* server is not running, this value is set only if it has been set to a
* non-default name using setPrimary. In this case reading this value will
* throw NS_ERROR_NOT_INITIALIZED.
*/
readonly attribute string primaryHost;
pub unsafe fn GetPrimaryPort(&self, aPrimaryPort: *mut int32_t) -> nsresult
[src]
/**
* The primary port on which the corresponding server runs, defaulting to the
* associated server's port. This name will be the value of
* nsIHttpRequest.port for HTTP/1.0 requests.
*
* This value is always set when the corresponding server is running. If the
* server is not running, this value is set only if it has been set to a
* non-default name using setPrimary. In this case reading this value will
* throw NS_ERROR_NOT_INITIALIZED.
*/
readonly attribute long primaryPort;
pub unsafe fn Add(
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t
) -> nsresult
[src]
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t
) -> nsresult
/**
* Adds a location at which this server may be accessed.
*
* @throws NS_ERROR_ILLEGAL_VALUE
* if scheme or host do not match the scheme or host productions imported
* into RFC 2616 from RFC 2396, or if port is not a valid port number
*/
void add (in string scheme, in string host, in long port);
pub unsafe fn Remove(
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t,
_retval: *mut bool
) -> nsresult
/**
* Removes this name from the list of names by which the corresponding server
* is known. If name is also the primary name for the server, the primary
* name reverts to 'http://127.0.0.1' with the associated server's port.
*
* @throws NS_ERROR_ILLEGAL_VALUE
* if scheme or host do not match the scheme or host productions imported
* into RFC 2616 from RFC 2396, or if port is not a valid port number
* @returns
* true if the given name was a name for this server, false otherwise
*/
boolean remove (in string scheme, in string host, in long port);
pub unsafe fn Has(
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t,
_retval: *mut bool
) -> nsresult
/**
* Returns true if the given name is in this, false otherwise.
*
* @throws NS_ERROR_ILLEGAL_VALUE
* if scheme or host do not match the scheme or host productions imported
* into RFC 2616 from RFC 2396, or if port is not a valid port number
*/
boolean has (in string scheme, in string host, in long port);
pub unsafe fn GetScheme(
&self,
host: *const c_char,
port: int32_t,
_retval: *mut *const c_char
) -> nsresult
[src]
&self,
host: *const c_char,
port: int32_t,
_retval: *mut *const c_char
) -> nsresult
/**
* Returns the scheme for the name with the given host and port, if one is
* present; otherwise returns the empty string.
*
* @throws NS_ERROR_ILLEGAL_VALUE
* if host does not match the host production imported into RFC 2616 from
* RFC 2396, or if port is not a valid port number
*/
string getScheme (in string host, in long port);
pub unsafe fn SetPrimary(
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t
) -> nsresult
[src]
&self,
scheme: *const c_char,
host: *const c_char,
port: int32_t
) -> nsresult
/**
* Designates the given name as the primary name in this and adds it to this
* if it is not already present.
*
* @throws NS_ERROR_ILLEGAL_VALUE
* if scheme or host do not match the scheme or host productions imported
* into RFC 2616 from RFC 2396, or if port is not a valid port number
*/
void setPrimary (in string scheme, in string host, in long port);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIHttpServerIdentity
[src]
const IID: nsIID
IID: nsIID = nsID(2828919157, 44686, 19526, [145, 165, 13, 186, 153, 187, 210, 132])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIHttpServerIdentity
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIHttpServerIdentity
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.