AWS SDK for C++  0.12.9
AWS SDK for C++
MobileAnalyticsClient.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 #pragma once
23 #include <aws/core/NoResult.h>
26 #include <future>
27 #include <functional>
28 
29 namespace Aws
30 {
31 
32 namespace Http
33 {
34  class HttpClient;
35  class HttpClientFactory;
36 } // namespace Http
37 
38 namespace Utils
39 {
40  template< typename R, typename E> class Outcome;
41 
42 namespace Threading
43 {
44  class Executor;
45 } // namespace Threading
46 
47 namespace Json
48 {
49  class JsonValue;
50 } // namespace Json
51 } // namespace Utils
52 
53 namespace Auth
54 {
55  class AWSCredentials;
56  class AWSCredentialsProvider;
57 } // namespace Auth
58 
59 namespace Client
60 {
61  class RetryStrategy;
62 } // namespace Client
63 
64 namespace MobileAnalytics
65 {
66 
67 namespace Model
68 {
70 
72 
73  typedef std::future<PutEventsOutcome> PutEventsOutcomeCallable;
74 } // namespace Model
75 
77 
78  typedef std::function<void(const MobileAnalyticsClient*, const Model::PutEventsRequest&, const Model::PutEventsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutEventsResponseReceivedHandler;
79 
85  {
86  public:
88 
94 
100 
105  MobileAnalyticsClient(const std::shared_ptr<Auth::AWSCredentialsProvider>& credentialsProvider,
106  const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
107 
108  virtual ~MobileAnalyticsClient();
109 
115  virtual Model::PutEventsOutcome PutEvents(const Model::PutEventsRequest& request) const;
116 
124  virtual Model::PutEventsOutcomeCallable PutEventsCallable(const Model::PutEventsRequest& request) const;
125 
133  virtual void PutEventsAsync(const Model::PutEventsRequest& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
134 
135 
136  private:
137  void init(const Client::ClientConfiguration& clientConfiguration);
138 
140  void PutEventsAsyncHelper(const Model::PutEventsRequest& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
141 
142  Aws::String m_uri;
143  std::shared_ptr<Utils::Threading::Executor> m_executor;
144  };
145 
146 } // namespace MobileAnalytics
147 } // namespace Aws
std::future< PutEventsOutcome > PutEventsOutcomeCallable
#define AWS_MOBILEANALYTICS_API
std::function< void(const MobileAnalyticsClient *, const Model::PutEventsRequest &, const Model::PutEventsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > PutEventsResponseReceivedHandler
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< MobileAnalyticsErrors > > PutEventsOutcome
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
JSON (JavaScript Object Notation).