summaryrefslogtreecommitdiff
path: root/qicclient/client.hxx
blob: 4994ad92ec84a9e55972af2022fe41ba5f1fa976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef QRTCLIENT_CLIENT_HXX
#define QRTCLIENT_CLIENT_HXX

#include <QObject>
#include <icclient/product.h>

struct icclient_catalog;

namespace ICClient {

	class Client : public QObject
	{
		Q_OBJECT

		public:
			Client(char const* url, char const* certificate = nullptr);
			~Client();

			void allProducts(icclient_catalog** catalogptr
					, size_t (*callback)(void* contents
						, size_t size, size_t nmemb
						, void* userdata));

		public slots:
			void logIn(QString const& username, QString const& password);
			void logOut();

		signals:
			void gotAllProducts(icclient_catalog* catalog);
			void loggedIn(QString const& username);
			void loggedOut();
	};

}

#endif // QRTCLIENT_CLIENT_HXX