AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | ContentDecrypterTest |
Test class for ContentDecrypter class. More... | |
class | Id3TagsRemoverTest |
Test class for Id3TagsRemoverTest class. More... | |
class | IterativePlaylistParserTest |
class | MockContentFetcher |
A mock content fetcher. More... | |
class | MockContentFetcherFactory |
A mock factory that creates mock content fetchers. More... | |
class | PlaylistParserTest |
class | TestParserObserver |
Typedefs | |
using | ByteVector = std::vector< unsigned char > |
Alias for bytes. More... | |
Functions | |
static const ByteVector | KEY (16, 0x61) |
Test key: aaaaaaaaaaaaaaaa. More... | |
TEST_F (ContentDecrypterTest, test_unsupportedEncryption) | |
TEST_F (ContentDecrypterTest, test_invalidKeyEncryption) | |
TEST_F (ContentDecrypterTest, test_invalidIVEncryption) | |
TEST_F (ContentDecrypterTest, test_aESDecryption) | |
TEST_F (ContentDecrypterTest, test_convertIVNullByteArray) | |
TEST_F (ContentDecrypterTest, test_convertIVIncorrectLength) | |
TEST_F (ContentDecrypterTest, test_convertIVNotHex) | |
TEST_F (ContentDecrypterTest, test_convertIV) | |
TEST_F (Id3TagsRemoverTest, test_validID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_validID3TagWithOffset) | |
TEST_F (Id3TagsRemoverTest, test_twoValidID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_invalidID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_partialID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_attachmentValidID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_attachmentTwoValidID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_attachmentPartialID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_attachmentCompleteID3Tag) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagAcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3Tag9MatchingAcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagAcrossFullHeaderTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentInvalidID3TagAcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagRemove10BytesAcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagBoundary1AcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagBoundary2AcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagBoundary3AcrossTwoWrites) | |
TEST_F (Id3TagsRemoverTest, test_attachmentID3TagRemoveTagAcrossTwoBoundaries) | |
TEST_F (IterativePlaylistParserTest, test_initializeFailed) | |
TEST_F (IterativePlaylistParserTest, test_initializeOk) | |
TEST_F (IterativePlaylistParserTest, test_parsingPlaylist) | |
TEST_F (IterativePlaylistParserTest, test_parsingHlsPlaylist) | |
TEST_F (IterativePlaylistParserTest, test_parsingPlsPlaylist) | |
TEST_F (IterativePlaylistParserTest, test_parsingRelativePlaylist) | |
TEST_F (IterativePlaylistParserTest, test_parsingLiveStreamPlaylist) | |
TEST_F (IterativePlaylistParserTest, test_parseMediaUrl) | |
TEST_F (IterativePlaylistParserTest, test_parseInvalidUrl) | |
TEST_F (IterativePlaylistParserTest, test_nextFailsAfterAbort) | |
void | matchEncryptionInfo (const EncryptionInfo &lhs, const EncryptionInfo &rhs) |
TEST (M3UParserTest, test_parseKeyNoMethod) | |
TEST (M3UParserTest, test_parseKeyMethodNone) | |
TEST (M3UParserTest, test_parseKeyMissingKeyURL) | |
TEST (M3UParserTest, test_parseKeyUnknownMethod) | |
TEST (M3UParserTest, test_parseKeyURLClosingQuote) | |
TEST (M3UParserTest, test_parseKeyValidURL) | |
TEST (M3UParserTest, test_parseKeyValidInitVector) | |
TEST (M3UParserTest, test_parseMediaSequence) | |
TEST (M3UParserTest, test_parseMediaSequenceNoSpace) | |
TEST (M3UParserTest, test_parseEmptyMediaSequence) | |
TEST (M3UParserTest, test_parseManySpacesMediaSequence) | |
TEST (M3UParserTest, test_parseInvalidMediaSequence) | |
TEST (M3UParserTest, test_parseKeyEncryptionInfo) | |
TEST (M3UParserTest, test_parseByteRange) | |
TEST (M3UParserTest, test_parseByteRangeMissingColon) | |
TEST (M3UParserTest, test_parseByteRangeMissingAt) | |
TEST (M3UParserTest, test_parseByteRangeNonDecimal) | |
TEST (M3UParserTest, test_hLSParseByteRange) | |
TEST (M3UParserTest, test_parseMAPMissingURL) | |
TEST (M3UParserTest, test_parseMAPValidURL) | |
TEST (M3UParserTest, test_parseMAPValidByteRange) | |
TEST (M3UParserTest, test_hLSParseMAP) | |
TEST (M3UParserTest, test_masterPlaylist) | |
TEST_F (PlaylistParserTest, test_emptyUrl) | |
TEST_F (PlaylistParserTest, test_nullObserver) | |
TEST_F (PlaylistParserTest, testTimer_parsingPlaylist) | |
TEST_F (PlaylistParserTest, testTimer_parsingRelativePlaylist) | |
TEST_F (PlaylistParserTest, testTimer_parsingHlsPlaylist) | |
TEST_F (PlaylistParserTest, testTimer_parsingPlsPlaylist) | |
TEST_F (PlaylistParserTest, testTimer_notParsingCertainPlaylistTypes) | |
TEST_F (PlaylistParserTest, testTimer_parsingLiveStreamPlaylist) | |
static void | verifyGetAbsoluteURLResult (std::string baseURL, std::string relativePath, const std::string &expected) |
TEST (PlaylistUtilsTest, test_getAbsoluteURLFromAbsolutePath) | |
Variables | |
static const std::string | DECRYPTED_STRING = "HelloWorld!\n" |
Excepted decrypted content. More... | |
static const ByteVector | AES_ENCRYPTED_CONTENT |
HelloWorld! encrypted with below key and iv. More... | |
static const std::string | HEX_IV = "0x41414141414141414141414141414141" |
Test initialization vector: AAAAAAAAAAAAAAAA. More... | |
static const auto | AES_ENCRYPTION_INFO |
AES-128 EncryptionInfo with above key and iv. More... | |
static const std::chrono::milliseconds | WAIT_FOR_READ_TIMEOUT {1000} |
A timeout for the attachment reader. More... | |
static const ByteVector | VALID_ID3_TAG {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 1} |
An valid ID3 tag with tag size 11 (header + 1). More... | |
static const auto | noEncryption = EncryptionInfo() |
Default encryption info (EncryptionInfo::Method::NONE). More... | |
static const ByteRange | defaultByteRange {0, 0} |
Default byte range. More... | |
static const std::string | EXT_M3U_HEADER = "#EXTM3U\n" |
Header for HLS playlist. More... | |
static const std::string | MEDIA_URL = "https://www.amazon.com/audio.aac" |
Test media URL. More... | |
static const std::string | PLAYLIST_URL = "https://www.amazon.com/playlist.m3u8" |
Test HLS playlist URL. More... | |
static const std::string | MASTER_PLAYLIST_URL = "https://www.amazon.com/master-playlist.m3u8" |
Test master playlist URL. More... | |
static const auto | SHORT_TIMEOUT = std::chrono::milliseconds(100) |
Short time out for when callbacks are expected not to occur. More... | |
static const std::string | TEST_M3U_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample.m3u"} |
Test M3U url. More... | |
static const std::string | TEST_M3U_PLAYLIST_CONTENT |
static const size_t | TEST_M3U_PLAYLIST_URL_EXPECTED_PARSES = 2 |
static const std::vector< std::chrono::milliseconds > | TEST_M3U_DURATIONS |
static const std::vector< std::string > | TEST_M3U_PLAYLIST_URLS |
static const std::string | TEST_M3U_RELATIVE_PLAYLIST_URL {"http://sanjayisthecoolest.com/sampleRelativeUrls.m3u"} |
Test M3U url with relative urls within. More... | |
static const std::string | TEST_M3U_RELATIVE_PLAYLIST_CONTENT |
static const size_t | TEST_M3U_RELATIVE_PLAYLIST_URL_EXPECTED_PARSES = 2 |
static const std::vector< std::string > | TEST_M3U_RELATIVE_PLAYLIST_URLS |
static const std::string | TEST_HLS_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample.m3u8"} |
A test playlist in HLS format. More... | |
static const std::string | TEST_HLS_PLAYLIST_CONTENT |
static const size_t | TEST_HLS_PLAYLIST_URL_EXPECTED_PARSES = 15 |
static const std::vector< std::string > | TEST_HLS_PLAYLIST_URLS |
static const std::vector< std::chrono::milliseconds > | TEST_HLS_DURATIONS |
static const std::string | TEST_PLS_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample3.pls"} |
A test playlist in PLS format. More... | |
static const std::string | TEST_PLS_CONTENT |
static const size_t | TEST_PLS_PLAYLIST_URL_EXPECTED_PARSES = 2 |
static const std::vector< std::string > | TEST_PLS_PLAYLIST_URLS |
static const std::string | TEST_HLS_LIVE_STREAM_PLAYLIST_URL {"http://sanjayisthecoolest.com/liveStream.m3u8"} |
A test playlist in HLS format. More... | |
static const std::string | TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_1 |
static const std::string | TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_2 |
static const size_t | TEST_HLS_LIVE_STREAM_PLAYLIST_EXPECTED_PARSES = 5 |
static const std::vector< std::string > | TEST_HLS_LIVE_STREAM_PLAYLIST_URLS |
static const std::vector< std::chrono::milliseconds > | TEST_HLS_LIVE_STREAM_DURATIONS |
static const size_t | NUM_PARSES_EXPECTED_WHEN_NO_PARSING = 1 |
static const std::string | TEST_MEDIA_URL = "https://sanjay.com/some_media.mp3" |
static const std::unordered_map< std::string, std::string > | urlsToContentTypes |
static std::unordered_map< std::string, std::string > | urlsToContent |
using alexaClientSDK::playlistParser::test::ByteVector = typedef std::vector<unsigned char> |
Alias for bytes.
|
static |
Test key: aaaaaaaaaaaaaaaa.
void alexaClientSDK::playlistParser::test::matchEncryptionInfo | ( | const EncryptionInfo & | lhs, |
const EncryptionInfo & | rhs | ||
) |
Helper method to assert that encryption info match.
lhs | Expected encryption info. |
rhs | Actual encryption info. |
alexaClientSDK::playlistParser::test::TEST | ( | PlaylistUtilsTest | , |
test_getAbsoluteURLFromAbsolutePath | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyNoMethod | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyMethodNone | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyMissingKeyURL | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyUnknownMethod | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyURLClosingQuote | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyValidURL | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyValidInitVector | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseMediaSequence | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseMediaSequenceNoSpace | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseEmptyMediaSequence | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseManySpacesMediaSequence | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseInvalidMediaSequence | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseKeyEncryptionInfo | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseByteRange | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseByteRangeMissingColon | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseByteRangeMissingAt | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseByteRangeNonDecimal | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_hLSParseByteRange | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseMAPMissingURL | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseMAPValidURL | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_parseMAPValidByteRange | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_hLSParseMAP | |||
) |
alexaClientSDK::playlistParser::test::TEST | ( | M3UParserTest | , |
test_masterPlaylist | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_unsupportedEncryption | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_initializeFailed | |||
) |
Tests initialize failure due to an empty playlist url.
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
test_emptyUrl | |||
) |
Tests parsing of an empty playlist. Calls parsePlaylist
and expects it returns false.
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_invalidKeyEncryption | |||
) |
Test key: aaaaaaaaaaaaaaa. Length is invalid.
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_initializeOk | |||
) |
Tests successful initialization with non-empty url.
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
test_nullObserver | |||
) |
Tests passing a nullptr
for the observer.
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_invalidIVEncryption | |||
) |
Test initialization vector: AAAAAAAAAAAAAAA. Length is invalid.
AES-128 EncryptionInfo with KEY key and INVALID_IV iv.
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parsingPlaylist | |||
) |
Tests parsing of a simple M3U playlist.
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_validID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
testTimer_parsingPlaylist | |||
) |
Tests parsing of a simple M3U playlist. Calls parsePlaylist
and expects that the result of the parsing is successful.
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parsingHlsPlaylist | |||
) |
Tests parsing of an extended M3U/HLS playlist.
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_aESDecryption | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parsingPlsPlaylist | |||
) |
Tests parsing of a PLS playlist.
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_validID3TagWithOffset | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parsingRelativePlaylist | |||
) |
Tests parsing of a simple M3U playlist with relative urls.
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
testTimer_parsingRelativePlaylist | |||
) |
Tests parsing of a simple M3U playlist with relative urls. Calls parsePlaylist
and expects that the result of the parsing is successful.
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_convertIVNullByteArray | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_convertIVIncorrectLength | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parsingLiveStreamPlaylist | |||
) |
Tests parsing of a live stream HLS playlist.
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_twoValidID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parseMediaUrl | |||
) |
Test parsing a media url. We expect the media to be the unique url.
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_convertIVNotHex | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
testTimer_parsingHlsPlaylist | |||
) |
Tests parsing of an extended M3U/HLS playlist. Calls parsePlaylist
and expects that the result of the parsing is successful.
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_parseInvalidUrl | |||
) |
Test parsing a invalid url.
alexaClientSDK::playlistParser::test::TEST_F | ( | ContentDecrypterTest | , |
test_convertIV | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_invalidID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | IterativePlaylistParserTest | , |
test_nextFailsAfterAbort | |||
) |
Test calling next()
after abort parsing.
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
testTimer_parsingPlsPlaylist | |||
) |
Tests parsing of a PLS playlist. Calls parsePlaylist
and expects that the result of the parsing is successful.
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_partialID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
testTimer_notParsingCertainPlaylistTypes | |||
) |
Tests that the playlist parser skips parsing of unwanted playlist types. Calls parsePlaylist
and expects that the result of the parsing is successful.
alexaClientSDK::playlistParser::test::TEST_F | ( | PlaylistParserTest | , |
testTimer_parsingLiveStreamPlaylist | |||
) |
Tests parsing of a live stream HLS playlist. Calls parsePlaylist
and expects that the result of the parsing is successful.
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentValidID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentTwoValidID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentPartialID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentCompleteID3Tag | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagAcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3Tag9MatchingAcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagAcrossFullHeaderTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentInvalidID3TagAcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagRemove10BytesAcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagBoundary1AcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagBoundary2AcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagBoundary3AcrossTwoWrites | |||
) |
alexaClientSDK::playlistParser::test::TEST_F | ( | Id3TagsRemoverTest | , |
test_attachmentID3TagRemoveTagAcrossTwoBoundaries | |||
) |
|
static |
|
static |
HelloWorld!
encrypted with below key and iv.
|
static |
AES-128 EncryptionInfo with above key and iv.
|
static |
Excepted decrypted content.
|
static |
Default byte range.
|
static |
Header for HLS playlist.
|
static |
Test initialization vector: AAAAAAAAAAAAAAAA.
|
static |
Test master playlist URL.
|
static |
Test media URL.
|
static |
Default encryption info (EncryptionInfo::Method::NONE).
|
static |
|
static |
Test HLS playlist URL.
|
static |
Short time out for when callbacks are expected not to occur.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
A test playlist in HLS format.
|
static |
|
static |
|
static |
A test playlist in HLS format.
|
static |
|
static |
|
static |
|
static |
|
static |
Test M3U url.
|
static |
|
static |
|
static |
|
static |
Test M3U url with relative urls within.
|
static |
|
static |
|
static |
|
static |
|
static |
A test playlist in PLS format.
|
static |
|
static |
|
static |
|
static |
|
static |
An valid ID3 tag with tag size 11 (header + 1).
|
static |
A timeout for the attachment reader.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0