[EROS-Arch] CapIDL, C and expeptions

Robert Wittams robert.wittams@ic.ac.uk
19 Mar 2001 20:47:09 +0000


> I'm also interested to see "Dynamic Invocation Interface" for capabilities
> defiend for interfaces. This interface if it will standard will simplify
> writing scripting languages for EROS. 

A dynamic invocation interface would probably not need any extra
additions to CapIDL,
it would just mean dynamically inspecting the IDL and doing invocations
from that. The main problem would be getting the IDL for a specific key
you have, but markm had an idea that a binary form of the IDL could be
returned from a standard method. 

Going of on a bit of a tangent, I would like to see CapIDL have
inheritance ( single? multiple? ) if only so we can have a base
interface with common methods...  probably queryinterface + check
alleged key type eg:

interface Unknown {
     int CheckAllegedKeyType(out octet<> idl);
     Unknown QueryInterface(int keytype);
}

At the moment the keytype is an integer in a header file - see
sys/eros/StdKeyType.h
I don't know if this is a good idea... its a space with a high
probability of collisions...
If the idea is to use the binary capIDL as the keytype, this is a bit
unwieldy and couldn't 
be used for something like QueryInterface... I would prefer it if it was
just a string.
Like "Eros::Spacebank" ie the scoped name in the IDL. Is this bad for
some reason?
Another thing is, would this mean that you couldn't call this unless you
had 64k (maximum 
string length) free to use as the buffer for the out parameter or return
value? 

Also CheckAllegedKeyType is a bit long for a method name... so is
QueryInterface come
to think of it. So maybe catchier names could be thought of. maybe just
type() and qi() ? 
I don't know whether lifecycle management (ref & unref) should be in the
base interface. 
It works quite well in COM, but its a bit of a different ball game - C++
destructor workaround, 
really. Though we don't want to leak domains...

Rob