RDK Documentation (Open Sourced RDK Components)
audioOutputPortType.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 * @defgroup devicesettings
23 * @{
24 * @defgroup ds
25 * @{
26 **/
27 
28 
29 #ifndef _DS_AUDIOOUTPUTPORTTYPE_H_
30 #define _DS_AUDIOOUTPUTPORTTYPE_H_
31 
32 #include <vector>
33 #include <list>
34 
35 #include "dsConstant.hpp"
36 #include "audioEncoding.hpp"
37 #include "audioCompression.hpp"
38 #include "audioStereoMode.hpp"
39 #include "audioOutputPort.hpp"
40 #include <string>
41 
42 
43 /**
44  * @file audioOutputPortType.hpp
45  * @brief It contain variables,stuctures,class and functions referenced by audiooutputportType code.
46  */
47 
48 namespace device {
49 
50 
51 /**
52  * @class AudioOutputPortType
53  * @brief Class extending DSConstant to implement the audiooutputport interface.
54  * @ingroup devicesettingsclass
55  */
57 
58 private:
59  List<AudioEncoding> _encodings; //!< List of encoding types.
60  List<AudioCompression> _compressions; //!< List of compression types.
61  List<AudioStereoMode> _stereoModes; //!< List of stereo modes.
62  List<AudioOutputPort> _aPorts; //!< List of audio ports.
63 
64 public:
65  static const int kIDLR;
66  static const int kHDMI;
67  static const int kSPDIF;
68  static const int kSPEAKER;
69  static const int kARC;
70  static const int kHEADPHONE;
71 
72  static AudioOutputPortType & getInstance(int id);
73  static AudioOutputPortType & getInstance(const std::string &name);
74 
75  AudioOutputPortType(int id);
76  virtual ~AudioOutputPortType();
77 
81  const List<AudioOutputPort> getPorts() const;
82  AudioOutputPort &getPort(int index);
83 
84  void addEncoding(const AudioEncoding & encoding);
85  void addCompression(const AudioCompression & compression);
86  void addStereoMode(const AudioStereoMode & stereoMode);
87  void addPort(const AudioOutputPort & port);
88  bool isModeSupported(int newMode);
89 
90 };
91 }
92 
93 #endif /* AUDIOOUTPUTPORTTYPE_H_ */
94 
95 
96 /** @} */
97 /** @} */
device::AudioOutputPortType::~AudioOutputPortType
virtual ~AudioOutputPortType()
This is a default destructor of class AudioOutputPortType.
Definition: audioOutputPortType.cpp:127
device::AudioOutputPortType::getPorts
const List< AudioOutputPort > getPorts() const
This function is used to get the list of platform supported audio output ports.
Definition: audioOutputPortType.cpp:176
device::AudioOutputPortType::_aPorts
List< AudioOutputPort > _aPorts
List of audio ports.
Definition: audioOutputPortType.hpp:62
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::AudioOutputPortType::addPort
void addPort(const AudioOutputPort &port)
This function is used to add the specified audio port to the list of supported audio ports.
Definition: audioOutputPortType.cpp:252
device::AudioCompression
This class extends DSConstant for implementing AudioCompression. It helps to maintain different audio...
Definition: audioCompression.hpp:49
device::AudioOutputPortType::_stereoModes
List< AudioStereoMode > _stereoModes
List of stereo modes.
Definition: audioOutputPortType.hpp:61
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
device::AudioOutputPortType::getInstance
static AudioOutputPortType & getInstance(int id)
This function is used to get the instance of the AudioOutputPortType based on the port id,...
Definition: audioOutputPortType.cpp:90
device::AudioOutputPortType::_compressions
List< AudioCompression > _compressions
List of compression types.
Definition: audioOutputPortType.hpp:60
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::AudioStereoMode
This class extends DSConstant to implement AudioStereoMode. It manages the information related to aud...
Definition: audioStereoMode.hpp:52
device::AudioOutputPortType::getSupportedStereoModes
const List< AudioStereoMode > getSupportedStereoModes() const
This API is used to get the list of audio stereo modes supported by the audio port.
Definition: audioOutputPortType.cpp:164
device::AudioOutputPort
Class extending Enumerable to implement the audiooutputport interface.
Definition: audioOutputPort.hpp:60
device::AudioOutputPortType::addCompression
void addCompression(const AudioCompression &compression)
This function is used to add the specified compression types to the list of supported compressions fo...
Definition: audioOutputPortType.cpp:223
audioStereoMode.hpp
This file defines AudioStereoMode class for managing audio mode types.
device::AudioOutputPortType::addStereoMode
void addStereoMode(const AudioStereoMode &stereoMode)
This function is used to add the specified stereoMode types to the list of supported stereo modes for...
Definition: audioOutputPortType.cpp:238
device::AudioOutputPortType::AudioOutputPortType
AudioOutputPortType(int id)
This is a default constructor of class AudioOutputPortType. It initializes the AudioOutputPortType in...
Definition: audioOutputPortType.cpp:109
device::AudioOutputPortType::addEncoding
void addEncoding(const AudioEncoding &encoding)
This function is used to add the specified encoding types to the list of supported encodings for Audi...
Definition: audioOutputPortType.cpp:208
device::AudioOutputPortType::getPort
AudioOutputPort & getPort(int index)
This function is used to get the AudioOutputPort instance based on the index.
Definition: audioOutputPortType.cpp:189
device::AudioOutputPortType
Class extending DSConstant to implement the audiooutputport interface.
Definition: audioOutputPortType.hpp:56
device::AudioOutputPortType::getSupportedEncodings
const List< AudioEncoding > getSupportedEncodings() const
This API is used to get the list of audio encodings supported by the audio port .
Definition: audioOutputPortType.cpp:150
device::AudioOutputPortType::isModeSupported
bool isModeSupported(int newMode)
This function is used to find out if requested Audio mode is supported by Platform.
Definition: audioOutputPortType.cpp:265
device::AudioEncoding
This class extends DSConstant to implement AudioEncoding which manages audio encodings.
Definition: audioEncoding.hpp:51
audioOutputPort.hpp
It contain variables,stuctures,class and functions referenced by audiooutputport code.
device::AudioOutputPortType::getSupportedCompressions
const List< AudioCompression > getSupportedCompressions() const
This API is used to get the list of audio compressions supported by the audio port.
Definition: audioOutputPortType.cpp:138
audioCompression.hpp
This file defines AudioCompression class for managing audio compression levels.
audioEncoding.hpp
This file defines AudioEncoding class for managing audio encoding types.
device::AudioOutputPortType::_encodings
List< AudioEncoding > _encodings
List of encoding types.
Definition: audioOutputPortType.hpp:59