2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsMIMEInfoWin_h_
|
|
|
|
#define nsMIMEInfoWin_h_
|
|
|
|
|
|
|
|
#include "nsMIMEInfoImpl.h"
|
|
|
|
#include "nsIPropertyBag.h"
|
2007-10-18 21:15:41 -07:00
|
|
|
#include "nsIMutableArray.h"
|
|
|
|
#include "nsTArray.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsMIMEInfoWin : public nsMIMEInfoBase, public nsIPropertyBag {
|
|
|
|
public:
|
|
|
|
nsMIMEInfoWin(const char* aType = "") : nsMIMEInfoBase(aType) {}
|
|
|
|
nsMIMEInfoWin(const nsACString& aMIMEType) : nsMIMEInfoBase(aMIMEType) {}
|
2007-07-25 13:40:41 -07:00
|
|
|
nsMIMEInfoWin(const nsACString& aType, HandlerClass aClass) :
|
|
|
|
nsMIMEInfoBase(aType, aClass) {}
|
2007-03-22 10:30:00 -07:00
|
|
|
virtual ~nsMIMEInfoWin();
|
|
|
|
|
2007-10-18 21:15:41 -07:00
|
|
|
NS_IMETHOD LaunchWithFile(nsIFile* aFile);
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD GetHasDefaultHandler(bool * _retval);
|
2007-10-18 21:15:41 -07:00
|
|
|
NS_IMETHOD GetPossibleLocalHandlers(nsIArray **_retval);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_NSIPROPERTYBAG
|
|
|
|
|
|
|
|
void SetDefaultApplicationHandler(nsIFile* aDefaultApplication)
|
|
|
|
{
|
|
|
|
mDefaultApplication = aDefaultApplication;
|
|
|
|
}
|
2007-07-25 21:24:25 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2014-06-02 05:08:21 -07:00
|
|
|
virtual nsresult LoadUriInternal(nsIURI *aURI);
|
2007-03-22 10:30:00 -07:00
|
|
|
virtual nsresult LaunchDefaultWithFile(nsIFile* aFile);
|
2007-10-18 21:15:41 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIFile> mDefaultApplication;
|
2007-10-18 21:15:41 -07:00
|
|
|
|
|
|
|
// Given a path to a local handler, return its
|
|
|
|
// nsILocalHandlerApp instance.
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetLocalHandlerApp(const nsAString& aCommandHandler,
|
2007-10-18 21:15:41 -07:00
|
|
|
nsCOMPtr<nsILocalHandlerApp>& aApp);
|
|
|
|
|
|
|
|
// Return the cleaned up file path associated
|
|
|
|
// with a command verb located in root/Applications.
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetAppsVerbCommandHandler(const nsAString& appExeName,
|
2007-10-18 21:15:41 -07:00
|
|
|
nsAString& applicationPath,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool bEdit);
|
2007-10-18 21:15:41 -07:00
|
|
|
|
|
|
|
// Return the cleaned up file path associated
|
|
|
|
// with a progid command verb located in root.
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetProgIDVerbCommandHandler(const nsAString& appProgIDName,
|
2007-10-18 21:15:41 -07:00
|
|
|
nsAString& applicationPath,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool bEdit);
|
2007-10-18 21:15:41 -07:00
|
|
|
|
|
|
|
// Lookup a rundll command handler and return
|
|
|
|
// a populated command template for use with rundll32.exe.
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetDllLaunchInfo(nsIFile * aDll,
|
2012-06-05 19:08:30 -07:00
|
|
|
nsIFile * aFile,
|
2011-09-28 23:19:26 -07:00
|
|
|
nsAString& args, bool bEdit);
|
2007-10-18 21:15:41 -07:00
|
|
|
|
|
|
|
// Helper routine used in tracking app lists
|
|
|
|
void ProcessPath(nsCOMPtr<nsIMutableArray>& appList,
|
2007-12-31 07:15:43 -08:00
|
|
|
nsTArray<nsString>& trackList,
|
2007-10-18 21:15:41 -07:00
|
|
|
const nsAString& appFilesystemCommand);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|