diff options
Diffstat (limited to 'core/device.h')
-rw-r--r-- | core/device.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/core/device.h b/core/device.h index 4c202bee5..4906a2a49 100644 --- a/core/device.h +++ b/core/device.h @@ -21,4 +21,37 @@ extern void clear_device_nodes(); } #endif +// Functions and global variables that are only available to C++ code +#ifdef __cplusplus + +#include <QString> +#include <QVector> +class DiveComputerNode { +public: + bool operator==(const DiveComputerNode &a) const; + bool operator!=(const DiveComputerNode &a) const; + bool operator<(const DiveComputerNode &a) const; + void showchanges(const QString &n, const QString &s, const QString &f) const; + QString model; + uint32_t deviceId; + QString serialNumber; + QString firmware; + QString nickName; +}; + +class DiveComputerList { +public: + const DiveComputerNode *getExact(const QString &m, uint32_t d); + const DiveComputerNode *get(const QString &m); + void addDC(QString m, uint32_t d, QString n = QString(), QString s = QString(), QString f = QString()); + + // Keep the dive computers in a vector sorted by (model, deviceId) + QVector<DiveComputerNode> dcs; +}; + +QString get_dc_nickname(const struct divecomputer *dc); +extern DiveComputerList dcList; + +#endif + #endif // DEVICE_H |