LunaService


Classes

struct  LSError
 Error object which contains information about first error since it was initialized via LSErrorInit. More...
struct  LSMethod
struct  LSSignal
struct  LSProperty

Defines

#define LSMESSAGE_TOKEN_INVALID   0
 Invalid token number.

Typedefs

typedef unsigned long LSMessageToken
typedef struct LSError LSError
typedef struct LSHandle LSHandle
 Handle to service.
typedef struct LSPalmService LSPalmService
 Handle to public service.
typedef struct LSMessage LSMessage
 Message object.
typedef bool(* LSMethodFunction )(LSHandle *sh, LSMessage *msg, void *category_context)
 Type for method callbacks.
typedef bool(* LSPropertyGetFunction )(LSHandle *sh, LSMessage *msg, void *category_context)
 Type for property get callback.
typedef bool(* LSPropertySetFunction )(LSHandle *sh, LSMessage *msg, void *category_context)
 Type for property set callback.
typedef void(* LSDisconnectHandler )(LSHandle *sh, void *user_data)

Enumerations

enum  LSMethodFlags { LUNA_METHOD_FLAG_DEPRECATED = (1 << 0) }
 Method flags.
enum  LSSignalFlags { LUNA_SIGNAL_FLAG_DEPRECATED = (1 << 0) }
 Signal flags.
enum  LSPropertyFlags { LUNA_PROPERTY_FLAG_DEPRECATED = (1 << 0) }
 Property flags.

Functions

bool LSErrorInit (LSError *error)
void LSErrorFree (LSError *error)
bool LSErrorIsSet (LSError *lserror)
void LSErrorPrint (LSError *lserror, FILE *out)
bool LSRegister (const char *name, LSHandle **sh, LSError *lserror)
bool LSRegisterPubPriv (const char *name, LSHandle **sh, bool public_bus, LSError *lserror)
bool LSSetDisconnectHandler (LSHandle *sh, LSDisconnectHandler disconnect_handler, void *user_data, LSError *lserror)
bool LSRegisterCategory (LSHandle *sh, const char *category, LSMethod *methods, LSSignal *signals, LSProperty *properties, LSError *lserror)
bool LSRegisterCategoryAppend (LSHandle *sh, const char *category, LSMethod *methods, LSSignal *signals, LSError *lserror)
bool LSCategorySetData (LSHandle *sh, const char *category, void *user_data, LSError *lserror)
bool LSUnregister (LSHandle *service, LSError *lserror)
const char * LSHandleGetName (LSHandle *sh)
bool LSRegisterPalmService (const char *name, LSPalmService **ret_palm_service, LSError *lserror)
bool LSUnregisterPalmService (LSPalmService *psh, LSError *lserror)
bool LSPalmServiceRegisterCategory (LSPalmService *psh, const char *category, LSMethod *methods_public, LSMethod *methods_private, LSSignal *signals, void *category_user_data, LSError *lserror)
LSHandleLSPalmServiceGetPrivateConnection (LSPalmService *psh)
LSHandleLSPalmServiceGetPublicConnection (LSPalmService *psh)
LSHandleLSMessageGetConnection (LSMessage *message)
bool LSMessageIsPublic (LSPalmService *psh, LSMessage *message)
void LSMessageRef (LSMessage *message)
void LSMessageUnref (LSMessage *message)
bool LSMessagePrint (LSMessage *lmsg, FILE *out)
const char * LSMessageGetUniqueToken (LSMessage *message)
const char * LSMessageGetKind (LSMessage *message)
const char * LSMessageGetApplicationID (LSMessage *message)
const char * LSMessageGetSender (LSMessage *message)
const char * LSMessageGetCategory (LSMessage *message)
const char * LSMessageGetMethod (LSMessage *message)
const char * LSMessageGetPayload (LSMessage *message)
json_t * LSMessageGetPayloadJSON (LSMessage *message)
bool LSMessageIsSubscription (LSMessage *lsmgs)
LSMessageToken LSMessageGetToken (LSMessage *call)
LSMessageToken LSMessageGetResponseToken (LSMessage *reply)
bool LSMessageRespond (LSMessage *message, const char *reply_payload, LSError *lserror)
bool LSMessageReply (LSHandle *sh, LSMessage *lsmsg, const char *replyPayload, LSError *lserror)
bool LSMessageReturn (LSHandle *sh, LSMessage *message, const char *replyPayload, LSError *error)
bool LSGmainAttach (LSHandle *sh, GMainLoop *mainLoop, LSError *lserror)
bool LSGmainAttachPalmService (LSPalmService *psh, GMainLoop *mainLoop, LSError *lserror)
bool LSGmainSetPriority (LSHandle *sh, int priority, LSError *lserror)
bool LSGmainSetPriorityPalmService (LSPalmService *psh, int priority, LSError *lserror)

Define Documentation

#define LSMESSAGE_TOKEN_INVALID   0

Invalid token number.

This is seen if you do LSMessageGetResponseToken() on a message that is not a reply. It is also a good neutral value to initialize an array of unitialized message tokens.


Typedef Documentation

typedef bool(* LSMethodFunction)(LSHandle *sh, LSMessage *msg, void *category_context)

Type for method callbacks.

Table registration of callbacks.

Parameters:
*LSMethodFunction 
sh 
msg 
Return values:
true if message successfully processed.
false if some error occurred and you would like the callback to be called again later.

typedef bool(* LSPropertyGetFunction)(LSHandle *sh, LSMessage *msg, void *category_context)

Type for property get callback.

Parameters:
*LSPropertyGetFunction 
sh 
msg 
Return values:
Same as LSMethodFunction()

typedef bool(* LSPropertySetFunction)(LSHandle *sh, LSMessage *msg, void *category_context)

Type for property set callback.

Parameters:
*LSPropertySetFunction 
sh 
msg 
Return values:
Same as LSMethodFunction()


Generated on Wed Sep 16 12:26:46 2009 by  doxygen 1.5.5