Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIRegistryGetter Interface Reference

It sucks that nsIRegistry has to always allocate and return strings. More...

import "nsIRegistry.idl";

Inheritance diagram for nsIRegistryGetter:
Inheritance graph
[legend]
Collaboration diagram for nsIRegistryGetter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void getStringUTF8IntoBuffer (in nsRegistryKey baseKey, in string path, inout char buf, inout PRUint32 length)
 Get a string value of attribute valname in widestring or utf8 format.
void getBytesUTF8IntoBuffer (in nsRegistryKey baseKey, in string path, inout PRUint8 buf, inout PRUint32 length)
 Get a a byte array value of attribute valname.

Detailed Description

It sucks that nsIRegistry has to always allocate and return strings.

nsIRegistryGetter adds in interfaces for non allocating getters to registry values.

Definition at line 149 of file nsIRegistry.idl.


Member Function Documentation

void nsIRegistryGetter::getBytesUTF8IntoBuffer ( in nsRegistryKey  baseKey,
in string  path,
inout PRUint8  buf,
inout PRUint32  length 
)

Get a a byte array value of attribute valname.

Returns:
NS_OK on success. buf has the string value copied into it. length is updated to actual number of bytes copied into buf. NS_ERROR_REG_BUFFER_TOO_SMALL if not enough buffer space. length is updated to actual length in PRUint8s including terminating NULL and buf will be unchanged. NS_ERROR_FAILURE if an unknown error happened. state of buf and length undefined. various other failure codes otherwise. buf and length wont be updated.
void nsIRegistryGetter::getStringUTF8IntoBuffer ( in nsRegistryKey  baseKey,
in string  path,
inout char  buf,
inout PRUint32  length 
)

Get a string value of attribute valname in widestring or utf8 format.

Returns:
NS_OK on success. buf has the string value copied into it. length is NOT changed. NS_ERROR_REG_BUFFER_TOO_SMALL if not enough buffer space. length is updated to actual length in chars including terminating NULL and buf will be unchanged. NS_ERROR_FAILURE if an unknown error happened. state of buf and length undefined. various failure codes otherwise. buf and length wont be updated.

The documentation for this interface was generated from the following file: