зеркало из https://github.com/mozilla/pjs.git
Made necessary modifications to in-memory structs after writing some of
the XDR code for them.
This commit is contained in:
Родитель
658863e31c
Коммит
de1fdcb6be
|
@ -65,23 +65,35 @@ struct XPTHeader {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceDirectoryEntry {
|
struct XPTInterfaceDirectoryEntry {
|
||||||
uint128 iid;
|
uint128 iid;
|
||||||
XPTIdentfier name;
|
char *name;
|
||||||
XPTInterfaceDescriptor *interface_descriptor;
|
XPTInterfaceDescriptor *interface_descriptor;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceDescriptor {
|
struct XPTInterfaceDescriptor {
|
||||||
XPTInterfaceDescriptorEntry *parent_interface;
|
XPTInterfaceDescriptorEntry *parent_interface;
|
||||||
uint16 num_methods;
|
uint16 num_methods;
|
||||||
XPTMethodDescriptor *method_descriptors;
|
XPTMethodDescriptor *method_descriptors;
|
||||||
uint16 num_constants;
|
uint16 num_constants;
|
||||||
XPTConstDescriptor *const_descriptors;
|
XPTConstDescriptor *const_descriptors;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTConstDescriptor {
|
struct XPTConstDescriptor {
|
||||||
char *name;
|
char *name;
|
||||||
XPTTypeDescriptor type;
|
XPTTypeDescriptor type;
|
||||||
char value[0]; /* really varies according to type */
|
union {
|
||||||
|
int8 i8;
|
||||||
|
uint8 ui8;
|
||||||
|
int16 i16;
|
||||||
|
uint16 ui16;
|
||||||
|
int32 i32;
|
||||||
|
uint32 ui32;
|
||||||
|
int64 i64;
|
||||||
|
uint64 ui64;
|
||||||
|
uint16 wch;
|
||||||
|
char ch;
|
||||||
|
XPTstring *string;
|
||||||
|
} value; /* varies according to type */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTMethodDescriptor {
|
struct XPTMethodDescriptor {
|
||||||
|
@ -94,46 +106,48 @@ struct XPTMethodDescriptor {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTParamDescriptor {
|
struct XPTParamDescriptor {
|
||||||
uint8 in:1, out:1, retval:1, reserved:5;
|
uint8 in:1, out:1, retval:1, reserved:5;
|
||||||
XPTTypeDescriptor type;
|
XPTTypeDescriptor type;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTTypeDescriptorPrefix {
|
struct XPTTypeDescriptorPrefix {
|
||||||
uint8 is_pointer:1, is_unique_pointer:1, is_reference:1,
|
uint8 is_pointer:1, is_unique_pointer:1, is_reference:1,
|
||||||
tag:5;
|
tag:5;
|
||||||
};
|
|
||||||
|
|
||||||
struct XPTSimpleTypeDescriptor {
|
|
||||||
XPTTypeDescriptorPrefix prefix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceTypeDescriptor {
|
struct XPTInterfaceTypeDescriptor {
|
||||||
XPTTypeDescriptorPrefix prefix;
|
|
||||||
XPTInterfaceDirectoryEntry *interface;
|
XPTInterfaceDirectoryEntry *interface;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceIsTypeDescriptor {
|
struct XPTInterfaceIsTypeDescriptor {
|
||||||
XPTTypeDescriptorPrefix prefix;
|
uint8 argnum;
|
||||||
uint8 argnum;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct XPTTypeDescriptor {
|
||||||
|
XPTTypeDescriptorPrefix prefix;
|
||||||
|
union {
|
||||||
|
XPTInterfaceTypeDescriptor interface;
|
||||||
|
XPTInterfaceIsTypeDescriptor interface_is;
|
||||||
|
} type;
|
||||||
|
}
|
||||||
|
|
||||||
struct XPTString {
|
struct XPTString {
|
||||||
uint16 length;
|
uint16 length;
|
||||||
char bytes[];
|
char bytes[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTAnnotationPrefix {
|
struct XPTAnnotationPrefix {
|
||||||
uint8 is_last:1, tag:7;
|
uint8 is_last:1, tag:7;
|
||||||
};
|
|
||||||
|
|
||||||
struct XPTEmptyAnnotation {
|
|
||||||
XPTAnnotationPrefix prefix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTPrivateAnnotation {
|
struct XPTPrivateAnnotation {
|
||||||
XPTAnnotationPrefix prefix;
|
XPTString *creator;
|
||||||
XPTString *creator;
|
XPTString *private_data;
|
||||||
XPTString *private_data;
|
};
|
||||||
|
|
||||||
|
struct XPTAnnotation {
|
||||||
|
XPTAnnotationPrefix prefix;
|
||||||
|
XPTPrivateAnnotation private;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __xpt_struct_h__ */
|
#endif /* __xpt_struct_h__ */
|
||||||
|
|
|
@ -65,23 +65,35 @@ struct XPTHeader {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceDirectoryEntry {
|
struct XPTInterfaceDirectoryEntry {
|
||||||
uint128 iid;
|
uint128 iid;
|
||||||
XPTIdentfier name;
|
char *name;
|
||||||
XPTInterfaceDescriptor *interface_descriptor;
|
XPTInterfaceDescriptor *interface_descriptor;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceDescriptor {
|
struct XPTInterfaceDescriptor {
|
||||||
XPTInterfaceDescriptorEntry *parent_interface;
|
XPTInterfaceDescriptorEntry *parent_interface;
|
||||||
uint16 num_methods;
|
uint16 num_methods;
|
||||||
XPTMethodDescriptor *method_descriptors;
|
XPTMethodDescriptor *method_descriptors;
|
||||||
uint16 num_constants;
|
uint16 num_constants;
|
||||||
XPTConstDescriptor *const_descriptors;
|
XPTConstDescriptor *const_descriptors;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTConstDescriptor {
|
struct XPTConstDescriptor {
|
||||||
char *name;
|
char *name;
|
||||||
XPTTypeDescriptor type;
|
XPTTypeDescriptor type;
|
||||||
char value[0]; /* really varies according to type */
|
union {
|
||||||
|
int8 i8;
|
||||||
|
uint8 ui8;
|
||||||
|
int16 i16;
|
||||||
|
uint16 ui16;
|
||||||
|
int32 i32;
|
||||||
|
uint32 ui32;
|
||||||
|
int64 i64;
|
||||||
|
uint64 ui64;
|
||||||
|
uint16 wch;
|
||||||
|
char ch;
|
||||||
|
XPTstring *string;
|
||||||
|
} value; /* varies according to type */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTMethodDescriptor {
|
struct XPTMethodDescriptor {
|
||||||
|
@ -94,46 +106,48 @@ struct XPTMethodDescriptor {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTParamDescriptor {
|
struct XPTParamDescriptor {
|
||||||
uint8 in:1, out:1, retval:1, reserved:5;
|
uint8 in:1, out:1, retval:1, reserved:5;
|
||||||
XPTTypeDescriptor type;
|
XPTTypeDescriptor type;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTTypeDescriptorPrefix {
|
struct XPTTypeDescriptorPrefix {
|
||||||
uint8 is_pointer:1, is_unique_pointer:1, is_reference:1,
|
uint8 is_pointer:1, is_unique_pointer:1, is_reference:1,
|
||||||
tag:5;
|
tag:5;
|
||||||
};
|
|
||||||
|
|
||||||
struct XPTSimpleTypeDescriptor {
|
|
||||||
XPTTypeDescriptorPrefix prefix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceTypeDescriptor {
|
struct XPTInterfaceTypeDescriptor {
|
||||||
XPTTypeDescriptorPrefix prefix;
|
|
||||||
XPTInterfaceDirectoryEntry *interface;
|
XPTInterfaceDirectoryEntry *interface;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTInterfaceIsTypeDescriptor {
|
struct XPTInterfaceIsTypeDescriptor {
|
||||||
XPTTypeDescriptorPrefix prefix;
|
uint8 argnum;
|
||||||
uint8 argnum;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct XPTTypeDescriptor {
|
||||||
|
XPTTypeDescriptorPrefix prefix;
|
||||||
|
union {
|
||||||
|
XPTInterfaceTypeDescriptor interface;
|
||||||
|
XPTInterfaceIsTypeDescriptor interface_is;
|
||||||
|
} type;
|
||||||
|
}
|
||||||
|
|
||||||
struct XPTString {
|
struct XPTString {
|
||||||
uint16 length;
|
uint16 length;
|
||||||
char bytes[];
|
char bytes[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTAnnotationPrefix {
|
struct XPTAnnotationPrefix {
|
||||||
uint8 is_last:1, tag:7;
|
uint8 is_last:1, tag:7;
|
||||||
};
|
|
||||||
|
|
||||||
struct XPTEmptyAnnotation {
|
|
||||||
XPTAnnotationPrefix prefix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct XPTPrivateAnnotation {
|
struct XPTPrivateAnnotation {
|
||||||
XPTAnnotationPrefix prefix;
|
XPTString *creator;
|
||||||
XPTString *creator;
|
XPTString *private_data;
|
||||||
XPTString *private_data;
|
};
|
||||||
|
|
||||||
|
struct XPTAnnotation {
|
||||||
|
XPTAnnotationPrefix prefix;
|
||||||
|
XPTPrivateAnnotation private;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __xpt_struct_h__ */
|
#endif /* __xpt_struct_h__ */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче