summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-transaction.h
blob: 908051804a59c4a377a4218e51839b27ac17abe8 (plain)
1
2
3
4
5

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* K
#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 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 bool AlsaMixerTransactionObjectAddTail(AlsaMixerTransaction* list, void* object, AlsaTransactionDestructor destructor);

extern void AlsaMixerTransactionObjectDelete(AlsaMixerTransaction* list, void * object, bool destructor);

extern bool AlsaMixerTransactionVerbCreate(AlsaMixerTransaction*);

extern void AlsaMixerTransactionVerbCB(AFB_ReqT request);

#endif /* __INC_ALSA_TRANSACTION_H */