16 #ifndef ALEXA_CLIENT_SDK_AFML_INCLUDE_AFML_CHANNEL_H_ 17 #define ALEXA_CLIENT_SDK_AFML_INCLUDE_AFML_CHANNEL_H_ 120 void setPrimaryActivity(std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> activity);
128 bool releaseActivity(std::shared_ptr<avsCommon::sdkInterfaces::ChannelObserverInterface> observer);
180 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity>
getPrimaryActivity();
188 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity>
getActivity(
213 bool releaseActivityLocked(
214 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> activityToRelease);
222 bool removeActivityHelperLocked(
223 std::list<std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity>>::iterator
241 void processPolicyLocked(
242 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> incomingActivity,
243 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> currentActivity);
250 void patienceTimerCallback(std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> activity);
255 void updateChannelInterfaceLocked();
262 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> getPrimaryActivityLocked()
const;
266 const unsigned int m_priority;
275 std::list<std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity>> m_activities;
278 mutable std::mutex m_mutex;
281 std::vector<Channel::State> m_activityUpdates;
287 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> m_patienceInitiator;
290 std::shared_ptr<avsCommon::sdkInterfaces::FocusManagerInterface::Activity> m_patienceReceiver;
293 std::shared_ptr<avsCommon::utils::power::PowerResource> m_powerResource;
298 #endif // ALEXA_CLIENT_SDK_AFML_INCLUDE_AFML_CHANNEL_H_ bool setFocus(avsCommon::avs::FocusState focus, avsCommon::avs::MixingBehavior behavior, bool forceUpdate=false)
std::vector< Channel::State > getActivityUpdates()
MixingBehavior
Definition: MixingBehavior.h:25
void setPrimaryActivity(std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface::Activity > activity)
Channel(const std::string &name, const unsigned int priority, bool isVirtual=false)
unsigned int getPriority() const
::std::string string
Definition: gtest-port.h:1097
const std::string & getName() const
std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface::Activity > getPrimaryActivity()
std::string name
Definition: Channel.h:60
FocusState
Definition: FocusState.h:29
avsCommon::avs::FocusState focusState
The current Focus of the Channel.
Definition: Channel.h:63
std::string interfaceName
The name of the AVS interface that is occupying the Channel.
Definition: Channel.h:66
std::shared_ptr< avsCommon::sdkInterfaces::FocusManagerInterface::Activity > getActivity(const std::string &interfaceName)
std::vector< std::string > getInterfaceList() const
std::chrono::steady_clock::time_point timeAtIdle
Time at which the channel goes to NONE focus.
Definition: Channel.h:69
Timer to schedule task for delayed and periodic execution.
Definition: Timer.h:39
Channel::State getState() const
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool operator>(const Channel &rhs) const
std::string getInterface() const
bool releaseActivity(std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > observer)