|
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/. */ |
|
4 |
|
5 #include "nsISupports.idl" |
|
6 |
|
7 interface nsIMacWebAppUtils; |
|
8 |
|
9 [scriptable, function, uuid(8c899c4f-58c1-4b74-9034-3bb64e484b68)] |
|
10 interface nsITrashAppCallback : nsISupports |
|
11 { |
|
12 void trashAppFinished(in nsresult rv); |
|
13 }; |
|
14 |
|
15 /** |
|
16 * Allow MozApps API to locate and manipulate natively installed apps |
|
17 */ |
|
18 |
|
19 [scriptable, uuid(c69cf343-ea41-428b-b161-4655fd54d8e7)] |
|
20 interface nsIMacWebAppUtils : nsISupports { |
|
21 /** |
|
22 * Find the path for an app with the given signature. |
|
23 */ |
|
24 AString pathForAppWithIdentifier(in AString bundleIdentifier); |
|
25 |
|
26 /** |
|
27 * Launch the app with the given identifier, if it exists. |
|
28 */ |
|
29 void launchAppWithIdentifier(in AString bundleIdentifier); |
|
30 |
|
31 /** |
|
32 * Move the app from the given directory to the Trash. |
|
33 */ |
|
34 void trashApp(in AString path, in nsITrashAppCallback callback); |
|
35 }; |