Hamlib
1.2.15
|
00001 /* 00002 * Hamlib Interface - plugin registration 00003 * Copyright (c) 2003-2005 by Stephane Fillod 00004 * 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 */ 00021 #ifndef _REGISTER_H 00022 #define _REGISTER_H 1 00023 00024 00025 #include <hamlib/rig.h> 00026 #include <hamlib/rotator.h> 00027 00028 #ifdef __cplusplus 00029 #define EXTERN_C extern "C" 00030 #else 00031 #define EXTERN_C extern 00032 #endif 00033 00034 #define CONCAT4(w__, x__, y__, z__) w__ ## x__ ## y__ ## z__ 00035 #define MAKE_VERSIONED_FN(prefix__, version__, name_args__) CONCAT4(prefix__, version__, _, name_args__) 00036 /* void MAKE_VERSIONED_FN(foo, 42, bar(int i)) -> void foo42_bar(int i) */ 00037 00038 #ifndef ABI_VERSION 00039 #error ABI_VERSION undefined! Did you include config.h? 00040 #endif 00041 00042 #ifdef DECLARE_INITRIG_BACKEND 00043 #undef DECLARE_INITRIG_BACKEND 00044 #endif 00045 #define DECLARE_INITRIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) MAKE_VERSIONED_FN(initrigs, ABI_VERSION, backend(void *be_handle)) 00046 00047 #ifdef DECLARE_PROBERIG_BACKEND 00048 #undef DECLARE_PROBERIG_BACKEND 00049 #endif 00050 #define DECLARE_PROBERIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rig_model_t) MAKE_VERSIONED_FN(probeallrigs, ABI_VERSION, backend(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)) 00051 00052 #ifdef DECLARE_INITROT_BACKEND 00053 #undef DECLARE_INITROT_BACKEND 00054 #endif 00055 #define DECLARE_INITROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) MAKE_VERSIONED_FN(initrots, ABI_VERSION, backend(void *be_handle)) 00056 00057 #ifdef DECLARE_PROBEROT_BACKEND 00058 #undef DECLARE_PROBEROT_BACKEND 00059 #endif 00060 #define DECLARE_PROBEROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rot_model_t) MAKE_VERSIONED_FN(probeallrots, ABI_VERSION, backend(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)) 00061 00062 #endif /* _REGISTER_H */
Hamlib documentation for version 1.2.15 -- Thu Feb 2 2012 21:37:27
Project page: http://www.hamlib.org