1#ifndef GD77CALLSIGNDB_HH
2#define GD77CALLSIGNDB_HH
4#include "callsigndb.hh"
5#include "userdatabase.hh"
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition callsigndb.hh:20
CallsignDB(QObject *parent=nullptr)
Hidden constructor.
Definition callsigndb.cc:45
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition errorstack.hh:41
virtual ~GD77CallsignDB()
Destructor.
Definition gd77_callsigndb.cc:81
virtual bool encode(UserDatabase *calldb, const Selection &selection=Selection(), const ErrorStack &err=ErrorStack())
Encodes as many entries as possible of the given user-database.
Definition gd77_callsigndb.cc:86
GD77CallsignDB(QObject *parent=nullptr)
Constructor.
Definition gd77_callsigndb.cc:75
Represents the user information within the UserDatabase.
Definition userdatabase.hh:28
Auto-updating DMR user database.
Definition userdatabase.hh:23
void clear()
Resets the entry.
Definition gd77_callsigndb.cc:23
char name[8]
Call or name, up to 8 ASCII chars, 0x00 padded.
Definition gd77_callsigndb.hh:32
void setName(const QString &name)
Sets the name of the entry.
Definition gd77_callsigndb.cc:41
uint32_t number
DMR ID stored in BCD little-endian.
Definition gd77_callsigndb.hh:31
uint32_t getNumber() const
Returns the DMR ID for the entry.
Definition gd77_callsigndb.cc:28
void setNumber(uint32_t number)
Sets the DMR ID for the entry.
Definition gd77_callsigndb.cc:32
void fromEntry(const UserDatabase::User &user)
Constructs an entry from the given user.
Definition gd77_callsigndb.cc:46
userdb_entry_t()
Constructor.
Definition gd77_callsigndb.cc:18
QString getName() const
Returns the name of the entry.
Definition gd77_callsigndb.cc:37
char magic[8]
Fixed string 'ID-V001\0'.
Definition gd77_callsigndb.hh:59
void setSize(uint32_t n)
Sets the number of entries in the call-sign DB.
Definition gd77_callsigndb.cc:67
uint32_t count
Number of contacts in DB, 32bit little-endian.
Definition gd77_callsigndb.hh:60
void clear()
Resets the header.
Definition gd77_callsigndb.cc:61
userdb_t()
Constructor.
Definition gd77_callsigndb.cc:56