]> sigrok.org Git - sigrok-androidutils.git/blob - lib/libsigrokandroidutils.h
379140c720ac1514dc75a39185636ccb9675715e
[sigrok-androidutils.git] / lib / libsigrokandroidutils.h
1 /*
2  * This file is part of the sigrok-androidutils project.
3  *
4  * Copyright (C) 2014 Marcus Comstedt <marcus@mc.pp.se>
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef LIBSIGROKANDROIDUTILS_LIBSIGROKANDROIDUTILS_H
21 #define LIBSIGROKANDROIDUTILS_LIBSIGROKANDROIDUTILS_H
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /*
28  * Use SRAU_API to mark public API symbols, and SRAU_PRIV for private symbols.
29  *
30  * Variables and functions marked 'static' are private already and don't
31  * need SR_PRIV. However, functions which are not static (because they need
32  * to be used in other libsigrokandroidutils-internal files) but are also
33  * not meant to be part of the public libsigrokandroidutils API, must use
34  * SRAU_PRIV.
35  *
36  * This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
37  *
38  * Details: http://gcc.gnu.org/wiki/Visibility
39  */
40
41 /* Marks public libsigrokandroidutils API symbols. */
42 #define SRAU_API __attribute__((visibility("default")))
43
44 /* Marks private, non-public libsigrokandroidutils symbols (not part of the API). */
45 #define SRAU_PRIV __attribute__((visibility("hidden")))
46
47
48
49 SRAU_API void srau_init_environment(void);
50
51 #ifdef __cplusplus
52 }
53 #endif
54
55 #endif
56