RDK Documentation (Open Sourced RDK Components)
hostIf_jsonReqHandler.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  * @file hostIf_jsonReqHandler.h
21  * @brief The header file provides HostIf IP json request handler information APIs.
22  */
23 
24 /**
25  *
26  * @defgroup TR-069HOSTIF_JSON_REQHANDLER_API IP Json RequestHandler Public API
27  * Describe the details about API used in TR-069 json request handler.
28  * @ingroup TR-069HOSTIF_DEVICECLIENT_HANDLER
29  */
30 
31  /**
32  * Json-interface is a platform agnostic http server communication interface. It allows
33  * json client applications to communicate by sending Get operation
34  *
35  */
36 
37 
38 /**
39 * @defgroup tr69hostif
40 * @{
41 * @defgroup hostif
42 * @{
43 **/
44 
45 
46 #ifndef HOSTIFJSONIFHANDLER_H_
47 #define HOSTIFJSONIFHANDLER_H_
48 
49 
50 #include <yajl/yajl_parse.h>
51 #include <yajl/yajl_gen.h>
52 #include "hostIf_main.h"
53 #include "hostIf_msgHandler.h"
54 
55 
56 
57 
59 
60 /**
61  * @brief Handle the Post message from HTTP Json client.
62  *
63  * This API is used to listen the http messages and extract the Json payload.
64  * Next will pass the Json message to common API
65  *
66  *
67  * @return bool true/false.
68  * @retval true on success.
69 */
71 
72 
73 /**
74  * @brief It handles the request and response IARM member processes.
75  *
76  * This API handles the incoming request from http and forward to common Host IF API
77  * to get the respective parameter data. It also create and return the respond
78  * the Json object through http message.
79  *
80  * @param [in] incommingRequest This is Json incoming request object.
81  * @param [ou] outResponse This is Json incoming response object.
82  *
83  * @return bool true/false.
84  * @retval true on success
85  */
87 
88 /**
89  * @brief This is parsing the Json message and construct the respective structure
90  * to send to common request handler API.
91  *
92  * This API is used to parse the Json messages and mapp to respective HOSTIF_MsgData_t
93  * structure to pass the common request handler.
94  *
95  * @param [in] incommingReq The incoming request Json message.
96  * @param [out] strMsgData This the data structure of parameter data.
97  *
98  * @return bool true/false.
99  * @retval true on success
100  */
101 //bool hostIf_ParseJsonReq(json_t *incommingReq, HOSTIF_MsgData_t *strMsgData);
102 
103 
104 /**
105  * @brief Create the json object from response structure.
106  *
107  * This API is creating the Json object from response structure.
108  *
109  * @param [in] stMsgData The date structure of HOSTIF_MsgData_t structure.
110  *
111  * @return json object.
112  * @retval json response object on success, NULL on failure
113  */
114 //json_t * hostIf_CreateJsonMsgResponse(HOSTIF_MsgData_t *stMsgData);
115 
116 
117 #endif /* HOSTIFJSONIFHANDLER_H_ */
118 
119 /* End of IARM_BUS_IARM_CORE_API doxygen group */
120 /**
121  * @}
122  */
123 
124 
125 /** @} */
126 /** @} */
hostIf_HttpServerStart
void hostIf_HttpServerStart()
This API is used to initialize and start the HTTP server process. It use to serve the http json clien...
Definition: hostIf_jsonReqHandlerThread.cpp:343
hostIf_main.h
hostIf_main API.
hostIf_HttpServerStop
void hostIf_HttpServerStop()
It handles the request and response IARM member processes.
Definition: hostIf_jsonReqHandlerThread.cpp:382
hostIf_HTTPJsonMsgHandler
bool hostIf_HTTPJsonMsgHandler()
Handle the Post message from HTTP Json client.
hostIf_msgHandler.h
The header file provides HostIf message handler information APIs.