RDK Documentation (Open Sourced RDK Components)
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
audioOutputPortConfig.hpp
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_AUDIOOUTPUTPORTCONFIG_HPP_
30 #define _DS_AUDIOOUTPUTPORTCONFIG_HPP_
31 
32 #include "audioEncoding.hpp"
33 #include "audioCompression.hpp"
34 #include "audioStereoMode.hpp"
35 #include "audioOutputPortType.hpp"
36 #include "list.hpp"
37 
38 #include <list>
39 #include <string>
40 
41 namespace device {
42 
44 
45  std::vector<AudioEncoding> _aEncodings;
46  std::vector<AudioCompression> _aCompressions;
47  std::vector<AudioStereoMode> _aStereoModes;
48  std::vector<AudioOutputPortType> _aPortTypes;
49  std::vector<AudioOutputPort> _aPorts;
50 
52  virtual ~AudioOutputPortConfig();
53  //To Make the instance as thread-safe, using = delete, the result is, automatically generated methods (constructor, for example) from the compiler will not be created and, therefore, can not be called
55  AudioOutputPortConfig& operator=(const AudioOutputPortConfig&)= delete;
56 
57 public:
58  static AudioOutputPortConfig & getInstance();
59 
60  const AudioEncoding &getEncoding(int id) const;
61  const AudioCompression &getCompression(int id) const;
62  const AudioStereoMode &getStereoMode(int id) const;
63  AudioOutputPortType &getPortType(int id);
64  AudioOutputPort &getPort(int id);
65  AudioOutputPort &getPort(const std::string &name);
66  List<AudioOutputPort> getPorts();
67  List<AudioOutputPortType> getSupportedTypes();
68 
69  void load();
70  void release();
71 
72 };
73 
74 }
75 
76 #endif /* _DS_AUDIOOUTPUTPORTCONFIG_HPP_ */
77 
78 
79 /** @} */
80 /** @} */
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::AudioCompression
This class extends DSConstant for implementing AudioCompression. It helps to maintain different audio...
Definition: audioCompression.hpp:49
device::AudioStereoMode
This class extends DSConstant to implement AudioStereoMode. It manages the information related to aud...
Definition: audioStereoMode.hpp:52
device::AudioOutputPort
Class extending Enumerable to implement the audiooutputport interface.
Definition: audioOutputPort.hpp:60
audioStereoMode.hpp
This file defines AudioStereoMode class for managing audio mode types.
device::AudioOutputPortType
Class extending DSConstant to implement the audiooutputport interface.
Definition: audioOutputPortType.hpp:56
audioOutputPortType.hpp
It contain variables,stuctures,class and functions referenced by audiooutputportType code.
device::AudioOutputPortConfig
Definition: audioOutputPortConfig.hpp:43
device::AudioEncoding
This class extends DSConstant to implement AudioEncoding which manages audio encodings.
Definition: audioEncoding.hpp:51
audioCompression.hpp
This file defines AudioCompression class for managing audio compression levels.
audioEncoding.hpp
This file defines AudioEncoding class for managing audio encoding types.