protocol.h File Reference

Protocol API. More...

#include <lwmsg/status.h>
#include <lwmsg/context.h>
#include <lwmsg/type.h>
#include <lwmsg/buffer.h>
#include <lwmsg/message.h>

Macros

#define LWMSG_MESSAGE(tag, spec)
 Specify a message tag and type. More...
 
#define LWMSG_PROTOCOL_END
 Mark end of protocol specification. More...
 

Typedefs

typedef struct LWMsgProtocol LWMsgProtocol
 A protocol object. More...
 
typedef struct
LWMsgProtocolSpec const 
LWMsgProtocolSpec
 Protocol specification structure. More...
 

Functions

LWMsgStatus lwmsg_protocol_get_message_type (LWMsgProtocol *prot, LWMsgTag tag, LWMsgTypeSpec **out_type)
 Get marshaller type by message tag. More...
 
LWMsgStatus lwmsg_protocol_get_message_name (LWMsgProtocol *prot, LWMsgTag tag, const char **name)
 Get name of message tag. More...
 
LWMsgStatus lwmsg_protocol_new (LWMsgContext *context, LWMsgProtocol **prot)
 Create a new protocol object. More...
 
LWMsgStatus lwmsg_protocol_add_protocol_spec (LWMsgProtocol *prot, LWMsgProtocolSpec *spec)
 Add messages from a protocol specification. More...
 
void lwmsg_protocol_delete (LWMsgProtocol *prot)
 Delete a protocol object. More...