|
RDK Documentation (Open Sourced RDK Components)
|
34 #include "libIBusDaemon.h"
39 static IARM_Result_t _ReleaseOwnership(
void *arg)
41 printf(
"############### Bus Client _ReleaseOwnership, CLIENT releasing stuff\r\n");
43 IARM_Result_t retCode = IARM_RESULT_SUCCESS;
47 static void _eventHandler(
const char *owner, IARM_EventId_t eventId,
void *data,
size_t len)
54 printf(
"Event IARM_BUS_PWRMGR_EVENT_MODECHANGED: State Changed %d -- > %d\r\n",
55 param->data.state.curState, param->data.state.newState);
67 int keyCode = irEventData->data.irkey.keyCode;
68 int keyType = irEventData->data.irkey.keyType;
69 printf(
"Test Bus Client Get IR Key (%x, %x) From IR Manager\r\n", keyCode,
keyType);
81 IARM_Result_t retCode = IARM_RESULT_SUCCESS;
82 printf(
"Client Entering %d\r\n", getpid());
88 retCode = IARM_BusDaemon_RequestOwnership(IARM_BUS_RESOURCE_FOCUS);
93 printf(
"HeartBeat of Bus Client\r\n");
95 printf(
"Register IR for Bus Client\r\n");
99 printf(
"Unregister IR for Bus Client\r\n");
104 retCode = IARM_BusDaemon_ReleaseOwnership(IARM_BUS_RESOURCE_FOCUS);
108 printf(
"Bus Client Exiting\r\n");
#define IARM_BUS_PWRMGR_NAME
IARM_Result_t IARM_Bus_Term(void)
This API is used to terminate the IARM-Bus library.
@ IARM_BUS_IRMGR_EVENT_IRKEY
Structure which holds the event data.
IARM_Result_t IARM_Bus_RegisterEventHandler(const char *ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler)
This API register to listen to event and provide the callback function for event notification....
IARM_Result_t IARM_Bus_RegisterCall(const char *methodName, IARM_BusCall_t handler)
This API is used to register an RPC method that can be invoked by other applications.
IARM_Result_t IARM_Bus_Disconnect(void)
This API disconnect Application from IARM Bus so the application will not receive any IARM event or R...
RDK IARM-Bus API Declarations.
#define IARM_BUS_IRMGR_NAME
@ IARM_BUS_PWRMGR_EVENT_MODECHANGED
IARM-Bus Power Manager Public API.
IARM_Result_t IARM_Bus_Connect(void)
This API is used to connect application to the IARM bus daemon. After connected, the application can ...
IARM_Result_t IARM_Bus_UnRegisterEventHandler(const char *ownerName, IARM_EventId_t eventId)
This API is used to Remove ALL handlers registered for the given event. This API remove the all the e...
IARM_Result_t IARM_Bus_Init(const char *name)
This API is used to initialize the IARM-Bus library.