12
12
#include " AWSFoundationalTypes.h"
13
13
14
14
/* Total number of headers. */
15
- static const int HEADER_COUNT2 = 7 ;
15
+ static const int HEADER_COUNT = 7 ;
16
16
/* Size of the awsDate string. */
17
- static const int AWS_DATE_LEN2 = 8 ;
17
+ static const int AWS_DATE_LEN = 8 ;
18
18
/* Size of the awsTime string. */
19
- static const int AWS_TIME_LEN2 = 6 ;
19
+ static const int AWS_TIME_LEN = 6 ;
20
20
/* Size of sha hashes and signatures in hexidecimal. */
21
- static const int HASH_HEX_LEN2 = 64 ;
21
+ static const int HASH_HEX_LEN = 64 ;
22
22
23
23
/* Base class for an AWS Service Client. Creates http and https request in raw
24
24
* http format or as a curl command. */
@@ -27,22 +27,20 @@ class AWSClient2 {
27
27
char * awsRegion;
28
28
/* Endpoint, eg. "amazonaws.com" in "kinesis.us-east-1.amazonaws.com". */
29
29
char * awsEndpoint;
30
- /* Subdomain, eg. "A2MBBEONHC7LUH" in "A2MBBEONHC9LUG.iot.us-east-1.amazonaws.com". */
31
- char * awsDomain;
32
30
/* The user's AWS Secret Key for accessing the AWS Resource. */
33
31
char * awsSecKey;
34
32
/* The user's AWS Access Key ID for accessing the AWS Resource. */
35
33
char * awsKeyID;
36
34
/* GMT date in yyyyMMdd format. */
37
- char awsDate[AWS_DATE_LEN2 + 1 ];
35
+ char awsDate[AWS_DATE_LEN + 1 ];
38
36
/* GMT time in HHmmss format. */
39
- char awsTime[AWS_TIME_LEN2 + 1 ];
37
+ char awsTime[AWS_TIME_LEN + 1 ];
40
38
/* Number of headers created. */
41
39
int headersCreated;
42
40
/* Array of the created http headers. */
43
- char * headers[HEADER_COUNT2 ];
41
+ char * headers[HEADER_COUNT ];
44
42
/* Array of string lengths of the headers in the "headers" array. */
45
- int headerLens[HEADER_COUNT2 ];
43
+ int headerLens[HEADER_COUNT ];
46
44
/* The payload of the httprequest to be created */
47
45
MinimalString payload;
48
46
@@ -78,8 +76,6 @@ class AWSClient2 {
78
76
const char * awsService;
79
77
/* Content type of payload, eg. "application/x-amz-json-1.1". */
80
78
const char * contentType;
81
- // /* Generates the host based on subdomain, service, etc */
82
- // char* createHostString(void);
83
79
/* Creates a raw http request, given the payload and current GMT date in
84
80
* yyyyMMddHHmmss format. Should be exposed to user by extending class.
85
81
* Returns 0 if client is unititialized. */
@@ -92,11 +88,8 @@ class AWSClient2 {
92
88
public:
93
89
/* Setters for values used by createRequest and createCurlRequest. Must
94
90
* be set or create[Curl]Request will return null. */
95
- /* Generates the host based on subdomain, service, etc */
96
- char * createHostString (void );
97
91
void setAWSRegion (const char * awsRegion);
98
92
void setAWSEndpoint (const char * awsEndpoint);
99
- void setAWSDomain (const char * awsDomain);
100
93
void setAWSSecretKey (const char * awsSecKey);
101
94
void setAWSKeyID (const char * awsKeyID);
102
95
void setHttpClient (IHttpClient* httpClient);
0 commit comments