1 #ifndef TYTCALLSIGNDB_HH
2 #define TYTCALLSIGNDB_HH
5 #include "callsigndb.hh"
6 #include "userdatabase.hh"
46 explicit Entry(uint8_t *ptr);
53 virtual void set(
unsigned id,
unsigned index);
71 virtual void setIndexEntry(
unsigned n,
unsigned id,
unsigned index);
116 virtual void setIndexEntry(
unsigned n,
unsigned id,
unsigned index);
Controls the selection of callsigns from the UserDatabase to be encoded into the callsign db.
Definition: callsigndb.hh:20
Abstract base class of all callsign database implementations.
Definition: callsigndb.hh:14
Represents the abstract base class of all codeplug elements.
Definition: codeplug.hh:47
uint32_t size() const
Returns the total size of the DFU file.
Definition: dfufile.cc:50
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Represents an entry within the call-sign database.
Definition: tyt_callsigndb.hh:81
virtual void set(const UserDatabase::User &user)
Encodes the given user.
Definition: tyt_callsigndb.cc:115
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_callsigndb.cc:110
virtual ~EntryElement()
Destructor.
Definition: tyt_callsigndb.cc:105
EntryElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_callsigndb.cc:93
Represents an index entry, a pair of DMR ID and call-sign DB index.
Definition: tyt_callsigndb.hh:39
Entry(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_callsigndb.cc:60
virtual void set(unsigned id, unsigned index)
Sets the index entry.
Definition: tyt_callsigndb.cc:82
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_callsigndb.cc:77
virtual ~Entry()
Destructor.
Definition: tyt_callsigndb.cc:72
Represents a search index over the complete call-sign database.
Definition: tyt_callsigndb.hh:31
virtual ~IndexElement()
Destructor.
Definition: tyt_callsigndb.cc:32
virtual void setIndexEntry(unsigned n, unsigned id, unsigned index)
Sets the given index entry.
Definition: tyt_callsigndb.cc:52
virtual void setNumEntries(unsigned n)
Sets the number of entries in the DB.
Definition: tyt_callsigndb.cc:44
void clear()
Abstract method to reset the element within the codeplug.
Definition: tyt_callsigndb.cc:37
IndexElement(uint8_t *ptr, size_t size)
Hidden constructor.
Definition: tyt_callsigndb.cc:20
Base class for all call-sign DBs of TyT/Retevis devices.
Definition: tyt_callsigndb.hh:21
virtual void setIndexEntry(unsigned n, unsigned id, unsigned index)
Sets the given index entry.
Definition: tyt_callsigndb.cc:210
TyTCallsignDB(QObject *parent=nullptr)
Hidden constructor.
Definition: tyt_callsigndb.cc:136
virtual void clearIndex()
Clears the call-sign DB index.
Definition: tyt_callsigndb.cc:200
virtual void allocate(unsigned n)
Allocates required space for index and n call-signs.
Definition: tyt_callsigndb.cc:189
bool encode(UserDatabase *db, const Selection &selection, const ErrorStack &err=ErrorStack())
Encodes the given user db into the device specific callsign db.
Definition: tyt_callsigndb.cc:148
virtual ~TyTCallsignDB()
Destructor.
Definition: tyt_callsigndb.cc:143
virtual void setNumEntries(unsigned n)
Sets the number of entries in the DB.
Definition: tyt_callsigndb.cc:205
virtual void setEntry(unsigned n, const UserDatabase::User &user)
Sets a given call-sign entry.
Definition: tyt_callsigndb.cc:215
Represents the user information within the UserDatabase.
Definition: userdatabase.hh:28
Auto-updating DMR user database.
Definition: userdatabase.hh:23