From a8d85fa387edb5892348c559eb0ad2e01481e305 Mon Sep 17 00:00:00 2001 From: "mcmullen%netscape.com" Date: Tue, 15 Jun 1999 05:17:57 +0000 Subject: [PATCH] idlized nsIFileLocator. --- xpfe/appshell/src/nsFileLocations.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xpfe/appshell/src/nsFileLocations.cpp b/xpfe/appshell/src/nsFileLocations.cpp index 89048753650..d051efc9d2b 100644 --- a/xpfe/appshell/src/nsFileLocations.cpp +++ b/xpfe/appshell/src/nsFileLocations.cpp @@ -25,7 +25,7 @@ #include "nsFileLocations.h" #include "nsIFileLocator.h" -#include "nsFileSpec.h" +#include "nsIFileSpec.h" #include "nsIServiceManager.h" #include "nsIComponentManager.h" @@ -383,8 +383,10 @@ public: NS_DECL_ISUPPORTS NS_IMETHOD GetFileLocation( - PRUint32 aType, // NOTE: actually nsSpecialFileSpec:Type, see nsFileLocations.h - nsFileSpec* outSpec); + PRUint32 aType, + // NOTE: actually either nsSpecialFileSpec:Type, see nsFileLocations.h + // or nsSpecialSystemDirectory::SystemDirectories, see nsSpecialSystemDirectory.h + nsIFileSpec** outSpec); NS_IMETHOD ForgetProfileDir(); @@ -412,12 +414,13 @@ NS_IMPL_ISUPPORTS(nsFileLocator, kIFileLocatorIID); //---------------------------------------------------------------------------------------- NS_IMETHODIMP nsFileLocator::GetFileLocation( PRUint32 aType, - nsFileSpec* outSpec) + nsIFileSpec** outSpec) //---------------------------------------------------------------------------------------- { if (!outSpec) return NS_ERROR_NULL_POINTER; + nsFileSpec spec; if (aType < nsSpecialFileSpec::App_DirectoryBase) { *(nsSpecialSystemDirectory*)outSpec @@ -425,7 +428,7 @@ NS_IMETHODIMP nsFileLocator::GetFileLocation( return NS_OK; } *(nsSpecialFileSpec*)outSpec = (nsSpecialFileSpec::Type)aType; - return NS_OK; + return NS_NewFileSpecWithSpec(spec, outSpec); } //----------------------------------------------------------------------------------------