summaryrefslogtreecommitdiffstats
path: root/src/lib/engagement.h
blob: 2692d0cdb8a1ce39a512f2ffbf2cad02fe046940 (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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
 * (c) Copyright 2016 Olliver Schinagl
 * Author: Olliver Schinagl <oliver@schinagl.nl>
 *
 * SPDX-License-Identifier:	AGPL-3.0+
 */

#ifndef _ENGAGEMENT_H_
#define _ENGAGEMENT_H_

#include <Elementary.h>

#ifdef EAPI
# undef EAPI
#endif

#ifdef _WIN32
# ifdef EFL_ENGAGEMENT_BUILD
#  ifdef DLL_EXPORT
#   define EAPI __declspec(dllexport)
#  else
#   define EAPI
#  endif /* ! DLL_EXPORT */
# else
#  define EAPI __declspec(dllimport)
# endif /* ! EFL_ENGAGEMENT_BUILD */
#else
# ifdef __GNUC__
#  if __GNUC__ >= 4
#   define EAPI __attribute__ ((visibility("default")))
#  else
#   define EAPI
#  endif
# else
#  define EAPI
# endif
#endif /* ! _WIN32 */

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file
 * @brief These routines are used for Engagement library interaction.
 */

/**
 * @brief Init / shutdown functions.
 * @defgroup Init  Init / Shutdown
 *
 * @{
 *
 * Functions of obligatory usage, handling proper initialization
 * and shutdown routines.
 *
 * Before the usage of any other function, Engagement should be properly
 * initialized with @ref engagement_init() and the last call to Engagement's
 * functions should be @ref engagement_shutdown(), so everything will
 * be correctly freed.
 *
 * Engagement logs everything with Eina Log, using the "engagement" log domain.
 *
 */

/**
 * Initialize Engagement.
 *
 * Initializes Engagement, its dependencies and modules. Should be the first
 * function of Engagement to be called.
 *
 * @return The init counter value.
 *
 * @see engagement_shutdown().
 *
 * @ingroup Init
 */
EAPI int engagement_init(void);

/**
 * Shutdown Engagement
 *
 * Shutdown Engagement. If init count reaches 0, all the internal structures will
 * be freed. Any Engagement library call after this point will leads to an error.
 *
 * @return Engagement's init counter value.
 *
 * @see engagement_init().
 *
 * @ingroup Init
 */
EAPI int engagement_shutdown(void);

/**
 * @}
 */

/**
 * @brief Main group API that wont do anything
 * @defgroup Main Main
 *
 * @{
 *
 * @brief A function that doesn't do any good nor any bad
 *
 * @ingroup Main
 */
EAPI void engagement_library_call(void);

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif /* _ENGAGEMENT_H_ */