2005-06-08 21:40:38 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2005-06-08 21:40:38 +04:00
|
|
|
|
|
|
|
#ifndef nsUpdateDriver_h__
|
|
|
|
#define nsUpdateDriver_h__
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
|
|
|
|
class nsIFile;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This function processes any available updates. As part of that process, it
|
|
|
|
* may exit the current process and relaunch it at a later time.
|
|
|
|
*
|
2006-02-22 00:10:55 +03:00
|
|
|
* Two directories are passed to this function: greDir (where the actual
|
|
|
|
* binary resides) and appDir (which contains application.ini for XULRunner
|
|
|
|
* apps). If this is not a XULRunner app then appDir is identical to greDir.
|
|
|
|
*
|
2005-06-08 21:40:38 +04:00
|
|
|
* The argc and argv passed to this function should be what is needed to
|
|
|
|
* relaunch the current process.
|
|
|
|
*
|
2008-11-14 15:11:08 +03:00
|
|
|
* The appVersion param passed to this function is the current application's
|
|
|
|
* version and is used to determine if an update's version is older than the
|
|
|
|
* current application version.
|
|
|
|
*
|
2005-06-08 21:40:38 +04:00
|
|
|
* This function does not modify appDir.
|
|
|
|
*/
|
2006-02-22 00:10:55 +03:00
|
|
|
NS_HIDDEN_(nsresult) ProcessUpdates(nsIFile *greDir, nsIFile *appDir,
|
2007-01-30 08:14:50 +03:00
|
|
|
nsIFile *updRootDir,
|
2008-11-14 15:11:08 +03:00
|
|
|
int argc, char **argv,
|
2011-10-19 23:09:53 +04:00
|
|
|
const char *appVersion);
|
2005-06-08 21:40:38 +04:00
|
|
|
|
|
|
|
#endif // nsUpdateDriver_h__
|