RDK Documentation (Open Sourced RDK Components)
hostIf_msgHandler.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 hostIf_msgHandler.h
22  * @brief The header file provides HostIf message handler information APIs.
23  */
24 
25 /**
26  *
27  * @defgroup TR-069HOSTIF_MESSAGE_REQHANDLER_CLASSES Message Handler Public Classes
28  * Describe the details about classes used in TR-069 message handler.
29  * @ingroup TR-069HOSTIF_DEVICECLIENT_HANDLER
30  */
31 
32 
33 /**
34 * HOST-IF is a platform agnostic Inter-process communication (IPC) interface. It allows
35 * applications to communicate with each other by sending Events or invoking Remote
36 * Procedure Calls. The common programming APIs offered by the RDK IARM-Bus interface is
37 * independent of the operating system or the underlying IPC mechanism.
38 *
39 */
40 
41 
42 /**
43 * @defgroup tr69hostif
44 * @{
45 * @defgroup hostif
46 * @{
47 **/
48 
49 
50 #ifndef HOSTIF_MSGHANDLER_H_
51 #define HOSTIF_MSGHANDLER_H_
52 
53 #include "hostIf_tr69ReqHandler.h"
54 
55 #define TEST_STR "Device.Service.STBService.HDMI.status"
56 
57 #define HOSTIF_MGR_GROUP "HOSTIF_DM_PROFILE_MGR"
58 #define HOSTIF_JSON_CONG_GROUP "HOSTIF_JSON_CONFIG"
59 #define HOSTIF_GENERAL_CONG_GROUP "HOSTIF_CONFIG"
60 
61 /*! Host IF request type*/
62 typedef enum _HostIf_ParamMgr
63 {
64  HOSTIF_INVALID_Mgr = 0,
65  HOSTIF_DeviceMgr,
66  HOSTIF_XREMgr,
67  HOSTIF_DSMgr,
68  HOSTIF_MoCAMgr,
69  HOSTIF_EthernetMgr,
70  HOSTIF_IPMgr,
71  HOSTIF_TimeMgr,
72  HOSTIF_WiFiMgr,
73  HOSTIF_DHCPv4,
74  HOSTIF_InterfaceStack,
75  HOSTIF_TelemetryMgr,
76  HOSTIF_RdkProfileMgr,
77 #ifdef WEB_CONFIG_ENABLED
78  HOSTIF_WebConfigMgr,
79 #endif
80  HOSTIF_StorageSrvcMgr
81 #ifdef SNMP_ADAPTER_ENABLED
82  , HOSTIF_SNMPAdapterMgr
83 #endif
85 
86 
87 int hostIf_GetMsgHandler(HOSTIF_MsgData_t *stMsgData);
88 
89 int hostIf_SetAttributesMsgHandler(HOSTIF_MsgData_t *stMsgData);
90 
91 int hostIf_GetAttributesMsgHandler(HOSTIF_MsgData_t *stMsgData);
92 
93 int hostIf_SetMsgHandler(HOSTIF_MsgData_t *stMsgData);
94 
95 void hostIf_Init_Dummy_stMsgData (HOSTIF_MsgData_t **stMsgData);
96 
97 void hostIf_Print_msgData(HOSTIF_MsgData_t *stMsgData);
98 
99 void hostIf_Free_stMsgData (HOSTIF_MsgData_t *stMsgData);
100 
101 bool hostIf_initalize_ConfigManger();
102 bool hostIf_ConfigProperties_Init();
103 class msgHandler {
104 
105 protected:
106 
107  msgHandler() {};
108 
109 public:
110  /**
111  * @brief This is a pure virtual function used for initialization. Currently not implemented.
112  *
113  * @return Returns the status of the operation.
114  *
115  * @retval true if initialization is successful .
116  * @retval false if initialization is not successful.
117  * @ingroup TR-069HOSTIF_MESSAGE_REQHANDLER_CLASSES
118  */
119  virtual bool init() = 0;
120 
121  /**
122  * @brief This is a pure virtual function used for un initialization. Currently not implemented.
123  *
124  * @return Returns the status of the operation.
125  *
126  * @retval true if initialization is successful.
127  * @retval false if initialization is not successful.
128  * @ingroup TR-069HOSTIF_MESSAGE_REQHANDLER_CLASSES
129  */
130  virtual bool unInit() = 0;
131 
132  virtual int handleGetAttributesMsg(HOSTIF_MsgData_t *stMsgData) = 0;
133  virtual int handleSetAttributesMsg(HOSTIF_MsgData_t *stMsgData) = 0;
134 
135  /**
136  * @brief This is a pure virtual function used to handle the set message request.
137  * Currently not implemented.
138  *
139  * @param[out] stMsgData TR-069 Host interface message request.
140  *
141  * @return Returns the status of the operation.
142  *
143  * @retval OK if successful.
144  * @retval ERR_INTERNAL_ERROR if not able to set the data to the device.
145  * @ingroup TR-069HOSTIF_MESSAGE_REQHANDLER_CLASSES
146  */
147  virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData) = 0;
148 
149  /**
150  * @brief This is a pure virtual function used to handle the get message request.
151  * Currently not implemented.
152  *
153  * @param[out] stMsgData TR-069 Host interface message request.
154  *
155  * @return Returns the status of the operation.
156  *
157  * @retval OK if successful.
158  * @retval ERR_INTERNAL_ERROR if not able to get the data from the device.
159  * @ingroup TR-069HOSTIF_MESSAGE_REQHANDLER_CLASSES
160  */
161  virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData) = 0;
162 };
163 
164 msgHandler* HostIf_GetMgr(HOSTIF_MsgData_t *stMsgHandlerData);
165 
166 #endif /* HOSTIF_MSGHANDLER_H_ */
167 
168 /* End of HOSTIF_MSGHANDLER_H_ API doxygen group */
169 /**
170  * @}
171  */
172 
173 
174 /** @} */
175 /** @} */
msgHandler::init
virtual bool init()=0
This is a pure virtual function used for initialization. Currently not implemented.
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
_HostIf_ParamMgr
_HostIf_ParamMgr
Definition: hostIf_msgHandler.h:62
HostIf_ParamMgr_t
enum _HostIf_ParamMgr HostIf_ParamMgr_t
msgHandler::handleGetMsg
virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData)=0
This is a pure virtual function used to handle the get message request. Currently not implemented.
msgHandler
Definition: hostIf_msgHandler.h:103
msgHandler::unInit
virtual bool unInit()=0
This is a pure virtual function used for un initialization. Currently not implemented.
msgHandler::handleSetMsg
virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData)=0
This is a pure virtual function used to handle the set message request. Currently not implemented.