RDK Documentation (Open Sourced RDK Components)
|
RDK IARM-Bus API Declarations. More...
#include "libIARM.h"
Go to the source code of this file.
Typedefs | |
typedef IARM_Result_t(* | IARM_BusCall_t) (void *arg) |
Function signature for RPC Methods. More... | |
typedef void(* | IARM_EventHandler_t) (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
Function signature for event handlers. More... | |
Functions | |
IARM_Result_t | IARM_Bus_Init (const char *name) |
This API is used to initialize the IARM-Bus library. More... | |
IARM_Result_t | IARM_Bus_Term (void) |
This API is used to terminate the IARM-Bus library. More... | |
IARM_Result_t | IARM_Bus_Connect (void) |
This API is used to connect application to the IARM bus daemon. After connected, the application can send/receive IARM events and invoke IARM RPC calls. More... | |
IARM_Result_t | IARM_Bus_Disconnect (void) |
This API disconnect Application from IARM Bus so the application will not receive any IARM event or RPC calls. More... | |
IARM_Result_t | IARM_Bus_GetContext (void **context) |
Returns group context of the calling member. More... | |
IARM_Result_t | IARM_Bus_BroadcastEvent (const char *ownerName, IARM_EventId_t eventId, void *data, size_t len) |
This API is used to publish an Asynchronous event to all IARM client registered for this perticular event. Upon returns of this function, all the listeners are notified of the event. More... | |
IARM_Result_t | IARM_Bus_IsConnected (const char *memberName, int *isRegistered) |
This API is used to check if the current process is registered with IARM. More... | |
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. Execution of the handler will not block the process sending the event. More... | |
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 event handlers. This API is not used to unregister a specific handler.. More... | |
IARM_Result_t | IARM_Bus_RemoveEventHandler (const char *ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler) |
Remove specific handler registered for the given event. More... | |
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. More... | |
IARM_Result_t | IARM_Bus_Call (const char *ownerName, const char *methodName, void *arg, size_t argLen) |
This API is used to Invoke RPC method by its application name and method name. More... | |
IARM_Result_t | IARM_Bus_Call_with_IPCTimeout (const char *ownerName, const char *methodName, void *arg, size_t argLen, int timeout) |
This API is used to Invoke RPC method by its application name and method name with specified timeout to wait for response. More... | |
IARM_Result_t | IARM_Bus_RegisterEvent (IARM_EventId_t maxEventId) |
This API is used to register all the events that are published by the application. More... | |
void | IARM_Bus_WritePIDFile (const char *path) |
Write PID file. More... | |
RDK IARM-Bus API Declarations.
Definition in file libIBus.h.
typedef IARM_Result_t(* IARM_BusCall_t) (void *arg) |
Function signature for RPC Methods.
All IARM RPC Methods must use IARM_BusCall_t
as their function signature. Important Note: The argument structure cannot have pointers. The sizeof() operator applied on the arg
must equal to the actual memory allocated. Internally an equivalent of memcpy() is used to dispatch parameters its target. If a pointer is used in the parameters, the pointer, not the content it points to, is sent to the destination.
arg | is the composite carrying all input and output parameters of the RPC Method. |
typedef void(* IARM_EventHandler_t) (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
Function signature for event handlers.
All IARM Event handlers must use IARM_EventHandler_t
as their function signature. Important Note: The event data structure cannot have pointers. The sizeof() operator applied on the data
must equal to the actual memory allocated. Internally an equivalent of memcpy() is used to dispatch event data to its target. If a pointer is used in the event data, the pointer, not the content it points to, is sent to the destination.
owner | is well-known name of the application sending the event. |
eventID | is the integer uniquely identifying the event within the sending application. |
data | is the composite carrying all input and output parameters of event. |
len | is the result of sizeof() applied on the event data data structure. |