diff options
| author | Christoph Berg <myon@debian.org> | 2021-02-03 22:54:50 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-02-03 22:54:50 +0100 |
| commit | 1c4a8c9374cacfc002e47c8e3bb824e82aa8441c (patch) | |
| tree | 13b31e80d276b67cca79f8077efbba2ad3863f34 /Transceiver/HamlibTransceiver.hpp | |
| parent | 3209ca0e2d4243c861c3d1d6022ba1da4f9f2fc8 (diff) | |
New upstream version 2.4.0~rc1+repackupstream/2.4.0_rc1+repack
Diffstat (limited to 'Transceiver/HamlibTransceiver.hpp')
| -rw-r--r-- | Transceiver/HamlibTransceiver.hpp | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/Transceiver/HamlibTransceiver.hpp b/Transceiver/HamlibTransceiver.hpp index e1b5dece..9548fe65 100644 --- a/Transceiver/HamlibTransceiver.hpp +++ b/Transceiver/HamlibTransceiver.hpp @@ -1,14 +1,11 @@ #ifndef HAMLIB_TRANSCEIVER_HPP_ #define HAMLIB_TRANSCEIVER_HPP_ -#include <tuple> - #include <QString> -#include <hamlib/rig.h> - #include "TransceiverFactory.hpp" #include "PollingTransceiver.hpp" +#include "pimpl_h.hpp" // hamlib transceiver and PTT mostly delegated directly to hamlib Rig class class HamlibTransceiver final @@ -20,10 +17,11 @@ public: static void register_transceivers (logger_type *, TransceiverFactory::Transceivers *); static void unregister_transceivers (); - explicit HamlibTransceiver (logger_type *, int model_number, TransceiverFactory::ParameterPack const&, + explicit HamlibTransceiver (logger_type *, unsigned model_number, TransceiverFactory::ParameterPack const&, QObject * parent = nullptr); explicit HamlibTransceiver (logger_type *, TransceiverFactory::PTTMethod ptt_type, QString const& ptt_port, QObject * parent = nullptr); + ~HamlibTransceiver (); private: int do_start () override; @@ -35,38 +33,8 @@ private: void do_poll () override; - void error_check (int ret_code, QString const& doing) const; - void set_conf (char const * item, char const * value); - QByteArray get_conf (char const * item); - Transceiver::MODE map_mode (rmode_t) const; - rmode_t map_mode (Transceiver::MODE mode) const; - std::tuple<vfo_t, vfo_t> get_vfos (bool for_split) const; - - struct RIGDeleter {static void cleanup (RIG *);}; - QScopedPointer<RIG, RIGDeleter> rig_; - - bool ptt_only_; // we can use a dummy device for PTT - bool back_ptt_port_; - bool one_VFO_; - bool is_dummy_; - - // these are saved on destruction so we can start new instances - // where the last one left off - static freq_t dummy_frequency_; - static rmode_t dummy_mode_; - - bool mutable reversed_; - - bool freq_query_works_; - bool mode_query_works_; - bool split_query_works_; - bool tickle_hamlib_; // Hamlib requires a - // rig_set_split_vfo() call to - // establish the Tx VFO - bool get_vfo_works_; // Net rigctl promises what it can't deliver - bool set_vfo_works_; // More rigctl promises which it can't deliver - - static int debug_callback (enum rig_debug_level_e level, rig_ptr_t arg, char const * format, va_list ap); + class impl; + pimpl<impl> m_; }; #endif |
