diff --git a/mozilla/xpcom/sample/Makefile.in b/mozilla/xpcom/sample/Makefile.in index 7057ae13129..a56de210c03 100644 --- a/mozilla/xpcom/sample/Makefile.in +++ b/mozilla/xpcom/sample/Makefile.in @@ -28,9 +28,9 @@ IS_COMPONENT = 1 REQUIRES = sample raptor xpcom -CPPSRCS = \ - nsSample.cpp \ - nsSampleFactory.cpp \ +CPPSRCS = \ + nsSample.cpp \ + nsSampleModule.cpp \ $(NULL) XPIDLSRCS = nsISample.idl diff --git a/mozilla/xpcom/sample/makefile.win b/mozilla/xpcom/sample/makefile.win index cb3d9d05877..c446ee7e579 100644 --- a/mozilla/xpcom/sample/makefile.win +++ b/mozilla/xpcom/sample/makefile.win @@ -22,23 +22,23 @@ MAKE_OBJ_TYPE=DLL DLLNAME=$(MODULE) DLL=.\$(OBJDIR)\$(DLLNAME).dll -XPIDLSRCS= .\nsISample.idl \ +XPIDLSRCS= .\nsISample.idl \ $(NULL) CPP_OBJS=\ - .\$(OBJDIR)\nsSample.obj \ - .\$(OBJDIR)\nsSampleFactory.obj \ + .\$(OBJDIR)\nsSample.obj \ + .\$(OBJDIR)\nsSampleModule.obj \ $(NULL) LLIBS=\ - $(DIST)\lib\xpcom.lib \ - $(DIST)\lib\plc3.lib \ + $(DIST)\lib\xpcom.lib \ + $(DIST)\lib\plc3.lib \ $(NULL) LINCS=\ - -I$(PUBLIC)\sample \ - -I$(PUBLIC)\raptor \ - -I$(PUBLIC)\xpcom \ + -I$(PUBLIC)\sample \ + -I$(PUBLIC)\raptor \ + -I$(PUBLIC)\xpcom \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/sample/nsISample.idl b/mozilla/xpcom/sample/nsISample.idl index 29bb704d9ff..8c77d2468dd 100644 --- a/mozilla/xpcom/sample/nsISample.idl +++ b/mozilla/xpcom/sample/nsISample.idl @@ -27,9 +27,9 @@ [scriptable, uuid(7CB5B7A1-07D7-11d3-BDE2-000064657374)] interface nsISample : nsISupports { - attribute string Value; - void WriteValue(in string aPrefix); - void Poke(in string aValue); + attribute string value; + void writeValue(in string aPrefix); + void poke(in string aValue); }; diff --git a/mozilla/xpcom/sample/nsSampleModule.cpp b/mozilla/xpcom/sample/nsSampleModule.cpp index f45b6450798..3d74973dcd7 100644 --- a/mozilla/xpcom/sample/nsSampleModule.cpp +++ b/mozilla/xpcom/sample/nsSampleModule.cpp @@ -22,7 +22,7 @@ static NS_DEFINE_CID(kSampleCID, NS_SAMPLE_CID); -// Module implementation for the sample library +// Module implementation class nsSampleModule : public nsIModule { public: @@ -149,7 +149,7 @@ nsSampleModule::GetClassObject(nsIComponentManager *aCompMgr, fact = mFactory; } else { - rv = NS_ERROR_FACTORY_NOT_REGISTERED; + rv = NS_ERROR_FACTORY_NOT_REGISTERED; #ifdef DEBUG char* cs = aClass.ToString(); printf("+++ nsSampleModule: unable to create factory for %s\n", cs); @@ -181,9 +181,9 @@ static Components gComponents[] = { NS_IMETHODIMP nsSampleModule::RegisterSelf(nsIComponentManager *aCompMgr, - nsIFileSpec* aPath, - const char* registryLocation, - const char* componentType) + nsIFileSpec* aPath, + const char* registryLocation, + const char* componentType) { nsresult rv = NS_OK; @@ -212,8 +212,8 @@ nsSampleModule::RegisterSelf(nsIComponentManager *aCompMgr, NS_IMETHODIMP nsSampleModule::UnregisterSelf(nsIComponentManager* aCompMgr, - nsIFileSpec* aPath, - const char* registryLocation) + nsIFileSpec* aPath, + const char* registryLocation) { #ifdef DEBUG printf("*** Unregistering sample components\n"); @@ -257,14 +257,14 @@ extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr, NS_ASSERTION(return_cobj, "Null argument"); NS_ASSERTION(gModule == NULL, "nsSampleModule: Module already created."); - // Create an initialize the layout module instance + // Create and initialize the module instance nsSampleModule *m = new nsSampleModule(); if (!m) { return NS_ERROR_OUT_OF_MEMORY; } // Increase refcnt and store away nsIModule interface to m in return_cobj - rv = m->QueryInterface(nsIModule::GetIID(), (void**)return_cobj); + rv = m->QueryInterface(NS_GET_IID(nsIModule), (void**)return_cobj); if (NS_FAILED(rv)) { delete m; m = nsnull;