changed locale argument from nsString to nsILocale

git-svn-id: svn://10.0.0.236/trunk@19056 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
erik%netscape.com 1999-01-30 00:29:33 +00:00
parent 99b03d485a
commit b4d51fcaf1
3 changed files with 9 additions and 6 deletions

View File

@ -20,6 +20,7 @@
#define nsIStringBundle_h___
#include "nsIFactory.h"
#include "nsILocale.h"
#include "nsIURL.h"
#include "nsString.h"
@ -53,7 +54,7 @@ public:
class nsIStringBundleFactory : public nsIFactory
{
public:
NS_IMETHOD CreateBundle(nsIURL* aURL, const nsString& aLocale,
NS_IMETHOD CreateBundle(nsIURL* aURL, nsILocale* aLocale,
nsIStringBundle** aResult) = 0;
};

View File

@ -22,6 +22,7 @@
#include "nsIProperties.h"
#include "nsIStringBundle.h"
#include "nscore.h"
#include "nsILocale.h"
#include "nsINetService.h"
#include "nsIServiceManager.h"
#include "nsIURL.h"
@ -42,7 +43,7 @@ static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID);
class nsStringBundle : public nsISupports
{
public:
nsStringBundle(nsIURL* aURL, const nsString& aLocale, nsresult* aResult);
nsStringBundle(nsIURL* aURL, nsILocale* aLocale, nsresult* aResult);
~nsStringBundle();
NS_DECL_ISUPPORTS
@ -53,7 +54,7 @@ public:
nsIProperties* mProps;
};
nsStringBundle::nsStringBundle(nsIURL* aURL, const nsString& aLocale,
nsStringBundle::nsStringBundle(nsIURL* aURL, nsILocale* aLocale,
nsresult* aResult)
{
mProps = nsnull;
@ -113,7 +114,7 @@ public:
NS_IMETHOD CreateInstance(nsISupports* aOuter, REFNSIID aIID, void** aResult);
NS_IMETHOD LockFactory(PRBool aLock);
NS_IMETHOD CreateBundle(nsIURL* aURL, const nsString& aLocale,
NS_IMETHOD CreateBundle(nsIURL* aURL, nsILocale* aLocale,
nsIStringBundle** aResult);
};
@ -133,7 +134,7 @@ nsStringBundleFactory::LockFactory(PRBool aLock)
}
NS_IMETHODIMP
nsStringBundleFactory::CreateBundle(nsIURL* aURL, const nsString& aLocale,
nsStringBundleFactory::CreateBundle(nsIURL* aURL, nsILocale* aLocale,
nsIStringBundle** aResult)
{
nsresult ret = NS_OK;

View File

@ -18,6 +18,7 @@
#include "nsIStringBundle.h"
#include "nsIEventQueueService.h"
#include "nsILocale.h"
#include "nsINetService.h"
#include "nsIServiceManager.h"
#include "nsRepository.h"
@ -79,7 +80,7 @@ main(int argc, char *argv[])
return 1;
}
nsAutoString locale("en-US");
nsILocale* locale = nsnull;
nsIStringBundle* bundle = nsnull;
ret = factory->CreateBundle(url, locale, &bundle);