summaryrefslogtreecommitdiffstats
path: root/pica-client/accounts.h
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-06-17 21:15:12 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-06-17 21:15:12 +0000
commit8df9466ada46e4b07990b9cb7e8b1cd61b96844a (patch)
tree2cb652e5839bed672133ffa90e7ad477f55cfb6b /pica-client/accounts.h
downloadpica-pica-8df9466ada46e4b07990b9cb7e8b1cd61b96844a.tar.gz
pica-pica-8df9466ada46e4b07990b9cb7e8b1cd61b96844a.zip
todo list update
git-svn-id: svn://localhost/project_picapica/trunk@128 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/accounts.h')
-rw-r--r--pica-client/accounts.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/pica-client/accounts.h b/pica-client/accounts.h
new file mode 100644
index 0000000..1205583
--- /dev/null
+++ b/pica-client/accounts.h
@@ -0,0 +1,35 @@
+#ifndef ACCOUNTS_H
+#define ACCOUNTS_H
+
+#include <QString>
+#include <QtSql>
+#include <QSqlDatabase>
+#include <QStringList>
+
+class Accounts
+{
+public:
+ struct AccountRecord
+ {
+ quint32 id;
+ QString name;
+ QString cert_file;
+ QString pkey_file;
+ QString CA_file;
+ };
+
+ Accounts(QString storage);
+ void Add(AccountRecord& acc);
+ void Delete(quint32 id);
+ QList<AccountRecord> GetAccounts();
+ bool isOK();
+ QString GetLastError();
+
+ static bool CheckFiles(AccountRecord& acc, QString &error_string);
+
+private:
+ QSqlDatabase dbconn;
+ QSqlError lasterr;
+};
+
+#endif // ACCOUNTS_H