FreeRDP
MessageQueue.c File Reference
#include <winpr/crt.h>
#include <winpr/sysinfo.h>
#include <winpr/collections.h>

Functions

wObject * MessageQueue_Object (wMessageQueue *queue)
 
HANDLE MessageQueue_Event (wMessageQueue *queue)
 
size_t MessageQueue_Size (wMessageQueue *queue)
 
BOOL MessageQueue_Wait (wMessageQueue *queue)
 
static BOOL MessageQueue_EnsureCapacity (wMessageQueue *queue, size_t count)
 
BOOL MessageQueue_Dispatch (wMessageQueue *queue, const wMessage *message)
 
BOOL MessageQueue_Post (wMessageQueue *queue, void *context, UINT32 type, void *wParam, void *lParam)
 
BOOL MessageQueue_PostQuit (wMessageQueue *queue, int nExitCode)
 
int MessageQueue_Get (wMessageQueue *queue, wMessage *message)
 
int MessageQueue_Peek (wMessageQueue *queue, wMessage *message, BOOL remove)
 
wMessageQueue * MessageQueue_New (const wObject *callback)
 Creates a new message queue. If 'callback' is null, no custom cleanup will be done on message queue deallocation. If the 'callback' argument contains valid uninit or free functions those will be called by 'MessageQueue_Clear'. More...
 
void MessageQueue_Free (wMessageQueue *queue)
 Frees resources allocated by a message queue. This function will only free resources allocated internally. More...
 
int MessageQueue_Clear (wMessageQueue *queue)
 Clears all elements in a message queue. More...
 

Function Documentation

◆ MessageQueue_Clear()

int MessageQueue_Clear ( wMessageQueue *  queue)

Clears all elements in a message queue.

Note
If dynamically allocated data is part of the messages, a custom cleanup handler must be passed in the 'callback' argument for MessageQueue_New.
Parameters
queueThe queue to clear.
Returns
0 in case of success or a error code otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessageQueue_Dispatch()

BOOL MessageQueue_Dispatch ( wMessageQueue *  queue,
const wMessage *  message 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessageQueue_EnsureCapacity()

static BOOL MessageQueue_EnsureCapacity ( wMessageQueue *  queue,
size_t  count 
)
static
Here is the caller graph for this function:

◆ MessageQueue_Event()

HANDLE MessageQueue_Event ( wMessageQueue *  queue)

Gets an event which is set when the queue is non-empty

Here is the caller graph for this function:

◆ MessageQueue_Free()

void MessageQueue_Free ( wMessageQueue *  queue)

Frees resources allocated by a message queue. This function will only free resources allocated internally.

Note
Empty the queue before calling this function with 'MessageQueue_Clear', 'MessageQueue_Get' or 'MessageQueue_Peek' to free all resources allocated by the message contained.
Parameters
queueA pointer to the queue to be freed.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessageQueue_Get()

int MessageQueue_Get ( wMessageQueue *  queue,
wMessage *  message 
)
Here is the call graph for this function:

◆ MessageQueue_New()

wMessageQueue* MessageQueue_New ( const wObject *  callback)

Creates a new message queue. If 'callback' is null, no custom cleanup will be done on message queue deallocation. If the 'callback' argument contains valid uninit or free functions those will be called by 'MessageQueue_Clear'.

Construction, Destruction

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessageQueue_Object()

wObject* MessageQueue_Object ( wMessageQueue *  queue)

Message Queue inspired from Windows: http://msdn.microsoft.com/en-us/library/ms632590/ Properties

Here is the caller graph for this function:

◆ MessageQueue_Peek()

int MessageQueue_Peek ( wMessageQueue *  queue,
wMessage *  message,
BOOL  remove 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessageQueue_Post()

BOOL MessageQueue_Post ( wMessageQueue *  queue,
void *  context,
UINT32  type,
void *  wParam,
void *  lParam 
)
Here is the call graph for this function:

◆ MessageQueue_PostQuit()

BOOL MessageQueue_PostQuit ( wMessageQueue *  queue,
int  nExitCode 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessageQueue_Size()

size_t MessageQueue_Size ( wMessageQueue *  queue)

Gets the queue size

◆ MessageQueue_Wait()

BOOL MessageQueue_Wait ( wMessageQueue *  queue)

Methods

Here is the call graph for this function:
Here is the caller graph for this function: