Neonode zForce(TM) SDK
Queue.h
Go to the documentation of this file.
1 
10 #ifndef QUEUE_QUEUE_H
11 #define QUEUE_QUEUE_H 1
12 
13 #ifndef ZFORCECOMMON_H
14  #error Please include "zForceCommon.h" before this file.
15 #endif // ZFORCECOMMON_H
16 
20 typedef struct Queue Queue;
24 struct Queue
25 {
27  void * QueuePrivate;
28 
43  void ( * Destructor)(Queue * self);
44 
62  bool ( * Enqueue)(Queue * self, void * payload);
63 
83  void * ( * Dequeue)(Queue * self, uint32_t timeoutMilliSeconds);
84 };
85 
86 #ifdef __cplusplus
87 extern "C"
88 {
89 #endif // __cplusplus
90 
104 DLLEXTERNAL Queue * Queue_New (void);
105 
106 #ifdef __cplusplus
107 }
108 #endif // __cplusplus
109 
110 #endif // QUEUE_QUEUE_H
DLLEXTERNAL Queue * Queue_New(void)
Create a new Queue.
The Queue struct.
Definition: Queue.h:25
bool(* Enqueue)(Queue *self, void *payload)
Add an entry to the queue.
Definition: Queue.h:62
void(* Destructor)(Queue *self)
Destroys the Queue, freeing any resources but NOT contents.
Definition: Queue.h:43
void * QueuePrivate
Private Queue data.
Definition: Queue.h:27
zForce * zForce
Pointer to zForce.
Definition: Queue.h:26
Main struct.
Definition: zForce.h:29