Struct xpcom::interfaces::nsIStandardURL
[−]
[src]
#[repr(C)]pub struct nsIStandardURL { /* fields omitted */ }
interface nsIStandardURL : nsIMutable
/**
* nsIStandardURL defines the interface to an URL with the standard
* file path format common to protocols like http, ftp, and file.
* It supports initialization from a relative path and provides
* some customization on how URLs are normalized.
*/
Methods
impl nsIStandardURL
[src]
pub fn coerce<T: nsIStandardURLCoerce>(&self) -> &T
[src]
Cast this nsIStandardURL
to one of its base interfaces.
impl nsIStandardURL
[src]
pub const URLTYPE_STANDARD: i64
URLTYPE_STANDARD: i64 = 1
/**
* blah:foo/bar => blah://foo/bar
* blah:/foo/bar => blah:///foo/bar
* blah://foo/bar => blah://foo/bar
* blah:///foo/bar => blah:///foo/bar
*/
pub const URLTYPE_AUTHORITY: i64
URLTYPE_AUTHORITY: i64 = 2
/**
* blah:foo/bar => blah://foo/bar
* blah:/foo/bar => blah://foo/bar
* blah://foo/bar => blah://foo/bar
* blah:///foo/bar => blah://foo/bar
*/
pub const URLTYPE_NO_AUTHORITY: i64
URLTYPE_NO_AUTHORITY: i64 = 3
/**
* blah:foo/bar => blah:///foo/bar
* blah:/foo/bar => blah:///foo/bar
* blah://foo/bar => blah://foo/bar
* blah:///foo/bar => blah:///foo/bar
*/
pub unsafe fn Init(
&self,
aUrlType: uint32_t,
aDefaultPort: int32_t,
aSpec: &nsACString,
aOriginCharset: *const c_char,
aBaseURI: *const nsIURI
) -> nsresult
[src]
&self,
aUrlType: uint32_t,
aDefaultPort: int32_t,
aSpec: &nsACString,
aOriginCharset: *const c_char,
aBaseURI: *const nsIURI
) -> nsresult
/**
* Initialize a standard URL.
*
* @param aUrlType - one of the URLTYPE_ flags listed above.
* @param aDefaultPort - if the port parsed from the URL string matches
* this port, then the port will be removed from the
* canonical form of the URL.
* @param aSpec - URL string.
* @param aOriginCharset - the charset from which this URI string
* originated. this corresponds to the charset
* that should be used when communicating this
* URI to an origin server, for example. if
* null, then provide aBaseURI implements this
* interface, the origin charset of aBaseURI will
* be assumed, otherwise defaulting to UTF-8 (i.e.,
* no charset transformation from aSpec).
* @param aBaseURI - if null, aSpec must specify an absolute URI.
* otherwise, aSpec will be resolved relative
* to aBaseURI.
*/
void init (in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI);
pub unsafe fn SetDefaultPort(&self, aNewDefaultPort: int32_t) -> nsresult
[src]
/**
* Set the default port.
*
* Note: If this object is already using its default port (i.e. if it has
* mPort == -1), then it will now implicitly be using the new default port.
*
* @param aNewDefaultPort - if the URI has (or is later given) a port that
* matches this default, then we won't include a
* port number in the canonical form of the URL.
*/
void setDefaultPort (in long aNewDefaultPort);
Methods from Deref<Target = nsIMutable>
pub fn coerce<T: nsIMutableCoerce>(&self) -> &T
[src]
Cast this nsIMutable
to one of its base interfaces.
pub unsafe fn GetMutable(&self, aMutable: *mut bool) -> nsresult
[src]
/**
* Control whether or not this object can be modified. If the flag is
* false, no modification is allowed. Once the flag has been set to false,
* it cannot be reset back to true -- attempts to do so throw
* NS_ERROR_INVALID_ARG.
*/
attribute boolean mutable;
pub unsafe fn SetMutable(&self, aMutable: bool) -> nsresult
[src]
/**
* Control whether or not this object can be modified. If the flag is
* false, no modification is allowed. Once the flag has been set to false,
* it cannot be reset back to true -- attempts to do so throw
* NS_ERROR_INVALID_ARG.
*/
attribute boolean mutable;
Trait Implementations
impl XpCom for nsIStandardURL
[src]
const IID: nsIID
IID: nsIID = nsID(3132976330, 60391, 17193, [150, 124, 214, 185, 227, 60, 170, 129])
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 nsIStandardURL
[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 nsIStandardURL
[src]
type Target = nsIMutable
The resulting type after dereferencing.
fn deref(&self) -> &nsIMutable
[src]
Dereferences the value.