From e20e3a90e66832809c3b78fd17d19a0008d82378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Tue, 24 Sep 2019 23:11:05 +0800 Subject: A Qt Core based library that depends on libicclient and can be used for a Qt based project --- client.cxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 client.cxx (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx new file mode 100644 index 0000000..6cf6114 --- /dev/null +++ b/client.cxx @@ -0,0 +1,30 @@ +#include +#include "qicclient/client.hxx" + +namespace ICClient { + + Client::Client(char const* url, char const* certificate) + { + icclient_init(url, certificate); + } + + Client::~Client() + { + icclient_cleanup(); + } + + void Client::logIn(QString const& username, QString const& password) + { + icclient_login(username.toLatin1().constData() + , password.toLatin1().constData(), NULL, NULL + , NULL); + emit loggedIn(username); + } + + void Client::logOut() + { + icclient_logout(); + emit loggedOut(); + } + +} -- cgit v1.2.3