Hi Tobias, Tobias Oberstein wrote: >>They are suppose to be opaque and the category >>manager gives parameterization flexibly. >>Maybe you need multiple parameters in a contract id as you mentioned. >>This is not supported by the category manager. I know that Necko uses >>their own contract id parsing to support stream converts. >> > > Necko? I'm quite new on Mozilla sources - could you please give me a > starting point? How do they _get_ the ContractID, the client provided? >
Sorry. necko is our network library. Take a look at here: http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/src/ > Absolutely. What about this: > > having registered a CLSID = 123 for > ContractID = "@xyz.com/some-module/foobar;1" > > a request to instantiate > > ContractID = "@xyz.com/some-module/foobar;1?param1=small;param2=blue" > > gets "converted" to an instantiation of component with CLSID = 123 and an > automatic call of Init() with one argument: > I would just make Init() part of a base interface which the instantiator calls. In they way you make no requirement of XPCOM or contract id which does not already exist. Even if there were variable parameter, one could pass a array of parameter similar to how java varargs are passed.
