diff options
Diffstat (limited to 'pica-client/contacts.h')
| -rw-r--r-- | pica-client/contacts.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pica-client/contacts.h b/pica-client/contacts.h index f3f7663..34c7742 100644 --- a/pica-client/contacts.h +++ b/pica-client/contacts.h @@ -9,23 +9,35 @@ class Contacts { public: + + enum ContactType + { + temporary = 0, + regular = 1, + blacklisted = 2 + }; + struct ContactRecord { QByteArray id; QString name; + + ContactType type; }; Contacts(QString storage, QByteArray user_account_id); - void Add(QByteArray id); + bool Exists(QByteArray id); + void Add(QByteArray id, ContactType type = regular); void Delete(QByteArray id); - QList<ContactRecord> GetContacts(); + QList<ContactRecord> GetContacts(ContactType type = regular); QString GetContactCert(QByteArray id); QString GetContactName(QByteArray id); void SetContactCert(QByteArray id, QString &cert_pem); void SetContactName(QByteArray id, QString name); QString GetLastError(); bool isOK(); + private: QSqlDatabase dbconn; QSqlError lasterr; |
