]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - include/c++/orb.h
Some weak symbol usage, and some marshalling stuff.
[polintos/scott/priv.git] / include / c++ / orb.h
index 72daad843dcedaaed5ab6175e8e174d9c55ad62d..1f1a3e6f6588586d69caec87fd0976ff6571c783 100644 (file)
@@ -309,24 +309,13 @@ namespace System {
                }
                
                struct IFaceInfo;
+               typedef uint32_t ID;
 
                struct IFaceTable {
                        const IFaceInfo *info;
                        const ptrdiff_t offset;
                };
                
-               struct VStructInfo {
-                       // List of GUIDs of the struct and its superstructs,
-                       // starting with System.VStruct and ending with
-                       // the concrete struct.
-                       
-                       const unsigned long *const *const guids;
-
-                       // Length of inheritance chain; 1 for System.VStruct
-                       
-                       const int chainlen;
-               };
-               
                union GUID {
                        unsigned char c[16];
                        unsigned long l[];
@@ -345,12 +334,11 @@ namespace System {
                                  guid1[3] == guid2[3])));
                }
                
-               typedef uint32_t ID;
                struct ParamInfoBlock {
                        uint32_t buffer_size;
                        uint32_t copy_size;
-                       ID *objlist;
-                       uint32_t objlist_len;
+                       ID *objlist, *newobj;
+                       uint32_t objlist_len, newobj_len;
                        uint32_t num_segments;
 
                        struct Segment {
@@ -398,12 +386,36 @@ namespace System {
 
                struct IFaceInfo {
                        const GUID *guid;
+                       void (*invoke)(Array<ID> objlist,
+                                      ParamInfoBlock::Segment *segs,
+                                      int nsegs);
+                       ::System::_i_Object *(*wrapper)(ID id);
+               };
+               
+               struct NewObject {
+                       uint32_t guid_hash[5]; // SHA-1 hash of Interface GUIDs
+                       uint32_t id;
+                       uint32_t reserved[3]; // must be zero
+               };
+
+               struct VStructInfo {
+                       // List of GUIDs of the struct and its superstructs,
+                       // starting with System.VStruct and ending with
+                       // the concrete struct.
+                       
+                       const unsigned long *const *const guids;
+
+                       // Length of inheritance chain; 1 for System.VStruct
+                       
+                       const int chainlen;
+
                        int (*marshall)(GrowableArray<uint8_t> &buf,
                                        GrowableArray<ID> &objlist,
+                                       GrowableArray<NewObject> &newobjlist,
                                        ParamInfoBlock::Segment *segs,
                                        int nsegs);
                        void (*unmarshall)(Array<uint8_t> buf,
-                                          Array<ID> objlist,
+                                          Array< ::System::_i_Object *> objlist,
                                           ParamInfoBlock::Segment *segs,
                                           int nsegs);
                };