diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-24 23:11:05 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-24 23:11:05 +0800 |
| commit | e20e3a90e66832809c3b78fd17d19a0008d82378 (patch) | |
| tree | ac03dba8eedee6ef3a6ad2093391ace8892a14cd /client.cxx | |
A Qt Core based library that depends on libicclient
and can be used for a Qt based project
Diffstat (limited to 'client.cxx')
| -rw-r--r-- | client.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
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 <icclient/client.h> +#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(); + } + +} |