assoc.h File Reference

Message-oriented APIs. More...

#include <lwmsg/status.h>
#include <lwmsg/message.h>
#include <lwmsg/protocol.h>
#include <lwmsg/context.h>
#include <lwmsg/time.h>
#include <lwmsg/security.h>
#include <lwmsg/session.h>
#include <lwmsg/call.h>
#include <stdlib.h>
#include <unistd.h>

Macros

#define lwmsg_assoc_free_message(assoc, message)
 Destroy a message [DEPRECATED] More...
 
#define LWMSG_HANDLE(htype)
 Define a handle. More...
 
#define LWMSG_MEMBER_HANDLE(type, field, htype)
 Define a handle as a member. More...
 
#define LWMSG_ATTR_HANDLE_LOCAL_FOR_RECEIVER
 Ensure that handle is local to receiving peer. More...
 
#define LWMSG_ATTR_HANDLE_LOCAL_FOR_SENDER
 Ensure that handle is local to sending peer. More...
 

Typedefs

typedef struct LWMsgAssoc LWMsgAssoc
 An association. More...
 

Enumerations

enum  LWMsgAssocState {
  LWMSG_ASSOC_STATE_NONE,
  LWMSG_ASSOC_STATE_NOT_ESTABLISHED,
  LWMSG_ASSOC_STATE_IDLE,
  LWMSG_ASSOC_STATE_BLOCKED_SEND,
  LWMSG_ASSOC_STATE_BLOCKED_RECV,
  LWMSG_ASSOC_STATE_BLOCKED_SEND_RECV,
  LWMSG_ASSOC_STATE_CLOSED,
  LWMSG_ASSOC_STATE_BUSY,
  LWMSG_ASSOC_STATE_ERROR
}
 Association state. More...
 
enum  LWMsgTimeout {
  LWMSG_TIMEOUT_MESSAGE,
  LWMSG_TIMEOUT_ESTABLISH,
  LWMSG_TIMEOUT_IDLE
}
 Timeout classification. More...
 

Functions

void lwmsg_assoc_delete (LWMsgAssoc *assoc)
 Delete an association. More...
 
LWMsgProtocollwmsg_assoc_get_protocol (LWMsgAssoc *assoc)
 Get association protocol. More...
 
LWMsgStatus lwmsg_assoc_send_message (LWMsgAssoc *assoc, LWMsgMessage *message)
 Send a message. More...
 
LWMsgStatus lwmsg_assoc_recv_message (LWMsgAssoc *assoc, LWMsgMessage *message)
 Receive a message. More...
 
LWMsgStatus lwmsg_assoc_send_message_transact (LWMsgAssoc *assoc, LWMsgMessage *send_message, LWMsgMessage *recv_message)
 Send a message and receive a reply [deprecated]. More...
 
LWMsgStatus lwmsg_assoc_close (LWMsgAssoc *assoc)
 Close an association. More...
 
LWMsgStatus lwmsg_assoc_reset (LWMsgAssoc *assoc)
 Reset an association. More...
 
LWMsgStatus lwmsg_assoc_destroy_message (LWMsgAssoc *assoc, LWMsgMessage *message)
 Destroy a message. More...
 
LWMsgStatus lwmsg_assoc_free_graph (LWMsgAssoc *assoc, LWMsgTag tag, void *root)
 Free a message (simple) [DEPRECATED] More...
 
LWMsgStatus lwmsg_assoc_get_session (LWMsgAssoc *assoc, LWMsgSession **session)
 Get current session. More...
 
LWMsgAssocState lwmsg_assoc_get_state (LWMsgAssoc *assoc)
 Get association state. More...
 
LWMsgStatus lwmsg_assoc_set_timeout (LWMsgAssoc *assoc, LWMsgTimeout type, LWMsgTime *value)
 Set timeout. More...
 
LWMsgStatus lwmsg_assoc_connect (LWMsgAssoc *assoc, LWMsgSession *session)
 Connect association to peer. More...
 
LWMsgStatus lwmsg_assoc_accept (LWMsgAssoc *assoc, LWMsgSession *session)
 Accept connection from peer on assocation. More...
 
LWMsgStatus lwmsg_assoc_print_message_alloc (LWMsgAssoc *assoc, LWMsgMessage *message, char **result)
 Print message in human-readable form. More...
 
LWMsgStatus lwmsg_assoc_acquire_call (LWMsgAssoc *assoc, LWMsgCall **call)
 Acquire call handle [DEPRECATED]. More...
 

Macro Definition Documentation

#define lwmsg_assoc_free_message (   assoc,
  message 
)