File tree Expand file tree Collapse file tree 12 files changed +523
-73
lines changed Expand file tree Collapse file tree 12 files changed +523
-73
lines changed Original file line number Diff line number Diff line change @@ -283,3 +283,4 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake"
283
283
enable_testing ()
284
284
add_subdirectory (tests )
285
285
add_subdirectory (samples/mqtt_pub_sub )
286
+ add_subdirectory (samples/raw_mqtt_pub_sub )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependen
17
17
18
18
message ("install dir ${AWS_DEPS_INSTALL_DIR} " )
19
19
set (AWS_C_COMMON_URL "https://github.com/awslabs/aws-c-common.git" )
20
- set (AWS_C_COMMON_SHA "v0.4.21 " )
20
+ set (AWS_C_COMMON_SHA "v0.4.22 " )
21
21
include (BuildAwsCCommon )
22
22
23
23
if (UNIX AND NOT APPLE )
@@ -35,19 +35,19 @@ set(AWS_C_COMPRESSION_SHA "v0.2.4")
35
35
include (BuildAwsCCompression )
36
36
37
37
set (AWS_C_HTTP_URL "https://github.com/awslabs/aws-c-http.git" )
38
- set (AWS_C_HTTP_SHA "v0.4.13 " )
38
+ set (AWS_C_HTTP_SHA "v0.4.17 " )
39
39
include (BuildAwsCHttp )
40
40
41
41
set (AWS_C_MQTT_URL "https://github.com/awslabs/aws-c-mqtt.git" )
42
- set (AWS_C_MQTT_SHA "v0.4.16 " )
42
+ set (AWS_C_MQTT_SHA "v0.4.17 " )
43
43
include (BuildAwsCMqtt )
44
44
45
45
set (AWS_C_CAL_URL "https://github.com/awslabs/aws-c-cal.git" )
46
46
set (AWS_C_CAL_SHA "v0.2.0" )
47
47
include (BuildAwsCCal )
48
48
49
49
set (AWS_C_AUTH_URL "https://github.com/awslabs/aws-c-auth.git" )
50
- set (AWS_C_AUTH_SHA "v0.2.9 " )
50
+ set (AWS_C_AUTH_SHA "v0.3.2 " )
51
51
include (BuildAwsCAuth )
52
52
53
53
add_dependencies (AwsCCompression AwsCCommon )
Original file line number Diff line number Diff line change @@ -165,43 +165,27 @@ namespace Aws
165
165
Crt::String m_serviceName;
166
166
};
167
167
168
- /* *
169
- * Http request signer base class that wraps any aws-c-* signer implementation
170
- */
171
- class AWS_CRT_CPP_API AwsHttpRequestSigner : public IHttpRequestSigner
172
- {
173
- public:
174
- AwsHttpRequestSigner (aws_signer *signer, Allocator *allocator = DefaultAllocator());
175
- virtual ~AwsHttpRequestSigner ();
176
-
177
- /* *
178
- * Whether or not the signer is in a valid state
179
- */
180
- virtual bool IsValid () const override { return m_signer != nullptr ; }
181
-
182
- protected:
183
- Allocator *m_allocator;
184
-
185
- aws_signer *m_signer;
186
- };
187
-
188
168
/* *
189
169
* Http request signer that performs Aws Sigv4 signing
190
170
*/
191
- class AWS_CRT_CPP_API Sigv4HttpRequestSigner : public AwsHttpRequestSigner
171
+ class AWS_CRT_CPP_API Sigv4HttpRequestSigner : public IHttpRequestSigner
192
172
{
193
173
public:
194
174
Sigv4HttpRequestSigner (Allocator *allocator = DefaultAllocator());
195
175
virtual ~Sigv4HttpRequestSigner () = default ;
196
176
177
+ bool IsValid () const override { return true ; }
197
178
/* *
198
179
* Signs an http request with AWS-auth sigv4. OnCompletionCallback will be invoked upon completion.
199
180
*/
200
181
virtual bool SignRequest (
201
182
const std::shared_ptr<Aws::Crt::Http::HttpRequest> &request,
202
183
const std::shared_ptr<ISigningConfig> &config,
203
184
const OnHttpRequestSigningComplete &completionCallback) override ;
185
+
186
+ private:
187
+ Allocator *m_allocator;
204
188
};
205
189
} // namespace Auth
206
190
} // namespace Crt
207
- } // namespace Aws
191
+ } // namespace Aws
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ namespace Aws
58
58
59
59
size_t GetHeaderCount () const noexcept ;
60
60
Optional<HttpHeader> GetHeader (size_t index) const noexcept ;
61
- bool SetHeader (size_t index, const HttpHeader &header) noexcept ;
62
61
bool AddHeader (const HttpHeader &header) noexcept ;
63
62
bool EraseHeader (size_t index) noexcept ;
64
63
Original file line number Diff line number Diff line change
1
+ project (aws-crt-cpp-raw-mqtt-pub-sub CXX )
2
+
3
+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX} /lib/cmake" )
4
+
5
+ file (GLOB MQTT_PUB_SUB_SRC
6
+ "*.cpp"
7
+ )
8
+
9
+ set (PUB_SUB_PROJECT_NAME aws-crt-cpp-raw-mqtt-pub-sub )
10
+ add_executable (${PUB_SUB_PROJECT_NAME} ${MQTT_PUB_SUB_SRC} )
11
+ set_target_properties (${PUB_SUB_PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX )
12
+ set_target_properties (${PUB_SUB_PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD} )
13
+
14
+ set (CMAKE_C_FLAGS_DEBUGOPT "" )
15
+
16
+ #set warnings
17
+ if (MSVC )
18
+ target_compile_options (${PUB_SUB_PROJECT_NAME} PRIVATE /W4 /WX /wd4068 )
19
+ else ()
20
+ target_compile_options (${PUB_SUB_PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror )
21
+ endif ()
22
+
23
+ if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug )
24
+ target_compile_definitions (${PUB_SUB_PROJECT_NAME} PRIVATE "-DDEBUG_BUILD" )
25
+ endif ()
26
+
27
+ target_include_directories (${PUB_SUB_PROJECT_NAME} PUBLIC
28
+ $< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>
29
+ $< INSTALL_INTERFACE:include> )
30
+
31
+ target_link_libraries (${PUB_SUB_PROJECT_NAME} aws-crt-cpp )
32
+
You can’t perform that action at this time.
0 commit comments