Made necessary modifications to in-memory structs after writing some of

the XDR code for them.
This commit is contained in:
coop%netscape.com 1999-01-15 00:04:56 +00:00
Родитель 658863e31c
Коммит de1fdcb6be
2 изменённых файлов: 88 добавлений и 60 удалений

Просмотреть файл

@ -66,7 +66,7 @@ struct XPTHeader {
struct XPTInterfaceDirectoryEntry { struct XPTInterfaceDirectoryEntry {
uint128 iid; uint128 iid;
XPTIdentfier name; char *name;
XPTInterfaceDescriptor *interface_descriptor; XPTInterfaceDescriptor *interface_descriptor;
}; };
@ -81,7 +81,19 @@ struct XPTInterfaceDescriptor {
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 {
@ -103,20 +115,22 @@ struct XPTTypeDescriptorPrefix {
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[];
@ -126,14 +140,14 @@ 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__ */

Просмотреть файл

@ -66,7 +66,7 @@ struct XPTHeader {
struct XPTInterfaceDirectoryEntry { struct XPTInterfaceDirectoryEntry {
uint128 iid; uint128 iid;
XPTIdentfier name; char *name;
XPTInterfaceDescriptor *interface_descriptor; XPTInterfaceDescriptor *interface_descriptor;
}; };
@ -81,7 +81,19 @@ struct XPTInterfaceDescriptor {
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 {
@ -103,20 +115,22 @@ struct XPTTypeDescriptorPrefix {
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[];
@ -126,14 +140,14 @@ 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__ */