uriloader/exthandler/win/nsMIMEInfoWin.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef nsMIMEInfoWin_h_
michael@0 6 #define nsMIMEInfoWin_h_
michael@0 7
michael@0 8 #include "nsMIMEInfoImpl.h"
michael@0 9 #include "nsIPropertyBag.h"
michael@0 10 #include "nsIMutableArray.h"
michael@0 11 #include "nsTArray.h"
michael@0 12
michael@0 13 class nsMIMEInfoWin : public nsMIMEInfoBase, public nsIPropertyBag {
michael@0 14 public:
michael@0 15 nsMIMEInfoWin(const char* aType = "") : nsMIMEInfoBase(aType) {}
michael@0 16 nsMIMEInfoWin(const nsACString& aMIMEType) : nsMIMEInfoBase(aMIMEType) {}
michael@0 17 nsMIMEInfoWin(const nsACString& aType, HandlerClass aClass) :
michael@0 18 nsMIMEInfoBase(aType, aClass) {}
michael@0 19 virtual ~nsMIMEInfoWin();
michael@0 20
michael@0 21 NS_IMETHOD LaunchWithFile(nsIFile* aFile);
michael@0 22 NS_IMETHOD GetHasDefaultHandler(bool * _retval);
michael@0 23 NS_IMETHOD GetPossibleLocalHandlers(nsIArray **_retval);
michael@0 24
michael@0 25 NS_DECL_ISUPPORTS_INHERITED
michael@0 26 NS_DECL_NSIPROPERTYBAG
michael@0 27
michael@0 28 void SetDefaultApplicationHandler(nsIFile* aDefaultApplication)
michael@0 29 {
michael@0 30 mDefaultApplication = aDefaultApplication;
michael@0 31 }
michael@0 32
michael@0 33 protected:
michael@0 34 virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI);
michael@0 35 virtual nsresult LaunchDefaultWithFile(nsIFile* aFile);
michael@0 36
michael@0 37 private:
michael@0 38 nsCOMPtr<nsIFile> mDefaultApplication;
michael@0 39
michael@0 40 // Given a path to a local handler, return its
michael@0 41 // nsILocalHandlerApp instance.
michael@0 42 bool GetLocalHandlerApp(const nsAString& aCommandHandler,
michael@0 43 nsCOMPtr<nsILocalHandlerApp>& aApp);
michael@0 44
michael@0 45 // Return the cleaned up file path associated
michael@0 46 // with a command verb located in root/Applications.
michael@0 47 bool GetAppsVerbCommandHandler(const nsAString& appExeName,
michael@0 48 nsAString& applicationPath,
michael@0 49 bool bEdit);
michael@0 50
michael@0 51 // Return the cleaned up file path associated
michael@0 52 // with a progid command verb located in root.
michael@0 53 bool GetProgIDVerbCommandHandler(const nsAString& appProgIDName,
michael@0 54 nsAString& applicationPath,
michael@0 55 bool bEdit);
michael@0 56
michael@0 57 // Lookup a rundll command handler and return
michael@0 58 // a populated command template for use with rundll32.exe.
michael@0 59 bool GetDllLaunchInfo(nsIFile * aDll,
michael@0 60 nsIFile * aFile,
michael@0 61 nsAString& args, bool bEdit);
michael@0 62
michael@0 63 // Helper routine used in tracking app lists
michael@0 64 void ProcessPath(nsCOMPtr<nsIMutableArray>& appList,
michael@0 65 nsTArray<nsString>& trackList,
michael@0 66 const nsAString& appFilesystemCommand);
michael@0 67
michael@0 68 };
michael@0 69
michael@0 70 #endif

mercurial