diff options
Diffstat (limited to 'pica-client/contacts.h')
| -rw-r--r-- | pica-client/contacts.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pica-client/contacts.h b/pica-client/contacts.h new file mode 100644 index 0000000..54042b5 --- /dev/null +++ b/pica-client/contacts.h @@ -0,0 +1,34 @@ +#ifndef CONTACTS_H +#define CONTACTS_H + +#include <QString> +#include <QtSql> +#include <QSqlDatabase> +#include <QStringList> + +class Contacts +{ +public: + struct ContactRecord + { + quint32 id; + QString name; + }; + + Contacts(QString storage, quint32 user_account_id); + + void Add(quint32 id); + void Delete(quint32 id); + QList<ContactRecord> GetContacts(); + QString GetContactCert(quint32 id); + void SetContactCert(quint32 id, QString &cert_pem); + void SetContactName(quint32 id, QString name); + QString GetLastError(); + bool isOK(); +private: + QSqlDatabase dbconn; + QSqlError lasterr; + quint32 account_id_; +}; + +#endif // CONTACTS_H |
