Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsIBinaryOutputStream.idl File Reference
import "nsIOutputStream.idl";
import "nsrootidl.idl";
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  nsIBinaryOutputStream
 This interface allows writing of primitive data types (integers, floating-point values, booleans, etc.) to a stream in a binary, untagged, fixed-endianness format. More...

Functions

nsresult NS_WriteOptionalStringZ (nsIBinaryOutputStream *aStream, const char *aString)
nsresult NS_WriteOptionalWStringZ (nsIBinaryOutputStream *aStream, const PRUnichar *aString)

Function Documentation

nsresult NS_WriteOptionalStringZ ( nsIBinaryOutputStream aStream,
const char *  aString 
) [inline]

Definition at line 100 of file nsIBinaryOutputStream.idl.

{
    PRBool nonnull = (aString != nsnull);
    nsresult rv = aStream->WriteBoolean(nonnull);
    if (NS_SUCCEEDED(rv) && nonnull)
        rv = aStream->WriteStringZ(aString);
    return rv;
}
nsresult NS_WriteOptionalWStringZ ( nsIBinaryOutputStream aStream,
const PRUnichar aString 
) [inline]

Definition at line 110 of file nsIBinaryOutputStream.idl.

{
    PRBool nonnull = (aString != nsnull);
    nsresult rv = aStream->WriteBoolean(nonnull);
    if (NS_SUCCEEDED(rv) && nonnull)
        rv = aStream->WriteWStringZ(aString);
    return rv;
}