6 dump("Ah ha! This xpcom isn't really 'xp'. We make use of the .wrappedJSObject method to get a truly global place to stick data.\n");
11 wrappedJSObject: this,
13 QueryInterface: function (iid) {
14 if (!iid.equals(Components.interfaces.nsIOpenILS)
15 && !iid.equals(Components.interfaces.nsISupports))
17 throw Components.results.NS_ERROR_NO_INTERFACE;
26 registerSelf: function (compMgr, fileSpec, location, type) {
28 dump("*** Deferring registration of OpenILS data cache\n");
29 this.firstTime = false;
30 throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
32 debug("*** Registering OpenILS data cache\n");
33 compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
34 compMgr.registerFactoryLocation(this.myCID,
42 getClassObject : function (compMgr, cid, iid) {
43 if (!cid.equals(this.myCID))
44 throw Components.results.NS_ERROR_NO_INTERFACE
45 if (!iid.equals(Components.interfaces.nsIFactory))
46 throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
47 return this.myFactory;
50 myCID: Components.ID("{dc3e4b5f-c0f4-4b34-bc57-7b4099c3a5d6}"),
51 myProgID: "@mozilla.org/openils_data_cache;1",
54 createInstance: function (outer, iid) {
55 //dump("CI: " + iid + "\n");
57 throw Components.results.NS_ERROR_NO_AGGREGATION;
58 return (new OpenILS()).QueryInterface(iid);
62 canUnload: function(compMgr) {
63 dump("****** Unloading: OpenILS data cache! ****** \n");
68 function NSGetModule(compMgr, fileSpec) { return Module; }