RDK Documentation (Open Sourced RDK Components)
audioEncoding.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 audioEncoding.hpp
23  * @brief This file defines AudioEncoding class for managing audio encoding types.
24  */
25 
26 
27 
28 /**
29 * @defgroup devicesettings
30 * @{
31 * @defgroup ds
32 * @{
33 **/
34 
35 
36 #ifndef _DS_AUDIOENCODING_HPP_
37 #define _DS_AUDIOENCODING_HPP_
38 
39 #include "dsConstant.hpp"
40 #include <string>
41 
42 namespace device {
43 
44 
45 /**
46  * @class AudioEncoding
47  * @brief This class extends DSConstant to implement AudioEncoding which manages
48  * audio encodings.
49  * @ingroup devicesettingsclass
50  */
51 class AudioEncoding : public DSConstant {
52 
53 public:
54  static const int kNone; //!< Value indicating encoding type None.
55  static const int kDisplay; //!< Value indicating digital audio encoding format.
56  static const int kPCM; //!< Value indicating PCM digital audio encoding format.
57  static const int kAC3; //!< Value indicating AC3 digital audio encoding format.
58  static const int kMax; //!< Indicates the maximum encoding formats supported.
59 
60  static const AudioEncoding & getInstance(int id);
61  static const AudioEncoding & getInstance(const std::string &name);
62 
63  AudioEncoding(int id);
64  virtual ~AudioEncoding();
65 
66 };
67 
68 }
69 
70 #endif /* _DS_AUDIOENCODING_HPP_ */
71 
72 
73 /** @} */
74 /** @} */
device::AudioEncoding::AudioEncoding
AudioEncoding(int id)
This function is the default constructor for AudioEncoding. It initializes the instance with the id p...
Definition: audioEncoding.cpp:130
device::AudioEncoding::getInstance
static const AudioEncoding & getInstance(int id)
This function gets an AudioEncoding instance against the id parameter, only if the id passed is valid...
Definition: audioEncoding.cpp:82
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
device::AudioEncoding::kMax
static const int kMax
Indicates the maximum encoding formats supported.
Definition: audioEncoding.hpp:58
device::AudioEncoding::~AudioEncoding
virtual ~AudioEncoding()
This function is the default destructor of AudioEncoding class.
Definition: audioEncoding.cpp:150
device::AudioEncoding::kDisplay
static const int kDisplay
Value indicating digital audio encoding format.
Definition: audioEncoding.hpp:55
device::AudioEncoding::kNone
static const int kNone
Value indicating encoding type None.
Definition: audioEncoding.hpp:54
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::AudioEncoding::kAC3
static const int kAC3
Value indicating AC3 digital audio encoding format.
Definition: audioEncoding.hpp:57
device::AudioEncoding::kPCM
static const int kPCM
Value indicating PCM digital audio encoding format.
Definition: audioEncoding.hpp:56
device::AudioEncoding
This class extends DSConstant to implement AudioEncoding which manages audio encodings.
Definition: audioEncoding.hpp:51