summaryrefslogtreecommitdiffstats
path: root/src/include/eiotas_main.h
blob: d75ab964a88f7636ca8d87d8bf4878ce81347594 (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
/* EIOTAS
 * Copyright (C) 2012 Jérémy Zurcher
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library;
 * if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __EIOTAS_MAIN_H__
#define __EIOTAS_MAIN_H__

#include <eina_types.h>

/**
 * @typedef Eiotas_Version
 * The version of Eiotas.
 */
typedef struct _Eiotas_Version
{
   int major;    /**< Major component of the version */
   int minor;    /**< Minor component of the version */
   int micro;    /**< Micro component of the version */
} Eiotas_Version;

EAPI extern Eiotas_Version *eiotas_version;

EAPI extern int _eiotas_log_dom;

/**
 * @brief Initialize the Eiotas library.
 *
 * @return 1 or greater on success, 0 on error.
 *
 * This function sets up all the eiotas modules. It returns 0 on
 * failure (that is, when one of the module fails to initialize),
 * otherwise it returns the number of times it has already been
 * called.
 *
 * When Eiotas is not used anymore, call eiotas_shutdown() to shut down
 * the Eiotaslibrary.
 */
EAPI int eiotas_init();

/**
 * @brief Shut down the Eiotas library.
 *
 * @return 0 when all the modules are completely shut down, 1 or
 * greater otherwise.
 *
 * This function shuts down the Eiotas library. It returns 0 when it has
 * been called the same number of times than eiotas_init(). In that case
 * it shut down all the Eiotas modules.
 *
 * Once this function succeeds (that is, @c 0 is returned), you must
 * not call any of the Eiotas function anymore. You must call
 * eiotas_init() again to use the Eiotas functions again.
 */
EAPI int eiotas_shutdown();

#endif // __EIOTAS_MAIN_H__