FreeRDP
collections.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/stream.h>

Data Structures

struct  wObject
 This struct contains function pointer to initialize/free objects. More...
 
struct  wMessage
 
struct  wMessagePipe
 
struct  wEventArgs
 
struct  wEventType
 

Macros

#define WMQ_QUIT   0xFFFFFFFF
 
#define WINPR_EVENT_CAST(t, val)   (t)(val)
 
#define MAX_EVENT_HANDLERS   32
 
#define EventArgsInit(_event_args, _sender)
 
#define DEFINE_EVENT_HANDLER(name)    typedef void (*p##name##EventHandler)(void* context, const name##EventArgs* e)
 
#define DEFINE_EVENT_RAISE(name)
 
#define DEFINE_EVENT_SUBSCRIBE(name)
 
#define DEFINE_EVENT_UNSUBSCRIBE(name)
 
#define DEFINE_EVENT_BEGIN(name)
 
#define DEFINE_EVENT_END(name)
 
#define DEFINE_EVENT_ENTRY(name)
 

Typedefs

typedef void *(* OBJECT_NEW_FN) (const void *val)
 
typedef void(* OBJECT_INIT_FN) (void *obj)
 
typedef void(* OBJECT_UNINIT_FN) (void *obj)
 
typedef void(* OBJECT_FREE_FN) (void *obj)
 
typedef BOOL(* OBJECT_EQUALS_FN) (const void *objA, const void *objB)
 
typedef BOOL(* ArrayList_ForEachFkt) (void *data, size_t index, va_list ap)
 
typedef UINT32(* HASH_TABLE_HASH_FN) (const void *key)
 
typedef BOOL(* HASH_TABLE_FOREACH_FN) (const void *key, void *value, void *arg)
 
typedef void(* MESSAGE_FREE_FN) (wMessage *message)
 
typedef void(* pEventHandler) (void *context, const wEventArgs *e)
 

Functions

WINPR_API void * winpr_ObjectStringClone (const void *pvstr)
 
WINPR_API void * winpr_ObjectWStringClone (const void *pvstr)
 
WINPR_API void winpr_ObjectStringFree (void *pvstr)
 
WINPR_API size_t Queue_Count (wQueue *queue)
 Return the number of elements in the queue. More...
 
WINPR_API void Queue_Lock (wQueue *queue)
 Mutex-Lock a queue. More...
 
WINPR_API void Queue_Unlock (wQueue *queue)
 Mutex-Unlock a queue. More...
 
WINPR_API HANDLE Queue_Event (wQueue *queue)
 Get an event handle for the queue, usable by WaitForSingleObject or WaitForMultipleObjects. More...
 
WINPR_API wObjectQueue_Object (wQueue *queue)
 Mutex-Lock a queue. More...
 
WINPR_API void Queue_Clear (wQueue *queue)
 Remove all elements from a queue, call wObject cleanup functions fnObjectFree. More...
 
WINPR_API BOOL Queue_Contains (wQueue *queue, const void *obj)
 Check if the queue contains an object. More...
 
WINPR_API BOOL Queue_Enqueue (wQueue *queue, const void *obj)
 Pushes a new element into the queue. If a fnObjectNew is set, the element is copied and the queue takes ownership of the memory, otherwise the ownership stays with the caller. More...
 
WINPR_API void * Queue_Dequeue (wQueue *queue)
 returns the element at the top of the queue. The element is removed from the queue, ownership of the element is passed on to the caller. More...
 
WINPR_API void * Queue_Peek (wQueue *queue)
 returns the element at the top of the queue. The element is not removed from the queue, ownership of the element stays with the queue. More...
 
WINPR_API void Queue_Discard (wQueue *queue)
 Removes the element at the top of the queue. If fnObjectFree is set, the element is freed. This can be used in combination with Queue_Peek to handle an element and discard it with this function afterward. An alternative is Queue_Dequeue with calling the appropriate free function afterward. More...
 
WINPR_API void Queue_Free (wQueue *queue)
 Clean up a queue, free all resources (e.g. calls Queue_Clear) More...
 
WINPR_API wQueue * Queue_New (BOOL synchronized, SSIZE_T capacity, SSIZE_T growthFactor)
 Creates a new queue. More...
 
WINPR_API size_t Stack_Count (wStack *stack)
 
WINPR_API BOOL Stack_IsSynchronized (wStack *stack)
 
WINPR_API wObjectStack_Object (wStack *stack)
 
WINPR_API void Stack_Clear (wStack *stack)
 
WINPR_API BOOL Stack_Contains (wStack *stack, const void *obj)
 
WINPR_API void Stack_Push (wStack *stack, void *obj)
 
WINPR_API void * Stack_Pop (wStack *stack)
 
WINPR_API void * Stack_Peek (wStack *stack)
 
WINPR_API void Stack_Free (wStack *stack)
 
WINPR_API wStack * Stack_New (BOOL synchronized)
 
WINPR_API size_t ArrayList_Capacity (wArrayList *arrayList)
 
WINPR_API size_t ArrayList_Count (wArrayList *arrayList)
 
WINPR_API size_t ArrayList_Items (wArrayList *arrayList, ULONG_PTR **ppItems)
 
WINPR_API BOOL ArrayList_IsFixedSized (wArrayList *arrayList)
 
WINPR_API BOOL ArrayList_IsReadOnly (wArrayList *arrayList)
 
WINPR_API BOOL ArrayList_IsSynchronized (wArrayList *arrayList)
 
WINPR_API void ArrayList_Lock (wArrayList *arrayList)
 
WINPR_API void ArrayList_Unlock (wArrayList *arrayList)
 
WINPR_API void * ArrayList_GetItem (wArrayList *arrayList, size_t index)
 
WINPR_API BOOL ArrayList_SetItem (wArrayList *arrayList, size_t index, const void *obj)
 
WINPR_API wObjectArrayList_Object (wArrayList *arrayList)
 
WINPR_API BOOL ArrayList_ForEach (wArrayList *arrayList, ArrayList_ForEachFkt fkt,...)
 
WINPR_API BOOL ArrayList_ForEachAP (wArrayList *arrayList, ArrayList_ForEachFkt fkt, va_list ap)
 
WINPR_API void ArrayList_Clear (wArrayList *arrayList)
 
WINPR_API BOOL ArrayList_Contains (wArrayList *arrayList, const void *obj)
 
WINPR_API BOOL ArrayList_Append (wArrayList *arrayList, const void *obj)
 
WINPR_API BOOL ArrayList_Insert (wArrayList *arrayList, size_t index, const void *obj)
 
WINPR_API BOOL ArrayList_Remove (wArrayList *arrayList, const void *obj)
 
WINPR_API BOOL ArrayList_RemoveAt (wArrayList *arrayList, size_t index)
 
WINPR_API SSIZE_T ArrayList_IndexOf (wArrayList *arrayList, const void *obj, SSIZE_T startIndex, SSIZE_T count)
 
WINPR_API SSIZE_T ArrayList_LastIndexOf (wArrayList *arrayList, const void *obj, SSIZE_T startIndex, SSIZE_T count)
 
WINPR_API void ArrayList_Free (wArrayList *arrayList)
 
WINPR_API wArrayList * ArrayList_New (BOOL synchronized)
 
WINPR_API wObjectListDictionary_KeyObject (wListDictionary *listDictionary)
 Get the wObject function pointer struct for the key of the dictionary. More...
 
WINPR_API wObjectListDictionary_ValueObject (wListDictionary *listDictionary)
 Get the wObject function pointer struct for the value of the dictionary. More...
 
WINPR_API size_t ListDictionary_Count (wListDictionary *listDictionary)
 Return the number of entries in the dictionary. More...
 
WINPR_API void ListDictionary_Lock (wListDictionary *listDictionary)
 mutex-lock a dictionary More...
 
WINPR_API void ListDictionary_Unlock (wListDictionary *listDictionary)
 mutex-unlock a dictionary More...
 
WINPR_API BOOL ListDictionary_Add (wListDictionary *listDictionary, const void *key, const void *value)
 mutex-lock a dictionary More...
 
WINPR_API void * ListDictionary_Take (wListDictionary *listDictionary, const void *key)
 Remove an item from the dictionary and return the value. Cleanup is up to the caller. More...
 
WINPR_API void ListDictionary_Remove (wListDictionary *listDictionary, const void *key)
 Remove an item from the dictionary and call fnObjectFree for key and value. More...
 
WINPR_API void * ListDictionary_Take_Head (wListDictionary *listDictionary)
 Remove the head item from the dictionary and return the value. Cleanup is up to the caller. More...
 
WINPR_API void ListDictionary_Remove_Head (wListDictionary *listDictionary)
 Remove the head item from the dictionary and call fnObjectFree for key and value. More...
 
WINPR_API void ListDictionary_Clear (wListDictionary *listDictionary)
 Remove all items from the dictionary and call fnObjectFree for key and value. More...
 
WINPR_API BOOL ListDictionary_Contains (wListDictionary *listDictionary, const void *key)
 Check if a dictionary contains key (fnObjectEquals of the key object is called) More...
 
WINPR_API size_t ListDictionary_GetKeys (wListDictionary *listDictionary, ULONG_PTR **ppKeys)
 return all keys the dictionary contains More...
 
WINPR_API void * ListDictionary_GetItemValue (wListDictionary *listDictionary, const void *key)
 Get the value in the dictionary for a key. The ownership of the data stays with the dictionary. More...
 
WINPR_API BOOL ListDictionary_SetItemValue (wListDictionary *listDictionary, const void *key, const void *value)
 Set the value in the dictionary for a key. The entry must already exist, value is copied if fnObjectNew is set. More...
 
WINPR_API void ListDictionary_Free (wListDictionary *listDictionary)
 Free memory allocated by a dictionary. Calls ListDictionary_Clear. More...
 
WINPR_API wListDictionary * ListDictionary_New (BOOL synchronized)
 allocate a new dictionary More...
 
WINPR_API size_t LinkedList_Count (wLinkedList *list)
 Return the current number of elements in the linked list. More...
 
WINPR_API void * LinkedList_First (wLinkedList *list)
 Return the first element of the list, ownership stays with the list. More...
 
WINPR_API void * LinkedList_Last (wLinkedList *list)
 Return the last element of the list, ownership stays with the list. More...
 
WINPR_API BOOL LinkedList_Contains (wLinkedList *list, const void *value)
 Check if the linked list contains a value. More...
 
WINPR_API void LinkedList_Clear (wLinkedList *list)
 Remove all elements of the linked list. fnObjectUninit and fnObjectFree are called for each entry. More...
 
WINPR_API BOOL LinkedList_AddFirst (wLinkedList *list, const void *value)
 Add a new element at the start of the linked list. fnObjectNew and fnObjectInit is called for the new entry. More...
 
WINPR_API BOOL LinkedList_AddLast (wLinkedList *list, const void *value)
 Add a new element at the end of the linked list. fnObjectNew and fnObjectInit is called for the new entry. More...
 
WINPR_API BOOL LinkedList_Remove (wLinkedList *list, const void *value)
 Remove a element identified by value from the linked list. fnObjectUninit and fnObjectFree is called for the entry. More...
 
WINPR_API void LinkedList_RemoveFirst (wLinkedList *list)
 Remove the first element from the linked list. fnObjectUninit and fnObjectFree is called for the entry. More...
 
WINPR_API void LinkedList_RemoveLast (wLinkedList *list)
 Remove the last element from the linked list. fnObjectUninit and fnObjectFree is called for the entry. More...
 
WINPR_API void LinkedList_Enumerator_Reset (wLinkedList *list)
 Move enumerator to the first element. More...
 
WINPR_API void * LinkedList_Enumerator_Current (wLinkedList *list)
 Return the value for the current position of the enumerator. More...
 
WINPR_API BOOL LinkedList_Enumerator_MoveNext (wLinkedList *list)
 Move enumerator to the next element. More...
 
WINPR_API void LinkedList_Free (wLinkedList *list)
 Free a linked list. More...
 
WINPR_API wLinkedList * LinkedList_New (void)
 Allocate a linked list. More...
 
WINPR_API wObjectLinkedList_Object (wLinkedList *list)
 Return the wObject function pointers for list elements. More...
 
WINPR_API size_t CountdownEvent_CurrentCount (wCountdownEvent *countdown)
 return the current event count of the CountdownEvent More...
 
WINPR_API size_t CountdownEvent_InitialCount (wCountdownEvent *countdown)
 return the initial event count of the CountdownEvent More...
 
WINPR_API BOOL CountdownEvent_IsSet (wCountdownEvent *countdown)
 return the current event state of the CountdownEvent More...
 
WINPR_API HANDLE CountdownEvent_WaitHandle (wCountdownEvent *countdown)
 return the event HANDLE of the CountdownEvent to be used by WaitForSingleObject or WaitForMultipleObjects More...
 
WINPR_API void CountdownEvent_AddCount (wCountdownEvent *countdown, size_t signalCount)
 add signalCount to the current event count of the CountdownEvent More...
 
WINPR_API BOOL CountdownEvent_Signal (wCountdownEvent *countdown, size_t signalCount)
 Increase the current event signal state of the CountdownEvent. More...
 
WINPR_API void CountdownEvent_Reset (wCountdownEvent *countdown, size_t count)
 reset the CountdownEvent More...
 
WINPR_API void CountdownEvent_Free (wCountdownEvent *countdown)
 Free a CountdownEvent. More...
 
WINPR_API wCountdownEvent * CountdownEvent_New (size_t initialCount)
 Allocte a CountdownEvent with initialCount. More...
 
WINPR_API size_t HashTable_Count (wHashTable *table)
 
WINPR_API BOOL HashTable_Insert (wHashTable *table, const void *key, const void *value)
 
WINPR_API BOOL HashTable_Remove (wHashTable *table, const void *key)
 
WINPR_API void HashTable_Clear (wHashTable *table)
 
WINPR_API BOOL HashTable_Contains (wHashTable *table, const void *key)
 
WINPR_API BOOL HashTable_ContainsKey (wHashTable *table, const void *key)
 
WINPR_API BOOL HashTable_ContainsValue (wHashTable *table, const void *value)
 
WINPR_API void * HashTable_GetItemValue (wHashTable *table, const void *key)
 
WINPR_API BOOL HashTable_SetItemValue (wHashTable *table, const void *key, const void *value)
 
WINPR_API size_t HashTable_GetKeys (wHashTable *table, ULONG_PTR **ppKeys)
 
WINPR_API BOOL HashTable_Foreach (wHashTable *table, HASH_TABLE_FOREACH_FN fn, VOID *arg)
 
WINPR_API UINT32 HashTable_PointerHash (const void *pointer)
 
WINPR_API BOOL HashTable_PointerCompare (const void *pointer1, const void *pointer2)
 
WINPR_API UINT32 HashTable_StringHash (const void *key)
 
WINPR_API BOOL HashTable_StringCompare (const void *string1, const void *string2)
 
WINPR_API void * HashTable_StringClone (const void *str)
 
WINPR_API void HashTable_StringFree (void *str)
 
WINPR_API void HashTable_Free (wHashTable *table)
 
WINPR_API wHashTable * HashTable_New (BOOL synchronized)
 
WINPR_API void HashTable_Lock (wHashTable *table)
 
WINPR_API void HashTable_Unlock (wHashTable *table)
 
WINPR_API wObjectHashTable_KeyObject (wHashTable *table)
 
WINPR_API wObjectHashTable_ValueObject (wHashTable *table)
 
WINPR_API BOOL HashTable_SetHashFunction (wHashTable *table, HASH_TABLE_HASH_FN fn)
 
WINPR_API BOOL HashTable_SetupForStringData (wHashTable *table, BOOL stringValues)
 
WINPR_API SSIZE_T BufferPool_GetPoolSize (wBufferPool *pool)
 
WINPR_API SSIZE_T BufferPool_GetBufferSize (wBufferPool *pool, const void *buffer)
 
WINPR_API void * BufferPool_Take (wBufferPool *pool, SSIZE_T bufferSize)
 
WINPR_API BOOL BufferPool_Return (wBufferPool *pool, void *buffer)
 
WINPR_API void BufferPool_Clear (wBufferPool *pool)
 
WINPR_API void BufferPool_Free (wBufferPool *pool)
 
WINPR_API wBufferPool * BufferPool_New (BOOL synchronized, SSIZE_T fixedSize, DWORD alignment)
 
WINPR_API void * ObjectPool_Take (wObjectPool *pool)
 
WINPR_API void ObjectPool_Return (wObjectPool *pool, void *obj)
 
WINPR_API void ObjectPool_Clear (wObjectPool *pool)
 
WINPR_API wObjectObjectPool_Object (wObjectPool *pool)
 
WINPR_API void ObjectPool_Free (wObjectPool *pool)
 
WINPR_API wObjectPool * ObjectPool_New (BOOL synchronized)
 
WINPR_API wObjectMessageQueue_Object (wMessageQueue *queue)
 
WINPR_API HANDLE MessageQueue_Event (wMessageQueue *queue)
 
WINPR_API BOOL MessageQueue_Wait (wMessageQueue *queue)
 
WINPR_API size_t MessageQueue_Size (wMessageQueue *queue)
 
WINPR_API BOOL MessageQueue_Dispatch (wMessageQueue *queue, const wMessage *message)
 
WINPR_API BOOL MessageQueue_Post (wMessageQueue *queue, void *context, UINT32 type, void *wParam, void *lParam)
 
WINPR_API BOOL MessageQueue_PostQuit (wMessageQueue *queue, int nExitCode)
 
WINPR_API int MessageQueue_Get (wMessageQueue *queue, wMessage *message)
 
WINPR_API int MessageQueue_Peek (wMessageQueue *queue, wMessage *message, BOOL remove)
 
WINPR_API int MessageQueue_Clear (wMessageQueue *queue)
 Clears all elements in a message queue. More...
 
WINPR_API void MessageQueue_Free (wMessageQueue *queue)
 Frees resources allocated by a message queue. This function will only free resources allocated internally. More...
 
WINPR_API 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...
 
WINPR_API void MessagePipe_PostQuit (wMessagePipe *pipe, int nExitCode)
 
WINPR_API void MessagePipe_Free (wMessagePipe *pipe)
 
WINPR_API wMessagePipeMessagePipe_New (void)
 
WINPR_API void PubSub_Lock (wPubSub *pubSub)
 
WINPR_API void PubSub_Unlock (wPubSub *pubSub)
 
WINPR_API wEventTypePubSub_GetEventTypes (wPubSub *pubSub, size_t *count)
 
WINPR_API void PubSub_AddEventTypes (wPubSub *pubSub, wEventType *events, size_t count)
 
WINPR_API wEventTypePubSub_FindEventType (wPubSub *pubSub, const char *EventName)
 
WINPR_API int PubSub_Subscribe (wPubSub *pubSub, const char *EventName,...)
 
WINPR_API int PubSub_Unsubscribe (wPubSub *pubSub, const char *EventName,...)
 
WINPR_API int PubSub_OnEvent (wPubSub *pubSub, const char *EventName, void *context, const wEventArgs *e)
 
WINPR_API void PubSub_Free (wPubSub *pubSub)
 
WINPR_API wPubSub * PubSub_New (BOOL synchronized)
 

Macro Definition Documentation

◆ DEFINE_EVENT_BEGIN

#define DEFINE_EVENT_BEGIN (   name)
Value:
typedef struct \
{ \
wEventArgs e;

◆ DEFINE_EVENT_END

#define DEFINE_EVENT_END (   name)
Value:
} \
name##EventArgs; \
DEFINE_EVENT_HANDLER(name); \
DEFINE_EVENT_RAISE(name) \
DEFINE_EVENT_SUBSCRIBE(name) \
DEFINE_EVENT_UNSUBSCRIBE(name)
const char * name
Definition: include/freerdp/event.h:89

◆ DEFINE_EVENT_ENTRY

#define DEFINE_EVENT_ENTRY (   name)
Value:
{ \
#name, { sizeof(name##EventArgs), NULL }, 0, \
{ \
NULL \
} \
}

◆ DEFINE_EVENT_HANDLER

#define DEFINE_EVENT_HANDLER (   name)     typedef void (*p##name##EventHandler)(void* context, const name##EventArgs* e)

◆ DEFINE_EVENT_RAISE

#define DEFINE_EVENT_RAISE (   name)
Value:
static INLINE int PubSub_On##name(wPubSub* pubSub, void* context, const name##EventArgs* e) \
{ \
WINPR_ASSERT(e); \
return PubSub_OnEvent(pubSub, #name, context, &e->e); \
}
WINPR_API int PubSub_OnEvent(wPubSub *pubSub, const char *EventName, void *context, const wEventArgs *e)
Definition: PubSub.c:190
TsmfClientContext * context
Definition: tsmf_main.c:559
#define INLINE
Definition: winpr.h:119

◆ DEFINE_EVENT_SUBSCRIBE

#define DEFINE_EVENT_SUBSCRIBE (   name)
Value:
static INLINE int PubSub_Subscribe##name(wPubSub* pubSub, p##name##EventHandler EventHandler) \
{ \
return PubSub_Subscribe(pubSub, #name, EventHandler); \
}
WINPR_API int PubSub_Subscribe(wPubSub *pubSub, const char *EventName,...)
Definition: PubSub.c:118

◆ DEFINE_EVENT_UNSUBSCRIBE

#define DEFINE_EVENT_UNSUBSCRIBE (   name)
Value:
static INLINE int PubSub_Unsubscribe##name(wPubSub* pubSub, \
p##name##EventHandler EventHandler) \
{ \
return PubSub_Unsubscribe(pubSub, #name, EventHandler); \
}
WINPR_API int PubSub_Unsubscribe(wPubSub *pubSub, const char *EventName,...)
Definition: PubSub.c:150

◆ EventArgsInit

#define EventArgsInit (   _event_args,
  _sender 
)
Value:
memset(_event_args, 0, sizeof(*_event_args)); \
(_event_args)->e.Size = sizeof(*_event_args); \
(_event_args)->e.Sender = _sender

◆ MAX_EVENT_HANDLERS

#define MAX_EVENT_HANDLERS   32

◆ WINPR_EVENT_CAST

#define WINPR_EVENT_CAST (   t,
  val 
)    (t)(val)

◆ WMQ_QUIT

#define WMQ_QUIT   0xFFFFFFFF

Typedef Documentation

◆ ArrayList_ForEachFkt

typedef BOOL(* ArrayList_ForEachFkt) (void *data, size_t index, va_list ap)

◆ HASH_TABLE_FOREACH_FN

typedef BOOL(* HASH_TABLE_FOREACH_FN) (const void *key, void *value, void *arg)

◆ HASH_TABLE_HASH_FN

typedef UINT32(* HASH_TABLE_HASH_FN) (const void *key)

◆ MESSAGE_FREE_FN

typedef void(* MESSAGE_FREE_FN) (wMessage *message)

◆ OBJECT_EQUALS_FN

typedef BOOL(* OBJECT_EQUALS_FN) (const void *objA, const void *objB)

◆ OBJECT_FREE_FN

typedef void(* OBJECT_FREE_FN) (void *obj)

◆ OBJECT_INIT_FN

typedef void(* OBJECT_INIT_FN) (void *obj)

◆ OBJECT_NEW_FN

typedef void*(* OBJECT_NEW_FN) (const void *val)

WinPR: Windows Portable Runtime Collections

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.

◆ OBJECT_UNINIT_FN

typedef void(* OBJECT_UNINIT_FN) (void *obj)

◆ pEventHandler

typedef void(* pEventHandler) (void *context, const wEventArgs *e)

Function Documentation

◆ ArrayList_Append()

WINPR_API BOOL ArrayList_Append ( wArrayList *  arrayList,
const void *  obj 
)

Adds an object to the end of the ArrayList.

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

◆ ArrayList_Capacity()

WINPR_API size_t ArrayList_Capacity ( wArrayList *  arrayList)

C equivalent of the C# ArrayList Class: http://msdn.microsoft.com/en-us/library/system.collections.arraylist.aspx Properties Gets or sets the number of elements that the ArrayList can contain.

◆ ArrayList_Clear()

WINPR_API void ArrayList_Clear ( wArrayList *  arrayList)

Removes all elements from the ArrayList.

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

◆ ArrayList_Contains()

WINPR_API BOOL ArrayList_Contains ( wArrayList *  arrayList,
const void *  obj 
)

Determines whether an element is in the ArrayList.

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

◆ ArrayList_Count()

WINPR_API size_t ArrayList_Count ( wArrayList *  arrayList)

Gets the number of elements actually contained in the ArrayList.

Here is the caller graph for this function:

◆ ArrayList_ForEach()

WINPR_API BOOL ArrayList_ForEach ( wArrayList *  arrayList,
ArrayList_ForEachFkt  fkt,
  ... 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayList_ForEachAP()

WINPR_API BOOL ArrayList_ForEachAP ( wArrayList *  arrayList,
ArrayList_ForEachFkt  fkt,
va_list  ap 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayList_Free()

WINPR_API void ArrayList_Free ( wArrayList *  arrayList)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayList_GetItem()

WINPR_API void* ArrayList_GetItem ( wArrayList *  arrayList,
size_t  index 
)

Gets the element at the specified index.

Here is the caller graph for this function:

◆ ArrayList_IndexOf()

WINPR_API SSIZE_T ArrayList_IndexOf ( wArrayList *  arrayList,
const void *  obj,
SSIZE_T  startIndex,
SSIZE_T  count 
)

Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList.

Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that extends from the first element to the specified index.

Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that contains the specified number of elements and ends at the specified index.

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

◆ ArrayList_Insert()

WINPR_API BOOL ArrayList_Insert ( wArrayList *  arrayList,
size_t  index,
const void *  obj 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayList_IsFixedSized()

WINPR_API BOOL ArrayList_IsFixedSized ( wArrayList *  arrayList)

Gets a value indicating whether the ArrayList has a fixed size.

◆ ArrayList_IsReadOnly()

WINPR_API BOOL ArrayList_IsReadOnly ( wArrayList *  arrayList)

Gets a value indicating whether the ArrayList is read-only.

◆ ArrayList_IsSynchronized()

WINPR_API BOOL ArrayList_IsSynchronized ( wArrayList *  arrayList)

Gets a value indicating whether access to the ArrayList is synchronized (thread safe).

◆ ArrayList_Items()

WINPR_API size_t ArrayList_Items ( wArrayList *  arrayList,
ULONG_PTR **  ppItems 
)

Gets the internal list of items contained in the ArrayList.

◆ ArrayList_LastIndexOf()

WINPR_API SSIZE_T ArrayList_LastIndexOf ( wArrayList *  arrayList,
const void *  obj,
SSIZE_T  startIndex,
SSIZE_T  count 
)

Searches for the specified Object and returns the zero-based index of the last occurrence within the entire ArrayList.

Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that extends from the first element to the specified index.

Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that contains the specified number of elements and ends at the specified index.

Here is the call graph for this function:

◆ ArrayList_Lock()

WINPR_API void ArrayList_Lock ( wArrayList *  arrayList)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayList_New()

WINPR_API wArrayList* ArrayList_New ( BOOL  synchronized)

Construction, Destruction

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

◆ ArrayList_Object()

WINPR_API wObject* ArrayList_Object ( wArrayList *  arrayList)
Here is the caller graph for this function:

◆ ArrayList_Remove()

WINPR_API BOOL ArrayList_Remove ( wArrayList *  arrayList,
const void *  obj 
)

Removes the first occurrence of a specific object from the ArrayList.

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

◆ ArrayList_RemoveAt()

WINPR_API BOOL ArrayList_RemoveAt ( wArrayList *  arrayList,
size_t  index 
)

Removes the element at the specified index of the ArrayList.

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

◆ ArrayList_SetItem()

WINPR_API BOOL ArrayList_SetItem ( wArrayList *  arrayList,
size_t  index,
const void *  obj 
)

Sets the element at the specified index.

Here is the caller graph for this function:

◆ ArrayList_Unlock()

WINPR_API void ArrayList_Unlock ( wArrayList *  arrayList)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BufferPool_Clear()

WINPR_API void BufferPool_Clear ( wBufferPool *  pool)

Releases the buffers currently cached in the pool.

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

◆ BufferPool_Free()

WINPR_API void BufferPool_Free ( wBufferPool *  pool)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BufferPool_GetBufferSize()

WINPR_API SSIZE_T BufferPool_GetBufferSize ( wBufferPool *  pool,
const void *  buffer 
)

Get the size of a pooled buffer

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

◆ BufferPool_GetPoolSize()

WINPR_API SSIZE_T BufferPool_GetPoolSize ( wBufferPool *  pool)

Get the buffer pool size

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

◆ BufferPool_New()

WINPR_API wBufferPool* BufferPool_New ( BOOL  synchronized,
SSIZE_T  fixedSize,
DWORD  alignment 
)

Construction, Destruction

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

◆ BufferPool_Return()

WINPR_API BOOL BufferPool_Return ( wBufferPool *  pool,
void *  buffer 
)

Returns a buffer to the pool.

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

◆ BufferPool_Take()

WINPR_API void* BufferPool_Take ( wBufferPool *  pool,
SSIZE_T  size 
)

Gets a buffer of at least the specified size from the pool.

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

◆ CountdownEvent_AddCount()

WINPR_API void CountdownEvent_AddCount ( wCountdownEvent *  countdown,
size_t  signalCount 
)

add signalCount to the current event count of the CountdownEvent

Parameters
countdownA pointer to a CountdownEvent, must not be NULL
signalCountThe amount to add to CountdownEvent

Methods Increments the CountdownEvent's current count by a specified value.

Here is the call graph for this function:

◆ CountdownEvent_CurrentCount()

WINPR_API size_t CountdownEvent_CurrentCount ( wCountdownEvent *  countdown)

return the current event count of the CountdownEvent

Parameters
countdownA pointer to a CountdownEvent, must not be NULL
Returns
The current event count

C equivalent of the C# CountdownEvent Class http://msdn.microsoft.com/en-us/library/dd235708/ Properties Gets the number of remaining signals required to set the event.

Here is the call graph for this function:

◆ CountdownEvent_Free()

WINPR_API void CountdownEvent_Free ( wCountdownEvent *  countdown)

Free a CountdownEvent.

Parameters
countdownA pointer to a CountdownEvent, may be NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountdownEvent_InitialCount()

WINPR_API size_t CountdownEvent_InitialCount ( wCountdownEvent *  countdown)

return the initial event count of the CountdownEvent

Parameters
countdownA pointer to a CountdownEvent, must not be NULL
Returns
The initial event count

Gets the numbers of signals initially required to set the event.

Here is the call graph for this function:

◆ CountdownEvent_IsSet()

WINPR_API BOOL CountdownEvent_IsSet ( wCountdownEvent *  countdown)

return the current event state of the CountdownEvent

Parameters
countdownA pointer to a CountdownEvent, must not be NULL
Returns
TRUE if set, FALSE otherwise

Determines whether the event is set.

Here is the call graph for this function:

◆ CountdownEvent_New()

WINPR_API wCountdownEvent* CountdownEvent_New ( size_t  initialCount)

Allocte a CountdownEvent with initialCount.

Parameters
initialCountThe initial value of the event
Returns
The newly allocated event or NULL in case of failure

Construction, Destruction

Here is the call graph for this function:

◆ CountdownEvent_Reset()

WINPR_API void CountdownEvent_Reset ( wCountdownEvent *  countdown,
size_t  count 
)

reset the CountdownEvent

Parameters
countdownA pointer to a CountdownEvent, must not be NULL

Resets the InitialCount property to a specified value.

◆ CountdownEvent_Signal()

WINPR_API BOOL CountdownEvent_Signal ( wCountdownEvent *  countdown,
size_t  signalCount 
)

Increase the current event signal state of the CountdownEvent.

Parameters
countdownA pointer to a CountdownEvent, must not be NULL
signalCountThe amount of signaled events to add
Returns
TRUE if event is set, FALSE otherwise

Registers multiple signals with the CountdownEvent, decrementing the value of CurrentCount by the specified amount.

Here is the call graph for this function:

◆ CountdownEvent_WaitHandle()

WINPR_API HANDLE CountdownEvent_WaitHandle ( wCountdownEvent *  countdown)

return the event HANDLE of the CountdownEvent to be used by WaitForSingleObject or WaitForMultipleObjects

Parameters
countdownA pointer to a CountdownEvent, must not be NULL
Returns
a HANDLE or NULL in case of failure

Gets a WaitHandle that is used to wait for the event to be set.

◆ HashTable_Clear()

WINPR_API void HashTable_Clear ( wHashTable *  table)

Removes all elements from the HashTable.

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

◆ HashTable_Contains()

WINPR_API BOOL HashTable_Contains ( wHashTable *  table,
const void *  key 
)

Determines whether the HashTable contains a specific key.

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

◆ HashTable_ContainsKey()

WINPR_API BOOL HashTable_ContainsKey ( wHashTable *  table,
const void *  key 
)

Determines whether the HashTable contains a specific key.

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

◆ HashTable_ContainsValue()

WINPR_API BOOL HashTable_ContainsValue ( wHashTable *  table,
const void *  value 
)

Determines whether the HashTable contains a specific value.

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

◆ HashTable_Count()

WINPR_API size_t HashTable_Count ( wHashTable *  table)

C equivalent of the C# Hashtable Class: http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx Properties Gets the number of key/value pairs contained in the HashTable.

Here is the caller graph for this function:

◆ HashTable_Foreach()

WINPR_API BOOL HashTable_Foreach ( wHashTable *  table,
HASH_TABLE_FOREACH_FN  fn,
VOID *  arg 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Free()

WINPR_API void HashTable_Free ( wHashTable *  table)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_GetItemValue()

WINPR_API void* HashTable_GetItemValue ( wHashTable *  table,
const void *  key 
)

Get an item value using key

Here is the call graph for this function:

◆ HashTable_GetKeys()

WINPR_API size_t HashTable_GetKeys ( wHashTable *  table,
ULONG_PTR **  ppKeys 
)

Gets the list of keys as an array

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

◆ HashTable_Insert()

WINPR_API BOOL HashTable_Insert ( wHashTable *  table,
const void *  key,
const void *  value 
)

Methods Adds an element with the specified key and value into the HashTable.

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

◆ HashTable_KeyObject()

WINPR_API wObject* HashTable_KeyObject ( wHashTable *  table)
Here is the caller graph for this function:

◆ HashTable_Lock()

WINPR_API void HashTable_Lock ( wHashTable *  table)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_New()

WINPR_API wHashTable* HashTable_New ( BOOL  synchronized)

Construction, Destruction

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

◆ HashTable_PointerCompare()

WINPR_API BOOL HashTable_PointerCompare ( const void *  pointer1,
const void *  pointer2 
)
Here is the caller graph for this function:

◆ HashTable_PointerHash()

WINPR_API UINT32 HashTable_PointerHash ( const void *  pointer)
Here is the caller graph for this function:

◆ HashTable_Remove()

WINPR_API BOOL HashTable_Remove ( wHashTable *  table,
const void *  key 
)

Removes the element with the specified key from the HashTable.

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

◆ HashTable_SetHashFunction()

WINPR_API BOOL HashTable_SetHashFunction ( wHashTable *  table,
HASH_TABLE_HASH_FN  fn 
)
Here is the caller graph for this function:

◆ HashTable_SetItemValue()

WINPR_API BOOL HashTable_SetItemValue ( wHashTable *  table,
const void *  key,
const void *  value 
)

Set an item value using key

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

◆ HashTable_SetupForStringData()

WINPR_API BOOL HashTable_SetupForStringData ( wHashTable *  table,
BOOL  stringValues 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_StringClone()

WINPR_API void* HashTable_StringClone ( const void *  str)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_StringCompare()

WINPR_API BOOL HashTable_StringCompare ( const void *  string1,
const void *  string2 
)
Here is the caller graph for this function:

◆ HashTable_StringFree()

WINPR_API void HashTable_StringFree ( void *  str)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_StringHash()

WINPR_API UINT32 HashTable_StringHash ( const void *  key)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Unlock()

WINPR_API void HashTable_Unlock ( wHashTable *  table)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_ValueObject()

WINPR_API wObject* HashTable_ValueObject ( wHashTable *  table)
Here is the caller graph for this function:

◆ LinkedList_AddFirst()

WINPR_API BOOL LinkedList_AddFirst ( wLinkedList *  list,
const void *  value 
)

Add a new element at the start of the linked list. fnObjectNew and fnObjectInit is called for the new entry.

Parameters
listA pointer to the list, must not be NULL
valueThe value to add
Returns
TRUE if successful, FALSE otherwise.

Adds a new node containing the specified value at the start of the LinkedList.

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

◆ LinkedList_AddLast()

WINPR_API BOOL LinkedList_AddLast ( wLinkedList *  list,
const void *  value 
)

Add a new element at the end of the linked list. fnObjectNew and fnObjectInit is called for the new entry.

Parameters
listA pointer to the list, must not be NULL
valueThe value to add
Returns
TRUE if successful, FALSE otherwise.

Adds a new node containing the specified value at the end of the LinkedList.

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

◆ LinkedList_Clear()

WINPR_API void LinkedList_Clear ( wLinkedList *  list)

Remove all elements of the linked list. fnObjectUninit and fnObjectFree are called for each entry.

Parameters
listA pointer to the list, must not be NULL

Removes all entries from the LinkedList.

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

◆ LinkedList_Contains()

WINPR_API BOOL LinkedList_Contains ( wLinkedList *  list,
const void *  value 
)

Check if the linked list contains a value.

Parameters
listA pointer to the list, must not be NULL
valueA value to check for
Returns
TRUE if found, FALSE otherwise

Methods Determines whether the LinkedList contains a specific value.

Here is the call graph for this function:

◆ LinkedList_Count()

WINPR_API size_t LinkedList_Count ( wLinkedList *  list)

Return the current number of elements in the linked list.

Parameters
listA pointer to the list, must not be NULL
Returns
the number of elements in the list

C equivalent of the C# LinkedList<T> Class: http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx

Internal implementation uses a doubly-linked list Properties Gets the number of nodes actually contained in the LinkedList.

Here is the caller graph for this function:

◆ LinkedList_Enumerator_Current()

WINPR_API void* LinkedList_Enumerator_Current ( wLinkedList *  list)

Return the value for the current position of the enumerator.

Parameters
listA pointer to the list, must not be NULL
Returns
A pointer to the current entry or NULL
Here is the caller graph for this function:

◆ LinkedList_Enumerator_MoveNext()

WINPR_API BOOL LinkedList_Enumerator_MoveNext ( wLinkedList *  list)

Move enumerator to the next element.

Parameters
listA pointer to the list, must not be NULL
Returns
TRUE if the move was successful, FALSE if not (e.g. no more entries)
Here is the caller graph for this function:

◆ LinkedList_Enumerator_Reset()

WINPR_API void LinkedList_Enumerator_Reset ( wLinkedList *  list)

Move enumerator to the first element.

Parameters
listA pointer to the list, must not be NULL

Sets the enumerator to its initial position, which is before the first element in the collection.

Here is the caller graph for this function:

◆ LinkedList_First()

WINPR_API void* LinkedList_First ( wLinkedList *  list)

Return the first element of the list, ownership stays with the list.

Parameters
listA pointer to the list, must not be NULL
Returns
A pointer to the element or NULL if empty

Gets the first node of the LinkedList.

Here is the caller graph for this function:

◆ LinkedList_Free()

WINPR_API void LinkedList_Free ( wLinkedList *  list)

Free a linked list.

Parameters
listA pointer to the list, may be NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LinkedList_Last()

WINPR_API void* LinkedList_Last ( wLinkedList *  list)

Return the last element of the list, ownership stays with the list.

Parameters
listA pointer to the list, must not be NULL
Returns
A pointer to the element or NULL if empty

Gets the last node of the LinkedList.

Here is the caller graph for this function:

◆ LinkedList_New()

WINPR_API wLinkedList* LinkedList_New ( void  )

Allocate a linked list.

Returns
A pointer to the newly allocated linked list or NULL in case of failure

Construction, Destruction

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

◆ LinkedList_Object()

WINPR_API wObject* LinkedList_Object ( wLinkedList *  list)

Return the wObject function pointers for list elements.

Parameters
listA pointer to the list, must not be NULL
Returns
A pointer to the wObject or NULL in case of failure

◆ LinkedList_Remove()

WINPR_API BOOL LinkedList_Remove ( wLinkedList *  list,
const void *  value 
)

Remove a element identified by value from the linked list. fnObjectUninit and fnObjectFree is called for the entry.

Parameters
listA pointer to the list, must not be NULL
valueThe value to remove
Returns
TRUE if successful, FALSE otherwise.

Removes the first occurrence of the specified value from the LinkedList.

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

◆ LinkedList_RemoveFirst()

WINPR_API void LinkedList_RemoveFirst ( wLinkedList *  list)

Remove the first element from the linked list. fnObjectUninit and fnObjectFree is called for the entry.

Parameters
listA pointer to the list, must not be NULL

Removes the node at the start of the LinkedList.

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

◆ LinkedList_RemoveLast()

WINPR_API void LinkedList_RemoveLast ( wLinkedList *  list)

Remove the last element from the linked list. fnObjectUninit and fnObjectFree is called for the entry.

Parameters
listA pointer to the list, must not be NULL

Removes the node at the end of the LinkedList.

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

◆ ListDictionary_Add()

WINPR_API BOOL ListDictionary_Add ( wListDictionary *  listDictionary,
const void *  key,
const void *  value 
)

mutex-lock a dictionary

Parameters
listDictionaryA dictionary to query, must not be NULL
keyThe key identifying the entry, if set cloned with fnObjectNew
valueThe value to store for the key. May be NULL. if set cloned with fnObjectNew
Returns
TRUE for successfull addition, FALSE for failure

Adds an entry with the specified key and value into the ListDictionary.

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

◆ ListDictionary_Clear()

WINPR_API void ListDictionary_Clear ( wListDictionary *  listDictionary)

Remove all items from the dictionary and call fnObjectFree for key and value.

Parameters
listDictionaryA dictionary to query, must not be NULL

Removes all entries from the ListDictionary.

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

◆ ListDictionary_Contains()

WINPR_API BOOL ListDictionary_Contains ( wListDictionary *  listDictionary,
const void *  key 
)

Check if a dictionary contains key (fnObjectEquals of the key object is called)

Parameters
listDictionaryA dictionary to query, must not be NULL
keyA key to look for
Returns
TRUE if found, FALSE otherwise

Determines whether the ListDictionary contains a specific key.

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

◆ ListDictionary_Count()

WINPR_API size_t ListDictionary_Count ( wListDictionary *  listDictionary)

Return the number of entries in the dictionary.

Parameters
listDictionaryA dictionary to query, must not be NULL
Returns
the number of entries

Properties Gets the number of key/value pairs contained in the ListDictionary.

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

◆ ListDictionary_Free()

WINPR_API void ListDictionary_Free ( wListDictionary *  listDictionary)

Free memory allocated by a dictionary. Calls ListDictionary_Clear.

Parameters
listDictionaryA dictionary to query, may be NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListDictionary_GetItemValue()

WINPR_API void* ListDictionary_GetItemValue ( wListDictionary *  listDictionary,
const void *  key 
)

Get the value in the dictionary for a key. The ownership of the data stays with the dictionary.

Parameters
listDictionaryA dictionary to query, must not be NULL
keyA key to look for (fnObjectEquals of the key object is called)
Returns
A pointer to the data in the dictionary or NULL if not found

Get an item value using key

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

◆ ListDictionary_GetKeys()

WINPR_API size_t ListDictionary_GetKeys ( wListDictionary *  listDictionary,
ULONG_PTR **  ppKeys 
)

return all keys the dictionary contains

Parameters
listDictionaryA dictionary to query, must not be NULL
ppKeysA pointer to a ULONG_PTR array that will hold the result keys. Call free if no longer required
Returns
the number of keys found in the dictionary or 0 if ppKeys is NULL

Methods Gets the list of keys as an array

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

◆ ListDictionary_KeyObject()

WINPR_API wObject* ListDictionary_KeyObject ( wListDictionary *  _dictionary)

Get the wObject function pointer struct for the key of the dictionary.

Parameters
listDictionaryA dictionary to query, must not be NULL
Returns
a wObject used to initialize the key object, NULL in case of failure

C equivalent of the C# ListDictionary Class: http://msdn.microsoft.com/en-us/library/system.collections.specialized.listdictionary.aspx

Internal implementation uses a singly-linked list

Here is the caller graph for this function:

◆ ListDictionary_Lock()

WINPR_API void ListDictionary_Lock ( wListDictionary *  listDictionary)

mutex-lock a dictionary

Parameters
listDictionaryA dictionary to query, must not be NULL

Lock access to the ListDictionary

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

◆ ListDictionary_New()

WINPR_API wListDictionary* ListDictionary_New ( BOOL  synchronized)

allocate a new dictionary

Parameters
synchronizedCreate the dictionary with automatic mutex lock
Returns
A newly allocated dictionary or NULL in case of failure

Construction, Destruction

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

◆ ListDictionary_Remove()

WINPR_API void ListDictionary_Remove ( wListDictionary *  listDictionary,
const void *  key 
)

Remove an item from the dictionary and call fnObjectFree for key and value.

Parameters
listDictionaryA dictionary to query, must not be NULL
keyThe key identifying the entry
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListDictionary_Remove_Head()

WINPR_API void ListDictionary_Remove_Head ( wListDictionary *  listDictionary)

Remove the head item from the dictionary and call fnObjectFree for key and value.

Parameters
listDictionaryA dictionary to query, must not be NULL
Here is the call graph for this function:

◆ ListDictionary_SetItemValue()

WINPR_API BOOL ListDictionary_SetItemValue ( wListDictionary *  listDictionary,
const void *  key,
const void *  value 
)

Set the value in the dictionary for a key. The entry must already exist, value is copied if fnObjectNew is set.

Parameters
listDictionaryA dictionary to query, must not be NULL
keyA key to look for (fnObjectEquals of the key object is called)
valueA pointer to the value to set
Returns
TRUE for success, FALSE in case of failure

Set an item value using key

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

◆ ListDictionary_Take()

WINPR_API void* ListDictionary_Take ( wListDictionary *  listDictionary,
const void *  key 
)

Remove an item from the dictionary and return the value. Cleanup is up to the caller.

Parameters
listDictionaryA dictionary to query, must not be NULL
keyThe key identifying the entry
Returns
a pointer to the value stored or NULL in case of failure or not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListDictionary_Take_Head()

WINPR_API void* ListDictionary_Take_Head ( wListDictionary *  listDictionary)

Remove the head item from the dictionary and return the value. Cleanup is up to the caller.

Parameters
listDictionaryA dictionary to query, must not be NULL
Returns
a pointer to the value stored or NULL in case of failure or not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListDictionary_Unlock()

WINPR_API void ListDictionary_Unlock ( wListDictionary *  listDictionary)

mutex-unlock a dictionary

Parameters
listDictionaryA dictionary to query, must not be NULL

Unlock access to the ListDictionary

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

◆ ListDictionary_ValueObject()

WINPR_API wObject* ListDictionary_ValueObject ( wListDictionary *  listDictionary)

Get the wObject function pointer struct for the value of the dictionary.

Parameters
listDictionaryA dictionary to query, must not be NULL
Returns
a wObject used to initialize the value object, NULL in case of failure
Here is the caller graph for this function:

◆ MessagePipe_Free()

WINPR_API void MessagePipe_Free ( wMessagePipe pipe)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MessagePipe_New()

WINPR_API wMessagePipe* MessagePipe_New ( void  )

Construction, Destruction

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

◆ MessagePipe_PostQuit()

WINPR_API void MessagePipe_PostQuit ( wMessagePipe pipe,
int  nExitCode 
)

WinPR: Windows Portable Runtime Message Pipe

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. Properties Methods

Here is the call graph for this function:

◆ MessageQueue_Clear()

WINPR_API 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()

WINPR_API 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_Event()

WINPR_API 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()

WINPR_API 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()

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

◆ MessageQueue_New()

WINPR_API 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'.

Parameters
callbacka pointer to custom initialization / cleanup functions. Can be NULL if not used.
Returns
A pointer to a newly allocated MessageQueue or NULL.

Construction, Destruction

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

◆ MessageQueue_Object()

WINPR_API 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()

WINPR_API 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()

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

◆ MessageQueue_PostQuit()

WINPR_API 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()

WINPR_API size_t MessageQueue_Size ( wMessageQueue *  queue)

Gets the queue size

◆ MessageQueue_Wait()

WINPR_API BOOL MessageQueue_Wait ( wMessageQueue *  queue)

Methods

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

◆ ObjectPool_Clear()

WINPR_API void ObjectPool_Clear ( wObjectPool *  pool)

Releases the buffers currently cached in the pool.

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

◆ ObjectPool_Free()

WINPR_API void ObjectPool_Free ( wObjectPool *  pool)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ObjectPool_New()

WINPR_API wObjectPool* ObjectPool_New ( BOOL  synchronized)

Construction, Destruction

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

◆ ObjectPool_Object()

WINPR_API wObject* ObjectPool_Object ( wObjectPool *  pool)
Here is the caller graph for this function:

◆ ObjectPool_Return()

WINPR_API void ObjectPool_Return ( wObjectPool *  pool,
void *  obj 
)

Returns an object to the pool.

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

◆ ObjectPool_Take()

WINPR_API void* ObjectPool_Take ( wObjectPool *  pool)

Gets an object from the pool.

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

◆ PubSub_AddEventTypes()

WINPR_API void PubSub_AddEventTypes ( wPubSub *  pubSub,
wEventType events,
size_t  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PubSub_FindEventType()

WINPR_API wEventType* PubSub_FindEventType ( wPubSub *  pubSub,
const char *  EventName 
)
Here is the caller graph for this function:

◆ PubSub_Free()

WINPR_API void PubSub_Free ( wPubSub *  pubSub)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PubSub_GetEventTypes()

WINPR_API wEventType* PubSub_GetEventTypes ( wPubSub *  pubSub,
size_t *  count 
)

Properties

◆ PubSub_Lock()

WINPR_API void PubSub_Lock ( wPubSub *  pubSub)

Methods

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

◆ PubSub_New()

WINPR_API wPubSub* PubSub_New ( BOOL  synchronized)

Construction, Destruction

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

◆ PubSub_OnEvent()

WINPR_API int PubSub_OnEvent ( wPubSub *  pubSub,
const char *  EventName,
void *  context,
const wEventArgs e 
)
Here is the call graph for this function:

◆ PubSub_Subscribe()

WINPR_API int PubSub_Subscribe ( wPubSub *  pubSub,
const char *  EventName,
  ... 
)
Here is the call graph for this function:

◆ PubSub_Unlock()

WINPR_API void PubSub_Unlock ( wPubSub *  pubSub)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PubSub_Unsubscribe()

WINPR_API int PubSub_Unsubscribe ( wPubSub *  pubSub,
const char *  EventName,
  ... 
)
Here is the call graph for this function:

◆ Queue_Clear()

WINPR_API void Queue_Clear ( wQueue *  queue)

Remove all elements from a queue, call wObject cleanup functions fnObjectFree.

Parameters
queueA pointer to a queue, must not be NULL

Methods Removes all objects from the Queue.

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

◆ Queue_Contains()

WINPR_API BOOL Queue_Contains ( wQueue *  queue,
const void *  obj 
)

Check if the queue contains an object.

Parameters
queueA pointer to a queue, must not be NULL
objThe object to look for. fnObjectEquals is called internally
Returns
TRUE if the object was found, FALSE otherwise.

Determines whether an element is in the Queue.

Here is the call graph for this function:

◆ Queue_Count()

WINPR_API size_t Queue_Count ( wQueue *  queue)

Return the number of elements in the queue.

Parameters
queueA pointer to a queue, must not be NULL
Returns
the number of objects queued

C equivalent of the C# Queue Class: http://msdn.microsoft.com/en-us/library/system.collections.queue.aspx Properties Gets the number of elements contained in the Queue.

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

◆ Queue_Dequeue()

WINPR_API void* Queue_Dequeue ( wQueue *  queue)

returns the element at the top of the queue. The element is removed from the queue, ownership of the element is passed on to the caller.

Parameters
queueThe queue to check
Returns
NULL if empty, a pointer to the memory on top of the queue otherwise.

Removes and returns the object at the beginning of the Queue.

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

◆ Queue_Discard()

WINPR_API void Queue_Discard ( wQueue *  queue)

Removes the element at the top of the queue. If fnObjectFree is set, the element is freed. This can be used in combination with Queue_Peek to handle an element and discard it with this function afterward. An alternative is Queue_Dequeue with calling the appropriate free function afterward.

Parameters
queueThe queue to operate on
Here is the call graph for this function:

◆ Queue_Enqueue()

WINPR_API BOOL Queue_Enqueue ( wQueue *  queue,
const void *  obj 
)

Pushes a new element into the queue. If a fnObjectNew is set, the element is copied and the queue takes ownership of the memory, otherwise the ownership stays with the caller.

Parameters
queueThe queue to operate on
objA pointer to the object to queue
Returns
TRUE for success, FALSE if failed.

Adds an object to the end of the Queue.

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

◆ Queue_Event()

WINPR_API HANDLE Queue_Event ( wQueue *  queue)

Get an event handle for the queue, usable by WaitForSingleObject or WaitForMultipleObjects.

Parameters
queueA pointer to a queue, must not be NULL

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

Here is the caller graph for this function:

◆ Queue_Free()

WINPR_API void Queue_Free ( wQueue *  queue)

Clean up a queue, free all resources (e.g. calls Queue_Clear)

Parameters
queueThe queue to free, may be NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Queue_Lock()

WINPR_API void Queue_Lock ( wQueue *  queue)

Mutex-Lock a queue.

Parameters
queueA pointer to a queue, must not be NULL

Lock access to the ArrayList

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

◆ Queue_New()

WINPR_API wQueue* Queue_New ( BOOL  synchronized,
SSIZE_T  capacity,
SSIZE_T  growthFactor 
)

Creates a new queue.

Returns
A newly allocated queue or NULL in case of failure

Construction, Destruction

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

◆ Queue_Object()

WINPR_API wObject* Queue_Object ( wQueue *  queue)

Mutex-Lock a queue.

Parameters
queueA pointer to a queue, must not be NULL
Returns
A pointer to a wObject that contains the allocation/cleanup handlers for queue elements
Here is the caller graph for this function:

◆ Queue_Peek()

WINPR_API void* Queue_Peek ( wQueue *  queue)

returns the element at the top of the queue. The element is not removed from the queue, ownership of the element stays with the queue.

Parameters
queueThe queue to check
Returns
NULL if empty, a pointer to the memory on top of the queue otherwise.

Returns the object at the beginning of the Queue without removing it.

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

◆ Queue_Unlock()

WINPR_API void Queue_Unlock ( wQueue *  queue)

Mutex-Unlock a queue.

Parameters
queueA pointer to a queue, must not be NULL

Unlock access to the ArrayList

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

◆ Stack_Clear()

WINPR_API void Stack_Clear ( wStack *  stack)

Methods Removes all objects from the Stack.

Here is the call graph for this function:

◆ Stack_Contains()

WINPR_API BOOL Stack_Contains ( wStack *  stack,
const void *  obj 
)

Determines whether an element is in the Stack.

Here is the call graph for this function:

◆ Stack_Count()

WINPR_API size_t Stack_Count ( wStack *  stack)

C equivalent of the C# Stack Class: http://msdn.microsoft.com/en-us/library/system.collections.stack.aspx Properties Gets the number of elements contained in the Stack.

Here is the call graph for this function:

◆ Stack_Free()

WINPR_API void Stack_Free ( wStack *  stack)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stack_IsSynchronized()

WINPR_API BOOL Stack_IsSynchronized ( wStack *  stack)

Gets a value indicating whether access to the Stack is synchronized (thread safe).

◆ Stack_New()

WINPR_API wStack* Stack_New ( BOOL  synchronized)

Construction, Destruction

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

◆ Stack_Object()

WINPR_API wObject* Stack_Object ( wStack *  stack)

◆ Stack_Peek()

WINPR_API void* Stack_Peek ( wStack *  stack)

Returns the object at the top of the Stack without removing it.

Here is the call graph for this function:

◆ Stack_Pop()

WINPR_API void* Stack_Pop ( wStack *  stack)

Removes and returns the object at the top of the Stack.

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

◆ Stack_Push()

WINPR_API void Stack_Push ( wStack *  stack,
void *  obj 
)

Inserts an object at the top of the Stack.

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

◆ winpr_ObjectStringClone()

WINPR_API void* winpr_ObjectStringClone ( const void *  pvstr)

WinPR: Windows Portable Runtime Collections

Copyright 2024 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2024 Thincast Technologies GmbH

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.

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

◆ winpr_ObjectStringFree()

WINPR_API void winpr_ObjectStringFree ( void *  pvstr)
Here is the caller graph for this function:

◆ winpr_ObjectWStringClone()

WINPR_API void* winpr_ObjectWStringClone ( const void *  pvstr)
Here is the call graph for this function: