AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
SpeakerManagerMiscStorage.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_CAPABILITYAGENTS_SPEAKERMANAGER_INCLUDE_SPEAKERMANAGER_SPEAKERMANAGERMISCSTORAGE_H_
17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_SPEAKERMANAGER_INCLUDE_SPEAKERMANAGER_SPEAKERMANAGERMISCSTORAGE_H_
18 
22 
23 namespace alexaClientSDK {
24 namespace capabilityAgents {
25 namespace speakerManager {
26 
31 public:
38  static std::shared_ptr<SpeakerManagerMiscStorage> create(
39  const std::shared_ptr<avsCommon::sdkInterfaces::storage::MiscStorageInterface>& miscStorage);
40 
43  bool loadState(SpeakerManagerStorageState& state) override;
44  bool saveState(const SpeakerManagerStorageState& state) override;
46 
47 private:
49  static std::string convertToStateString(const SpeakerManagerStorageState& state);
50  static std::string convertToStateString(const SpeakerManagerStorageState::ChannelState& state);
51 
58  const std::shared_ptr<avsCommon::sdkInterfaces::storage::MiscStorageInterface>& miscStorage);
59 
67  bool init();
68 
77  bool convertFromStateString(const std::string& stateString, SpeakerManagerStorageState& state);
78 
87  bool convertFromStateString(const std::string& stateString, SpeakerManagerStorageState::ChannelState& state);
88 
90  std::shared_ptr<avsCommon::sdkInterfaces::storage::MiscStorageInterface> m_miscStorage;
91 };
92 
93 } // namespace speakerManager
94 } // namespace capabilityAgents
95 } // namespace alexaClientSDK
96 
97 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_SPEAKERMANAGER_INCLUDE_SPEAKERMANAGER_SPEAKERMANAGERMISCSTORAGE_H_
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerMiscStorage::loadState
bool loadState(SpeakerManagerStorageState &state) override
Definition: SpeakerManagerMiscStorage.cpp:147
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerMiscStorage::create
static std::shared_ptr< SpeakerManagerMiscStorage > create(const std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface > &miscStorage)
Definition: SpeakerManagerMiscStorage.cpp:60
MiscStorageInterface.h
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerStorageInterface
Definition: SpeakerManagerStorageInterface.h:28
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerMiscStorage::saveState
bool saveState(const SpeakerManagerStorageState &state) override
Definition: SpeakerManagerMiscStorage.cpp:169
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
SpeakerManagerStorageInterface.h
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerStorageState
Definition: SpeakerManagerStorageState.h:29
SpeakerManagerStorageState.h
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerStorageState::ChannelState
Definition: SpeakerManagerStorageState.h:33
alexaClientSDK::capabilityAgents::speakerManager::SpeakerManagerMiscStorage
Definition: SpeakerManagerMiscStorage.h:30

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