webOS Userland
Native system APIs for webOS
libhelpers.h File Reference

Go to the source code of this file.

Classes

struct  HContext
 Context for luna service calls. More...
 

Typedefs

typedef struct LSHandle LSHandle
 
typedef struct LSMessage LSMessage
 
typedef unsigned long LSMessageToken
 
typedef bool(* LSFilterFunc) (LSHandle *sh, LSMessage *reply, void *ctx)
 

Functions

int HLunaServiceCall (const char *uri, const char *payload, HContext *context)
 Send luna call. More...
 
int HUnregisterServiceCallback (HContext *context)
 Unregister a service callback. More...
 
const char * HLunaServiceMessage (LSMessage *msg)
 Get payload message from luna call response. More...
 

Function Documentation

◆ HLunaServiceCall()

int HLunaServiceCall ( const char *  uri,
const char *  payload,
HContext context 
)

Send luna call.

Parameters
uri
payload
context
Returns
0 if succeeded

◆ HLunaServiceMessage()

const char* HLunaServiceMessage ( LSMessage *  msg)

Get payload message from luna call response.

Parameters
msg
Returns
Payload message (JSON string)

◆ HUnregisterServiceCallback()

int HUnregisterServiceCallback ( HContext context)

Unregister a service callback.

Parameters
contextSame context used in HLunaServiceCall
Returns
0 if succeeded