RDK Documentation (Open Sourced RDK Components)
hostIf_updateHandler.h
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 * @defgroup tr69hostif
22 * @{
23 * @defgroup hostif
24 * @{
25 **/
26 
27 
28 #ifndef _HOSTIF_UPDATE_HANDLER_H_
29 #define _HOSTIF_UPDATE_HANDLER_H_
30 
31 #include <pthread.h>
32 #include "hostIf_tr69ReqHandler.h"
33 #include "stdio.h"
34 #include "hostIf_main.h"
35 //#include <unistd.h>
36 #include "libIBus.h"
37 #include <condition_variable>
38 #include <mutex>
39 
40 typedef void (*updateCallback)(IARM_Bus_tr69HostIfMgr_EventId_t, const char* paramName, const char* paramValue, HostIf_ParamType_t paramtype);
41 
43 
44  static bool stopped;
45  static GThread *thread;
46 
47 public:
48  static void Init();
49  static void stop();
50  static void reset();
51  static gpointer run(gpointer);
52  static void notifyCallback(IARM_Bus_tr69HostIfMgr_EventId_t, const char* paramName, const char* paramVal, HostIf_ParamType_t paramtype);
53 };
54 
55 void sendAddRemoveEvents (updateCallback callbackFn, int newValue, int& savedValue, char* objectPath);
56 
57 #endif //_HOSTIF_UPDATE_HANDLER_H_
58 
59 
60 /** @} */
61 /** @} */
hostIf_main.h
hostIf_main API.
IARM_Bus_tr69HostIfMgr_EventId_t
enum _tr69HostIfMgr_EventId_t IARM_Bus_tr69HostIfMgr_EventId_t
HostIf_ParamType_t
enum _HostIf_ParamType HostIf_ParamType_t
libIBus.h
RDK IARM-Bus API Declarations.
updateHandler
Definition: hostIf_updateHandler.h:42