blob: 6bb5d92da0b75f5aa52e36f821d211f3423709ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef __INC_ALSA_TRANSACTION_H
#define __INC_ALSA_TRANSACTION_H
#include <urcu/list.h>
#include <stdbool.h>
#include <afb/afb-binding.h>
struct SoftMixerT_;
typedef void (*AlsaTransactionDestructor) (struct SoftMixerT_ *, void*);
typedef struct {
const char * uid;
struct SoftMixerT_* mixer;
struct cds_list_head item_list; // list of items
struct cds_list_head transaction_node; // node in a list of transactions
} AlsaMixerTransaction;
typedef struct {
struct cds_list_head list_entry;
void * object;
AlsaTransactionDestructor destructor;
} AlsaMixerTransactionDataItem;
extern AlsaMixerTransaction * AlsaMixerTransactionNew(struct SoftMixerT_ * api, const char*);
extern void AlsaMixerTransactionDelete(AlsaMixerTransaction * transaction);
extern void AlsaMixerTransactionDataListDestroy(AlsaMixerTransaction*);
extern bool AlsaMixerTransactionObjectAdd(AlsaMixerTransaction*, void * object, AlsaTransactionDestructor destructor);
extern void AlsaMixerTransactionObjectDelete(AlsaMixerTransaction* list, void * object, bool destructor);
extern bool AlsaMixerTransactionVerbCreate(AlsaMixerTransaction*);
extern void AlsaMixerTransactionVerbCB(afb_req_t request);
#endif /* __INC_ALSA_TRANSACTION_H */
|