AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Functions | Variables
alexaClientSDK::capabilityAgents::doNotDisturb Namespace Reference

Namespaces

 test
 

Classes

class  DNDMessageRequest
 
class  DNDSettingProtocol
 
class  DoNotDisturbCapabilityAgent
 

Functions

static const std::string TAG ("DNDMessageRequest")
 String to identify log entries originating from this file. More...
 
static void submitMetric (const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder, const std::string &eventName, const std::string &settingsKey, uint64_t count)
 
static const std::chrono::seconds HTTP_RESPONSE_TIMEOUT (15)
 A timeout for an HTTP response when sending change events. More...
 
static bool parseDirectivePayload (const std::string &payload, Document *document)
 

Variables

static const std::string INVALID_VALUE = ""
 String to designate invalid value for the DND setting. NOTE: Valid values are "true" and "false". More...
 
static const std::string METRIC_SOURCE_PREFIX = "SETTINGS-"
 The metrics source string. More...
 
static const std::string LOCAL_CHANGE_METRIC = "LOCAL_CHANGE"
 The local change metric string. More...
 
static const std::string LOCAL_CHANGE_FAILED_METRIC = "LOCAL_CHANGE_FAILED"
 The local change failed metric string. More...
 
static const std::string AVS_CHANGE_METRIC = "AVS_CHANGE"
 The AVS change metric string. More...
 
static const std::string AVS_CHANGE_FAILED_METRIC = "AVS_CHANGE_FAILED"
 The local change failed metric string. More...
 
static const std::string SETTING_KEY = "SETTING_KEY"
 The setting key metric string. More...
 
static const std::string TAG {"DoNotDisturbCapabilityAgent"}
 String to identify log entries originating from this file. More...
 
static const std::string NAMESPACE = "Alexa.DoNotDisturb"
 The Alexa.DoNotDisturb interface namespace. More...
 
static const NamespaceAndName DIRECTIVE_SETDONOTDISTURB {NAMESPACE, "SetDoNotDisturb"}
 The SetDoNotDisturb directive identifier. More...
 
static const NamespaceAndName EVENT_DONOTDISTURBCHANGED {NAMESPACE, "DoNotDisturbChanged"}
 The DoNotDisturbChanged event identifier. More...
 
static const NamespaceAndName EVENT_REPORTDONOTDISTURB {NAMESPACE, "ReportDoNotDisturb"}
 The ReportDoNotDisturb event identifier. More...
 
static const std::string DND_JSON_INTERFACE_TYPE = "AlexaInterface"
 AVS Interface type. More...
 
static const std::string DND_JSON_INTERFACE_NAME = "Alexa.DoNotDisturb"
 AVS Interface name. More...
 
static const std::string DND_JSON_INTERFACE_VERSION = "1.0"
 AVS interface version. More...
 
static constexpr char JSON_KEY_ENABLED [] = "enabled"
 Name for "enabled" JSON branch. More...
 

Function Documentation

◆ HTTP_RESPONSE_TIMEOUT()

static const std::chrono::seconds alexaClientSDK::capabilityAgents::doNotDisturb::HTTP_RESPONSE_TIMEOUT ( 15  )
static

A timeout for an HTTP response when sending change events.

◆ parseDirectivePayload()

static bool alexaClientSDK::capabilityAgents::doNotDisturb::parseDirectivePayload ( const std::string &  payload,
Document *  document 
)
static

Parses a directive payload JSON and returns a parsed document object.

Parameters
payloadJSON string to parse.
[out]documentPointer to a parsed document.
Returns
True if parsing was successful, false otherwise.

◆ submitMetric()

static void alexaClientSDK::capabilityAgents::doNotDisturb::submitMetric ( const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &  metricRecorder,
const std::string &  eventName,
const std::string &  settingsKey,
uint64_t  count 
)
static

Submits a counter metric with the passed in event name

Note
: This function returns immediately if metricRecorder is null.
Parameters
metricRecorderThe MetricRecorder instance used to record the metric.
eventNameThe event name string.
countThe count to increment the datapoint with.

◆ TAG()

static const std::string alexaClientSDK::capabilityAgents::doNotDisturb::TAG ( "DNDMessageRequest"  )
static

String to identify log entries originating from this file.

Variable Documentation

◆ AVS_CHANGE_FAILED_METRIC

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::AVS_CHANGE_FAILED_METRIC = "AVS_CHANGE_FAILED"
static

The local change failed metric string.

◆ AVS_CHANGE_METRIC

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::AVS_CHANGE_METRIC = "AVS_CHANGE"
static

The AVS change metric string.

◆ DIRECTIVE_SETDONOTDISTURB

const NamespaceAndName alexaClientSDK::capabilityAgents::doNotDisturb::DIRECTIVE_SETDONOTDISTURB {NAMESPACE, "SetDoNotDisturb"}
static

The SetDoNotDisturb directive identifier.

◆ DND_JSON_INTERFACE_NAME

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::DND_JSON_INTERFACE_NAME = "Alexa.DoNotDisturb"
static

AVS Interface name.

◆ DND_JSON_INTERFACE_TYPE

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::DND_JSON_INTERFACE_TYPE = "AlexaInterface"
static

AVS Interface type.

◆ DND_JSON_INTERFACE_VERSION

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::DND_JSON_INTERFACE_VERSION = "1.0"
static

AVS interface version.

◆ EVENT_DONOTDISTURBCHANGED

const NamespaceAndName alexaClientSDK::capabilityAgents::doNotDisturb::EVENT_DONOTDISTURBCHANGED {NAMESPACE, "DoNotDisturbChanged"}
static

The DoNotDisturbChanged event identifier.

◆ EVENT_REPORTDONOTDISTURB

const NamespaceAndName alexaClientSDK::capabilityAgents::doNotDisturb::EVENT_REPORTDONOTDISTURB {NAMESPACE, "ReportDoNotDisturb"}
static

The ReportDoNotDisturb event identifier.

◆ INVALID_VALUE

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::INVALID_VALUE = ""
static

String to designate invalid value for the DND setting. NOTE: Valid values are "true" and "false".

◆ JSON_KEY_ENABLED

constexpr char alexaClientSDK::capabilityAgents::doNotDisturb::JSON_KEY_ENABLED[] = "enabled"
static

Name for "enabled" JSON branch.

◆ LOCAL_CHANGE_FAILED_METRIC

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::LOCAL_CHANGE_FAILED_METRIC = "LOCAL_CHANGE_FAILED"
static

The local change failed metric string.

◆ LOCAL_CHANGE_METRIC

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::LOCAL_CHANGE_METRIC = "LOCAL_CHANGE"
static

The local change metric string.

◆ METRIC_SOURCE_PREFIX

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::METRIC_SOURCE_PREFIX = "SETTINGS-"
static

The metrics source string.

◆ NAMESPACE

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::NAMESPACE = "Alexa.DoNotDisturb"
static

The Alexa.DoNotDisturb interface namespace.

◆ SETTING_KEY

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::SETTING_KEY = "SETTING_KEY"
static

The setting key metric string.

◆ TAG

const std::string alexaClientSDK::capabilityAgents::doNotDisturb::TAG {"DoNotDisturbCapabilityAgent"}
static

String to identify log entries originating from this file.

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