1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PContent;
12 nsString detailedDescription;
19 bool alwaysAskBeforeHandling;
20 nsCString[] extensions;
21 HandlerApp preferredApplicationHandler;
22 HandlerApp[] possibleApplicationHandlers;
23 int32_t preferredAction;
26 [ChildImpl=virtual, ParentImpl=virtual]
27 sync protocol PHandlerService
32 sync FillHandlerInfo(HandlerInfo aHandlerInfoData,
33 nsCString aOverrideType)
34 returns (HandlerInfo handlerInfoData);
37 * Check if an OS handler exists for the given protocol scheme.
39 sync ExistsForProtocolOS(nsCString aProtocolScheme)
40 returns (bool exists);
43 * Check if a handler exists for the given protocol scheme. Check
44 * the datastore first and then fallback to an OS handler check.
46 sync ExistsForProtocol(nsCString aProtocolScheme)
47 returns (bool exists);
49 sync Exists(HandlerInfo aHandlerInfo)
50 returns (bool exists);
51 sync GetTypeFromExtension(nsCString aFileExtension)
52 returns (nsCString type);
53 sync GetMIMEInfoFromOS(nsCString aMIMEType, nsCString aExtension)
54 returns (nsresult rv, HandlerInfo handlerInfoData, bool found);
55 sync GetApplicationDescription(nsCString aScheme)
56 returns (nsresult rv, nsString description);
62 } // namespace mozilla