|
RDK Documentation (Open Sourced RDK Components)
|
35 #include "safec_lib.h"
37 #define SAFEC_ERR_CHECK(safec_rc) if(safec_rc != EOK) {\
43 IARM_Result_t _callback(
void *arg)
46 printf(
"Result :: %s \n",param->
cbData);
47 return (IARM_Result_t)0;
50 int main(
int argc,
char** argv)
54 errno_t safec_rc = -1;
57 printf(
"usage is : ./test_writeImage <image_path> <signed_image_name>\n");
61 printf(
"Client Entering\r\n");
66 safec_rc = strcpy_s(param.
name,
sizeof(param.
name), argv[2]);
67 SAFEC_ERR_CHECK(safec_rc);
69 safec_rc = strcpy_s(param.
path,
sizeof(param.
path), argv[1]);
70 SAFEC_ERR_CHECK(safec_rc);
73 SAFEC_ERR_CHECK(safec_rc);
76 param.
type = mfrIMAGE_TYPE_CDL;
77 safec_rc = strcpy_s(param.
cbData,
sizeof(param.
cbData),
"Test Success");
78 SAFEC_ERR_CHECK(safec_rc);
82 printf(
"Register Call Success...\n");
86 printf(
"Problem with registering callback \n");
90 printf(
"IARM_Bus_Call Success...\n");
94 printf(
"Problem with IARM_Bus_Call \n");
97 while(getchar()!=
'x') {
104 printf(
"Client Exiting\r\n");
IARM_Result_t IARM_Bus_Term(void)
This API is used to terminate the IARM-Bus library.
#define IARM_BUS_MFRLIB_API_WriteImage
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.
#define IARM_BUS_MFRLIB_COMMON_API_WriteImageCb
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...
char callerModuleName[255]
RDK IARM-Bus API Declarations.
#define IARM_BUS_MFRLIB_NAME
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_Init(const char *name)
This API is used to initialize the IARM-Bus library.