AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
NoOpPowerResourceManager.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_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_POWER_NOOPPOWERRESOURCEMANAGER_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_POWER_NOOPPOWERRESOURCEMANAGER_H_
18 
20 
21 namespace alexaClientSDK {
22 namespace avsCommon {
23 namespace utils {
24 namespace power {
25 
30 public:
34  const std::string& component,
35  const PowerResourceLevel level = PowerResourceLevel::ACTIVE_HIGH) override{};
36  void releasePowerResource(const std::string& component) override{};
37  bool isPowerResourceAcquired(const std::string& component) override {
38  return false;
39  };
40  std::shared_ptr<PowerResourceId> create(
41  const std::string& resourceId,
42  bool isRefCounted = true,
43  const PowerResourceLevel level = PowerResourceLevel::STANDBY_MED) override {
44  return nullptr;
45  };
46  bool acquire(
47  const std::shared_ptr<PowerResourceId>& id,
48  const std::chrono::milliseconds autoReleaseTimeout = std::chrono::milliseconds::zero()) override {
49  return true;
50  };
51  bool release(const std::shared_ptr<PowerResourceId>& id) override {
52  return true;
53  };
54  bool close(const std::shared_ptr<PowerResourceId>& id) override {
55  return true;
56  };
58 };
59 
60 } // namespace power
61 } // namespace utils
62 } // namespace avsCommon
63 } // namespace alexaClientSDK
64 
65 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_POWER_NOOPPOWERRESOURCEMANAGER_H_
STANDBY_MED usually means all the hardware components work in the medium standby power levels...
bool release(const std::shared_ptr< PowerResourceId > &id) override
Definition: NoOpPowerResourceManager.h:51
PowerResourceLevel
Definition: PowerResourceManagerInterface.h:49
::std::string string
Definition: gtest-port.h:1097
bool close(const std::shared_ptr< PowerResourceId > &id) override
Definition: NoOpPowerResourceManager.h:54
void acquirePowerResource(const std::string &component, const PowerResourceLevel level=PowerResourceLevel::ACTIVE_HIGH) override
Definition: NoOpPowerResourceManager.h:33
bool isPowerResourceAcquired(const std::string &component) override
Definition: NoOpPowerResourceManager.h:37
ACTIVE_HIGH usually means all the hardware components work in the highest active power levels...
void releasePowerResource(const std::string &component) override
Definition: NoOpPowerResourceManager.h:36
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool acquire(const std::shared_ptr< PowerResourceId > &id, const std::chrono::milliseconds autoReleaseTimeout=std::chrono::milliseconds::zero()) override
Definition: NoOpPowerResourceManager.h:46
std::shared_ptr< PowerResourceId > create(const std::string &resourceId, bool isRefCounted=true, const PowerResourceLevel level=PowerResourceLevel::STANDBY_MED) override
Definition: NoOpPowerResourceManager.h:40

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