RDK Documentation (Open Sourced RDK Components)
mfrMgr.h
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
22 *
23 * @brief IARM-Bus MFR Manager Public API.
24 *
25 * This API defines the operations for the IARM-Bus MFR Manager interface.
26 *
27 * @par Document
28 * Document reference.
29 *
30 * @par Open Issues (in no particular order)
31 * -# None
32 *
33 * @par Assumptions
34 * -# None
35 *
36 * @par Abbreviations
37 * - BE: ig-Endian.
38 * - cb: allback function (suffix).
39 * - DS: Device Settings.
40 * - FPD: Front-Panel Display.
41 * - HAL: Hardware Abstraction Layer.
42 * - LE: Little-Endian.
43 * - LS: Least Significant.
44 * - MBZ: Must be zero.
45 * - MS: Most Significant.
46 * - RDK: Reference Design Kit.
47 * - _t: Type (suffix).
48 *
49 * @par Implementation Notes
50 * -# None
51 *
52 */
53 
54 /** @defgroup IARM_BUS IARM-Bus HAL API
55 * @ingroup IARM_RDK
56 *
57 * IARM-Bus is a platform agnostic Inter-process communication (IPC) interface. It allows
58 * applications to communicate with each other by sending Events or invoking Remote
59 * Procedure Calls. The common programming APIs offered by the RDK IARM-Bus interface is
60 * independent of the operating system or the underlying IPC mechanism.
61 *
62 * Two applications connected to the same instance of IARM-Bus are able to exchange events
63 * or RPC calls. On a typical system, only one instance of IARM-Bus instance is needed. If
64 * desired, it is possible to have multiple IARM-Bus instances. However, applications
65 * connected to different buses will not be able to communicate with each other.
66 */
67 
68 /** @defgroup IARM_BUS MFR Manager MFR lib
69 * @ingroup IARM_RDK
70 *
71 */
72 
73 /** @addtogroup IARM_BUS_MFR_LIB_API IARM-MFR Manager API
74 * @ingroup IARM_BUS
75 *
76 * Described herein are functions and structures exposed by MFR library.
77 *
78 * @{
79 */
80 
81 
82 
83 /**
84 * @defgroup iarmmgrs
85 * @{
86 * @defgroup mfr
87 * @{
88 **/
89 
90 
91 #ifndef _MFR_MGR_H_
92 #define _MFR_MGR_H_
93 
94 #include "libIBus.h"
95 #include "libIARM.h"
96 #include "mfrTypes.h"
97 #include "mfr_wifi_types.h"
98 #include "mfr_wifi_api.h"
99 
100 
101 #define IARM_BUS_MFRLIB_NAME "MFRLib" /*!< Well-known Name for MFR libarary */
102 
103 #define IARM_BUS_MFRLIB_API_GetSerializedData "mfrGetManufacturerData" /*!< Retrives manufacturer specific data from the box*/
104 #define IARM_BUS_MFRLIB_API_DeletePDRI "mfrDeletePDRI" /*!< delete PDRI image from the box*/
105 #define IARM_BUS_MFRLIB_API_ScrubAllBanks "scrubAllBanks" /*!< scrub all banks from the box*/
106 #define IARM_BUS_MFRLIB_API_WriteImage "mfrWriteImage" /*!< Validate and Write the image into flash*/
107 #define IARM_BUS_MFRLIB_API_WIFI_EraseAllData "mfrWifiEraseAllData"
108 #define IARM_BUS_MFRLIB_API_WIFI_Credentials "mfrWifiCredentials"
109 #define IARM_BUS_MFRLIB_API_SetBootLoaderPattern "mfrSetBootloaderPattern" /*!< Sets how the frontpanel LED(s) (and TV backlight on applicable devices) behave when running bootloader.*/
110 
111 #define IARM_BUS_MFRLIB_COMMON_API_WriteImageCb "WriteImageCb" /*!< This method shall be implemented by the caller calling WriteImage*/
112 
113 /*! Data size management need to be improved */
114 #define HDCP_KEY_MAX_SIZE (1280)
115 #define MAX_SERIALIZED_BUF HDCP_KEY_MAX_SIZE
116 #define MAX_BUF 255
117 
119  mfrSerializedType_t type; /*!< [in] Type of data to be queried*/
120  char buffer[MAX_SERIALIZED_BUF]; /*!< [out] On success, this will be pointing to a local memory location having expected data*/
121  int bufLen; /*!< [out] Indicates length of buffer pointed by pBuffer */
123 
125  char name[MAX_BUF]; /*!< [in] the path of the image file in the STB file system. */
126  char path[MAX_BUF]; /*!< [in] the filename of the image file. */
127  mfrImageType_t type; /*!< [in] the type (e.g. format, signature type) of the image.*/
128  char callerModuleName[MAX_BUF]; /*!< [in] Name registered IARMBus by the caller module*/
129  int interval; /*!< [in] number of seconds between two callbacks */
130  char cbData[MAX_BUF]; /*!< [inout] data that could be passed through this call and returned back through callback*/
132 
133 /*! Data associated with WriteImage callback call*/
135  mfrUpgradeStatus_t status; /*! upgrade status, set by WriteImage callback*/
136  char cbData[MAX_BUF]; /*! callback data, which was passed through WriteImage call*/
138 
139 typedef enum _WifiRequestType
140 {
141  WIFI_GET_CREDENTIALS = 0,
142  WIFI_SET_CREDENTIALS = 1
143 } WifiRequestType_t;
145  WIFI_DATA wifiCredentials;
146  WifiRequestType_t requestType;
147  WIFI_API_RESULT returnVal;
150  mfrBlPattern_t pattern;
152 
153 #endif //_MFR_MGR_H_
154 
155 
156 /* End of IARM_BUS_MFR_LIB_API doxygen group */
157 /**
158  * @}
159  */
160 
161 
162 /** @} */
163 /** @} */
_mfrUpgradeStatus_t
Definition: mfrTypes.h:218
_IARM_Bus_MFRLib_GetSerializedData_Param_t::buffer
char buffer[(1280)]
Definition: mfrMgr.h:120
_IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t::cbData
char cbData[255]
Definition: mfrMgr.h:184
_IARM_Bus_MFRLib_SetBLPattern_Param_t
Definition: mfrMgr.h:149
_IARM_Bus_MFRLib_GetSerializedData_Param_t::bufLen
int bufLen
Definition: mfrMgr.h:121
_IARM_Bus_MFRLib_WriteImage_Param_t::cbData
char cbData[255]
Definition: mfrMgr.h:130
_IARM_Bus_MFRLib_WriteImage_Param_t::callerModuleName
char callerModuleName[255]
Definition: mfrMgr.h:128
_IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t
Definition: mfrMgr.h:182
libIBus.h
RDK IARM-Bus API Declarations.
_IARM_BUS_MFRLIB_API_WIFI_Credentials_Param_t
Definition: mfrMgr.h:144
_IARM_Bus_MFRLib_WriteImage_Param_t
Definition: mfrMgr.h:129
_IARM_Bus_MFRLib_WriteImage_Param_t::interval
int interval
Definition: mfrMgr.h:133
_IARM_Bus_MFRLib_WriteImage_Param_t::path
char path[255]
Definition: mfrMgr.h:131
WIFI_DATA
Definition: mfr_wifi_types.h:63
IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t
struct _IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t IARM_Bus_MFRLib_CommonAPI_WriteImageCb_Param_t
_IARM_Bus_MFRLib_GetSerializedData_Param_t
Definition: mfrMgr.h:118
_IARM_Bus_MFRLib_GetSerializedData_Param_t::type
mfrSerializedType_t type
Definition: mfrMgr.h:119
_IARM_Bus_MFRLib_WriteImage_Param_t::name
char name[255]
Definition: mfrMgr.h:130
mfr_wifi_api.h
Manufacturer Library WIFI Public API.
_IARM_Bus_MFRLib_WriteImage_Param_t::type
mfrImageType_t type
Definition: mfrMgr.h:132