2003-04-16 22:30:43 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Interface - plugin registration
|
2005-04-03 12:27:17 +00:00
|
|
|
* Copyright (c) 2003-2005 by Stephane Fillod
|
2003-04-16 22:30:43 +00:00
|
|
|
*
|
|
|
|
*
|
2011-08-22 01:07:57 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2003-04-16 22:30:43 +00:00
|
|
|
*
|
2011-08-22 01:07:57 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2003-04-16 22:30:43 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-08-22 01:07:57 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2003-04-16 22:30:43 +00:00
|
|
|
*
|
2011-08-22 01:07:57 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2003-04-16 22:30:43 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2011-08-22 01:07:57 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-04-16 22:30:43 +00:00
|
|
|
*
|
|
|
|
*/
|
2003-09-23 22:52:52 +00:00
|
|
|
#ifndef _REGISTER_H
|
|
|
|
#define _REGISTER_H 1
|
2003-04-16 22:30:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include <hamlib/rig.h>
|
|
|
|
#include <hamlib/rotator.h>
|
2019-06-12 20:52:35 +00:00
|
|
|
#include <hamlib/amplifier.h>
|
2022-02-04 04:31:42 +00:00
|
|
|
#include <hamlib/config.h>
|
2003-04-16 22:30:43 +00:00
|
|
|
|
2003-09-23 22:52:52 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN_C extern "C"
|
|
|
|
#else
|
|
|
|
#define EXTERN_C extern
|
|
|
|
#endif
|
|
|
|
|
2009-09-04 21:30:32 +00:00
|
|
|
#define CONCAT4(w__, x__, y__, z__) w__ ## x__ ## y__ ## z__
|
|
|
|
#define MAKE_VERSIONED_FN(prefix__, version__, name_args__) CONCAT4(prefix__, version__, _, name_args__)
|
|
|
|
/* void MAKE_VERSIONED_FN(foo, 42, bar(int i)) -> void foo42_bar(int i) */
|
|
|
|
|
|
|
|
#ifndef ABI_VERSION
|
|
|
|
#error ABI_VERSION undefined! Did you include config.h?
|
|
|
|
#endif
|
|
|
|
|
2013-09-08 13:56:28 +00:00
|
|
|
#define PREFIX_INITRIG initrigs
|
|
|
|
#define PREFIX_PROBERIG probeallrigs
|
2003-04-16 22:30:43 +00:00
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
#define DECLARE_INITRIG_BACKEND(backend) \
|
|
|
|
EXTERN_C BACKEND_EXPORT(int) \
|
|
|
|
MAKE_VERSIONED_FN(PREFIX_INITRIG, ABI_VERSION, backend(void *be_handle))
|
2003-04-16 22:30:43 +00:00
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
#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))
|
2003-04-16 22:30:43 +00:00
|
|
|
|
2013-09-08 13:56:28 +00:00
|
|
|
#define PREFIX_INITROTS initrots
|
|
|
|
#define PREFIX_PROBEROTS probeallrots
|
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
#define DECLARE_INITROT_BACKEND(backend) \
|
|
|
|
EXTERN_C BACKEND_EXPORT(int) \
|
|
|
|
MAKE_VERSIONED_FN(PREFIX_INITROTS, ABI_VERSION, backend(void *be_handle))
|
2013-09-08 13:56:28 +00:00
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
#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))
|
2003-04-16 22:30:43 +00:00
|
|
|
|
2019-06-12 20:52:35 +00:00
|
|
|
#define PREFIX_INITAMPS initamps
|
|
|
|
#define PREFIX_PROBEAMPS probeallamps
|
|
|
|
|
|
|
|
#define DECLARE_INITAMP_BACKEND(backend) \
|
|
|
|
EXTERN_C BACKEND_EXPORT(int) \
|
|
|
|
MAKE_VERSIONED_FN(PREFIX_INITAMPS, ABI_VERSION, backend(void *be_handle))
|
|
|
|
|
|
|
|
#define DECLARE_PROBEAMP_BACKEND(backend) \
|
|
|
|
EXTERN_C BACKEND_EXPORT(amp_model_t) \
|
|
|
|
MAKE_VERSIONED_FN(PREFIX_PROBEAMPS, \
|
|
|
|
ABI_VERSION, \
|
|
|
|
backend(hamlib_port_t *port, \
|
|
|
|
rig_probe_func_t cfunc, \
|
|
|
|
rig_ptr_t data))
|
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
#endif /* _REGISTER_H */
|