Struct xpcom::interfaces::nsIPersistentProperties
[−]
[src]
#[repr(C)]pub struct nsIPersistentProperties { /* fields omitted */ }
interface nsIPersistentProperties : nsIProperties
Methods
impl nsIPersistentProperties
[src]
pub fn coerce<T: nsIPersistentPropertiesCoerce>(&self) -> &T
[src]
Cast this nsIPersistentProperties
to one of its base interfaces.
impl nsIPersistentProperties
[src]
pub unsafe fn Load(&self, input: *const nsIInputStream) -> nsresult
[src]
/**
* load a set of name/value pairs from the input stream
* names and values should be in UTF8
*/
void load (in nsIInputStream input);
pub unsafe fn Save(
&self,
output: *const nsIOutputStream,
header: &nsACString
) -> nsresult
[src]
&self,
output: *const nsIOutputStream,
header: &nsACString
) -> nsresult
/**
* output the values to the stream - results will be in UTF8
*/
void save (in nsIOutputStream output, in AUTF8String header);
pub unsafe fn Enumerate(
&self,
_retval: *mut *const nsISimpleEnumerator
) -> nsresult
[src]
&self,
_retval: *mut *const nsISimpleEnumerator
) -> nsresult
/**
* get an enumeration of nsIPropertyElement objects,
* which are read-only (i.e. setting properties on the element will
* not make changes back into the source nsIPersistentProperties
*/
nsISimpleEnumerator enumerate ();
pub unsafe fn GetStringProperty(
&self,
key: &nsACString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
key: &nsACString,
_retval: &mut nsAString
) -> nsresult
/**
* shortcut to nsIProperty's get() which retrieves a string value
* directly (and thus faster)
*/
AString getStringProperty (in AUTF8String key);
pub unsafe fn SetStringProperty(
&self,
key: &nsACString,
value: &nsAString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
key: &nsACString,
value: &nsAString,
_retval: &mut nsAString
) -> nsresult
/**
* shortcut to nsIProperty's set() which sets a string value
* directly (and thus faster). If the given property already exists,
* then the old value will be returned
*/
AString setStringProperty (in AUTF8String key, in AString value);
Methods from Deref<Target = nsIProperties>
pub fn coerce<T: nsIPropertiesCoerce>(&self) -> &T
[src]
Cast this nsIProperties
to one of its base interfaces.
pub unsafe fn Get(
&self,
prop: *const c_char,
iid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
prop: *const c_char,
iid: &nsIID,
result: *mut *mut c_void
) -> nsresult
/**
* Gets a property with a given name.
*
* @throws NS_ERROR_FAILURE if a property with that name doesn't exist.
* @throws NS_ERROR_NO_INTERFACE if the found property fails to QI to the
* given iid.
*/
void get (in string prop, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result);
pub unsafe fn Set(
&self,
prop: *const c_char,
value: *const nsISupports
) -> nsresult
[src]
&self,
prop: *const c_char,
value: *const nsISupports
) -> nsresult
/**
* Sets a property with a given name to a given value.
*/
void set (in string prop, in nsISupports value);
pub unsafe fn Has(&self, prop: *const c_char, _retval: *mut bool) -> nsresult
[src]
/**
* Returns true if the property with the given name exists.
*/
boolean has (in string prop);
pub unsafe fn Undefine(&self, prop: *const c_char) -> nsresult
[src]
/**
* Undefines a property.
* @throws NS_ERROR_FAILURE if a property with that name doesn't
* already exist.
*/
void undefine (in string prop);
pub unsafe fn GetKeys(
&self,
count: *mut uint32_t,
keys: *mut *mut *const c_char
) -> nsresult
[src]
&self,
count: *mut uint32_t,
keys: *mut *mut *const c_char
) -> nsresult
/**
* Returns an array of the keys.
*/
void getKeys (out uint32_t count, [array, size_is (count), retval] out string keys);
Trait Implementations
impl XpCom for nsIPersistentProperties
[src]
const IID: nsIID
IID: nsIID = nsID(1885890479, 1024, 20394, [190, 177, 13, 174, 135, 48, 135, 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 nsIPersistentProperties
[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 nsIPersistentProperties
[src]
type Target = nsIProperties
The resulting type after dereferencing.
fn deref(&self) -> &nsIProperties
[src]
Dereferences the value.