|
1 /* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
|
2 * This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef nsOSHelperAppService_h |
|
7 #define nsOSHelperAppService_h |
|
8 |
|
9 #include "nsCExternalHandlerService.h" |
|
10 #include "nsExternalHelperAppService.h" |
|
11 |
|
12 class nsOSHelperAppService : public nsExternalHelperAppService |
|
13 { |
|
14 public: |
|
15 nsOSHelperAppService(); |
|
16 virtual ~nsOSHelperAppService(); |
|
17 |
|
18 virtual already_AddRefed<nsIMIMEInfo> |
|
19 GetMIMEInfoFromOS(const nsACString& aMIMEType, |
|
20 const nsACString& aFileExt, |
|
21 bool* aFound); |
|
22 |
|
23 virtual NS_HIDDEN_(nsresult) |
|
24 OSProtocolHandlerExists(const char* aScheme, |
|
25 bool* aExists); |
|
26 |
|
27 NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString &aScheme, |
|
28 bool *found, |
|
29 nsIHandlerInfo **_retval); |
|
30 |
|
31 static nsIHandlerApp* |
|
32 CreateAndroidHandlerApp(const nsAString& aName, |
|
33 const nsAString& aDescription, |
|
34 const nsAString& aPackageName, |
|
35 const nsAString& aClassName, |
|
36 const nsACString& aMimeType, |
|
37 const nsAString& aAction = EmptyString()); |
|
38 }; |
|
39 |
|
40 #endif /* nsOSHelperAppService_h */ |