AWS SDK for C++  0.12.9
AWS SDK for C++
WinHttpSyncHttpClient.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include <aws/core/Core_EXPORTS.h>
19 
22 
23 namespace Aws
24 {
25  namespace Client
26  {
27  struct ClientConfiguration;
28  } // namespace Client
29 
30  namespace Http
31  {
32 
33  class WinHttpConnectionPoolMgr;
34 
39  {
40  public:
42 
48 
52  const char* GetLogTag() const override { return "WinHttpSyncHttpClient"; }
53 
54  private:
55  // WinHttp specific implementations
56  void* OpenRequest(const Aws::Http::HttpRequest& request, void* connection, const Aws::StringStream& ss) const override;
57  void DoAddHeaders(void* httpRequest, Aws::String& headerStr) const override;
58  uint64_t DoWriteData(void* httpRequest, char* streamBuffer, uint64_t bytesRead) const override;
59  bool DoReceiveResponse(void* httpRequest) const override;
60  bool DoQueryHeaders(void* httpRequest, std::shared_ptr<Aws::Http::Standard::StandardHttpResponse>& response, Aws::StringStream& ss, uint64_t& read) const override;
61  bool DoSendRequest(void* httpRequest) const override;
62  bool DoReadData(void* hHttpRequest, char* body, uint64_t size, uint64_t& read) const override;
63  void* GetClientModule() const override;
64  };
65 
66  } // namespace Http
67 } // namespace Aws
68 
const char * GetLogTag() const override
std::basic_stringstream< char, std::char_traits< char >, Aws::Allocator< char > > StringStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_CORE_API
Definition: Core_EXPORTS.h:30
JSON (JavaScript Object Notation).