Re: Interface introspection



Joe Shaw <joe helixcode com> writes:

> So, I was chatting a bit with Miguel about whether bonobo has the ability
> to ask components for the interfaces they support. This is particularly
> useful for querying remote components, since you can't just access the
> oafinfo file. Miguel suggested that we create a standard interface like
> "ComponentProperties" to Bonobo_Unknown so that it could be queried and
> return this kind of information.
> 
> Comments?

OAF works fine for remote components as long as you have the IID for
the component - there's no need to have the oafinfo file local (oafd
is able to talk to remote ObjectDirectories). I plan to enhance it so
that it can be used for running objects as well without having to know
how it was activated. One simple possibility is a an interface you
could QI for that has a getIID method, which would then enable you to
query for info about the object.

However, we should not add to Bonobo::Unknown. There's a particular
reason IUnknown was designed to have only QueryInterface and not
GetAllInterfaces or whatever, which is to make it possible to do
things like dynamically adding new interfaces to the object, binary
reusability, etc. An optional interface you can QI for can add more
introspectability to those objects that can support it, without
interfering with the fundamental dynamism of COM-style object models.

I suggest reading chapters 1 and 2 of Essential COM before you
suggest changing fundamental parts of the component model.

Regards,

Maciej





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]