OLD | NEW |
| (Empty) |
1 // Copyright 2008-2009 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_TOOLS_SRC_OMAHACOMPATIBILITY_HTTPSERVER_XML_PARSER_H_ | |
17 #define OMAHA_TOOLS_SRC_OMAHACOMPATIBILITY_HTTPSERVER_XML_PARSER_H_ | |
18 | |
19 #include <vector> | |
20 #include "omaha/goopdate/request.h" | |
21 #include "omaha/goopdate/update_response_data.h" | |
22 #include "omaha/goopdate/update_response.h" | |
23 #include "omaha/worker/app_request.h" | |
24 | |
25 namespace omaha { | |
26 | |
27 // Represents the server response to a get, if the request is a ping, | |
28 // the server just responds with a ok. For now we only support | |
29 // responses for update checks with update or no-update. Later on | |
30 // extend the is_update_response to be a enum | |
31 struct ServerResponse { | |
32 ServerResponse() | |
33 : is_ping(false), | |
34 is_update_response(false) {} | |
35 | |
36 bool is_ping; | |
37 bool is_update_response; | |
38 CString guid; | |
39 UpdateResponseData response_data; | |
40 }; | |
41 | |
42 typedef std::vector<ServerResponse> ServerResponses; | |
43 | |
44 HRESULT ParseUpdateCheck(const CString& post_string, | |
45 AppRequestDataVector* request); | |
46 | |
47 HRESULT BuildUpdateResponse(const ServerResponses& update_response, | |
48 CString* response); | |
49 | |
50 } // namespace omaha | |
51 | |
52 #endif // OMAHA_TOOLS_SRC_OMAHACOMPATIBILITY_HTTPSERVER_XML_PARSER_H_ | |
OLD | NEW |