Changed nsNativeFileSpec to nsFileSpec.

git-svn-id: svn://10.0.0.236/trunk@21978 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%netscape.com
1999-02-25 20:58:10 +00:00
parent 451b4db4af
commit 25bcdd1a61
9 changed files with 36 additions and 91 deletions

View File

@@ -1869,7 +1869,7 @@ NS_IMETHODIMP nsPluginHostImpl::LoadPlugins()
break;
for (nsDirectoryIterator iter(pluginsDir); iter; iter++) {
const nsNativeFileSpec& file = iter;
const nsFileSpec& file = iter;
if (pluginsDir.IsPluginFile(file)) {
nsPluginFile pluginFile(file);
// load the plugin's library so we can ask it some questions.
@@ -2270,7 +2270,7 @@ printf("plugin %s added to list %s\n", plugintag->mName, (plugintag->mFlags & NS
// private methods
PRLibrary* nsPluginHostImpl::LoadPluginLibrary(const nsNativeFileSpec &pluginSpec)
PRLibrary* nsPluginHostImpl::LoadPluginLibrary(const nsFileSpec &pluginSpec)
{
PRLibrary* plugin = NULL;

View File

@@ -30,7 +30,7 @@
#include "nsPluginsDir.h"
class ns4xPlugin;
class nsNativeFileSpec;
class nsFileSpec;
class nsPluginTag
{
@@ -216,7 +216,7 @@ private:
nsresult
NewFullPagePluginStream(nsIStreamListener *&aStreamListener, nsIPluginInstance *aInstance);
PRLibrary* LoadPluginLibrary(const nsNativeFileSpec &pluginSpec);
PRLibrary* LoadPluginLibrary(const nsFileSpec &pluginSpec);
PRLibrary* LoadPluginLibrary(const char* pluginPath, const char* path);

View File

@@ -26,9 +26,9 @@
* Provides a cross-platform way to obtain the location of the plugins
* directory. Once constructed, can be used with nsDirectoryIterator to
* scan the plugins directory. An nsPluginFileSpec can be constructed from the
* nsNativeFileSpec returned by the iterator.
* nsFileSpec returned by the iterator.
*/
class nsPluginsDir : public nsNativeFileSpec {
class nsPluginsDir : public nsFileSpec {
public:
/**
* Locates the plugins directory in a platform-dependent manner.
@@ -39,7 +39,7 @@ public:
/**
* Determines whether or not the given file is actually a plugin file.
*/
PRBool IsPluginFile(const nsNativeFileSpec& fileSpec);
PRBool IsPluginFile(const nsFileSpec& fileSpec);
};
struct PRLibrary;
@@ -62,14 +62,14 @@ struct nsPluginInfo {
* library. Insulates core nsIPluginHost implementations from these
* details.
*/
class nsPluginFile : public nsNativeFileSpec {
class nsPluginFile : public nsFileSpec {
public:
/**
* If spec corresponds to a valid plugin file, constructs a reference
* to a plugin file on disk. Plugins are typically located using the
* nsPluginsDir class.
*/
nsPluginFile(const nsNativeFileSpec& spec);
nsPluginFile(const nsFileSpec& spec);
virtual ~nsPluginFile();
/**

View File

@@ -33,10 +33,10 @@
#include <TextUtils.h>
#include <string.h>
static nsresult getApplicationDir(nsNativeFileSpec& outAppDir)
static nsresult getApplicationDir(nsFileSpec& outAppDir)
{
// Use the process manager to get the application's FSSpec,
// then construct an nsNativeFileSpec that encapsulates it.
// then construct an nsFileSpec that encapsulates it.
FSSpec spec;
ProcessInfoRec info;
info.processInfoLength = sizeof(info);
@@ -44,7 +44,7 @@ static nsresult getApplicationDir(nsNativeFileSpec& outAppDir)
info.processAppSpec = &spec;
ProcessSerialNumber psn = { 0, kCurrentProcess };
OSErr result = GetProcessInformation(&psn, &info);
nsNativeFileSpec appSpec(spec);
nsFileSpec appSpec(spec);
appSpec.GetParent(outAppDir);
return NS_OK;
}
@@ -66,7 +66,7 @@ nsPluginsDir::nsPluginsDir()
nsPluginsDir::~nsPluginsDir() {}
PRBool nsPluginsDir::IsPluginFile(const nsNativeFileSpec& fileSpec)
PRBool nsPluginsDir::IsPluginFile(const nsFileSpec& fileSpec)
{
// look at file's creator/type and make sure it is a code fragment, etc.
FInfo info;
@@ -77,8 +77,8 @@ PRBool nsPluginsDir::IsPluginFile(const nsNativeFileSpec& fileSpec)
return false;
}
nsPluginFile::nsPluginFile(const nsNativeFileSpec& spec)
: nsNativeFileSpec(spec)
nsPluginFile::nsPluginFile(const nsFileSpec& spec)
: nsFileSpec(spec)
{
}