Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines
nsIStreamBufferAccess.idl File Reference
import "nsISupports.idl";
import "nsrootidl.idl";

Go to the source code of this file.

Classes

interface  nsIStreamBufferAccess
 An interface for access to a buffering stream implementation's underlying memory buffer. More...

Defines

#define NS_GET_BUFFER(sba, n, a)   ((sba)->GetBuffer(n, a))
 These macros get and put a buffer given either an sba parameter that may point to an object implementing nsIStreamBufferAccess, nsIObjectInputStream, or nsIObjectOutputStream.
#define NS_PUT_BUFFER(sba, p, n)   ((sba)->PutBuffer(p, n))
#define NS_GET8(p)   (*(PRUint8*)(p))
#define NS_GET16(p)   NS_SWAP16(*(PRUint16*)(p))
#define NS_GET32(p)   NS_SWAP32(*(PRUint32*)(p))
#define NS_GET64(p)   NS_SWAP64(*(PRUint64*)(p))
#define NS_GET_FLOAT(p)   ((float)NS_SWAP32(*(PRUint32*)(p)))
#define NS_GET_DOUBLE(p)   ((double)NS_SWAP64(*(PRUint64*)(p)))
#define NS_PUT8(p, x)   (*(PRUint8*)(p) = (x))
#define NS_PUT16(p, x)   (*(PRUint16*)(p) = NS_SWAP16(x))
#define NS_PUT32(p, x)   (*(PRUint32*)(p) = NS_SWAP32(x))
#define NS_PUT64(p, x)   (*(PRUint64*)(p) = NS_SWAP64(x))
#define NS_PUT_FLOAT(p, x)   (*(PRUint32*)(p) = NS_SWAP32(*(PRUint32*)&(x)))
#define NS_PUT_DOUBLE(p, x)   (*(PRUint64*)(p) = NS_SWAP64(*(PRUint64*)&(x)))

Define Documentation

#define NS_GET16 (   p)    NS_SWAP16(*(PRUint16*)(p))

Definition at line 178 of file nsIStreamBufferAccess.idl.

#define NS_GET32 (   p)    NS_SWAP32(*(PRUint32*)(p))

Definition at line 179 of file nsIStreamBufferAccess.idl.

#define NS_GET64 (   p)    NS_SWAP64(*(PRUint64*)(p))

Definition at line 180 of file nsIStreamBufferAccess.idl.

#define NS_GET8 (   p)    (*(PRUint8*)(p))

Definition at line 177 of file nsIStreamBufferAccess.idl.

#define NS_GET_BUFFER (   sba,
  n,
  a 
)    ((sba)->GetBuffer(n, a))

These macros get and put a buffer given either an sba parameter that may point to an object implementing nsIStreamBufferAccess, nsIObjectInputStream, or nsIObjectOutputStream.

Definition at line 174 of file nsIStreamBufferAccess.idl.

#define NS_GET_DOUBLE (   p)    ((double)NS_SWAP64(*(PRUint64*)(p)))

Definition at line 182 of file nsIStreamBufferAccess.idl.

#define NS_GET_FLOAT (   p)    ((float)NS_SWAP32(*(PRUint32*)(p)))

Definition at line 181 of file nsIStreamBufferAccess.idl.

#define NS_PUT16 (   p,
  x 
)    (*(PRUint16*)(p) = NS_SWAP16(x))

Definition at line 185 of file nsIStreamBufferAccess.idl.

#define NS_PUT32 (   p,
  x 
)    (*(PRUint32*)(p) = NS_SWAP32(x))

Definition at line 186 of file nsIStreamBufferAccess.idl.

#define NS_PUT64 (   p,
  x 
)    (*(PRUint64*)(p) = NS_SWAP64(x))

Definition at line 187 of file nsIStreamBufferAccess.idl.

#define NS_PUT8 (   p,
  x 
)    (*(PRUint8*)(p) = (x))

Definition at line 184 of file nsIStreamBufferAccess.idl.

#define NS_PUT_BUFFER (   sba,
  p,
  n 
)    ((sba)->PutBuffer(p, n))

Definition at line 175 of file nsIStreamBufferAccess.idl.

#define NS_PUT_DOUBLE (   p,
  x 
)    (*(PRUint64*)(p) = NS_SWAP64(*(PRUint64*)&(x)))

Definition at line 189 of file nsIStreamBufferAccess.idl.

#define NS_PUT_FLOAT (   p,
  x 
)    (*(PRUint32*)(p) = NS_SWAP32(*(PRUint32*)&(x)))

Definition at line 188 of file nsIStreamBufferAccess.idl.