AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
CommunicationPropertiesHandlerInterface.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 ACSDKCOMMUNICATIONINTERFACES_COMMUNICATIONPROPERTIESHANDLERINTERFACE_H_
17 #define ACSDKCOMMUNICATIONINTERFACES_COMMUNICATIONPROPERTIESHANDLERINTERFACE_H_
18 
19 #include <functional>
20 
21 #include "CommunicationProperty.h"
24 
25 namespace alexaClientSDK {
26 namespace acsdkCommunicationInterfaces {
27 
34 template <typename T>
36 public:
40  virtual ~CommunicationPropertiesHandlerInterface() = default;
41 
51  virtual std::shared_ptr<CommunicationProperty<T>> registerProperty(
52  const std::string& propertyName,
53  T initValue,
54  const std::shared_ptr<CommunicationPropertyValidatorInterface<T>>& writeValidator = nullptr) = 0;
62  virtual void deregisterProperty(
63  const std::string& propertyName,
64  const std::shared_ptr<CommunicationProperty<T>>& property) = 0;
71  virtual bool writeProperty(const std::string& propertyName, T newValue) = 0;
78  virtual bool readProperty(const std::string& propertyName, T& value) = 0;
86  virtual bool subscribeToPropertyChangeEvent(
87  const std::string& propertyName,
88  const std::weak_ptr<CommunicationPropertyChangeSubscriber<T>>& subscriber) = 0;
96  const std::string& propertyName,
97  const std::shared_ptr<CommunicationPropertyChangeSubscriber<T>>& subscriber) = 0;
98 };
99 
100 } // namespace acsdkCommunicationInterfaces
101 } // namespace alexaClientSDK
102 
103 #endif // ACSDKCOMMUNICATIONINTERFACES_COMMUNICATIONPROPERTIESHANDLERINTERFACE_H_
virtual bool unsubscribeToPropertyChangeEvent(const std::string &propertyName, const std::shared_ptr< CommunicationPropertyChangeSubscriber< T >> &subscriber)=0
virtual bool readProperty(const std::string &propertyName, T &value)=0
::std::string string
Definition: gtest-port.h:1097
virtual std::shared_ptr< CommunicationProperty< T > > registerProperty(const std::string &propertyName, T initValue, const std::shared_ptr< CommunicationPropertyValidatorInterface< T >> &writeValidator=nullptr)=0
virtual bool subscribeToPropertyChangeEvent(const std::string &propertyName, const std::weak_ptr< CommunicationPropertyChangeSubscriber< T >> &subscriber)=0
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual bool writeProperty(const std::string &propertyName, T newValue)=0
virtual void deregisterProperty(const std::string &propertyName, const std::shared_ptr< CommunicationProperty< T >> &property)=0

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