Hamlib
1.2.14
|
00001 /* 00002 * Hamlib Interface - plugin registration 00003 * Copyright (c) 2003-2005 by Stephane Fillod 00004 * 00005 * $Id: register.h,v 1.5 2005-04-03 12:27:16 fillods Exp $ 00006 * 00007 * This library is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU Library General Public License as 00009 * published by the Free Software Foundation; either version 2 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Library General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Library General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 * 00021 */ 00022 #ifndef _REGISTER_H 00023 #define _REGISTER_H 1 00024 00025 00026 #include <hamlib/rig.h> 00027 #include <hamlib/rotator.h> 00028 00029 #ifdef __cplusplus 00030 #define EXTERN_C extern "C" 00031 #else 00032 #define EXTERN_C extern 00033 #endif 00034 00035 #define CONCAT4(w__, x__, y__, z__) w__ ## x__ ## y__ ## z__ 00036 #define MAKE_VERSIONED_FN(prefix__, version__, name_args__) CONCAT4(prefix__, version__, _, name_args__) 00037 /* void MAKE_VERSIONED_FN(foo, 42, bar(int i)) -> void foo42_bar(int i) */ 00038 00039 #ifndef ABI_VERSION 00040 #error ABI_VERSION undefined! Did you include config.h? 00041 #endif 00042 00043 #ifdef DECLARE_INITRIG_BACKEND 00044 #undef DECLARE_INITRIG_BACKEND 00045 #endif 00046 #define DECLARE_INITRIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) MAKE_VERSIONED_FN(initrigs, ABI_VERSION, backend(void *be_handle)) 00047 00048 #ifdef DECLARE_PROBERIG_BACKEND 00049 #undef DECLARE_PROBERIG_BACKEND 00050 #endif 00051 #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)) 00052 00053 #ifdef DECLARE_INITROT_BACKEND 00054 #undef DECLARE_INITROT_BACKEND 00055 #endif 00056 #define DECLARE_INITROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) MAKE_VERSIONED_FN(initrots, ABI_VERSION, backend(void *be_handle)) 00057 00058 #ifdef DECLARE_PROBEROT_BACKEND 00059 #undef DECLARE_PROBEROT_BACKEND 00060 #endif 00061 #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)) 00062 00063 #endif /* _REGISTER_H */
Hamlib documentation for version 1.2.14 -- Fri Dec 23 2011 23:24:31
Project page: http://www.hamlib.org