bug 313956: expand installer .exe contents to make complete mar. r=ted.
[gecko.git] / toolkit / xre / nsUpdateDriver.h
blob050c5ddff64caa3b53c134d27d411842e07f1291
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is mozilla.org code.
18 * The Initial Developer of the Original Code is Google Inc.
19 * Portions created by the Initial Developer are Copyright (C) 2005
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Darin Fisher <darin@meer.net>
24 * Ben Turner <mozilla@songbirdnest.com>
25 * Robert Strong <robert.bugzilla@gmail.com>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #ifndef nsUpdateDriver_h__
42 #define nsUpdateDriver_h__
44 #include "nscore.h"
46 class nsIFile;
48 /**
49 * This function processes any available updates. As part of that process, it
50 * may exit the current process and relaunch it at a later time.
52 * Two directories are passed to this function: greDir (where the actual
53 * binary resides) and appDir (which contains application.ini for XULRunner
54 * apps). If this is not a XULRunner app then appDir is identical to greDir.
56 * The argc and argv passed to this function should be what is needed to
57 * relaunch the current process.
59 * The appVersion param passed to this function is the current application's
60 * version and is used to determine if an update's version is older than the
61 * current application version.
63 * This function does not modify appDir.
65 NS_HIDDEN_(nsresult) ProcessUpdates(nsIFile *greDir, nsIFile *appDir,
66 nsIFile *updRootDir,
67 int argc, char **argv,
68 const char *&appVersion);
70 #endif // nsUpdateDriver_h__