RDK Documentation (Open Sourced RDK Components)
sleepMode.hpp
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 /**
22  * @file sleepMode.hpp
23  * @brief This file defines SleepMode class for device settings.
24  */
25 
26 
27 
28 /**
29 * @defgroup devicesettings
30 * @{
31 * @defgroup ds
32 * @{
33 **/
34 
35 
36 #ifndef _DS_SLEEPMODE_HPP_
37 #define _DS_SLEEPMODE_HPP_
38 
39 #include "dsConstant.hpp"
40 #include "list.hpp"
41 #include <string>
42 
43 namespace device {
44 
45 /**
46  * @class SleepMode
47  * @brief This class extends DSConstant to implement SleepMode. It is used
48  * to manage the sleep modes for device settings.
49  * @ingroup devicesettingsclass
50  */
51 class SleepMode : public DSConstant {
52 
53 public:
54  static const int kLightSleep; //!< Indicates light sleep mode.
55  static const int kDeepSleep; //!< Indicates deep sleep mode.
56  static const int kMax; //!< Indicates maximum number of sleep modes supported.
57 
58  static SleepMode & getInstance(int id);
59  static SleepMode & getInstance(const std::string &name);
61  SleepMode(int id);
62  virtual ~SleepMode();
63 
64 };
65 
66 }
67 
68 #endif /* _DS_SLEEPMODE_HPP_ */
69 
70 
71 /** @} */
72 /** @} */
device::List
This class is implemented using templates and it is used to maintain a container with the list of sup...
Definition: list.hpp:51
device::SleepMode::SleepMode
SleepMode(int id)
This function is a parameterised constructor of SleepMode class. It initializes the SleepMode instanc...
Definition: sleepMode.cpp:147
device::SleepMode::getInstance
static SleepMode & getInstance(int id)
This function is used to get an instance of SleepMode against the specified id, only if the id passed...
Definition: sleepMode.cpp:74
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
device::DSConstant
This class is used to store and manage the names and id's. It is derived by many classes like VideoRe...
Definition: dsConstant.hpp:52
device::SleepMode::kLightSleep
static const int kLightSleep
Indicates light sleep mode.
Definition: sleepMode.hpp:54
device::SleepMode::kMax
static const int kMax
Indicates maximum number of sleep modes supported.
Definition: sleepMode.hpp:56
device::SleepMode
This class extends DSConstant to implement SleepMode. It is used to manage the sleep modes for device...
Definition: sleepMode.hpp:51
device::SleepMode::~SleepMode
virtual ~SleepMode()
This function is the default destructor of SleepMode class.
Definition: sleepMode.cpp:165
device::SleepMode::kDeepSleep
static const int kDeepSleep
Indicates deep sleep mode.
Definition: sleepMode.hpp:55
device::SleepMode::getSleepModes
List< SleepMode > getSleepModes()
This function is used to get all the platform supported types of sleep modes.
Definition: sleepMode.cpp:100