From a19e9744751d4278f56cb3b6ff885c0068f03a3d Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sun, 27 Nov 2011 12:31:03 +0200 Subject: File downloading (no MD5 hash check yet). Various fixes --- client/SslClient.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'client/SslClient.h') diff --git a/client/SslClient.h b/client/SslClient.h index 8172bad..a6b981c 100644 --- a/client/SslClient.h +++ b/client/SslClient.h @@ -88,13 +88,13 @@ public: }; /** - * @brief setup ssl socket ans it's type, certificates and key
+ * @brief Setup ssl socket ans it's type, certificates and key
* Default server address will be used: 127.0.0.1 */ SslClient(); /** - * @brief setup ssl socket ans it's type, certificates and key + * @brief Setup ssl socket and it's type, certificates and key * @param addr server address or hostname to connect to */ SslClient(QString addr); @@ -106,15 +106,22 @@ public: void SetServerAddr(QString addr); /** - * @brief Request generic proxy list + * @brief Send request to server * @param type type of request to send */ void SendRequest(RequestType type); + /** + * @brief Send file data request (RequestType::RegularFile) + * @param File name on client machine (will be sent to server) + */ + void SendFileRequest(string filename); + /** * @brief disconnect from server */ void Disconnect(); + signals: /** * @brief This signal is emited when data is recieved as a reply to @@ -128,6 +135,7 @@ signals: * @todo emit this signal on all SSL errors too */ void ConnectionError(); + private slots: void Connected(); void Disconnected(); @@ -135,9 +143,12 @@ private slots: void Error(QAbstractSocket::SocketError socketError); void PeerVerifyError(const QSslError &error); void SslErrors(const QList &errors); + +protected: + QString server; + private: QSslSocket sslSocket; - QString server; unsigned short port; }; -- cgit v1.2.3