| OLD | NEW |
| (Empty) |
| 1 // Copyright 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 #ifndef OMAHA_GOOPDATE_UPDATE_RESPONSE_UTILS_H_ | |
| 17 #define OMAHA_GOOPDATE_UPDATE_RESPONSE_UTILS_H_ | |
| 18 | |
| 19 #include <windows.h> | |
| 20 #include <vector> | |
| 21 #include "omaha/common/update_response.h" | |
| 22 | |
| 23 namespace omaha { | |
| 24 | |
| 25 class App; | |
| 26 | |
| 27 namespace update_response_utils { | |
| 28 | |
| 29 const xml::response::App* GetApp(const xml::response::Response& response, | |
| 30 const CString& appid); | |
| 31 | |
| 32 // Retrieves the install_data string corresponding to the install_data_index | |
| 33 // in the response data object. Returns an error if the status of the data | |
| 34 // object is not ok or the index is not found. | |
| 35 HRESULT GetInstallData(const std::vector<xml::response::Data>& data, | |
| 36 const CString& index, | |
| 37 CString* value); | |
| 38 | |
| 39 // Builds an App object from its corresponding representation in the | |
| 40 // update response. | |
| 41 HRESULT BuildApp(const xml::UpdateResponse* update_response, | |
| 42 HRESULT code, | |
| 43 App* app); | |
| 44 | |
| 45 // Returns the result of the update response for an app. The string member of | |
| 46 // the result is formatted in the specified language. | |
| 47 xml::UpdateResponseResult GetResult(const xml::UpdateResponse* update_response, | |
| 48 const CString& appid, | |
| 49 const CString& language); | |
| 50 | |
| 51 // Returns true if the update response contains an update for Omaha. | |
| 52 bool IsOmahaUpdateAvailable(const xml::UpdateResponse* update_response); | |
| 53 | |
| 54 // Extracts a set of experiment label deltas from a response, merges them with | |
| 55 // existing labels in the Registry, and writes the resulting set back. | |
| 56 HRESULT ApplyExperimentLabelDeltas(bool is_machine, | |
| 57 const xml::UpdateResponse* update_response); | |
| 58 | |
| 59 } // namespace update_response_utils | |
| 60 | |
| 61 } // namespace omaha | |
| 62 | |
| 63 #endif // OMAHA_GOOPDATE_UPDATE_RESPONSE_UTILS_H_ | |
| 64 | |
| OLD | NEW |