This file is indexed.

/usr/include/hamlib/rigclass.h is in libhamlib++-dev 3.1-7build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/*
 *  Hamlib C++ bindings - API header
 *  Copyright (c) 2001-2002 by Stephane Fillod
 *
 *
 *   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.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifndef _RIGCLASS_H
#define _RIGCLASS_H 1

#include <hamlib/rig.h>
#include <iostream>


class BACKEND_IMPEXP Rig {
private:
  RIG* theRig;  // Global ref. to the rig

protected:
public:
  Rig(rig_model_t rig_model);

  virtual ~Rig();

  const struct rig_caps *caps;

  // This method open the communication port to the rig
  void open(void);

  // This method close the communication port to the rig
  void close(void);

  void setConf(token_t token, const char *val);
  void setConf(const char *name, const char *val);
  void getConf(token_t token, char *val);
  void getConf(const char *name, char *val);
  token_t tokenLookup(const char *name);

  void setFreq(freq_t freq, vfo_t vfo = RIG_VFO_CURR);
  freq_t getFreq(vfo_t vfo = RIG_VFO_CURR);
  void setMode(rmode_t, pbwidth_t width = RIG_PASSBAND_NORMAL, vfo_t vfo = RIG_VFO_CURR);
  rmode_t getMode(pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
  void setVFO(vfo_t);
  vfo_t getVFO();

  void setPTT (ptt_t ptt, vfo_t vfo = RIG_VFO_CURR);
  ptt_t getPTT (vfo_t vfo = RIG_VFO_CURR);
  dcd_t getDCD (vfo_t vfo = RIG_VFO_CURR);

  void setLevel(setting_t level, int vali, vfo_t vfo = RIG_VFO_CURR);
  void setLevel(setting_t level, float valf, vfo_t vfo = RIG_VFO_CURR);
  void getLevel(setting_t level, int& vali, vfo_t vfo = RIG_VFO_CURR);
  void getLevel(setting_t level, float& valf, vfo_t vfo = RIG_VFO_CURR);
  int getLevelI(setting_t level, vfo_t vfo = RIG_VFO_CURR);
  float getLevelF(setting_t level, vfo_t vfo = RIG_VFO_CURR);
  bool hasGetLevel (setting_t level);
  bool hasSetLevel (setting_t level);

  void setParm(setting_t parm, int vali);
  void setParm(setting_t parm, float valf);
  void getParm(setting_t parm, int& vali);
  void getParm(setting_t parm, float& valf);
  int getParmI(setting_t parm);
  float getParmF(setting_t parm);
  bool hasGetParm (setting_t parm);
  bool hasSetParm (setting_t parm);

  void setFunc (setting_t func, bool status, vfo_t vfo = RIG_VFO_CURR);
  bool getFunc (setting_t func, vfo_t vfo = RIG_VFO_CURR);
  bool hasGetFunc (setting_t func);
  bool hasSetFunc (setting_t func);

  void VFOop(vfo_op_t op, vfo_t vfo = RIG_VFO_CURR);
  bool hasVFOop (vfo_op_t op);

  void scan(scan_t scan, int ch, vfo_t vfo = RIG_VFO_CURR);
  bool hasScan (scan_t scan);

  const char *getInfo (void);
  pbwidth_t passbandNormal (rmode_t);
  pbwidth_t passbandNarrow (rmode_t);
  pbwidth_t passbandWide (rmode_t);

  void setRptrShift (rptr_shift_t rptr_shift, vfo_t vfo = RIG_VFO_CURR);
  rptr_shift_t getRptrShift (vfo_t vfo = RIG_VFO_CURR);
  void setRptrOffs (shortfreq_t rptr_offs, vfo_t vfo = RIG_VFO_CURR);
  shortfreq_t getRptrOffs (vfo_t vfo = RIG_VFO_CURR);
  void setTs (shortfreq_t ts, vfo_t vfo = RIG_VFO_CURR);
  shortfreq_t getTs (vfo_t vfo = RIG_VFO_CURR);

  void setCTCSS (tone_t tone, vfo_t vfo = RIG_VFO_CURR);
  tone_t getCTCSS (vfo_t vfo = RIG_VFO_CURR);
  void setDCS (tone_t code, vfo_t vfo = RIG_VFO_CURR);
  tone_t getDCS (vfo_t vfo = RIG_VFO_CURR);

  void setCTCSSsql (tone_t tone, vfo_t vfo = RIG_VFO_CURR);
  tone_t getCTCSSsql (vfo_t vfo = RIG_VFO_CURR);
  void setDCSsql (tone_t tone, vfo_t vfo = RIG_VFO_CURR);
  tone_t getDCSsql (vfo_t vfo = RIG_VFO_CURR);


  unsigned int power2mW (float power, freq_t freq, rmode_t mode);
  float mW2power (unsigned int mwpower, freq_t freq, rmode_t mode);
  void setTrn (int trn);
  int getTrn (void);
  void setBank (int bank, vfo_t vfo = RIG_VFO_CURR);
  void setMem (int ch, vfo_t vfo = RIG_VFO_CURR);
  int getMem (vfo_t vfo = RIG_VFO_CURR);

  void setChannel (const channel_t *chan);
  void getChannel (channel_t *chan);

  void setPowerStat (powerstat_t status);
  powerstat_t getPowerStat (void);
  rmode_t RngRxModes (freq_t freq);
  rmode_t RngTxModes (freq_t freq);

  void setSplitFreq (freq_t tx_freq, vfo_t vfo = RIG_VFO_CURR);
  freq_t getSplitFreq (vfo_t vfo = RIG_VFO_CURR);
  void setSplitMode(rmode_t, pbwidth_t width = RIG_PASSBAND_NORMAL, vfo_t vfo = RIG_VFO_CURR);
  rmode_t getSplitMode(pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
  void setSplitFreqMode(freq_t, rmode_t, pbwidth_t width = RIG_PASSBAND_NORMAL, vfo_t vfo = RIG_VFO_CURR);
  freq_t getSplitFreqMode(rmode_t&, pbwidth_t&, vfo_t vfo = RIG_VFO_CURR);
  void setSplitVFO(split_t split, vfo_t vfo = RIG_VFO_CURR, vfo_t tx_vfo = RIG_VFO_CURR);
  split_t getSplitVFO(vfo_t &tx_vfo, vfo_t vfo = RIG_VFO_CURR);

  void setRit  (shortfreq_t rit, vfo_t vfo = RIG_VFO_CURR);
  shortfreq_t getRit  (vfo_t vfo = RIG_VFO_CURR);
  void setXit  (shortfreq_t xit, vfo_t vfo = RIG_VFO_CURR);
  shortfreq_t getXit  (vfo_t vfo = RIG_VFO_CURR);

  void setAnt  (ant_t ant, vfo_t vfo = RIG_VFO_CURR);
  ant_t getAnt  (vfo_t vfo = RIG_VFO_CURR);

  void sendDtmf  (const char *digits, vfo_t vfo = RIG_VFO_CURR);
  int recvDtmf  (char *digits, vfo_t vfo = RIG_VFO_CURR);
  void sendMorse  (const char *msg, vfo_t vfo = RIG_VFO_CURR);


  shortfreq_t getResolution (rmode_t mode);
  void reset (reset_t reset);

  // callbacks available in your derived object
  virtual int FreqEvent(vfo_t, freq_t, rig_ptr_t) const {
		  return RIG_OK;
  }
  virtual int ModeEvent(vfo_t, rmode_t, pbwidth_t, rig_ptr_t) const {
		  return RIG_OK;
  }
  virtual int VFOEvent(vfo_t, rig_ptr_t) const {
		  return RIG_OK;
  }
  virtual int PTTEvent(vfo_t, ptt_t, rig_ptr_t) const {
		  return RIG_OK;
  }
  virtual int DCDEvent(vfo_t, dcd_t, rig_ptr_t) const {
		  return RIG_OK;
  }


};



#ifdef __GNUG__
#  if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
#    if HAVE_TYPEINFO
#      include <typeinfo>
#    endif
#  endif
#endif

#if defined(__GNUG__)
#  if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
#    if ETIP_NEEDS_MATH_H
#      if ETIP_NEEDS_MATH_EXCEPTION
#        undef exception
#        define exception math_exception
#      endif
#      include <math.h>
#    endif
#    undef exception
#    define exception builtin_exception
#    if HAVE_GPP_BUILTIN_H
#     include <gpp/builtin.h>
#    elif HAVE_GXX_BUILTIN_H
#     include <g++/builtin.h>
#    else
#     include <builtin.h>
#    endif
#    undef exception
#  endif
#elif defined (__SUNPRO_CC)
#  include <generic.h>
#  include <string.h>
#else
#  include <string.h>
#endif


extern "C" {
#if HAVE_VALUES_H
#  include <values.h>
#endif

#include <assert.h>
#include <errno.h>
}

#include <iostream>
#if !(defined(__GNUG__)||defined(__SUNPRO_CC))
   extern "C" void exit(int);
#endif

// Forward Declarations

class BACKEND_IMPEXP RigException
{
public:
  const char *message;
  int errorno;

  RigException (const char* msg, int err)
    : message(msg), errorno (err)
    {};

  RigException (int err)
    : message(rigerror(err)), errorno (err)
    {};

  RigException (const char* msg)
    : message(msg), errorno (-RIG_EINTERNAL)
    {};

  virtual ~RigException()
    {};

  void print() const {
	  std::cerr << "Rig exception: " << message << std::endl;
  }
  virtual const char *classname() const {
    return "Rig";
  }
};

inline void THROW(const RigException *e) {
#if defined(__GNUG__)
#  if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
      (*lib_error_handler)(e?e->classname():"",e?e->message:"");
#else
      throw *e;
#endif
#elif defined(__SUNPRO_CC)
  genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
#else
  if (e)
    std::cerr << e->message << endl;
  exit(0);
#endif
}

#define THROWS(s)


#endif	// _RIGCLASS_H