Back out changes I added for implementing a launch and reveal method on nsIExternalProtocolService.

I've decided to move that functionality over to nsILocaFile where it makes more sense.


git-svn-id: svn://10.0.0.236/trunk@85680 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mscott%netscape.com 2001-01-29 21:35:12 +00:00
parent 8670add168
commit b07bb4b4ae
4 changed files with 0 additions and 76 deletions

View File

@ -459,18 +459,6 @@ NS_IMETHODIMP nsExternalHelperAppService::LoadUrl(nsIURI * aURL)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsExternalHelperAppService::Open(nsIFile * aFile)
{
// this method should only be implemented by each OS specific implementation of this service.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsExternalHelperAppService::OpenFolder(nsIFile * aFile)
{
// this method should only be implemented by each OS specific implementation of this service.
return NS_ERROR_NOT_IMPLEMENTED;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// begin external app handler implementation
//////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -43,16 +43,4 @@ interface nsIExternalProtocolService : nsISupports
// used to load a url via an external protocol handler (if one exists)
// aURL --> the url to load
void loadUrl (in nsIURI aURL);
// i may need to find a better interface for the following two methods. I'm not sure yet
// (mscott)
// open --> Ask the operating system to attempt to open aFile. This is used as a quick
// and easy way for one to automatically open a file using the application associated
// with that file.
void open(in nsIFile aFile);
// openFolder --> Ask the operating system to open the folder and select the file
// specified by aFile. If aFile doesn't include the actual file and is just a folder
// name then we'll just open that folder. this routine only works on platforms which
// support the ability to open a folder...
void openFolder(in nsIFile aFile);
};

View File

@ -172,56 +172,6 @@ NS_IMETHODIMP nsOSHelperAppService::LaunchAppWithTempFile(nsIMIMEInfo * aMIMEInf
return rv;
}
NS_IMETHODIMP nsOSHelperAppService::Open(nsIFile * aFile)
{
NS_ENSURE_ARG(aFile);
nsresult rv = NS_OK;
nsXPIDLCString path;
aFile->GetPath(getter_Copies(path));
// use the app registry name to launch a shell execute....
LONG r = (LONG) ::ShellExecute( NULL, "open", (const char *) path, NULL, NULL, SW_SHOWNORMAL);
if (r < 32)
rv = NS_ERROR_FAILURE;
else
rv = NS_OK;
return rv;
}
NS_IMETHODIMP nsOSHelperAppService::OpenFolder(nsIFile * aFile)
{
NS_ENSURE_ARG(aFile);
nsresult rv = NS_OK;
PRBool isDirectory = PR_FALSE;
nsXPIDLCString path;
aFile->IsDirectory(&isDirectory);
if (isDirectory)
{
aFile->GetPath(getter_Copies(path));
}
else
{
nsCOMPtr<nsIFile> parent;
aFile->GetParent(getter_AddRefs(parent));
if (parent)
parent->GetPath(getter_Copies(path));
}
// use the app registry name to launch a shell execute....
LONG r = (LONG) ::ShellExecute( NULL, "explore", (const char *) path, NULL, NULL, SW_SHOWNORMAL);
if (r < 32)
rv = NS_ERROR_FAILURE;
else
rv = NS_OK;
return NS_OK;
}
// The windows registry provides a mime database key which lists a set of mime types and corresponding "Extension" values.
// we can use this to look up our mime type to see if there is a preferred extension for the mime type.
nsresult GetExtensionFromWindowsMimeDatabase(const char * aMimeType, nsCString& aFileExtension)

View File

@ -45,8 +45,6 @@ public:
// override nsIExternalProtocolService methods
NS_IMETHOD ExternalProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists);
NS_IMETHOD LoadUrl(nsIURI * aURL);
NS_IMETHODIMP Open(nsIFile * aFile);
NS_IMETHOD OpenFolder(nsIFile * aFile);
// over ride nsIMIMEService methods to contain windows registry look up steps....
NS_IMETHOD GetFromExtension(const char *aFileExt, nsIMIMEInfo **_retval);