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

Functions

HANDLE MessageQueue_Event (wMessageQueue *queue)
 
int MessageQueue_Size (wMessageQueue *queue)
 
BOOL MessageQueue_Wait (wMessageQueue *queue)
 
BOOL MessageQueue_Dispatch (wMessageQueue *queue, 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

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:

BOOL MessageQueue_Dispatch ( wMessageQueue *  queue,
wMessage *  message 
)

Here is the call graph for this function:

Here is the caller graph for this function:

HANDLE MessageQueue_Event ( wMessageQueue *  queue)

WinPR: Windows Portable Runtime Message Queue

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Message Queue inspired from Windows: http://msdn.microsoft.com/en-us/library/ms632590/ Properties Gets an event which is set when the queue is non-empty

Here is the caller graph for this function:

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:

int MessageQueue_Get ( wMessageQueue *  queue,
wMessage *  message 
)

Here is the call graph for this function:

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:

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:

BOOL MessageQueue_Post ( wMessageQueue *  queue,
void context,
UINT32  type,
void wParam,
void lParam 
)

Here is the call graph for this function:

BOOL MessageQueue_PostQuit ( wMessageQueue *  queue,
int  nExitCode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int MessageQueue_Size ( wMessageQueue *  queue)

Gets the queue size

BOOL MessageQueue_Wait ( wMessageQueue *  queue)

Methods

Here is the call graph for this function:

Here is the caller graph for this function: