Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Version 1.19.0 alexa-client-sdk
Browse files Browse the repository at this point in the history
Changes in this update:

Feature enhancements, updates, and resolved issues from all releases are available on the [Amazon developer portal](https://developer.amazon.com/docs/alexa/avs-device-sdk/release-notes.html)
  • Loading branch information
womw committed Apr 13, 2020
1 parent b1ef879 commit c381bd8
Show file tree
Hide file tree
Showing 1,353 changed files with 107,701 additions and 32,239 deletions.
3 changes: 2 additions & 1 deletion ACL/include/ACL/AVSConnectionManager.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -105,6 +105,7 @@ class AVSConnectionManager
bool isEnabled() override;
void reconnect() override;
bool isConnected() const override;
void onWakeConnectionRetry() override;
void addMessageObserver(std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface> observer) override;
void removeMessageObserver(std::shared_ptr<avsCommon::sdkInterfaces::MessageObserverInterface> observer) override;
/// @}
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/DownchannelHandler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/ExchangeHandler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
16 changes: 13 additions & 3 deletions ACL/include/ACL/Transport/HTTP2Transport.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,6 +28,7 @@

#include <AVSCommon/AVS/Attachment/AttachmentManager.h>
#include <AVSCommon/SDKInterfaces/AuthDelegateInterface.h>
#include <AVSCommon/SDKInterfaces/EventTracerInterface.h>
#include <AVSCommon/SDKInterfaces/PostConnectSendMessageInterface.h>
#include <AVSCommon/Utils/HTTP2/HTTP2ConnectionInterface.h>
#include <AVSCommon/Utils/HTTP2/HTTP2ConnectionObserverInterface.h>
Expand Down Expand Up @@ -81,6 +82,7 @@ class HTTP2Transport
* @param sharedRequestQueue Request queue shared by all instances of HTTPTransportInterface.
* @param configuration An optional configuration to specify HTTP2/2 connection settings.
* @param metricRecorder The metric recorder.
* @param eventTracer The object used to trace events sent to AVS.
* @return A shared pointer to a HTTP2Transport object.
*/
static std::shared_ptr<HTTP2Transport> create(
Expand All @@ -93,7 +95,8 @@ class HTTP2Transport
std::shared_ptr<PostConnectFactoryInterface> postConnectFactory,
std::shared_ptr<SynchronizedMessageRequestQueue> sharedRequestQueue,
Configuration configuration = Configuration(),
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder = nullptr);
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder = nullptr,
std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> eventTracer = nullptr);

/**
* Method to add a TransportObserverInterface instance.
Expand Down Expand Up @@ -122,6 +125,8 @@ class HTTP2Transport
void disconnect() override;
bool isConnected() override;
void onRequestEnqueued() override;
void onWakeConnectionRetry() override;
void onWakeVerifyConnectivity() override;
/// @}

/// @name PostConnectSendMessageInterface methods.
Expand Down Expand Up @@ -210,6 +215,7 @@ class HTTP2Transport
* @param sharedRequestQueue Request queue shared by all instances of HTTPTransportInterface.
* @param configuration The HTTP2/2 connection settings.
* @param metricRecorder The metric recorder.
* @param eventTracer The object used to trace events sent to AVS.
*/
HTTP2Transport(
std::shared_ptr<avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
Expand All @@ -221,7 +227,8 @@ class HTTP2Transport
std::shared_ptr<PostConnectFactoryInterface> postConnectFactory,
std::shared_ptr<SynchronizedMessageRequestQueue> sharedRequestQueue,
Configuration configuration,
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder);
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder,
std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> eventTracer);

/**
* Main loop for servicing the various states.
Expand Down Expand Up @@ -395,6 +402,9 @@ class HTTP2Transport
/// Queue of @c MessageRequest instances to send that are shared between instances of @c HTTP2Transport.
std::shared_ptr<SynchronizedMessageRequestQueue> m_sharedRequestQueue;

/// Object for tracing events sent to AVS.
std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> m_eventTracer;

/// Mutex to protect access to the m_observers variable.
std::mutex m_observerMutex;

Expand Down
10 changes: 8 additions & 2 deletions ACL/include/ACL/Transport/HTTP2TransportFactory.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,7 @@

#include <AVSCommon/AVS/Attachment/AttachmentManager.h>
#include <AVSCommon/SDKInterfaces/AuthDelegateInterface.h>
#include <AVSCommon/SDKInterfaces/EventTracerInterface.h>
#include <AVSCommon/Utils/HTTP2/HTTP2ConnectionFactoryInterface.h>
#include <AVSCommon/Utils/Metrics/MetricRecorderInterface.h>

Expand All @@ -43,11 +44,13 @@ class HTTP2TransportFactory : public TransportFactoryInterface {
* @param connectionFactory Object used to create instances of HTTP2ConnectionInterface.
* @param postConnectFactory Object used to create instances of the PostConnectInterface.
* @param metricRecorder The metric recorder.
* @param eventTracer Object used to trace events sent to AVS.
*/
HTTP2TransportFactory(
std::shared_ptr<avsCommon::utils::http2::HTTP2ConnectionFactoryInterface> connectionFactory,
std::shared_ptr<PostConnectFactoryInterface> postConnectFactory,
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder = nullptr);
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder = nullptr,
std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> eventTracer = nullptr);

/// @name TransportFactoryInterface methods.
/// @{
Expand All @@ -74,6 +77,9 @@ class HTTP2TransportFactory : public TransportFactoryInterface {

/// The metric recorder.
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> m_metricRecorder;

/// The @c EventTracerInterface object used to pass in the tracer to HTTP2Transport.
std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> m_eventTracer;
};

} // namespace acl
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/MessageConsumerInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
7 changes: 5 additions & 2 deletions ACL/include/ACL/Transport/MessageRequestHandler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@

#include <AVSCommon/AVS/Attachment/AttachmentManager.h>
#include <AVSCommon/AVS/MessageRequest.h>
#include <AVSCommon/SDKInterfaces/EventTracerInterface.h>
#include <AVSCommon/Utils/HTTP2/HTTP2MimeRequestSourceInterface.h>
#include <AVSCommon/Utils/Metrics/MetricRecorderInterface.h>

Expand Down Expand Up @@ -53,6 +54,7 @@ class MessageRequestHandler
* @param messageConsumer Where to send messages.
* @param attachmentManager Where to get attachments to write to.
* @param metricRecorder The metric recorder.
* @param eventTracer The object to trace events sent to AVS.
* @return A new MessageRequestHandler or nullptr if the operation fails.
*/
static std::shared_ptr<MessageRequestHandler> create(
Expand All @@ -61,7 +63,8 @@ class MessageRequestHandler
std::shared_ptr<avsCommon::avs::MessageRequest> messageRequest,
std::shared_ptr<MessageConsumerInterface> messageConsumer,
std::shared_ptr<avsCommon::avs::attachment::AttachmentManager> attachmentManager,
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder);
std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder,
std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> eventTracer = nullptr);

private:
/**
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/MessageRequestQueue.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/MessageRequestQueueInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
13 changes: 6 additions & 7 deletions ACL/include/ACL/Transport/MessageRouter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,19 +65,18 @@ class MessageRouter
std::shared_ptr<TransportFactoryInterface> transportFactory,
const std::string& avsGateway = "");

/// @name MessageRouterInterface methods.
/// @{
void enable() override;

void disable() override;

ConnectionStatus getConnectionStatus() override;

void sendMessage(std::shared_ptr<avsCommon::avs::MessageRequest> request) override;

void setAVSGateway(const std::string& avsGateway) override;

std::string getAVSGateway() override;

void onWakeConnectionRetry() override;
void onWakeVerifyConnectivity() override;
void setObserver(std::shared_ptr<MessageRouterObserverInterface> observer) override;
/// @}

void onConnected(std::shared_ptr<TransportInterface> transport) override;

Expand Down
12 changes: 11 additions & 1 deletion ACL/include/ACL/Transport/MessageRouterInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -87,6 +87,16 @@ class MessageRouterInterface
*/
virtual std::string getAVSGateway() = 0;

/**
* This method is a hint to retry connecting (if not connected).
*/
virtual void onWakeConnectionRetry() = 0;

/**
* This method is a hint to verify that there is a valid connection to AVS.
*/
virtual void onWakeVerifyConnectivity() = 0;

/**
* Set the observer to this object.
* @param observer An observer to this class, which will be notified when the connection status changes,
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/MessageRouterObserverInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/MimeResponseSink.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/PingHandler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/PostConnectFactoryInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/PostConnectInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/PostConnectObserverInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/PostConnectSequencer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/PostConnectSequencerFactory.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/TransportDefines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/TransportFactoryInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
12 changes: 11 additions & 1 deletion ACL/include/ACL/Transport/TransportInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,6 +62,16 @@ class TransportInterface : public avsCommon::utils::RequiresShutdown {
*/
virtual void onRequestEnqueued() = 0;

/**
* This method is a hint to retry connecting (if not connected).
*/
virtual void onWakeConnectionRetry() = 0;

/**
* This method is a hint to verify that there is a valid connection ot AVS.
*/
virtual void onWakeVerifyConnectivity() = 0;

/**
* Deleted copy constructor
*
Expand Down
2 changes: 1 addition & 1 deletion ACL/include/ACL/Transport/TransportObserverInterface.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit c381bd8

Please sign in to comment.