151 Q_INVOKABLE QObject*
data();
211 #endif // ZMAILSLOT_H ZBL_DECLARE_LOGGED_OBJECT QString m_slotName
Name of the mail slot.
ZMap * m_data
Mailslot owner's user-defined data dictionary.
Q_INVOKABLE int messageCount()
Returns the number of messages in the message queue.
Q_INVOKABLE QVariant peekMessage()
Returns the next message from message queue without removing it from the queue.
Q_INVOKABLE void postResponse(QVariant response)
Enqueues response immediately, then queues a defered responseAvailable signal to be sent later...
void responseAvailable(QString slotName)
Sent when a response has been received from an endpoint.
Q_INVOKABLE void postMessage(QVariant message)
Enqueues message immediately, then posts a defered messageAvailable signal to the event queue to be s...
Q_INVOKABLE int responseCount()
Returns the number of responses in the response queue.
A Javascript dictionary object.
void messageAvailable(QString slotName)
Sent when a message has been placed into an endpoint's message queue.
#define ZBL_DECLARE_LOGGED_OBJECT
ZMailslot(QObject *parent=0)
static void registerType()
A message queue that decouples sending and processing of messages.
Q_INVOKABLE QObject * data()
returns a ZMap dictionary object that can be used by mailslot client to store parameters. Use of the dictionary is user defined.
Q_INVOKABLE QVariant getResponse()
Removes next response from response queue and returns it.
void onMessageQueueAvailable()
Q_INVOKABLE void sendMessage(QVariant message)
Enqueues message and sends messageAvailable signal immediately.
Q_INVOKABLE QVariant getMessage()
Removes next message from message queue and returns it.
ZMessageQueue m_responseQueue
Responses sent from endpoint to mailslot owner.
A two-way buffered message stream with attached user-defined data cache.
ZMessageQueue m_messageQueue
Messages sent from mailslot owner to endpoint.
Q_INVOKABLE void sendResponse(QVariant response)
Enqueues response and sends responseAvailable signal immediately.
void onResponseQueueAvailable()
Q_INVOKABLE void setSlotName(const QString &name)
Set the name of the mailslot.
Q_INVOKABLE QVariant peekResponse()
Returns the next response from response queue without removing it from the queue. ...
Q_INVOKABLE const QString getSlotName()
Get the name of the mailslot.