]>
Commit | Line | Data |
---|---|---|
2b68989a | 1 | /* |
5de7ce63 | 2 | * This file is part of the sigrok-androidutils project. |
2b68989a MC |
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 | |
6f1c3a93 | 31 | * need SRAU_PRIV. However, functions which are not static (because they need |
2b68989a MC |
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 | ||
6f1c3a93 | 44 | /* Marks private, non-public, non-API libsigrokandroidutils symbols. */ |
2b68989a MC |
45 | #define SRAU_PRIV __attribute__((visibility("hidden"))) |
46 | ||
2b68989a MC |
47 | SRAU_API void srau_init_environment(void); |
48 | ||
49 | #ifdef __cplusplus | |
50 | } | |
51 | #endif | |
52 | ||
53 | #endif | |
54 |