RDK Documentation (Open Sourced RDK Components)
Components_SPDIF.cpp
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  * @file Components_SPDIF.cpp
22  * @brief This source file contains the APIs of TR069 Components SBDIF.
23  */
24 
25 /**
26 * @defgroup tr69hostif
27 * @{
28 * @defgroup hostif
29 * @{
30 **/
31 
32 
33 #include "dsTypes.h"
34 #include "illegalArgumentException.hpp"
35 #include "exception.hpp"
36 #include "Components_SPDIF.h"
37 #include "safec_lib.h"
38 
39 #define DEV_NAME "SPDIF"
40 #define BASE_NAME "Device.Services.STBService.1.Components.SPDIF"
41 #define UPDATE_FORMAT_STRING "%s.%d.%s"
42 
43 #define ENABLE_STRING "Enable"
44 #define STATUS_STRING "Status"
45 #define ALIAS_STRING "Alias"
46 #define NAME_STRING "Name"
47 #define FORCEPCM_STRING "ForcePCM"
48 #define PASSTHROUGH_STRING "Passthrough"
49 #define AUDIODELAY_STRING "AudioDelay"
50 
51 #define ENABLED_STRING "Enabled"
52 #define DISABLED_STRING "Disabled"
53 
54 GHashTable * hostIf_STBServiceSPDIF::ifHash = NULL;
55 GMutex * hostIf_STBServiceSPDIF::m_mutex = NULL;
56 
57 hostIf_STBServiceSPDIF* hostIf_STBServiceSPDIF::getInstance(int dev_id)
58 {
59  hostIf_STBServiceSPDIF* pRet = NULL;
60 
61  if(ifHash)
62  {
63  pRet = (hostIf_STBServiceSPDIF *)g_hash_table_lookup(ifHash,(gpointer) dev_id);
64  }
65  else
66  {
67  ifHash = g_hash_table_new(NULL,NULL);
68  }
69 
70  if(!pRet)
71  {
72  try
73  {
74  pRet = new hostIf_STBServiceSPDIF(dev_id, device::Host::getInstance().getAudioOutputPort(std::string("SPDIF").append(int_to_string(dev_id-1))));
75  g_hash_table_insert(ifHash, (gpointer)dev_id, pRet);
76  }
77  catch (const device::IllegalArgumentException &e)
78  {
79  RDK_LOG(RDK_LOG_WARN,LOG_TR69HOSTIF,"Caught device::IllegalArgumentException, not able create STB service %s Interface instance %d..\n", DEV_NAME, dev_id);
80  }
81  catch (const int &e)
82  {
83  RDK_LOG(RDK_LOG_WARN,LOG_TR69HOSTIF,"Caught exception, not able create STB service %s Interface instance %d..\n", DEV_NAME, dev_id);
84  }
85  catch (const dsError_t &e)
86  {
87  RDK_LOG(RDK_LOG_ERROR,LOG_TR69HOSTIF,"Caught dsError_t %d, not able create STB service %s Interface instance %d..\n", e, DEV_NAME, dev_id);
88  }
89  catch (const device::Exception &e)
90  {
91  RDK_LOG(RDK_LOG_WARN,LOG_TR69HOSTIF,"Caught device::Exception %d \"%s\", not able create STB service %s Interface instance %d..\n", e.getCode(), e.getMessage().c_str(), DEV_NAME, dev_id);
92  }
93  }
94  return pRet;
95 }
96 
97 GList* hostIf_STBServiceSPDIF::getAllInstances()
98 {
99  if(ifHash)
100  return g_hash_table_get_keys(ifHash);
101  return NULL;
102 }
103 
104 void hostIf_STBServiceSPDIF::closeInstance(hostIf_STBServiceSPDIF *pDev)
105 {
106  if(pDev)
107  {
108  g_hash_table_remove(ifHash, (gconstpointer)pDev->dev_id);
109  delete pDev;
110  }
111 }
112 
113 void hostIf_STBServiceSPDIF::closeAllInstances()
114 {
115  if(ifHash)
116  {
117  GList* tmp_list = g_hash_table_get_values (ifHash);
118 
119  while(tmp_list)
120  {
121  hostIf_STBServiceSPDIF* pDev = (hostIf_STBServiceSPDIF *)tmp_list->data;
122  tmp_list = tmp_list->next;
123  closeInstance(pDev);
124  }
125  }
126 }
127 
128 void hostIf_STBServiceSPDIF::getLock()
129 {
130  if(!m_mutex)
131  {
132  m_mutex = g_mutex_new();
133  }
134  g_mutex_lock(m_mutex);
135 }
136 
137 void hostIf_STBServiceSPDIF::releaseLock()
138 {
139  g_mutex_unlock(m_mutex);
140 }
141 
142 /**
143  * @brief Class Constructor of the class hostIf_STBServiceSPDIF.
144  *
145  * It will initialize the device id and audio output port.
146  *
147  * @param[in] devid Identification number of the device.
148  * @param[in] port Audio output port number.
149  */
150 hostIf_STBServiceSPDIF::hostIf_STBServiceSPDIF(int devid, device::AudioOutputPort& port) : dev_id(devid), aPort(port)
151 {
152  backupEnable = false;
153  errno_t rc = -1;
154  rc=strcpy_s(backupStatus,sizeof(backupStatus), " ");
155  if(rc!=EOK)
156  {
157  ERR_CHK(rc);
158  }
159  backupForcePCM = false;
160  backupPassthrough = false;
161  backupAudioDelay = 0;
162 
163  bCalledEnable = false;
164  bCalledStatus = false;
165  bCalledAlias = false;
166  bCalledName = false;
167  bCalledForcePCM = false;
168  bCalledPassthrough = false;
169  bCalledAudioDelay = false;
170 
171 }
172 
173 /**
174  * @brief This function set the SPDIF interface updates such as Enable, Status, Alias,
175  * Name, ForcePCM, Pass through, AudioDelay in a connected SPDIF port. Currently ForcePCM
176  * is handled.
177  *
178  * @param[in] paramName SPDIF service name string.
179  * @param[in] stMsgData HostIf Message Request param contains the SPDIF attribute value.
180  *
181  * @return Returns an Integer value.
182  * @retval 0 If successfully set the hostIf SPDIF interface attribute.
183  * @retval -1 If Not able to set the hostIf SPDIF interface attribute.
184  * @retval -2 If Not handle the hostIf SPDIF interface attribute.
185  * @ingroup TR69_HOSTIF_STBSERVICES_SPDIF_API
186  */
187 int hostIf_STBServiceSPDIF::handleSetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData)
188 {
189  int ret = NOT_HANDLED;
190  if (strcasecmp(paramName, FORCEPCM_STRING) == 0)
191  {
192  ret = setForcePCM(stMsgData);
193  }
194  return ret;
195 }
196 
197 /**
198  * @brief This function get the SPDIF interface updates such as Enable, Status, Alias,
199  * Name, ForcePCM, Pass through, AudioDelay in a connected SPDIF port.
200  *
201  * @param[in] paramName SPDIF service name string.
202  * @param[in] stMsgData HostIf Message Request param contains the SPDIF attribute value.
203  *
204  * @return Returns an Integer value.
205  * @retval 0 If successfully get the hostIf SPDIF interface attribute.
206  * @retval -1 If Not able to get the hostIf SPDIF interface attribute.
207  * @retval -2 If Not handle the hostIf SPDIF interface attribute.
208  * @ingroup TR69_HOSTIF_STBSERVICES_SPDIF_API
209  */
210 int hostIf_STBServiceSPDIF::handleGetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData)
211 {
212  int ret = NOT_HANDLED;
213  if (strcasecmp(paramName, ENABLE_STRING) == 0)
214  {
215  ret = getEnable(stMsgData);
216  }
217  else if (strcasecmp(paramName, STATUS_STRING) == 0)
218  {
219  ret = getStatus(stMsgData);
220  }
221  else if (strcasecmp(paramName, ALIAS_STRING) == 0)
222  {
223  ret = getAlias(stMsgData);
224  }
225  else if (strcasecmp(paramName, NAME_STRING) == 0)
226  {
227  ret = getName(stMsgData);
228  }
229  else if (strcasecmp(paramName, FORCEPCM_STRING) == 0)
230  {
231  ret = getForcePCM(stMsgData);
232  }
233  else if (strcasecmp(paramName, PASSTHROUGH_STRING) == 0)
234  {
235  ret = getPassthrough(stMsgData);
236  }
237  else if (strcasecmp(paramName, AUDIODELAY_STRING) == 0)
238  {
239  ret = getAudioDelay(stMsgData);
240  }
241 
242  return ret;
243 }
244 
245 /**
246  * @brief This function updates the SPDIF interface updates such as Enable, Status, Alias,
247  * Name, ForcePCM, Pass through, AudioDelay in a connected SPDIF port.
248  *
249  * @param[in] mUpdateCallback Callback function which updates the hostIf SPDIF interface.
250  * @ingroup TR69_HOSTIF_STBSERVICES_SPDIF_API
251  */
252 void hostIf_STBServiceSPDIF::doUpdates(updateCallback mUpdateCallback)
253 {
254  HOSTIF_MsgData_t msgData;
255  bool bChanged;
256  char tmp_buff[PARAM_LEN];
257 
258  memset(&msgData,0,sizeof(msgData));
259  memset(tmp_buff,0,PARAM_LEN);
260  bChanged = false;
261  msgData.instanceNum=dev_id;
262  getEnable(&msgData,&bChanged);
263  if(bChanged)
264  {
265  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, ENABLE_STRING);
266  if(mUpdateCallback)
267  {
268  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
269  }
270  }
271 
272  memset(&msgData,0,sizeof(msgData));
273  memset(tmp_buff,0,PARAM_LEN);
274  bChanged = false;
275  msgData.instanceNum=dev_id;
276  getStatus(&msgData,&bChanged);
277  if(bChanged)
278  {
279  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, STATUS_STRING);
280  if(mUpdateCallback)
281  {
282  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
283  }
284  }
285 
286  memset(&msgData,0,sizeof(msgData));
287  memset(tmp_buff,0,PARAM_LEN);
288  bChanged = false;
289  msgData.instanceNum=dev_id;
290  getAlias(&msgData,&bChanged);
291  if(bChanged)
292  {
293  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, ALIAS_STRING);
294  if(mUpdateCallback)
295  {
296  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
297  }
298  }
299 
300  memset(&msgData,0,sizeof(msgData));
301  memset(tmp_buff,0,PARAM_LEN);
302  bChanged = false;
303  msgData.instanceNum=dev_id;
304  getName(&msgData,&bChanged);
305  if(bChanged)
306  {
307  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, NAME_STRING);
308  if(mUpdateCallback)
309  {
310  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
311  }
312  }
313 
314  memset(&msgData,0,sizeof(msgData));
315  memset(tmp_buff,0,PARAM_LEN);
316  bChanged = false;
317  msgData.instanceNum=dev_id;
318  getForcePCM(&msgData,&bChanged);
319  if(bChanged)
320  {
321  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, FORCEPCM_STRING);
322  if(mUpdateCallback)
323  {
324  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
325  }
326  }
327 
328  memset(&msgData,0,sizeof(msgData));
329  memset(tmp_buff,0,PARAM_LEN);
330  bChanged = false;
331  msgData.instanceNum=dev_id;
332  getPassthrough(&msgData,&bChanged);
333  if(bChanged)
334  {
335  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, PASSTHROUGH_STRING);
336  if(mUpdateCallback)
337  {
338  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
339  }
340  }
341 
342  memset(&msgData,0,sizeof(msgData));
343  memset(tmp_buff,0,PARAM_LEN);
344  bChanged = false;
345  msgData.instanceNum=dev_id;
346  getAudioDelay(&msgData,&bChanged);
347  if(bChanged)
348  {
349  snprintf(tmp_buff, PARAM_LEN, UPDATE_FORMAT_STRING, BASE_NAME, dev_id, AUDIODELAY_STRING);
350  if(mUpdateCallback)
351  {
352  mUpdateCallback(IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED,tmp_buff, msgData.paramValue, msgData.paramtype);
353  }
354  }
355 }
356 
357 int hostIf_STBServiceSPDIF::getNumberOfInstances(HOSTIF_MsgData_t *stMsgData)
358 {
359  int portCount = 0;
361  for (int i = 0; i < aPorts.size() ; i++) //CID:18299 - UNINIT
362  {
363  if (strcasestr(aPorts.at(i).getName().c_str(), "spdif"))
364  portCount++;
365  }
366  put_int(stMsgData->paramValue, portCount);
367  stMsgData->paramtype = hostIf_UnsignedIntType;
368  stMsgData->paramLen = sizeof(unsigned int);
369  return OK;
370 }
371 
372 // Private Impl below here.
373 
374 /************************************************************
375  * Description : Set device enable
376  * Precondition : None
377  * Input : stMsgData->paramValue -> 1 : Device is enabled.
378  0 : Device is disabled.
379 
380  * Return : OK -> Success
381  NOK -> Failure
382 ************************************************************/
383 int hostIf_STBServiceSPDIF::setEnable(HOSTIF_MsgData_t *stMsgData)
384 {
385  int ret = NOT_HANDLED;
386  return ret;
387 }
388 
389 /************************************************************
390  * Description : Set Alias for device
391  * Precondition : None
392  * Input : stMsgData->paramValue -> non volatile handle for this device.
393 
394  * Return : OK -> Success
395  NOK -> Failure
396 ************************************************************/
397 int hostIf_STBServiceSPDIF::setAlias(HOSTIF_MsgData_t *stMsgData)
398 {
399  int ret = NOT_HANDLED;
400  return ret;
401 }
402 
403 /************************************************************
404  * Description : Set ForcePCM
405  * Precondition : None
406  * Input : stMsgData->paramValue -> 1 : Force stream to be uncompressed.
407  0 : Allow compressed data to be sent.
408 
409  * Return : OK -> Success
410  NOK -> Failure
411 ************************************************************/
412 int hostIf_STBServiceSPDIF::setForcePCM(HOSTIF_MsgData_t *stMsgData)
413 {
414  int ret = OK;
415  try
416  {
417  dsAudioEncoding_t newEncoding;
418  if (*((bool *)stMsgData->paramValue))
419  newEncoding = dsAUDIO_ENC_PCM;
420  else
421  newEncoding = dsAUDIO_ENC_DISPLAY;
422  aPort.setEncoding(newEncoding);
423  }
424  catch (const std::exception e)
425  {
426  RDK_LOG(RDK_LOG_WARN,LOG_TR69HOSTIF,"[%s] Exception: %s\r\n",__FUNCTION__, e.what());
427  ret = NOK;
428  }
429  return ret;
430 }
431 
432 int hostIf_STBServiceSPDIF::getEnable(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
433 {
434  int ret = NOT_HANDLED;
435  return ret;
436 }
437 
438 /************************************************************
439  * Description : Get status
440  * Precondition : None
441  * Input : stMsgData for result return.
442  pChanged
443 
444  * Return : OK -> Success
445  NOK -> Failure
446  stMsgData->paramValue -> "Enabled", "Disabled" or "Error"
447 ************************************************************/
448 int hostIf_STBServiceSPDIF::getStatus(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
449 {
450  int ret = OK; // Since it's hard-coded.
451  strncpy(stMsgData->paramValue, ENABLED_STRING, PARAM_LEN);
452  stMsgData->paramValue[PARAM_LEN-1] = '\0';
453  stMsgData->paramtype = hostIf_StringType;
454  stMsgData->paramLen = strlen(ENABLED_STRING);
455  if(bCalledStatus && pChanged && strcmp(backupStatus, stMsgData->paramValue))
456  {
457  *pChanged = true;
458  }
459  bCalledStatus = true;
460  strncpy(backupStatus, stMsgData->paramValue, _BUF_LEN_16-1);
461  backupStatus[_BUF_LEN_16-1] = '\0';
462  return ret;
463 }
464 
465 /************************************************************
466  * Description : Get non volatile handle for device
467  * Precondition : None
468  * Input : stMsgData for result return.
469  pChanged
470 
471  * Return : OK -> Success
472  NOK -> Failure
473  stMsgData->paramValue -> the alias value
474 ************************************************************/
475 int hostIf_STBServiceSPDIF::getAlias(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
476 {
477  int ret = NOT_HANDLED;
478  return ret;
479 }
480 
481 /************************************************************
482  * Description : Get human readable device name
483  * Precondition : None
484  * Input : stMsgData for result return.
485  pChanged
486 
487  * Return : OK -> Success
488  NOK -> Failure
489  stMsgData->paramValue -> humaan readable name string.
490 ************************************************************/
491 int hostIf_STBServiceSPDIF::getName(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
492 {
493  int ret = NOT_HANDLED;
494  return ret;
495 }
496 
497 /************************************************************
498  * Description : Get ForcePCM setting
499  * Precondition : None
500  * Input : stMsgData for result return.
501  pChanged
502 
503  * Return : OK -> Success
504  NOK -> Failure
505  stMsgData->paramValue -> 1 : Audio format is forced to be pcm
506  0 : Compressed audio may be sent through (passthrough)
507 ************************************************************/
508 int hostIf_STBServiceSPDIF::getForcePCM(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
509 {
510  int ret = OK;
511  try
512  {
513  dsAudioEncoding_t newEncoding;
514  if (aPort.getEncoding().getId() == dsAUDIO_ENC_PCM)
515  {
516  put_boolean(stMsgData->paramValue, true);
517  }
518  else
519  {
520  put_boolean(stMsgData->paramValue, false);
521  }
522  stMsgData->paramtype = hostIf_BooleanType;
523  stMsgData->paramLen = sizeof(bool);
524  if(bCalledForcePCM && pChanged && (backupForcePCM != get_boolean(stMsgData->paramValue)))
525  {
526  *pChanged = true;
527  }
528  bCalledForcePCM = true;
529  backupForcePCM = get_boolean(stMsgData->paramValue);
530  }
531  catch (const std::exception e)
532  {
533  RDK_LOG(RDK_LOG_WARN,LOG_TR69HOSTIF,"[%s] Exception: %s\r\n",__FUNCTION__, e.what());
534  ret = NOK;
535  }
536  return ret;
537 }
538 
539 /************************************************************
540  * Description : Get Passthrough
541  * Precondition : None
542  * Input : stMsgData for result return.
543  pChanged
544 
545  * Return : OK -> Success
546  NOK -> Failure
547  stMsgData->paramValue -> 1 : Audio datastream is passed without decoding
548  0 : Audio stream is decoded
549 ************************************************************/
550 int hostIf_STBServiceSPDIF::getPassthrough(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
551 {
552  int ret = OK;
553  try
554  {
555  dsAudioEncoding_t currentEncoding;
556  currentEncoding = (dsAudioEncoding_t )aPort.getEncoding().getId();
557  if ((currentEncoding == dsAUDIO_ENC_DISPLAY) || (currentEncoding == dsAUDIO_ENC_AC3))
558  {
559  put_boolean(stMsgData->paramValue, true);
560  }
561  else
562  {
563  put_boolean(stMsgData->paramValue, false);
564  }
565  stMsgData->paramtype = hostIf_BooleanType;
566  stMsgData->paramLen = sizeof(bool);
567  if(bCalledPassthrough && pChanged && (backupPassthrough != get_boolean(stMsgData->paramValue)))
568  {
569  *pChanged = true;
570  }
571  bCalledPassthrough = true;
572  backupPassthrough = get_boolean(stMsgData->paramValue);
573  }
574  catch (const std::exception e)
575  {
576  RDK_LOG(RDK_LOG_WARN,LOG_TR69HOSTIF,"[%s] Exception: %s\r\n",__FUNCTION__, e.what());
577  ret = NOK;
578  }
579  return ret;
580 }
581 
582 /************************************************************
583  * Description : Get Audio Delay
584  * Precondition : None
585  * Input : stMsgData for result return.
586  pChanged
587 
588  * Return : OK -> Success
589  NOK -> Failure
590  stMsgData->paramValue -> Audio Delay
591 ************************************************************/
592 int hostIf_STBServiceSPDIF::getAudioDelay(HOSTIF_MsgData_t *stMsgData, bool *pChanged)
593 {
594  int ret = NOT_HANDLED;
595  return ret;
596 }
597 
598 
599 
600 /** @} */
601 /** @} */
hostIf_STBServiceSPDIF::doUpdates
void doUpdates(updateCallback mUpdateCallback)
This function updates the SPDIF interface updates such as Enable, Status, Alias, Name,...
Definition: Components_SPDIF.cpp:252
_HostIf_MsgData_t::instanceNum
short instanceNum
Definition: hostIf_tr69ReqHandler.h:176
hostIf_STBServiceSPDIF
This class provides the TR-069 components SPDIF information.
Definition: Components_SPDIF.h:79
device::AudioOutputPort::getEncoding
const AudioEncoding & getEncoding() const
This API is used to get the current encoding of the output port.
Definition: audioOutputPort.cpp:260
dsTypes.h
Device Settings HAL types.
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
device::AudioOutputPort::getName
const std::string & getName() const
This API gets the name of the AudioOutputPort. The AudioOutputPort names can be IDLR,...
Definition: audioOutputPort.hpp:105
device::Host::getAudioOutputPorts
List< AudioOutputPort > getAudioOutputPorts()
This API is used to get the list of the audio output ports supported on the device....
Definition: host.cpp:309
hostIf_STBServiceSPDIF::handleGetMsg
int handleGetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData)
This function get the SPDIF interface updates such as Enable, Status, Alias, Name,...
Definition: Components_SPDIF.cpp:210
put_boolean
void put_boolean(char *ptr, bool val)
This function converts the input data to Boolean type.
Definition: hostIf_utils.cpp:191
Components_SPDIF.h
The header file provides components SPDIF(Sony/Philips Digital Interface Format) information APIs.
device::List::size
size_t size()
This function gets the size of the container.
Definition: list.hpp:118
dsAUDIO_ENC_PCM
@ dsAUDIO_ENC_PCM
Definition: dsTypes.h:186
device::AudioOutputPort
Class extending Enumerable to implement the audiooutputport interface.
Definition: audioOutputPort.hpp:60
_HostIf_MsgData_t::paramtype
HostIf_ParamType_t paramtype
Definition: hostIf_tr69ReqHandler.h:177
RDK_LOG
#define RDK_LOG
Definition: rdk_debug.h:258
hostIf_STBServiceSPDIF::handleSetMsg
int handleSetMsg(const char *paramName, HOSTIF_MsgData_t *stMsgData)
This function set the SPDIF interface updates such as Enable, Status, Alias, Name,...
Definition: Components_SPDIF.cpp:187
device::Exception::getCode
virtual int getCode() const
This function is used to get the error code of the exception.
Definition: exception.hpp:104
device::AudioOutputPort::setEncoding
void setEncoding(const int encoding)
This API is used to set the Encoding method in a given audio port.
Definition: audioOutputPort.cpp:608
device::Exception
This class handles exceptions occurring in DS module.
Definition: exception.hpp:52
_HostIf_MsgData_t::paramValue
char paramValue[(4 *1024)]
Definition: hostIf_tr69ReqHandler.h:172
device::Host::getInstance
static Host & getInstance(void)
This API is used to get a reference to the single instance of the Host object.
Definition: host.cpp:88
device::Exception::getMessage
virtual const std::string & getMessage() const
This function is used to get the message string of the exception.
Definition: exception.hpp:93
dsAUDIO_ENC_AC3
@ dsAUDIO_ENC_AC3
Definition: dsTypes.h:187
device::List< device::AudioOutputPort >
dsAUDIO_ENC_DISPLAY
@ dsAUDIO_ENC_DISPLAY
Definition: dsTypes.h:185
device::IllegalArgumentException
This class extends Exception class to manage the expections caused due to illegal arguments.
Definition: illegalArgumentException.hpp:51
put_int
void put_int(char *ptr, int val)
This function converts the input data to integer type.
Definition: hostIf_utils.cpp:152
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED
@ IARM_BUS_TR69HOSTIFMGR_EVENT_VALUECHANGED
Definition: hostIf_tr69ReqHandler.h:189
_HostIf_MsgData_t::paramLen
short paramLen
Definition: hostIf_tr69ReqHandler.h:175
device::DSConstant::getId
virtual int getId() const
This function is used to get the id.
Definition: dsConstant.hpp:130
hostIf_STBServiceSPDIF::hostIf_STBServiceSPDIF
hostIf_STBServiceSPDIF(int dev_id, device::AudioOutputPort &port)
Class Constructor of the class hostIf_STBServiceSPDIF.
Definition: Components_SPDIF.cpp:150
dsAudioEncoding_t
enum _dsAudioEncoding_t dsAudioEncoding_t