RDK Documentation (Open Sourced RDK Components)
hostIf_IPClient_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_IPClient_ReqHandler.h
22  * @brief The header file provides HostIf IP client request handler information APIs.
23  */
24 
25 /**
26  * @defgroup TR-069HOSTIF_IPCLIENT_REQHANDLER_CLASSES IP Client RequestHandler Public Classes
27  * Describe the details about classes used in TR-069 IPClient request handler.
28  * @ingroup TR-069HOSTIF_DEVICECLIENT_HANDLER
29  */
30 
31 
32 /**
33  * It allows ip client applications to communicate by sending Get operation
34  * from IP library.
35  */
36 
37 
38 /**
39 * @defgroup tr69hostif
40 * @{
41 * @defgroup hostif
42 * @{
43 **/
44 
45 
46 #ifndef HOSTIF_IPCLIENT_REQHANDLER_H_
47 #define HOSTIF_IPCLIENT_REQHANDLER_H_
48 
49 #include "hostIf_msgHandler.h"
50 #include "hostIf_updateHandler.h"
51 #include <mutex>
52 
53 /**
54  * @brief This class provides the interface for getting IP client request handler information.
55  * @ingroup TR-069HOSTIF_IPCLIENT_REQHANDLER_CLASSES
56  */
58 {
59 private:
62 
63  static std::mutex m_mutex;
64  static class IPClientReqHandler *pInstance;
65  static updateCallback mUpdateCallback;
66 
67  static int curNumOfIPInterface;
68  static int curNumOfInterfaceIPv4Addresses[100];
69 #ifdef IPV6_SUPPORT
70  static int curNumOfInterfaceIPv6Addresses[100];
71  static int curNumOfInterfaceIPv6Prefixes[100];
72 #endif // IPV6_SUPPORT
73  static int curNumOfIPv4Interface[20];
74  static int curNumOfActivePorts[20];
75 
76 public:
77  virtual bool init();
78  virtual bool unInit();
79  virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData);
80  virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData);
81  virtual int handleGetAttributesMsg(HOSTIF_MsgData_t *stMsgData);
82  virtual int handleSetAttributesMsg(HOSTIF_MsgData_t *stMsgData);
83  static msgHandler* getInstance();
84  static void registerUpdateCallback(updateCallback cb);
85  static void checkForUpdates();
86  static void reset();
87 };
88 
89 #endif /* HOSTIF_IPCLIENT_REQHANDLER_H_ */
90 /* End of HOSTIF_IPCLIENT_REQHANDLER_H_ doxygen group */
91 /**
92  * @}
93  */
94 
95 
96 /** @} */
97 /** @} */
IPClientReqHandler::init
virtual bool init()
This function is used to initialize. Currently not implemented.
Definition: hostIf_IPClient_ReqHandler.cpp:101
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
IPClientReqHandler::unInit
virtual bool unInit()
This function is used to close all the instances of IP interface, IP interface stats IPv4 Address,...
Definition: hostIf_IPClient_ReqHandler.cpp:118
IPClientReqHandler::handleSetMsg
virtual int handleSetMsg(HOSTIF_MsgData_t *stMsgData)
This function is used to handle the set message request of IP interface IPv4Address and IP....
Definition: hostIf_IPClient_ReqHandler.cpp:271
IPClientReqHandler
This class provides the interface for getting IP client request handler information.
Definition: hostIf_IPClient_ReqHandler.h:57
IPClientReqHandler::handleGetMsg
virtual int handleGetMsg(HOSTIF_MsgData_t *stMsgData)
This function is used to handle the get message request of IP interface, IPv4Address,...
Definition: hostIf_IPClient_ReqHandler.cpp:146
msgHandler
Definition: hostIf_msgHandler.h:103
hostIf_msgHandler.h
The header file provides HostIf message handler information APIs.