AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
InProcessSDS.h
Go to the documentation of this file.
1 /*
2  * Copyright 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 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_SDS_INPROCESSSDS_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_SDS_INPROCESSSDS_H_
18 
19 #include <vector>
20 #include <mutex>
21 #include <atomic>
22 #include <condition_variable>
23 #include <string>
24 
25 #include "SharedDataStream.h"
26 
27 namespace alexaClientSDK {
28 namespace avsCommon {
29 namespace utils {
30 namespace sds {
31 
35  using AtomicIndex = std::atomic<uint64_t>;
36 
38  using AtomicBool = std::atomic<bool>;
39 
41  using Buffer = std::vector<uint8_t>;
42 
44  using Mutex = std::mutex;
45 
47  using ConditionVariable = std::condition_variable;
48 
50  static constexpr const char* traitsName = "alexaClientSDK::avsCommon::utils::sds::InProcessSDSTraits";
51 };
52 
54 using InProcessSDS = SharedDataStream<InProcessSDSTraits>;
55 
56 } // namespace sds
57 } // namespace utils
58 } // namespace avsCommon
59 } // namespace alexaClientSDK
60 
61 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_SDS_INPROCESSSDS_H_
std::mutex Mutex
A std::mutex provides a lock which will work for in-process usage.
Definition: InProcessSDS.h:44
std::atomic< uint64_t > AtomicIndex
C++11 std::atomic is sufficient for in-process atomic variables.
Definition: InProcessSDS.h:35
std::condition_variable ConditionVariable
A std::condition_variable provides a condition variable which will work for in-process usage...
Definition: InProcessSDS.h:47
SharedDataStream< InProcessSDSTraits > InProcessSDS
Type alias for a SharedDataStream which works between threads in a single process.
Definition: InProcessSDS.h:54
std::atomic< bool > AtomicBool
C++11 std::atomic is sufficient for in-process atomic variables.
Definition: InProcessSDS.h:38
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Structure for specifying the traits of a SharedDataStream which works between threads in a single pro...
Definition: InProcessSDS.h:33
static constexpr const char * traitsName
A unique identifier representing this combination of traits.
Definition: InProcessSDS.h:50
std::vector< uint8_t > Buffer
A std::vector provides a simple container to hold a buffer for in-process usage.
Definition: InProcessSDS.h:41

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0