| OLD | NEW |
| (Empty) |
| 1 // Copyright 2009-2010 Google Inc. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 // you may not use this file except in compliance with the License. | |
| 5 // You may obtain a copy of the License at | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 // ======================================================================== | |
| 15 | |
| 16 // Functions related to the installing Omaha. | |
| 17 | |
| 18 #ifndef OMAHA_CLIENT_INSTALL_SELF_H_ | |
| 19 #define OMAHA_CLIENT_INSTALL_SELF_H_ | |
| 20 | |
| 21 #include <windows.h> | |
| 22 #include <atlstr.h> | |
| 23 #include "omaha/common/ping_event.h" | |
| 24 | |
| 25 namespace omaha { | |
| 26 | |
| 27 struct CommandLineExtraArgs; | |
| 28 | |
| 29 namespace install_self { | |
| 30 | |
| 31 // Marks Omaha EULA as accepted by deleting the registry value. | |
| 32 // Does not touch apps' EULA state. | |
| 33 HRESULT SetEulaAccepted(bool is_machine); | |
| 34 | |
| 35 // Installs Omaha in the /install case. Does not install any applications. | |
| 36 HRESULT InstallSelf(bool is_machine, | |
| 37 bool is_eula_required, | |
| 38 bool is_oem_install, | |
| 39 const CString& current_version, | |
| 40 const CString& install_source, | |
| 41 const CommandLineExtraArgs& extra_args, | |
| 42 const CString& session_id, | |
| 43 int* extra_code1); | |
| 44 | |
| 45 // Updates Omaha. | |
| 46 HRESULT UpdateSelf(bool is_machine, const CString& session_id); | |
| 47 | |
| 48 // Repairs Omaha. Used for Code Red recovery. | |
| 49 HRESULT Repair(bool is_machine); | |
| 50 | |
| 51 // Verifies that Omaha is either properly installed or uninstalled completely. | |
| 52 void CheckInstallStateConsistency(bool is_machine); | |
| 53 | |
| 54 // Uninstalls all Omaha versions if Omaha can be uninstalled. | |
| 55 HRESULT UninstallSelf(bool is_machine, bool send_uninstall_ping); | |
| 56 | |
| 57 // Reads the error info for silent updates from the registry if present and | |
| 58 // deletes it. Returns true if the data is valid. | |
| 59 bool ReadAndClearUpdateErrorInfo(bool is_machine, | |
| 60 DWORD* error_code, | |
| 61 DWORD* extra_code1, | |
| 62 CString* version); | |
| 63 | |
| 64 } // namespace install_self | |
| 65 | |
| 66 } // namespace omaha | |
| 67 | |
| 68 #endif // OMAHA_CLIENT_INSTALL_SELF_H_ | |
| OLD | NEW |