diff --git a/include/qredis/client.h b/include/qredis/client.h index a0b49a0..f6296a2 100644 --- a/include/qredis/client.h +++ b/include/qredis/client.h @@ -2,20 +2,47 @@ #define QREDIS_CLIENT_H #include +#include +#include #include "qredis_export.h" namespace QRedis { + class QREDIS_EXPORT ClientPrivate; + + /** + * @brief Provides access to a Redis server. + */ class QREDIS_EXPORT Client : public QObject { Q_OBJECT public: + /** + * @brief Connects to a Redis server. + */ Client(); + + /** + * @brief Disconnects from the Redis server. + */ virtual ~Client(); + + void connectToHost(); + void disconnectFromHost(); + + Command * sendCommand(); + + signals: + + void connected(); + + private: + + const QScopedPointer d; }; } -#endif // QREDIS_CLIENT_H \ No newline at end of file +#endif // QREDIS_CLIENT_H diff --git a/include/qredis/command.h b/include/qredis/command.h new file mode 100644 index 0000000..e120a2c --- /dev/null +++ b/include/qredis/command.h @@ -0,0 +1,16 @@ +#ifndef QREDIS_COMMAND_H +#define QREDIS_COMMAND_H + +#include "qredis_export.h" + +namespace QRedis +{ + class QREDIS_EXPORT Command + { + public: + + //... + }; +} + +#endif // QREDIS_COMMAND_H diff --git a/src/client.cpp b/src/client.cpp index 88b2e8a..1bb96e1 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1,11 +1,21 @@ #include +#include "client_p.h" using namespace QRedis; Client::Client() + : d(new ClientPrivate) { } Client::~Client() { -} \ No newline at end of file +} + +void Client::connectToHost() +{ +} + +void Client::disconnectFromHost() +{ +} diff --git a/src/client_p.h b/src/client_p.h new file mode 100644 index 0000000..712430a --- /dev/null +++ b/src/client_p.h @@ -0,0 +1,16 @@ +#ifndef QREDIS_CLIENT_P_H +#define QREDIS_CLIENT_P_H + +#include + +namespace QRedis +{ + class ClientPrivate + { + public: + + QTcpSocket socket; + }; +} + +#endif // QREDIS_CLIENT_H