1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is the Mozilla XPInstall.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 2002
19 * the Initial Developer. All Rights Reserved.
22 * Daniel Veditz <dveditz@netscape.com>
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include
"nsISupports.idl"
40 interface nsIDOMWindow
;
41 interface nsIXPIProgressDialog
;
42 interface nsIObserver
;
45 * A service provided by embedding applications to override
46 * the default XUL implmementation of XPInstall dialogs.
48 * Embedding applications which wish to override the default
49 * XUL dialogs need to create a component which implements
50 * this interface and registers with the Contract ID
51 * "@mozilla.org/embedui/xpinstall-dialog-service;1"
53 * @status UNDER_REVIEW
55 [scriptable
, uuid(8cdd8baa
-1dd2
-11b2
-909a
-f0178da5c5ff
)]
56 interface nsIXPIDialogService
: nsISupports
59 * @brief Ask the user if it's OK to install
61 * When called the XPIDialogService implementation should pose an
62 * install confirmation dialog and return the user's response
64 * @param parent a window that can be used to parent the modal dialog
66 * @param packageList For each install package there will be three strings,
67 * a display name, a source URL, and a the name of the
68 * organization that signed this install. Note that the
69 * name of the signer is not verified. Verification
70 * happens when the the install has completely downloaded.
71 * Your user interface should only suggest that the
72 * install may be signed by this organization name.
73 * Note that an unsigned archive is indicated by an
76 * @param count The number of strings in the packageList. This
77 * will always be three times the number of
80 * @return true to install, false to cancel
82 boolean confirmInstall
(in nsIDOMWindow parent
,
83 [array
, size_is(count
)] in wstring packageList
,
84 in unsigned long count
);
87 * @brief Create and open a download-and-install progress dialog
89 * When called the XPIDialogService implementation creates and opens
90 * a dialog to display the status of the install. When the dialog
91 * is ready to be used then the observer must be called: the subject
92 * is an nsIXPIProgressDialog that nsXPInstallManager can use to control
93 * the dialog, the topic is "xpinstall-progress" and the data is "open".
95 * If the user wishes to cancel the download, the dialog can call the
96 * observe method with the same subject and topic and the data "cancel".
98 * @note Unless this routine throws an exception the observer <b>must</b>
99 * be called or nsXPInstallManager will wait forever and never clean
102 * @param packageList three strings per package as in confirmInstall()
103 * @param count the number of strings in the list
104 * @param observer nsIObserver to receive messages from the dialog
106 void openProgressDialog
([array
, size_is(count
)] in wstring packageList
,
107 in unsigned long count
,
108 in nsIObserver observer
);