RDK Documentation (Open Sourced RDK Components)
hostIf_DeviceClient_ReqHandler.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_DeviceClient_ReqHandler.h
22  * @brief The header file provides HostIf Device client request handler information APIs.
23  */
24 
25 /**
26  * @defgroup TR-069HOSTIF_DEVICECLIENT_HANDLER TR-069 Host Interface Handler
27  * The role of the protocol handler is to identify and classify flows based on application awareness.
28  * - For example, a SIP protocol handler might identify a call-control flow, an audio flow, and a
29  * video flow. The App and Flow tables are used to specify the classification outcome associated
30  * with each such flow.
31  *
32  * For each App table entry there can be one or more associated Flow table entries. Each flow table
33  * entry identifies a type of flow associated with the protocol handler. The Type parameter is used
34  * to identify the specific type of flow associated with each entry.
35  * - For example, a Flow table entry for a SIP protocol handler might refer only to the audio
36  * flows associated with that protocol handler.
37  *
38  * A protocol handler can be defined as being fed from the output of a Classification table entry.
39  * That is, a Classification entry can be used to single out control traffic to be passed to the protocol
40  * handler, which then subsequently identifies associated flows. Doing so allows more than one
41  * instance of a protocol handler associated with distinct traffic.
42  * - For example, one could define two App table entries associated with SIP protocol handlers.
43  * If the classifier distinguished control traffic to feed into each handler based on the destination
44  * IP address of the SIP server, this could be used to separately classify traffic for different
45  * SIP service providers. In this case, each instance of the protocol handler would identify only
46  * those flows associated with a given service.
47  *
48  * @note Note that the Classification table entry that feeds each protocol handler wouldnt encompass all
49  * of the flows, only the traffic needed by the protocol handler to determine the flows—typically
50  * only the control traffic.
51  * @ingroup TR69_HOSTIF
52  *
53  * @defgroup TR-069HOSTIF_DEVICECLIENT_REQHANDLER_CLASSES Device Client RequestHandler Public Classes
54  * Describe the details about classes used in TR-069 DeviceClient request handler.
55  * @ingroup TR-069HOSTIF_DEVICECLIENT_HANDLER
56  */
57 
58 
59 /**
60  * deviceClient -interface is a platform agnostic IARM communication interface. It allows
61  * ds client applications to communicate by sending Get and Set operation
62  *
63  */
64 
65 
66 
67 
68 /**
69 * @defgroup tr69hostif
70 * @{
71 * @defgroup hostif
72 * @{
73 **/
74 
75 
76 #ifndef HOSTIF_DEVICECLIENT_REQHANDLER_H_
77 #define HOSTIF_DEVICECLIENT_REQHANDLER_H_
78 
79 #include "hostIf_msgHandler.h"
80 #include "hostIf_updateHandler.h"
81 
82 /**
83  * @brief This class provides the interface for getting device client request handler information.
84  * @ingroup TR-069HOSTIF_DEVICECLIENT_REQHANDLER_CLASSES
85  */
87 {
90  static class DeviceClientReqHandler *pInstance;
91  static updateCallback mUpdateCallback;
92 
93  static int curNumOfProcess[100];
94  static int curNumOfProcessor[10];
95 
96 public:
97  virtual bool init();
98  virtual bool unInit();
99  virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData);
100  virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData);
101  virtual int handleGetAttributesMsg(HOSTIF_MsgData_t *stMsgData);
102  virtual int handleSetAttributesMsg(HOSTIF_MsgData_t *stMsgData);
103  static msgHandler* getInstance();
104  static void registerUpdateCallback(updateCallback cb);
105  static void checkForUpdates();
106  static void reset();
107  static void notifyIARM(IARM_Bus_tr69HostIfMgr_EventId_t event_type, const char* paramName, const char* paramValue, HostIf_ParamType_t paramtype);
108 
109 };
110 
111 #endif /* HOSTIF_DEVICECLIENT_REQHANDLER_H_ */
112 /* End of HOSTIF_DEVICECLIENT_REQHANDLER_H_ doxygen group */
113 /**
114  * @}
115  */
116 
117 
118 /** @} */
119 /** @} */
DeviceClientReqHandler::unInit
virtual bool unInit()
This function is used to close all the instances of device info, device processor interface,...
Definition: hostIf_DeviceClient_ReqHandler.cpp:104
DeviceClientReqHandler::handleSetMsg
virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData)
This function is used to set the Device reset, FirmwareDownload and FirmwareDownload Status....
Definition: hostIf_DeviceClient_ReqHandler.cpp:127
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
IARM_Bus_tr69HostIfMgr_EventId_t
enum _tr69HostIfMgr_EventId_t IARM_Bus_tr69HostIfMgr_EventId_t
HostIf_ParamType_t
enum _HostIf_ParamType HostIf_ParamType_t
DeviceClientReqHandler
This class provides the interface for getting device client request handler information.
Definition: hostIf_DeviceClient_ReqHandler.h:86
DeviceClientReqHandler::init
virtual bool init()
This function is used to initialize all the current process and processor to '0' using memset.
Definition: hostIf_DeviceClient_ReqHandler.cpp:85
msgHandler
Definition: hostIf_msgHandler.h:103
hostIf_msgHandler.h
The header file provides HostIf message handler information APIs.
DeviceClientReqHandler::handleGetMsg
virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData)
This function is used to get the Process information such as "PID", "Command" "Size",...
Definition: hostIf_DeviceClient_ReqHandler.cpp:326