AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
MessageRequestQueueInterface.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_ACL_INCLUDE_ACL_TRANSPORT_MESSAGEREQUESTQUEUEINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_TRANSPORT_MESSAGEREQUESTQUEUEINTERFACE_H_
18 
19 #include <chrono>
20 #include <deque>
21 #include <memory>
22 #include <unordered_map>
23 
26 
27 namespace alexaClientSDK {
28 namespace acl {
29 
34 public:
38  virtual ~MessageRequestQueueInterface() = default;
39 
43  virtual void enqueueRequest(std::shared_ptr<avsCommon::avs::MessageRequest> messageRequest) = 0;
44 
51 
58  virtual std::shared_ptr<avsCommon::avs::MessageRequest> dequeueOldestRequest() = 0;
59 
67  virtual std::shared_ptr<avsCommon::avs::MessageRequest> dequeueSendableRequest() = 0;
68 
74  virtual bool isMessageRequestAvailable() const = 0;
75 
79  virtual void setWaitingForSendAcknowledgement() = 0;
80 
84  virtual void clearWaitingForSendAcknowledgement() = 0;
85 
91  virtual bool empty() const = 0;
92 
96  virtual void clear() = 0;
97 };
98 
99 } // namespace acl
100 } // namespace alexaClientSDK
101 
102 #endif // ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_TRANSPORT_MESSAGEREQUESTQUEUEINTERFACE_H_
virtual std::shared_ptr< avsCommon::avs::MessageRequest > dequeueOldestRequest()=0
virtual avsCommon::utils::Optional< std::chrono::time_point< std::chrono::steady_clock > > peekRequestTime()=0
Definition: MessageRequestQueueInterface.h:33
virtual std::shared_ptr< avsCommon::avs::MessageRequest > dequeueSendableRequest()=0
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual void enqueueRequest(std::shared_ptr< avsCommon::avs::MessageRequest > messageRequest)=0

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