/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * Probably need some copyright here! 
 */

function nsJSAimOdirEntry() {
}


var module = {
    registerSelf: function (compMgr, fileSpec, location, type) {
      compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentManagerObsolete);
        compMgr.registerComponentWithType(this.myCID,
                                          "nsJSAimOdirEntry",
                                          "@netscape.com/js/aim/odirentry;1",
                                          fileSpec, location, true, true, 
                                          type);
    },

    getClassObject: function (compMgr, cid, iid) {
        if (!cid.equals(this.myCID))
            throw Components.results.NS_ERROR_NO_INTERFACE;
        
        if (!iid.equals(Components.interfaces.nsIFactory))
            throw Components.results.NS_ERROR_NOT_IMPLEMENTED;

        return this.myFactory;
    },

    canUnload: function () {
    },
    
    myCID: Components.ID("{95A3F539-C85F-11d3-B9FF-0010833594E9}"),
    
    myFactory: {
        createInstance: function (outer, iid) {
            if (outer != null)
                throw Components.results.NS_ERROR_NO_AGGREGATION;
            
            if (!(iid.equals(Components.interfaces.nsIAimOdirEntry) ||
                  iid.equals(Components.interfaces.nsISupports))) {
                throw Components.results.NS_ERROR_INVALID_ARG;
            }

            return new nsJSAimOdirEntry();
        }
    }
};

function NSGetModule(compMgr, fileSpec) { return module; }
