summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-transaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/alsa/alsa-transaction.h')
-rw-r--r--plugins/alsa/alsa-transaction.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/alsa/alsa-transaction.h b/plugins/alsa/alsa-transaction.h
new file mode 100644
index 0000000..a0af0ae
--- /dev/null
+++ b/plugins/alsa/alsa-transaction.h
@@ -0,0 +1,37 @@
+#ifndef __INC_ALSA_TRANSACTION_H
+#define __INC_ALSA_TRANSACTION_H
+
+#include <urcu/list.h>
+#include <stdbool.h>
+
+#include "afb-definitions.h"
+
+struct SoftMixerT_;
+
+typedef void (*AlsaTransactionDestructor) (struct SoftMixerT_ *, void*);
+
+typedef struct {
+ const char * uid;
+ struct SoftMixerT_* mixer;
+ struct cds_list_head list;
+} AlsaMixerTransaction;
+
+typedef struct {
+ struct cds_list_head list_entry;
+ void * object;
+ AlsaTransactionDestructor destructor;
+} AlsaMixerTransactionDataItem;
+
+extern AlsaMixerTransaction * AlsaMixerTransactionNew(struct SoftMixerT_ * api, const char*);
+
+extern void AlsaMixerTransactionDataListDestroy(AlsaMixerTransaction*);
+
+extern bool AlsaMixerTransactionObjectAdd(AlsaMixerTransaction*, void * object, AlsaTransactionDestructor destructor);
+
+extern void AlsaMixerTransactionDoCleanup(AlsaMixerTransaction*);
+
+extern bool AlsaMixerTransactionVerbCreate(AlsaMixerTransaction*);
+
+extern void AlsaMixerTransactionVerbCB(AFB_ReqT request);
+
+#endif /* __INC_ALSA_TRANSACTION_H */