removed lots of signals/slots

This commit is contained in:
csoler 2021-12-05 22:14:19 +01:00
parent bb37e2692b
commit e75d312724
20 changed files with 401 additions and 335 deletions

View file

@ -40,12 +40,20 @@ namespace Tor
class TorControlCommand;
class TorControlSocketClient
{
public:
virtual void socketError(const std::string& s) = 0;
};
class TorControlSocket : public RsThreadedTcpSocket
{
public:
explicit TorControlSocket(const std::string& tcp_address,uint16_t tcp_port);
explicit TorControlSocket(TorControlSocketClient *client);
virtual ~TorControlSocket();
void connect(const std::string& tcp_address,uint16_t tcp_port);
std::string errorMessage() const { return m_errorMessage; }
void connectToHost(const std::string& tcp_address,uint16_t tcp_port);
@ -62,7 +70,9 @@ public:
std::string peerAddress() const;
//signals:
void error(const std::string& message);
// void error(const std::string& message);
const std::string& errorString() const { return m_errorMessage ;}
//private slots:
void process();
@ -74,6 +84,7 @@ private:
std::string m_errorMessage;
TorControlCommand *currentCommand;
bool inDataReply;
TorControlSocketClient *mClient;
void setError(const std::string& message);
};