RDK Documentation (Open Sourced RDK Components)
xdevice_library.h
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  * @file xdevice.h
21  * @brief The header file provides xcal devices APIs.
22  */
23 
24  /**
25  * @defgroup XUPNP_XCALDEV XUPnP XCal-Device
26  * The XUPnP XCal-Device moudule is responssible for getting the device discovery information.
27  * - Read the xupnp configuration details from configuration file.
28  * - Getting the input for different gateway to populate all the service veriables.
29  * - It act like a server & whenever requested it will give the services details such as ipv6 ip address,
30  * receiver Id, etc.
31  * - Once the xcal-device receive the services details, it will create a UPnP object and start publishing the UPnP data.
32  * @ingroup XUPNP
33  *
34  * @defgroup XUPNP_XCALDEV_FUNC XUPnP XCal-Device Functions
35  * Describe the details about XCal-Device functional specifications.
36  * @ingroup XUPNP_XCALDEV
37  */
38 
39 #ifndef __XDEVICE_LIBRARY_H__
40 #define __XDEVICE_LIBRARY_H__
41 typedef enum serviceListCb
42 {
43  SERIAL_NUMBER,
44  IPV6_PREFIX,
45  TUNE_READY,
46  DST_OFFSET,
47  TIME_ZONE,
48  CHANNEL_MAP,
49  RAW_OFFSET,
50 }serviceListCb;
51 
52 #ifndef BOOL
53 #define BOOL unsigned char
54 #endif
55 #ifndef TRUE
56 #define TRUE 1
57 #endif
58 #ifndef FALSE
59 #define FALSE 0
60 #endif
61 #ifndef RETURN_OK
62 #define RETURN_OK 0
63 #endif
64 #ifndef RETURN_ERR
65 #define RETURN_ERR -1
66 #endif
67 
68 BOOL getBaseUrl(char *outValue);
69 BOOL getFogTsbUrl(char *outValue);
70 BOOL getPlaybackUrl(char *outValue);
71 BOOL getVideoBasedUrl(char *outValue);
72 BOOL getTrmUrl(char *outValue);
73 BOOL getIpv6Prefix(char *outValue);
74 BOOL getDeviceName(char *outValue);
75 BOOL getDeviceType(char *outValue);
76 BOOL getBcastMacAddress(char *outValue);
77 BOOL getGatewayStbIp(char *outValue);
78 BOOL getGatewayIpv6(char *outValue);
79 BOOL getGatewayIp(char *outValue);
80 BOOL getRecvDevType(char *outValue);
81 BOOL getBuildVersion(char *outValue);
82 BOOL getHostMacAddress(char *outValue);
83 BOOL getDnsConfig(char *outValue);
84 BOOL getSystemsIds(char *outValue);
85 BOOL getTimeZone(char *outValue);
86 BOOL getRawOffSet(int *outValue);
87 BOOL getDstOffset(int *outValue);
88 BOOL getDstSavings(int *outValue);
89 BOOL getUsesDayLightTime(BOOL *outValue);
90 BOOL getIsGateway(BOOL *outValue);
91 BOOL getHosts(char *outValue);
92 BOOL getRequiresTRM(BOOL *outValue);
93 BOOL getBcastPort(int *outValue);
94 BOOL getBcastIf(char *outValue);
95 BOOL getBcastIp(char *outValue);
96 BOOL getRUIUrl(char *outValue);
97 BOOL getSerialNum(char *outValue);
98 BOOL getPartnerId(char *outValue);
99 BOOL getUUID(char *outValue);
100 BOOL getReceiverId(char *outValue);
101 BOOL getCVPIp(char *outValue);
102 BOOL getCVPIf(char *outValue);
103 BOOL getCVPPort(int *outValue);
104 BOOL getCVPXmlFile(char *outValue);
105 BOOL getRouteDataGateway(char *outValue);
106 BOOL getLogFile(char *outValue);
107 BOOL getDevXmlPath(char *outValue);
108 BOOL getDevXmlFile(char *outValue, int refactor);
109 BOOL getModelNumber(char *outValue);
110 BOOL getMake(char *outValue);
111 BOOL getAccountId(char *outValue);
112 BOOL checkCVP2Enabled();
113 int check_rfc();
114 BOOL getIpSubnet(char *outValue);
115 BOOL getDevKeyPath(char *outValue);
116 BOOL getDevKeyFile(char *outValue);
117 BOOL getDevCertPath(char *outValue);
118 BOOL getDevCertPath(char *outValue);
119 void notify_timezone(void);
120 //typedef INT (*xdevice_service_callback)(enum serviceListCb , char *data);
121 //void xdevice_service_register(xdevice_service_callback callback_proc);
122 #else
123 #error "! __XDEVICE_LIBRARY_H__"
124 #endif
getBcastMacAddress
unsigned char getBcastMacAddress(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:701
getGatewayIpv6
unsigned char getGatewayIpv6(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:780
getDeviceType
unsigned char getDeviceType(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:666
getDeviceName
unsigned char getDeviceName(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:633
notify_timezone
void notify_timezone(void)
Generic function to notify the change in the time zone.
Definition: xcal-device.c:3640
getIpv6Prefix
unsigned char getIpv6Prefix(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal_device_library.c:1094
getGatewayStbIp
unsigned char getGatewayStbIp(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:747
getFogTsbUrl
unsigned char getFogTsbUrl(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:600
getRecvDevType
unsigned char getRecvDevType(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:848
getBaseUrl
unsigned char getBaseUrl(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:571
getGatewayIp
unsigned char getGatewayIp(char *outValue)
This function is used to get the IP address based on IPv6 or IPv4 is enabled.
Definition: xcal-device-library.c:813