summaryrefslogtreecommitdiffstats
path: root/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'queue.h')
-rw-r--r--queue.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/queue.h b/queue.h
index 989fe4a7..8bf308ba 100644
--- a/queue.h
+++ b/queue.h
@@ -51,6 +51,12 @@ typedef struct queue_s {
rsRetVal (*qDestruct)(struct queue_s *pThis);
rsRetVal (*qAdd)(struct queue_s *pThis, void *pUsr);
rsRetVal (*qDel)(struct queue_s *pThis, void **ppUsr);
+ /* the following two are currently only required for disk queuing, but
+ * we keep them global because we otherwise needed to change the interface
+ * too much.
+ */
+ rsRetVal (*serializer)(uchar **ppOutBuf, size_t *lenBuf, void *pUsr);
+ rsRetVal (*deSerializer)(void *ppUsr, uchar *ppBuf, size_t lenBuf);
/* end type-specific handler */
/* synchronization variables */
pthread_mutex_t *mut;
@@ -66,8 +72,6 @@ typedef struct queue_s {
qLinkedList_t *pLast;
} linklist;
struct {
- rsRetVal (*serializer)(uchar **ppOutBuf, size_t *lenBuf, void *pUsr);
- rsRetVal (*deSerializer)(void *ppUsr, uchar *ppBuf, size_t lenBuf);
uchar *pszSpoolDir;
size_t lenSpoolDir;
uchar *pszFilePrefix;
@@ -82,8 +86,11 @@ typedef struct queue_s {
/* prototypes */
-rsRetVal queueConstruct(queue_t **ppThis, queueType_t qType, int iMaxQueueSize, rsRetVal (*pConsumer)(void*));
rsRetVal queueDestruct(queue_t *pThis);
rsRetVal queueEnqObj(queue_t *pThis, void *pUsr);
+rsRetVal queueConstruct(queue_t **ppThis, queueType_t qType, int iMaxQueueSize, rsRetVal (*pConsumer)(void*),
+ rsRetVal (*serializer)(uchar **ppOutBuf, size_t *lenBuf, void *pUsr),
+ rsRetVal (*deSerializer)(void *ppUsr, uchar *ppBuf, size_t lenBuf)
+ );
#endif /* #ifndef QUEUE_H_INCLUDED */