RDK Documentation (Open Sourced RDK Components)
LibCCEC.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 /**
23 * @defgroup hdmicec
24 * @{
25 * @defgroup ccec
26 * @{
27 **/
28 
29 
30 #ifndef HDMI_CCEC_LIB_HPP_
31 #define HDMI_CCEC_LIB_HPP_
32 #include <list>
33 #include "osal/Mutex.hpp"
34 #include "ccec/CCEC.hpp"
35 #include "Operands.hpp"
36 using CCEC_OSAL::Mutex;
37 
38 CCEC_BEGIN_NAMESPACE
39 
40 class PhysicalAddress;
41 
42 class LibCCEC {
43 public:
44  static LibCCEC &getInstance(void);
45 
46  LibCCEC(void);
47  void init(const char * name= 0);
48  void term(void);
49  int getLogicalAddress(int devType);
50  void getPhysicalAddress(unsigned int *physicalAddress);
51  int addLogicalAddress(const LogicalAddress &source);
52 
53 private:
54 // int logicalAddresses;
55  bool initialized;
56  bool connected;
57  Mutex mutex;
58 };
59 
60 CCEC_END_NAMESPACE
61 
62 #endif
63 
64 
65 /** @} */
66 /** @} */
CCEC_OSAL::Mutex
Definition: Mutex.hpp:53
LibCCEC::getInstance
static LibCCEC & getInstance(void)
This function is used to create the instance for CEC.
Definition: LibCCEC.cpp:61
LibCCEC::init
void init(const char *name=0)
This function is used to initialize CEC by starting the driver and doing host-specific initialization...
Definition: LibCCEC.cpp:84
LogicalAddress
Definition: Operands.hpp:409
LibCCEC
Definition: LibCCEC.hpp:42
PhysicalAddress
Definition: Operands.hpp:314
LibCCEC::LibCCEC
LibCCEC(void)
This is Constructor for LibCEC class. It initializes variables with default values.
Definition: LibCCEC.cpp:71
LibCCEC::addLogicalAddress
int addLogicalAddress(const LogicalAddress &source)
This function is used to add logical address to the driver, so that it can ACK if there a direct mess...
Definition: LibCCEC.cpp:131
LibCCEC::getLogicalAddress
int getLogicalAddress(int devType)
This function is used to get CEC device logical address starting the connection.
Definition: LibCCEC.cpp:152
Mutex.hpp
This file defines interface of Mutex class.
LibCCEC::term
void term(void)
This function is used to stop CEC by terminating the connection and stoping the driver.
Definition: LibCCEC.cpp:111