summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio/ecore_audio_obj_out.h
blob: 68fa451389f644d6e92596db44c0c158a04c400f (plain) (blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef ECORE_AUDIO_OBJ_OUT_H
#define ECORE_AUDIO_OBJ_OUT_H

#include <Eina.h>
#include <Eo.h>

#ifdef EAPI
#undef EAPI
#endif

#ifdef __GNUC__
#if __GNUC__ >= 4
#define EAPI __attribute__ ((visibility("default")))
#else
#define EAPI
#endif
#else
#define EAPI
#endif

/**
 * @file ecore_audio_obj_out.h
 * @brief Ecore_Audio output object
 */

#ifdef __cplusplus
extern "C"
{
#endif

/**
 * @defgroup ecore_audio_obj_out - Ecore_Audio output object
 * @ingroup Ecore_Audio_Group
 * @{
 */

#define ECORE_AUDIO_OBJ_OUT_CLASS ecore_audio_obj_out_class_get() /**< Ecore_Audio output object class */

/**
 * @brief Get the Eo class ID
 *
 * @return The Eo class ID
 */
const Eo *ecore_audio_obj_out_class_get() EINA_CONST;

extern EAPI Eo_Op ECORE_AUDIO_OBJ_OUT_BASE_ID;

enum Ecore_Audio_Obj_Out_Sub_Ids
{
   ECORE_AUDIO_OBJ_OUT_SUB_ID_INPUT_ATTACH,
   ECORE_AUDIO_OBJ_OUT_SUB_ID_INPUT_DETACH,
   ECORE_AUDIO_OBJ_OUT_SUB_ID_INPUTS_GET,
   ECORE_AUDIO_OBJ_OUT_SUB_ID_LAST
};

#define ECORE_AUDIO_OBJ_OUT_ID(sub_id) (ECORE_AUDIO_OBJ_OUT_BASE_ID + EO_TYPECHECK(enum Ecore_Audio_Obj_Out_Sub_Ids, sub_id))

/**
 * @brief Attach an input to an output
 *
 * @since 1.8
 *
 * @param[in] input The input to attach to the output
 * @param[out] ret EINA_TRUE if the input was attached, EINA_FALSE otherwise
 */
#define ecore_audio_obj_out_input_attach(input, ret) ECORE_AUDIO_OBJ_OUT_ID(ECORE_AUDIO_OBJ_OUT_SUB_ID_INPUT_ATTACH), EO_TYPECHECK(Eo *, input), EO_TYPECHECK(Eina_Bool *, ret)

/**
 * @brief Detach an input from an output
 *
 * @since 1.8
 *
 * @param[in] input The input to detach to the output
 * @param[out] ret EINA_TRUE if the input was detached, EINA_FALSE otherwise
 */
#define ecore_audio_obj_out_input_detach(input, ret) ECORE_AUDIO_OBJ_OUT_ID(ECORE_AUDIO_OBJ_OUT_SUB_ID_INPUT_DETACH), EO_TYPECHECK(Eo *, input), EO_TYPECHECK(Eina_Bool *, ret)

/**
 * @brief Detach an input from an output
 *
 * @since 1.8
 *
 * @param[out] inputs An @ref Eina_List of the inputs that are attached to
 * the output
 */
#define ecore_audio_obj_out_inputs_get(inputs) ECORE_AUDIO_OBJ_OUT_ID(ECORE_AUDIO_OBJ_OUT_SUB_ID_INPUTS_GET), EO_TYPECHECK(Eina_List **, inputs)

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif