Skip to content

Commit

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

**Enhancements**
* Added the `ExternalMediaPlayer` Capability Agent. This allows playback from music providers that control their own playback queue. Example: Spotify.
* Added support for AU and NZ to the `SampleApp`.
* Firmware version can now be sent to Alexa via the `SoftwareInfo` event. The firmware version is specified in the config file under the `sampleApp` object as an integer value named [`firmwareVersion`](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L52).
* The new `f` command was added to the `SampleApp` which allows the firmware version to be updated at run-time.
* Optional configuration changes have been introduced. Now a [default log level](https://github.com/alexa/avs-device-sdk/blob/master/Integration/AlexaClientSDKConfig.json#L93) can be set for `ACSDK_LOG_MODULE` components, globally or individually. This value is specified under a new root level configuration object called `logger`, and the value itself is named `logLevel`. This allows you to limit the degree of logging to that default value, such as `ERROR`or `INFO`.

**Bug Fixes**
* Fixed bug where `AudioPlayer` progress reports were not being sent, or were being sent incorrectly.
* [Issue 408](alexa/avs-device-sdk#408) - Irrelevant code related to `UrlSource` was removed from the `GStreamer-based MediaPlayer` implementation.
* The `TZ` variable no longer needs to be set to `UTC` when building the `SampleApp`.
* Fixed a bug where `CurlEasyHandleWrapper` logged unwanted data on failure conditions.
* Fixed a bug to improve `SIGPIPE` handling.
* Fixed a bug where the filename and classname were mismatched. Changed `UrlToAttachmentConverter.h` to `UrlContentToAttachmentConverter.h`,and `UrlToAttachmentConverter.cpp` to `UrlContentToAttachmentConverter.cpp`

**Known Issues**
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* Display Cards for Kindle don't render.
* If using the GStreamer-based `MediaPlayer` implementation, after muting and un-muting an audio item, the next item in the queue will begin playing rather than continuing playback of the originally muted audio item.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* Music playback doesn't immediately stop when a user barges-in on iHeartRadio.
  • Loading branch information
celinval authored and padillag committed May 11, 2018
1 parent 753f3c5 commit daa5649
Show file tree
Hide file tree
Showing 521 changed files with 5,358 additions and 2,796 deletions.
4 changes: 1 addition & 3 deletions ACL/include/ACL/AVSConnectionManager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* AVSConnectionManager.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/HTTP2MessageRouter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2MessageRouter.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
17 changes: 1 addition & 16 deletions ACL/include/ACL/Transport/HTTP2Stream.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2Stream.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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 @@ -51,19 +49,6 @@ class HTTP2Transport;
*/
class HTTP2Stream {
public:
enum HTTPResponseCodes {
/// No HTTP response received.
NO_RESPONSE_RECEIVED = 0,
/// HTTP Success with reponse payload.
SUCCESS_OK = 200,
/// HTTP Succcess with no response payload.
SUCCESS_NO_CONTENT = 204,
/// HTTP code for invalid request by user.
BAD_REQUEST = 400,
/// HTTP code for internal error by server which didn't fulfill the request.
SERVER_INTERNAL_ERROR = 500
};

/**
* Constructor.
*
Expand Down
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/HTTP2StreamPool.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2StreamPool.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/HTTP2Transport.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2Transport.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/MessageConsumerInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MessageConsumerInterface.h
*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/MessageRouter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MessageRouter.h
*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/MessageRouterInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MessageRouterInterface.h
*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/MessageRouterObserverInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MessageRouterObserverInterface.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/MimeParser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MimeParser.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/PostConnectObject.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* PostConnectObject.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/PostConnectObserverInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* PostConnectObserverInterface.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/PostConnectSendMessageInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* PostConnectSendMessageInterface.h
*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/PostConnectSynchronizer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* PostConnectSynchronizer.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
3 changes: 1 addition & 2 deletions ACL/include/ACL/Transport/TransportDefines.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* TransportDefines.h
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Copyright 2016-2017 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.
* A copy of the License is located at
Expand Down
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/TransportInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* TransportInterface.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/include/ACL/Transport/TransportObserverInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* TransportObserverInterface.h
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
4 changes: 1 addition & 3 deletions ACL/src/AVSConnectionManager.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* AVSConnectionManager.cpp
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/src/Transport/HTTP2MessageRouter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2MessageRouter.cpp
*
* Copyright 2017 Amazon.com, Inc. or its affiliates.
* Copyright 2017-2018 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
22 changes: 11 additions & 11 deletions ACL/src/Transport/HTTP2Stream.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2Stream.cpp
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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 @@ -19,6 +17,7 @@
#include <sstream>

#include <AVSCommon/Utils/Configuration/ConfigurationNode.h>
#include <AVSCommon/Utils/LibcurlUtils/HttpResponseCodes.h>
#include <AVSCommon/Utils/Logger/Logger.h>
#include <AVSCommon/Utils/Logger/LoggerUtils.h>
#include <AVSCommon/Utils/Logger/ThreadMoniker.h>
Expand All @@ -30,6 +29,7 @@ namespace alexaClientSDK {
namespace acl {

using namespace alexaClientSDK::avsCommon::utils;
using namespace alexaClientSDK::avsCommon::utils::libcurlUtils;
using namespace avsCommon::avs;
using namespace avsCommon::avs::attachment;

Expand Down Expand Up @@ -307,7 +307,7 @@ size_t HTTP2Stream::writeCallback(char* data, size_t size, size_t nmemb, void* u
* payload. For all other response codes we're getting a JSON string without
* multipart headers.
*/
if (HTTP2Stream::HTTPResponseCodes::SUCCESS_OK == stream->getResponseCode()) {
if (HTTPResponseCode::SUCCESS_OK == stream->getResponseCode()) {
MimeParser::DataParsedStatus status = stream->m_parser.feed(data, numChars);

if (MimeParser::DataParsedStatus::OK == status) {
Expand Down Expand Up @@ -340,7 +340,7 @@ size_t HTTP2Stream::headerCallback(char* data, size_t size, size_t nmemb, void*
std::string boundary;
HTTP2Stream* stream = static_cast<HTTP2Stream*>(user);
stream->m_timeOfLastTransfer = getNow();
if (HTTP2Stream::HTTPResponseCodes::SUCCESS_OK == stream->getResponseCode()) {
if (HTTPResponseCode::SUCCESS_OK == stream->getResponseCode()) {
if (header.find(BOUNDARY_PREFIX) != std::string::npos) {
boundary = header.substr(header.find(BOUNDARY_PREFIX));
boundary = boundary.substr(BOUNDARY_PREFIX_SIZE, boundary.find(BOUNDARY_DELIMITER) - BOUNDARY_PREFIX_SIZE);
Expand Down Expand Up @@ -424,22 +424,22 @@ void HTTP2Stream::notifyRequestObserver() {
long responseCode = getResponseCode();

switch (responseCode) {
case HTTP2Stream::HTTPResponseCodes::NO_RESPONSE_RECEIVED:
case HTTPResponseCode::HTTP_RESPONSE_CODE_UNDEFINED:
m_currentRequest->sendCompleted(
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status::INTERNAL_ERROR);
break;
case HTTP2Stream::HTTPResponseCodes::SUCCESS_OK:
case HTTPResponseCode::SUCCESS_OK:
m_currentRequest->sendCompleted(avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status::SUCCESS);
break;
case HTTP2Stream::HTTPResponseCodes::SUCCESS_NO_CONTENT:
case HTTPResponseCode::SUCCESS_NO_CONTENT:
m_currentRequest->sendCompleted(
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status::SUCCESS_NO_CONTENT);
break;
case HTTP2Stream::HTTPResponseCodes::BAD_REQUEST:
case HTTPResponseCode::BAD_REQUEST:
m_currentRequest->sendCompleted(
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status::BAD_REQUEST);
break;
case HTTP2Stream::HTTPResponseCodes::SERVER_INTERNAL_ERROR:
case HTTPResponseCode::SERVER_INTERNAL_ERROR:
m_currentRequest->sendCompleted(
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status::SERVER_INTERNAL_ERROR_V2);
break;
Expand Down Expand Up @@ -584,7 +584,7 @@ int HTTP2Stream::debugFunction(CURL* handle, curl_infotype type, char* data, siz
if (index != std::string::npos) {
text.resize(index);
}
ACSDK_INFO(LX("libcurl").d("streamId", stream->getLogicalStreamId()).sensitive("text", text));
ACSDK_DEBUG0(LX("libcurl").d("streamId", stream->getLogicalStreamId()).sensitive("text", text));
} break;
case CURLINFO_HEADER_IN:
case CURLINFO_DATA_IN:
Expand Down
5 changes: 2 additions & 3 deletions ACL/src/Transport/HTTP2StreamPool.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2StreamPool.cpp
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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 @@ -14,6 +12,7 @@
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

#include <AVSCommon/Utils/Logger/Logger.h>
#include "ACL/Transport/HTTP2StreamPool.h"

Expand Down
12 changes: 6 additions & 6 deletions ACL/src/Transport/HTTP2Transport.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* HTTP2Transport.cpp
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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 +18,7 @@
#include <random>

#include <AVSCommon/Utils/Configuration/ConfigurationNode.h>
#include <AVSCommon/Utils/LibcurlUtils/HttpResponseCodes.h>
#include <AVSCommon/Utils/Logger/Logger.h>
#include <AVSCommon/Utils/Timing/TimeUtils.h>

Expand All @@ -30,6 +29,7 @@ namespace alexaClientSDK {
namespace acl {

using namespace alexaClientSDK::avsCommon::utils;
using namespace alexaClientSDK::avsCommon::utils::libcurlUtils;
using namespace avsCommon::sdkInterfaces;
using namespace avsCommon::avs;
using namespace avsCommon::avs::attachment;
Expand Down Expand Up @@ -309,7 +309,7 @@ bool HTTP2Transport::setupDownchannelStream(ConnectionStatusObserverInterface::C
}

std::string url = m_avsEndpoint + AVS_DOWNCHANNEL_URL_PATH_EXTENSION;
ACSDK_INFO(LX("setupDownchannelStream").d("url", url));
ACSDK_DEBUG9(LX("setupDownchannelStream").d("url", url));

m_downchannelStream = m_streamPool.createGetStream(url, authToken, m_messageConsumer);
if (!m_downchannelStream) {
Expand Down Expand Up @@ -501,7 +501,7 @@ bool HTTP2Transport::establishConnection() {
* Only break the loop if we are successful. If we aren't keep looping so that we download
* the full error message (for logging purposes) and then return false when we're done
*/
if (HTTP2Stream::HTTPResponseCodes::SUCCESS_OK == downchannelResponseCode) {
if (HTTPResponseCode::SUCCESS_OK == downchannelResponseCode) {
return true;
}
} else if (downchannelResponseCode < 0) {
Expand Down Expand Up @@ -664,7 +664,7 @@ bool HTTP2Transport::sendPing() {

void HTTP2Transport::handlePingResponse() {
ACSDK_DEBUG(LX("handlePingResponse"));
if (HTTP2Stream::HTTPResponseCodes::SUCCESS_NO_CONTENT != m_pingStream->getResponseCode()) {
if (HTTPResponseCode::SUCCESS_NO_CONTENT != m_pingStream->getResponseCode()) {
ACSDK_ERROR(LX("pingFailed").d("responseCode", m_pingStream->getResponseCode()));
setIsStopping(ConnectionStatusObserverInterface::ChangedReason::SERVER_SIDE_DISCONNECT);
}
Expand Down
4 changes: 1 addition & 3 deletions ACL/src/Transport/MessageRouter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MessageRouter.cpp
*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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
5 changes: 2 additions & 3 deletions ACL/src/Transport/MimeParser.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* MimeParser.cpp
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2016-2018 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 @@ -14,6 +12,7 @@
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

#include <AVSCommon/Utils/Logger/Logger.h>
#include "ACL/Transport/MimeParser.h"
#include <sstream>
Expand Down
4 changes: 1 addition & 3 deletions ACL/src/Transport/PostConnectObject.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* PostConnectObject.cpp
*
* Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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
4 changes: 1 addition & 3 deletions ACL/src/Transport/PostConnectSynchronizer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*
* PostConnectSynchronizer.cpp
*
* Copyright 2016-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2017-2018 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 daa5649

Please sign in to comment.