xpt_struct.h File Reference

#include "xpt_arena.h"

Include dependency graph for xpcom/xpt_struct.h:

This graph shows which files directly or indirectly include this file:


Classes

struct  nsID
 A "unique identifier". More...
struct  XPTHeader
struct  XPT_TYPELIB_VERSIONS_STRUCT
struct  XPTInterfaceDirectoryEntry
struct  XPTInterfaceDescriptor
struct  XPTString
struct  XPTTypeDescriptorPrefix
struct  XPTTypeDescriptor
union  XPTConstValue
struct  XPTConstDescriptor
struct  XPTParamDescriptor
struct  XPTMethodDescriptor
struct  XPTAnnotation

Defines

#define XPT_COPY_IID(to, from)
#define XPT_MAGIC   "XPCOM\nTypeLib\r\n\032"
#define XPT_MAGIC_STRING   "XPCOM\\nTypeLib\\r\\n\\032"
#define XPT_MAJOR_VERSION   0x01
#define XPT_MINOR_VERSION   0x02
#define XPT_MAJOR_INCOMPATIBLE_VERSION   0x02
#define XPT_VERSION_UNKNOWN   0
#define XPT_VERSION_UNSUPPORTED   1
#define XPT_VERSION_OLD   2
#define XPT_VERSION_CURRENT   3
#define XPT_TYPELIB_VERSIONS
#define XPT_ID_SCRIPTABLE   0x80
#define XPT_ID_FUNCTION   0x40
#define XPT_ID_FLAGMASK   0xc0
#define XPT_ID_TAGMASK   (~XPT_ID_FLAGMASK)
#define XPT_ID_TAG(id)   ((id).flags & XPT_ID_TAGMASK)
#define XPT_ID_IS_SCRIPTABLE(flags)   (!!(flags & XPT_ID_SCRIPTABLE))
#define XPT_ID_IS_FUNCTION(flags)   (!!(flags & XPT_ID_FUNCTION))
#define XPT_TDP_POINTER   0x80
#define XPT_TDP_UNIQUE_POINTER   0x40
#define XPT_TDP_REFERENCE   0x20
#define XPT_TDP_FLAGMASK   0xe0
#define XPT_TDP_TAGMASK   (~XPT_TDP_FLAGMASK)
#define XPT_TDP_TAG(tdp)   ((tdp).flags & XPT_TDP_TAGMASK)
#define XPT_TDP_IS_POINTER(flags)   (flags & XPT_TDP_POINTER)
#define XPT_TDP_IS_UNIQUE_POINTER(flags)   (flags & XPT_TDP_UNIQUE_POINTER)
#define XPT_TDP_IS_REFERENCE(flags)   (flags & XPT_TDP_REFERENCE)
#define XPT_COPY_TYPE(to, from)
#define XPT_PD_IN   0x80
#define XPT_PD_OUT   0x40
#define XPT_PD_RETVAL   0x20
#define XPT_PD_SHARED   0x10
#define XPT_PD_DIPPER   0x08
#define XPT_PD_OPTIONAL   0x04
#define XPT_PD_FLAGMASK   0xfc
#define XPT_PD_IS_IN(flags)   (flags & XPT_PD_IN)
#define XPT_PD_IS_OUT(flags)   (flags & XPT_PD_OUT)
#define XPT_PD_IS_RETVAL(flags)   (flags & XPT_PD_RETVAL)
#define XPT_PD_IS_SHARED(flags)   (flags & XPT_PD_SHARED)
#define XPT_PD_IS_DIPPER(flags)   (flags & XPT_PD_DIPPER)
#define XPT_PD_IS_OPTIONAL(flags)   (flags & XPT_PD_OPTIONAL)
#define XPT_MD_GETTER   0x80
#define XPT_MD_SETTER   0x40
#define XPT_MD_NOTXPCOM   0x20
#define XPT_MD_CTOR   0x10
#define XPT_MD_HIDDEN   0x08
#define XPT_MD_FLAGMASK   0xf8
#define XPT_MD_IS_GETTER(flags)   (flags & XPT_MD_GETTER)
#define XPT_MD_IS_SETTER(flags)   (flags & XPT_MD_SETTER)
#define XPT_MD_IS_NOTXPCOM(flags)   (flags & XPT_MD_NOTXPCOM)
#define XPT_MD_IS_CTOR(flags)   (flags & XPT_MD_CTOR)
#define XPT_MD_IS_HIDDEN(flags)   (flags & XPT_MD_HIDDEN)
#define XPT_ANN_LAST   0x80
#define XPT_ANN_IS_LAST(flags)   (flags & XPT_ANN_LAST)
#define XPT_ANN_PRIVATE   0x40
#define XPT_ANN_IS_PRIVATE(flags)   (flags & XPT_ANN_PRIVATE)

Typedefs

typedef struct XPTHeader XPTHeader
typedef struct
XPTInterfaceDirectoryEntry 
XPTInterfaceDirectoryEntry
typedef struct
XPTInterfaceDescriptor 
XPTInterfaceDescriptor
typedef struct XPTConstDescriptor XPTConstDescriptor
typedef struct XPTMethodDescriptor XPTMethodDescriptor
typedef struct XPTParamDescriptor XPTParamDescriptor
typedef struct XPTTypeDescriptor XPTTypeDescriptor
typedef struct
XPTTypeDescriptorPrefix 
XPTTypeDescriptorPrefix
typedef struct XPTString XPTString
typedef struct XPTAnnotation XPTAnnotation
typedef struct nsID nsID

Enumerations

enum  XPTTypeDescriptorTags {
  TD_INT8 = 0, TD_INT16 = 1, TD_INT32 = 2, TD_INT64 = 3,
  TD_UINT8 = 4, TD_UINT16 = 5, TD_UINT32 = 6, TD_UINT64 = 7,
  TD_FLOAT = 8, TD_DOUBLE = 9, TD_BOOL = 10, TD_CHAR = 11,
  TD_WCHAR = 12, TD_VOID = 13, TD_PNSIID = 14, TD_DOMSTRING = 15,
  TD_PSTRING = 16, TD_PWSTRING = 17, TD_INTERFACE_TYPE = 18, TD_INTERFACE_IS_TYPE = 19,
  TD_ARRAY = 20, TD_PSTRING_SIZE_IS = 21, TD_PWSTRING_SIZE_IS = 22, TD_UTF8STRING = 23,
  TD_CSTRING = 24, TD_ASTRING = 25, TD_INT8 = 0, TD_INT16 = 1,
  TD_INT32 = 2, TD_INT64 = 3, TD_UINT8 = 4, TD_UINT16 = 5,
  TD_UINT32 = 6, TD_UINT64 = 7, TD_FLOAT = 8, TD_DOUBLE = 9,
  TD_BOOL = 10, TD_CHAR = 11, TD_WCHAR = 12, TD_VOID = 13,
  TD_PNSIID = 14, TD_DOMSTRING = 15, TD_PSTRING = 16, TD_PWSTRING = 17,
  TD_INTERFACE_TYPE = 18, TD_INTERFACE_IS_TYPE = 19, TD_ARRAY = 20, TD_PSTRING_SIZE_IS = 21,
  TD_PWSTRING_SIZE_IS = 22, TD_UTF8STRING = 23, TD_CSTRING = 24, TD_ASTRING = 25
}

Functions

PRUint16 XPT_ParseVersionString (const char *str, PRUint8 *major, PRUint8 *minor)
XPTHeaderXPT_NewHeader (XPTArena *arena, PRUint16 num_interfaces, PRUint8 major_version, PRUint8 minor_version)
void XPT_FreeHeader (XPTArena *arena, XPTHeader *aHeader)
PRUint32 XPT_SizeOfHeader (XPTHeader *header)
PRUint32 XPT_SizeOfHeaderBlock (XPTHeader *header)
PRBool XPT_FillInterfaceDirectoryEntry (XPTArena *arena, XPTInterfaceDirectoryEntry *ide, nsID *iid, char *name, char *name_space, XPTInterfaceDescriptor *descriptor)
void XPT_DestroyInterfaceDirectoryEntry (XPTArena *arena, XPTInterfaceDirectoryEntry *ide)
PRBool XPT_GetInterfaceIndexByName (XPTInterfaceDirectoryEntry *ide_block, PRUint16 num_interfaces, char *name, PRUint16 *indexp)
XPTInterfaceDescriptorXPT_NewInterfaceDescriptor (XPTArena *arena, PRUint16 parent_interface, PRUint16 num_methods, PRUint16 num_constants, PRUint8 flags)
void XPT_FreeInterfaceDescriptor (XPTArena *arena, XPTInterfaceDescriptor *id)
PRBool XPT_InterfaceDescriptorAddTypes (XPTArena *arena, XPTInterfaceDescriptor *id, PRUint16 num)
PRBool XPT_InterfaceDescriptorAddMethods (XPTArena *arena, XPTInterfaceDescriptor *id, PRUint16 num)
PRBool XPT_InterfaceDescriptorAddConsts (XPTArena *arena, XPTInterfaceDescriptor *id, PRUint16 num)
XPTStringXPT_NewString (XPTArena *arena, PRUint16 length, char *bytes)
XPTStringXPT_NewStringZ (XPTArena *arena, char *bytes)
PRBool XPT_FillParamDescriptor (XPTArena *arena, XPTParamDescriptor *pd, PRUint8 flags, XPTTypeDescriptor *type)
PRBool XPT_FillMethodDescriptor (XPTArena *arena, XPTMethodDescriptor *meth, PRUint8 flags, char *name, PRUint8 num_args)
XPTAnnotationXPT_NewAnnotation (XPTArena *arena, PRUint8 flags, XPTString *creator, XPTString *private_data)

Define Documentation

#define XPT_ANN_IS_LAST ( flags   )     (flags & XPT_ANN_LAST)

#define XPT_ANN_IS_PRIVATE ( flags   )     (flags & XPT_ANN_PRIVATE)

#define XPT_ANN_LAST   0x80

#define XPT_ANN_PRIVATE   0x40

#define XPT_COPY_IID ( to,
from   ) 

Value:

(to).m0 = (from).m0;                                                        \
  (to).m1 = (from).m1;                                                        \
  (to).m2 = (from).m2;                                                        \
  (to).m3[0] = (from).m3[0];                                                  \
  (to).m3[1] = (from).m3[1];                                                  \
  (to).m3[2] = (from).m3[2];                                                  \
  (to).m3[3] = (from).m3[3];                                                  \
  (to).m3[4] = (from).m3[4];                                                  \
  (to).m3[5] = (from).m3[5];                                                  \
  (to).m3[6] = (from).m3[6];                                                  \
  (to).m3[7] = (from).m3[7];

#define XPT_COPY_TYPE ( to,
from   ) 

Value:

(to).prefix.flags = (from).prefix.flags;                                    \
  (to).argnum = (from).argnum;                                                \
  (to).argnum2 = (from).argnum2;                                              \
  (to).type.additional_type = (from).type.additional_type;

#define XPT_ID_FLAGMASK   0xc0

#define XPT_ID_FUNCTION   0x40

#define XPT_ID_IS_FUNCTION ( flags   )     (!!(flags & XPT_ID_FUNCTION))

#define XPT_ID_IS_SCRIPTABLE ( flags   )     (!!(flags & XPT_ID_SCRIPTABLE))

#define XPT_ID_SCRIPTABLE   0x80

#define XPT_ID_TAG ( id   )     ((id).flags & XPT_ID_TAGMASK)

#define XPT_ID_TAGMASK   (~XPT_ID_FLAGMASK)

#define XPT_MAGIC   "XPCOM\nTypeLib\r\n\032"

#define XPT_MAGIC_STRING   "XPCOM\\nTypeLib\\r\\n\\032"

#define XPT_MAJOR_INCOMPATIBLE_VERSION   0x02

#define XPT_MAJOR_VERSION   0x01

#define XPT_MD_CTOR   0x10

#define XPT_MD_FLAGMASK   0xf8

#define XPT_MD_GETTER   0x80

#define XPT_MD_HIDDEN   0x08

#define XPT_MD_IS_CTOR ( flags   )     (flags & XPT_MD_CTOR)

#define XPT_MD_IS_GETTER ( flags   )     (flags & XPT_MD_GETTER)

#define XPT_MD_IS_HIDDEN ( flags   )     (flags & XPT_MD_HIDDEN)

#define XPT_MD_IS_NOTXPCOM ( flags   )     (flags & XPT_MD_NOTXPCOM)

#define XPT_MD_IS_SETTER ( flags   )     (flags & XPT_MD_SETTER)

#define XPT_MD_NOTXPCOM   0x20

#define XPT_MD_SETTER   0x40

#define XPT_MINOR_VERSION   0x02

#define XPT_PD_DIPPER   0x08

#define XPT_PD_FLAGMASK   0xfc

#define XPT_PD_IN   0x80

#define XPT_PD_IS_DIPPER ( flags   )     (flags & XPT_PD_DIPPER)

#define XPT_PD_IS_IN ( flags   )     (flags & XPT_PD_IN)

#define XPT_PD_IS_OPTIONAL ( flags   )     (flags & XPT_PD_OPTIONAL)

#define XPT_PD_IS_OUT ( flags   )     (flags & XPT_PD_OUT)

#define XPT_PD_IS_RETVAL ( flags   )     (flags & XPT_PD_RETVAL)

#define XPT_PD_IS_SHARED ( flags   )     (flags & XPT_PD_SHARED)

#define XPT_PD_OPTIONAL   0x04

#define XPT_PD_OUT   0x40

#define XPT_PD_RETVAL   0x20

#define XPT_PD_SHARED   0x10

#define XPT_TDP_FLAGMASK   0xe0

#define XPT_TDP_IS_POINTER ( flags   )     (flags & XPT_TDP_POINTER)

#define XPT_TDP_IS_REFERENCE ( flags   )     (flags & XPT_TDP_REFERENCE)

#define XPT_TDP_IS_UNIQUE_POINTER ( flags   )     (flags & XPT_TDP_UNIQUE_POINTER)

#define XPT_TDP_POINTER   0x80

#define XPT_TDP_REFERENCE   0x20

#define XPT_TDP_TAG ( tdp   )     ((tdp).flags & XPT_TDP_TAGMASK)

#define XPT_TDP_TAGMASK   (~XPT_TDP_FLAGMASK)

#define XPT_TDP_UNIQUE_POINTER   0x40

#define XPT_TYPELIB_VERSIONS

Value:

{                                                \
    {"1.0", 1, 0, XPT_VERSION_UNSUPPORTED},                                   \
    {"1.1", 1, 1, XPT_VERSION_OLD},                                           \
    {"1.2", 1, 2, XPT_VERSION_CURRENT}                                        \
}

#define XPT_VERSION_CURRENT   3

#define XPT_VERSION_OLD   2

#define XPT_VERSION_UNKNOWN   0

#define XPT_VERSION_UNSUPPORTED   1


Typedef Documentation

typedef struct nsID nsID

typedef struct XPTAnnotation XPTAnnotation

typedef struct XPTHeader XPTHeader

typedef struct XPTString XPTString


Enumeration Type Documentation

Enumerator:
TD_INT8 
TD_INT16 
TD_INT32 
TD_INT64 
TD_UINT8 
TD_UINT16 
TD_UINT32 
TD_UINT64 
TD_FLOAT 
TD_DOUBLE 
TD_BOOL 
TD_CHAR 
TD_WCHAR 
TD_VOID 
TD_PNSIID 
TD_DOMSTRING 
TD_PSTRING 
TD_PWSTRING 
TD_INTERFACE_TYPE 
TD_INTERFACE_IS_TYPE 
TD_ARRAY 
TD_PSTRING_SIZE_IS 
TD_PWSTRING_SIZE_IS 
TD_UTF8STRING 
TD_CSTRING 
TD_ASTRING 
TD_INT8 
TD_INT16 
TD_INT32 
TD_INT64 
TD_UINT8 
TD_UINT16 
TD_UINT32 
TD_UINT64 
TD_FLOAT 
TD_DOUBLE 
TD_BOOL 
TD_CHAR 
TD_WCHAR 
TD_VOID 
TD_PNSIID 
TD_DOMSTRING 
TD_PSTRING 
TD_PWSTRING 
TD_INTERFACE_TYPE 
TD_INTERFACE_IS_TYPE 
TD_ARRAY 
TD_PSTRING_SIZE_IS 
TD_PWSTRING_SIZE_IS 
TD_UTF8STRING 
TD_CSTRING 
TD_ASTRING 


Function Documentation

void XPT_DestroyInterfaceDirectoryEntry ( XPTArena arena,
XPTInterfaceDirectoryEntry ide 
)

PRBool XPT_FillInterfaceDirectoryEntry ( XPTArena arena,
XPTInterfaceDirectoryEntry ide,
nsID iid,
char *  name,
char *  name_space,
XPTInterfaceDescriptor descriptor 
)

PRBool XPT_FillMethodDescriptor ( XPTArena arena,
XPTMethodDescriptor meth,
PRUint8  flags,
char *  name,
PRUint8  num_args 
)

PRBool XPT_FillParamDescriptor ( XPTArena arena,
XPTParamDescriptor pd,
PRUint8  flags,
XPTTypeDescriptor type 
)

void XPT_FreeHeader ( XPTArena arena,
XPTHeader aHeader 
)

void XPT_FreeInterfaceDescriptor ( XPTArena arena,
XPTInterfaceDescriptor id 
)

PRBool XPT_GetInterfaceIndexByName ( XPTInterfaceDirectoryEntry ide_block,
PRUint16  num_interfaces,
char *  name,
PRUint16 *  indexp 
)

PRBool XPT_InterfaceDescriptorAddConsts ( XPTArena arena,
XPTInterfaceDescriptor id,
PRUint16  num 
)

PRBool XPT_InterfaceDescriptorAddMethods ( XPTArena arena,
XPTInterfaceDescriptor id,
PRUint16  num 
)

PRBool XPT_InterfaceDescriptorAddTypes ( XPTArena arena,
XPTInterfaceDescriptor id,
PRUint16  num 
)

XPTAnnotation* XPT_NewAnnotation ( XPTArena arena,
PRUint8  flags,
XPTString creator,
XPTString private_data 
)

XPTHeader* XPT_NewHeader ( XPTArena arena,
PRUint16  num_interfaces,
PRUint8  major_version,
PRUint8  minor_version 
)

XPTInterfaceDescriptor* XPT_NewInterfaceDescriptor ( XPTArena arena,
PRUint16  parent_interface,
PRUint16  num_methods,
PRUint16  num_constants,
PRUint8  flags 
)

XPTString* XPT_NewString ( XPTArena arena,
PRUint16  length,
char *  bytes 
)

XPTString* XPT_NewStringZ ( XPTArena arena,
char *  bytes 
)

PRUint16 XPT_ParseVersionString ( const char *  str,
PRUint8 *  major,
PRUint8 *  minor 
)

PRUint32 XPT_SizeOfHeader ( XPTHeader header  ) 

PRUint32 XPT_SizeOfHeaderBlock ( XPTHeader header  ) 


Generated on Fri Jul 31 01:55:16 2009 for Mozilla by  doxygen 1.5.6