michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim:expandtab:shiftwidth=2:tabstop=2:cin: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __nsLocalHandlerAppImpl_h__ michael@0: #define __nsLocalHandlerAppImpl_h__ michael@0: michael@0: #include "nsString.h" michael@0: #include "nsIMIMEInfo.h" michael@0: #include "nsIFile.h" michael@0: #include "nsTArray.h" michael@0: michael@0: class nsLocalHandlerApp : public nsILocalHandlerApp michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIHANDLERAPP michael@0: NS_DECL_NSILOCALHANDLERAPP michael@0: michael@0: nsLocalHandlerApp() { } michael@0: michael@0: nsLocalHandlerApp(const char16_t *aName, nsIFile *aExecutable) michael@0: : mName(aName), mExecutable(aExecutable) { } michael@0: michael@0: nsLocalHandlerApp(const nsAString & aName, nsIFile *aExecutable) michael@0: : mName(aName), mExecutable(aExecutable) { } michael@0: virtual ~nsLocalHandlerApp() { } michael@0: michael@0: protected: michael@0: nsString mName; michael@0: nsString mDetailedDescription; michael@0: nsTArray mParameters; michael@0: nsCOMPtr mExecutable; michael@0: michael@0: /** michael@0: * Launches this application with a single argument (typically either michael@0: * a file path or a URI spec). This is meant as a helper method for michael@0: * implementations of (e.g.) LaunchWithURI. michael@0: * michael@0: * @param aApp The application to launch (may not be null) michael@0: * @param aArg The argument to pass on the command line michael@0: */ michael@0: NS_HIDDEN_(nsresult) LaunchWithIProcess(const nsCString &aArg); michael@0: }; michael@0: michael@0: // any platforms that need a platform-specific class instead of just michael@0: // using nsLocalHandlerApp need to add an include and a typedef here. michael@0: #ifdef XP_MACOSX michael@0: # ifndef NSLOCALHANDLERAPPMAC_H_ michael@0: # include "mac/nsLocalHandlerAppMac.h" michael@0: typedef nsLocalHandlerAppMac PlatformLocalHandlerApp_t; michael@0: # endif michael@0: #else michael@0: typedef nsLocalHandlerApp PlatformLocalHandlerApp_t; michael@0: #endif michael@0: michael@0: #endif // __nsLocalHandlerAppImpl_h__