Classes | Defines | Functions | Variables

mq.h File Reference

#include "stdsoap2.h"
Include dependency graph for mq.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  soap_mq_data
struct  soap_mq_msg
 Queued inbound message (in linked list). More...
struct  soap_mq_queue
 Message queue. More...

Defines

#define SOAP_MQ_ID   "MQ-0.9"

Functions

int soap_mq (struct soap *soap, struct soap_plugin *plugin, void *arg)
struct soap_mq_queuesoap_mq_queue (struct soap *)
 Create a new queue structure allocated in the current context. Will be deallocated with soap_end(soap). Use soap_mq_get() to receive a message from the current socket to add to the queue.
struct soap_mq_msgsoap_mq_get (struct soap *soap, struct soap_mq_queue *)
 Receive message from socket and queue it at the end of the queue.
struct soap_mq_msgsoap_mq_begin (struct soap_mq_queue *)
 Get first message in queue. Use msg->soap to invoke service from the queued message, as in soap_serve(&msg->soap).
struct soap_mq_msgsoap_mq_next (struct soap_mq_msg *)
 Get next message in queue. Use msg->soap to invoke service from the queued message, as in soap_serve(&msg->soap).
void soap_mq_del (struct soap_mq_queue *, struct soap_mq_msg *)
 Delete message from queue, e.g. after processing it. Delete entire queue when msg==NULL. Note: structures will be deallocated with deallocation with soap_end().

Variables

const char soap_mq_id []

Define Documentation

#define SOAP_MQ_ID   "MQ-0.9"

Function Documentation

int soap_mq ( struct soap *  soap,
struct soap_plugin *  p,
void *  arg 
)

plugin registry function, invoked by soap_register_plugin

struct soap_mq_msg * soap_mq_begin ( struct soap_mq_queue mq  )  [read]

Get first message in queue. Use msg->soap to invoke service from the queued message, as in soap_serve(&msg->soap).

Parameters:
mq pointer to the message queue structure created by soap_mq_queue()
Returns:
pointer to first message in the queue, or NULL
void soap_mq_del ( struct soap_mq_queue mq,
struct soap_mq_msg msg 
)

Delete message from queue, e.g. after processing it. Delete entire queue when msg==NULL. Note: structures will be deallocated with deallocation with soap_end().

Parameters:
mq pointer to the queue structure
msg pointer to a message in the queue, when NULL delete entire queue
struct soap_mq_msg * soap_mq_get ( struct soap *  soap,
struct soap_mq_queue mq 
) [read]

Receive message from socket and queue it at the end of the queue.

Parameters:
soap current context
mq pointer to the message queue structure created by soap_mq_queue()
Returns:
pointer to the message received and queued, or NULL
struct soap_mq_msg * soap_mq_next ( struct soap_mq_msg msg  )  [read]

Get next message in queue. Use msg->soap to invoke service from the queued message, as in soap_serve(&msg->soap).

Parameters:
msg pointer to current message in the queue
Returns:
pointer to next message in the queue, or NULL
struct soap_mq_queue * soap_mq_queue ( struct soap *  soap  )  [read]

Create a new queue structure allocated in the current context. Will be deallocated with soap_end(soap). Use soap_mq_get() to receive a message from the current socket to add to the queue.

Parameters:
soap current context
Returns:
pointer to the queue structure

Variable Documentation

const char soap_mq_id[]