Hamlib  3.0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
register.h
1 /*
2  * Hamlib Interface - plugin registration
3  * Copyright (c) 2003-2005 by Stephane Fillod
4  *
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 #ifndef _REGISTER_H
22 #define _REGISTER_H 1
23 
24 
25 #include <hamlib/rig.h>
26 #include <hamlib/rotator.h>
27 
28 #ifdef __cplusplus
29 #define EXTERN_C extern "C"
30 #else
31 #define EXTERN_C extern
32 #endif
33 
34 #define CONCAT4(w__, x__, y__, z__) w__ ## x__ ## y__ ## z__
35 #define MAKE_VERSIONED_FN(prefix__, version__, name_args__) CONCAT4(prefix__, version__, _, name_args__)
36 /* void MAKE_VERSIONED_FN(foo, 42, bar(int i)) -> void foo42_bar(int i) */
37 
38 #ifndef ABI_VERSION
39 #error ABI_VERSION undefined! Did you include config.h?
40 #endif
41 
42 #define PREFIX_INITRIG initrigs
43 #define PREFIX_PROBERIG probeallrigs
44 
45 #define DECLARE_INITRIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) MAKE_VERSIONED_FN(PREFIX_INITRIG, ABI_VERSION, backend(void *be_handle))
46 
47 #define DECLARE_PROBERIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rig_model_t) MAKE_VERSIONED_FN(PREFIX_PROBERIG, ABI_VERSION, backend(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data))
48 
49 #define PREFIX_INITROTS initrots
50 #define PREFIX_PROBEROTS probeallrots
51 
52 #define DECLARE_INITROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) MAKE_VERSIONED_FN(PREFIX_INITROTS, ABI_VERSION, backend(void *be_handle))
53 
54 #define DECLARE_PROBEROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rot_model_t) MAKE_VERSIONED_FN(PREFIX_PROBEROTS, ABI_VERSION, backend(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data))
55 
56 #endif /* _REGISTER_H */
Hamlib rotator data structures.
Hamlib rig data structures.

Generated by doxygen 1.8.8

Hamlib documentation for version 3.0.1 -- Wed Jan 13 2016 15:05:23
Project page: http://www.hamlib.org