]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - idl/objmgr.idl
ORB documentation updates.
[polintos/scott/priv.git] / idl / objmgr.idl
index 0be5157831c81620997568b6ab0ec984b219c139..764e055f6c1137319a9a1df421615fda67da6711 100644 (file)
@@ -14,11 +14,15 @@ struct VStruct virtual {
 };
 
 namespace Objects {
-       // FIXME: make this a built-in ID type that fixes things
-       // up when moving between systems.  It can be native word
-       // sized, rather than always long.
+       typedef uint ID;
+       
+       struct GUID {
+               ulong[2] data;
+       };
 
-       typedef ulong ID;
+       struct IHash {
+               uint[5] data;
+       };
 
        struct TypeDesc {
                enum BasicType {
@@ -115,84 +119,35 @@ namespace Objects {
                DatumDesc[] data;
        };
 
-       interface Class {
-               guid: "C30D0A85-EA8B-11D9-B985-000A95BB581A";
-               query_interface(Interface iface, bool supported out);
-               instantiate(Object instance out);
-       };
-       
-       interface Interface {
-               guid: "C36EBE18-EA8B-11D9-896D-000A95BB581A";
-       };
-       
-       interface Method {
-               guid: "C3D1BA69-EA8B-11D9-9439-000A95BB581A";
-       };
-       
-       interface Struct {
-               guid: "C4384909-EA8B-11D9-B856-000A95BB581A";
-       };
-
-       interface Filter {
-               guid: "C4A89048-EA8B-11D9-BB2C-000A95BB581A";
+       interface IDSpace {
+               guid: "06489629-9C25-4C14-9A5B-6C59639C87D6";
 
-               // Returns the object from which the filter was created.
-               // This will only succeed if the calling process already
-               // has a reference to the real object.  If the filter
-               // points to another filter, it will return the transitive
-               // real object if possible, or else the filter closest to
-               // the real object for which the process already has a
-               // reference.  If neither the real object nor a closer
-               // filter can be returned, this filter itself is returned.
-               // This should not be used for comparing filter references,
-               // as separately created filters for the same object will
-               // have different IDs and pointers, even if they contain
-               // the same subset of interfaces.
+               new_object(ID obj, IHash hash);
                
-               get_real_obj(Object obj out);
-               
-               // Returns a local ID of the real object, regardless of whether
-               // the calling process has a reference to it, or whether there
-               // are other intervening filters.  The ID cannot be used to
-               // invoke methods, but it can be used to compare the identities
-               // of the objects behind different filter objects.  If a real
-               // reference to the object is later obtained, it will have
-               // the same local ID.
+               // Release "num" references on the object.  If exactly "num"
+               // references remain, the object handle is closed and "gone" is
+               // true.  If more references remain, the handle is not closed and
+               // "gone" is false.  If fewer references than "num" are present
+               // when called, no references are released, and RefCountException
+               // is thrown.
+               //
+               // A handle's refcount is incremented whenever a reference is
+               // received via IPC.  Objects created with new_object start with
+               // a refcount of 1.
                
-               get_real_obj_id(ID id out);
-       };
-       
-       interface ObjectManager {
-               guid: "C28596AB-EA8B-11D9-8DEB-000A95BB581A";
+               release(ID obj, int num, bool gone out);
 
-               new_object(ID cla, ID obj out);
-               delete_object(ID obj) async;
-       
-               new_interface(ID cd, ID cla out);
-               delete_interface(ID cla, bool call_del) async;
-       
-               open_object(ID obj, uint handle out);
-               close_object(uint handle) async;
-       
-               // Create a filter object that implements only some of the
-               // interfaces implemented by "obj".  This is useful to create a
-               // more limited reference to pass to less trusted processes.  If
-               // "exclude" is true, then all interfaces but those specified will
-               // be included.  Otherwise, only those interfaces specified will be
-               // included.  A filter with no interfaces may be created to act as
-               // a (mostly) opaque handle.
-               //
-               // A holder of a filter reference can convert it into the real
-               // object if it already has (or later obtains) a reference to to
-               // the real object.  It can also compare the identities of
-               // separately created filters pointing at the same object
-               // regardless of what it has a real reference to.  Thus, filters
-               // should be used only to limit access granted by passing a
-               // reference to another process; it should not be used to hide the
-               // identity of the real object.
+               // Delete an object regardless of the number of references.
+               // If the object is local, then all remote references will
+               // become dangling; any attempt to pass the handle to the
+               // ORB will result in an InvalidReference exception.
+
+               revoke(ID obj);
+               
+               // Return the number of references to an object.
+               // This method is intended for debugging only.
                
-               create_filter(Object obj, bool exclude, Interface[] ifaces,
-                             Filter filter out);
+               get_refs(ID obj, int num out);
        };
        
        // This is a generic Factory interface; specific factories may