libdrmconf
0.15.1
A library to program DMR radios.
Toggle main menu visibility
Loading...
Searching...
No Matches
callsigndb.hh
1
#ifndef CALLSIGNDB_HH
2
#define CALLSIGNDB_HH
3
4
#include "dfufile.hh"
5
#include "transferflags.hh"
6
7
8
// Forward decl.
9
class
UserDatabase
;
10
15
class
CallsignDB
:
public
DFUFile
16
{
17
Q_OBJECT
18
19
public
:
22
class
Flags
:
public
TransferFlags
{
23
public
:
25
Flags
(int64_t count=-1);
27
Flags
(
const
Flags
&other);
28
30
bool
hasCountLimit
()
const
;
32
size_t
countLimit
()
const
;
34
void
setCountLimit
(
size_t
n);
36
void
clearCountLimit
();
37
38
protected
:
41
int64_t
_count
;
42
};
43
44
protected
:
46
explicit
CallsignDB
(QObject *parent=
nullptr
);
47
48
public
:
50
virtual
~CallsignDB
();
51
53
virtual
bool
encode
(
UserDatabase
*db,
const
Flags
&selection=
Flags
(),
54
const
ErrorStack
&err=
ErrorStack
()) = 0;
55
};
56
57
#endif
// CALLSIGNDB_HH
CallsignDB::Flags
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition
callsigndb.hh:22
CallsignDB::Flags::clearCountLimit
void clearCountLimit()
Clears the count limit.
Definition
callsigndb.cc:37
CallsignDB::Flags::hasCountLimit
bool hasCountLimit() const
Returns true if the selection has a limit on the number of callsigns to encode.
Definition
callsigndb.cc:20
CallsignDB::Flags::_count
int64_t _count
Specifies the maximum amount of callsigns to add.
Definition
callsigndb.hh:41
CallsignDB::Flags::countLimit
size_t countLimit() const
Returns the limit of callsigns to encode.
Definition
callsigndb.cc:25
CallsignDB::Flags::setCountLimit
void setCountLimit(size_t n)
Sets the count limit.
Definition
callsigndb.cc:32
CallsignDB::Flags::Flags
Flags(int64_t count=-1)
Constructor.
Definition
callsigndb.cc:7
CallsignDB::CallsignDB
CallsignDB(QObject *parent=nullptr)
Hidden constructor.
Definition
callsigndb.cc:45
CallsignDB::~CallsignDB
virtual ~CallsignDB()
Destructor.
Definition
callsigndb.cc:51
CallsignDB::encode
virtual bool encode(UserDatabase *db, const Flags &selection=Flags(), const ErrorStack &err=ErrorStack())=0
Encodes the given user db into the device specific callsign db.
DFUFile::DFUFile
DFUFile(QObject *parent=nullptr)
Constructs an empty DFU file object.
Definition
dfufile.cc:45
ErrorStack
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition
errorstack.hh:43
TransferFlags::TransferFlags
TransferFlags()
Default constructor.
Definition
transferflags.cc:3
UserDatabase
Auto-updating DMR user database.
Definition
userdatabase.hh:24
lib
callsigndb.hh
Generated by
1.17.0