webOS Userland
Native system APIs for webOS
 
Loading...
Searching...
No Matches
libhelpers.h
Go to the documentation of this file.
1
10#pragma once
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct LSHandle LSHandle;
17typedef struct LSMessage LSMessage;
18typedef unsigned long LSMessageToken;
19
20typedef bool (*LSFilterFunc) (LSHandle *sh, LSMessage *reply, void *ctx);
21
22
26typedef struct HContext {
30 LSFilterFunc callback;
31 void* userdata;
32 void* unknown;
40 int pub;
41 LSMessageToken ret_token;
42} HContext;
43
51int HLunaServiceCall(const char *uri, const char *payload, HContext *context);
52
59
65const char *HLunaServiceMessage(LSMessage *msg);
66
67#ifdef __cplusplus
68}
69#endif
int HLunaServiceCall(const char *uri, const char *payload, HContext *context)
Send luna call.
const char * HLunaServiceMessage(LSMessage *msg)
Get payload message from luna call response.
int HUnregisterServiceCallback(HContext *context)
Unregister a service callback.
Context for luna service calls.
Definition libhelpers.h:26
int pub
Whether the call is a public call or private call.
Definition libhelpers.h:40
int multiple
Whether the call is multiple (like subscription), or one-shot.
Definition libhelpers.h:36
LSFilterFunc callback
Callback function called on incoming message.
Definition libhelpers.h:30