1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/update/common/updatehelper.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +BOOL LaunchWinPostProcess(const WCHAR *installationDir, 1.9 + const WCHAR *updateInfoDir, 1.10 + bool forceSync, 1.11 + HANDLE userToken); 1.12 +BOOL StartServiceUpdate(LPCWSTR installDir); 1.13 +BOOL GetUpdateDirectoryPath(LPWSTR path); 1.14 +DWORD LaunchServiceSoftwareUpdateCommand(int argc, LPCWSTR *argv); 1.15 +BOOL WriteStatusFailure(LPCWSTR updateDirPath, int errorCode); 1.16 +BOOL WriteStatusPending(LPCWSTR updateDirPath); 1.17 +DWORD WaitForServiceStop(LPCWSTR serviceName, DWORD maxWaitSeconds); 1.18 +DWORD WaitForProcessExit(LPCWSTR filename, DWORD maxSeconds); 1.19 +BOOL DoesFallbackKeyExist(); 1.20 +BOOL IsLocalFile(LPCWSTR file, BOOL &isLocal); 1.21 +DWORD StartServiceCommand(int argc, LPCWSTR* argv); 1.22 +BOOL IsUnpromptedElevation(BOOL &isUnpromptedElevation); 1.23 + 1.24 +#define SVC_NAME L"MozillaMaintenance" 1.25 + 1.26 +#define BASE_SERVICE_REG_KEY \ 1.27 + L"SOFTWARE\\Mozilla\\MaintenanceService" 1.28 + 1.29 +// The test only fallback key, as its name implies, is only present on machines 1.30 +// that will use automated tests. Since automated tests always run from a 1.31 +// different directory for each test, the presence of this key bypasses the 1.32 +// "This is a valid installation directory" check. This key also stores 1.33 +// the allowed name and issuer for cert checks so that the cert check 1.34 +// code can still be run unchanged. 1.35 +#define TEST_ONLY_FALLBACK_KEY_PATH \ 1.36 + BASE_SERVICE_REG_KEY L"\\3932ecacee736d366d6436db0f55bce4" 1.37 + 1.38 +#ifdef MOZ_METRO 1.39 + bool GetDefaultBrowserAppModelID(WCHAR* aIDBuffer, long aCharLength); 1.40 + HRESULT LaunchDefaultMetroBrowser(); 1.41 +#endif 1.42 +