AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
VisualActivityTracker.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_AFML_INCLUDE_AFML_VISUALACTIVITYTRACKER_H_
17 #define ALEXA_CLIENT_SDK_AFML_INCLUDE_AFML_VISUALACTIVITYTRACKER_H_
18 
19 #include <chrono>
20 #include <memory>
21 #include <vector>
22 
35 
36 #include "AFML/Channel.h"
38 
39 namespace alexaClientSDK {
40 namespace afml {
41 
52 public:
65  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
66  std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface> shutdownNotifier,
70  defaultEndpointCapabilitiesRegistrar);
71 
78  static std::shared_ptr<VisualActivityTracker> create(
79  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager);
80 
83  void provideState(const avsCommon::avs::NamespaceAndName& stateProviderName, unsigned int stateRequestToken)
84  override;
86 
89  void notifyOfActivityUpdates(const std::vector<Channel::State>& channelStates) override;
91 
94  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> getCapabilityConfigurations() override;
96 
97 private:
103  VisualActivityTracker(std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager);
104 
107  void doShutdown() override;
109 
117  void executeProvideState(unsigned int stateRequestToken);
118 
120  std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
121 
128  Channel::State m_channelState;
132 
134  std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> m_capabilityConfigurations;
135 
143 };
144 
145 } // namespace afml
146 } // namespace alexaClientSDK
147 
148 #endif // ALEXA_CLIENT_SDK_AFML_INCLUDE_AFML_VISUALACTIVITYTRACKER_H_
static acsdkManufactory::Annotated< avsCommon::sdkInterfaces::VisualFocusAnnotation, ActivityTrackerInterface > createVisualActivityTrackerInterface(std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > shutdownNotifier, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > defaultEndpointCapabilitiesRegistrar)
Definition: NamespaceAndName.h:32
Definition: VisualActivityTracker.h:47
Definition: ActivityTrackerInterface.h:31
Single-thread executor implementation.
Definition: Executor.h:45
static std::shared_ptr< VisualActivityTracker > create(std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: Channel.h:49
void notifyOfActivityUpdates(const std::vector< Channel::State > &channelStates) override
void provideState(const avsCommon::avs::NamespaceAndName &stateProviderName, unsigned int stateRequestToken) override
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations() override

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