AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Namespaces | |
test | |
Functions | |
bool | validateCapabilityConfiguration (const avsCommon::avs::CapabilityConfiguration &capabilityConfig) |
bool | validateEndpointAttributes (const avsCommon::avs::AVSDiscoveryEndpointAttributes &endpointAttributes) |
bool | compareEndpointConfigurations (const std::string &firstEndpointConfigJson, const std::string &secondEndpointConfigJson) |
std::string | getEndpointConfigJson (const avsCommon::avs::AVSDiscoveryEndpointAttributes &endpointAttributes, const std::vector< avsCommon::avs::CapabilityConfiguration > &capabilities) |
std::pair< std::string, std::string > | getAddOrUpdateReportEventJson (const std::vector< std::string > &endpointConfigurations, const std::string &authToken) |
std::string | getDeleteReportEndpointConfigJson (const std::string &endpointId) |
std::string | getDeleteReportEventJson (const std::vector< std::string > &endpointConfigurations, const std::string &authToken) |
size_t | getMaxEndpoints () |
size_t | getMaxCapabilitiesPerEndpoint () |
Variables | |
static constexpr int | MAX_DISCOVERY_PAYLOAD_SIZE = 256 * 1024 |
Maximum size of the Discovery event (256 KB) More... | |
static constexpr int | MAX_DISCOVERY_HEADER_AND_SCOPE_SIZE = 10 * 1024 |
Maximum size of header and scope fields in the Discovery event (Choosing a sufficiently large size of 10KB). More... | |
static constexpr int | MAX_ENDPOINTS_SIZE_IN_PAYLOAD = MAX_DISCOVERY_PAYLOAD_SIZE - MAX_DISCOVERY_HEADER_AND_SCOPE_SIZE |
Maximum size of endpoint configurations in Event payload. More... | |
bool alexaClientSDK::capabilitiesDelegate::utils::compareEndpointConfigurations | ( | const std::string & | firstEndpointConfigJson, |
const std::string & | secondEndpointConfigJson | ||
) |
Compares given endpoint configuration JSONs and returns true if they are equal, else false. : RapidJSON's equal to operator compares elements of arrays in order. To overcome this, we always sort array entries before creating JSON strings.
firstEndpointConfigJson | The first endpoint config json string. |
secondEndpointConfigJson | The second endpoint config json string. |
std::pair<std::string, std::string> alexaClientSDK::capabilitiesDelegate::utils::getAddOrUpdateReportEventJson | ( | const std::vector< std::string > & | endpointConfigurations, |
const std::string & | authToken | ||
) |
Formats the Discovery.AddOrUpdateReport
event.
endpointConfigurations | The endpointConfiguration jsons to be included in the event. |
authToken | The authorization token that needs to be included in the event. |
std::string alexaClientSDK::capabilitiesDelegate::utils::getDeleteReportEndpointConfigJson | ( | const std::string & | endpointId | ) |
Formats the endpoint ID into endpointConfig JSON that will be sent in the payload of Discovery.DeleteReport
event.
endpointId | The endpointId for which the endpoint config JSON will be created. |
Discovery.DeleteReport
event. std::string alexaClientSDK::capabilitiesDelegate::utils::getDeleteReportEventJson | ( | const std::vector< std::string > & | endpointConfigurations, |
const std::string & | authToken | ||
) |
Formats the Discovery.DeleteReport
event.
endpointConfigurations | The endpointConfiguration jsons to be included in the event. |
authToken | The authorization token that needs to be included in the event. |
std::string alexaClientSDK::capabilitiesDelegate::utils::getEndpointConfigJson | ( | const avsCommon::avs::AVSDiscoveryEndpointAttributes & | endpointAttributes, |
const std::vector< avsCommon::avs::CapabilityConfiguration > & | capabilities | ||
) |
Formats the given EndpointAttributes
and CapabilityConfigurations
into a JSON required to send in the Discovery.AddOrUpdateReport
event.
endpointAttributes | The EndpointAttributes to format. |
capabilities | The list of CapabilityConfigurations to format. |
size_t alexaClientSDK::capabilitiesDelegate::utils::getMaxCapabilitiesPerEndpoint | ( | ) |
Get the maximum number of capabilities per endpoint.
size_t alexaClientSDK::capabilitiesDelegate::utils::getMaxEndpoints | ( | ) |
Get the maximum number of supported endpoints.
bool alexaClientSDK::capabilitiesDelegate::utils::validateCapabilityConfiguration | ( | const avsCommon::avs::CapabilityConfiguration & | capabilityConfig | ) |
Validates if all the required fields are available for the given CapabilityConfiguration
.
capabilityConfig | The CapabilityConfiguration to validate. |
bool alexaClientSDK::capabilitiesDelegate::utils::validateEndpointAttributes | ( | const avsCommon::avs::AVSDiscoveryEndpointAttributes & | endpointAttributes | ) |
Validates if the given EndpointAttributes
contains all the required fields.
endpointAttributes | The input EndpointAttributes to validate. |
|
static |
Maximum size of header and scope fields in the Discovery event (Choosing a sufficiently large size of 10KB).
|
static |
Maximum size of the Discovery event (256 KB)
|
static |
Maximum size of endpoint configurations in Event payload.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0