diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-11 11:58:33 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-11 11:58:33 +0300 |
commit | 92d9501792831f79263ba5b01b372d52ca48c2f2 (patch) | |
tree | be4bc015de07f5b9dcb2e0e406eb1d4c02b079c9 /protocols/YAMN/src/proto | |
parent | 71dcdadb1231ee3cd79cc880ae4cfb5e2c3ea641 (diff) |
YAMN: useless class deleted
Diffstat (limited to 'protocols/YAMN/src/proto')
-rw-r--r-- | protocols/YAMN/src/proto/netclient.h | 24 | ||||
-rw-r--r-- | protocols/YAMN/src/proto/netlib.h | 27 | ||||
-rw-r--r-- | protocols/YAMN/src/proto/pop3/pop3.h | 8 |
3 files changed, 20 insertions, 39 deletions
diff --git a/protocols/YAMN/src/proto/netclient.h b/protocols/YAMN/src/proto/netclient.h deleted file mode 100644 index 920c48fbc0..0000000000 --- a/protocols/YAMN/src/proto/netclient.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __CLIENT_H -#define __CLIENT_H - -class CNetClient -{ -public: - CNetClient(): Stopped(FALSE) {} - virtual ~CNetClient() {} - - virtual void Connect(const char* servername, const int port)=0; - virtual void Send(const char *query)=0; - virtual char* Recv(char *buf= nullptr, int buflen=65536)=0; - virtual void Disconnect()=0; - virtual BOOL Connected()=0; - virtual void SSLify()=0; - - BOOL Stopped; - int Rcv; - uint32_t NetworkError; - uint32_t SystemError; - BOOL ifTLSed; -}; - -#endif diff --git a/protocols/YAMN/src/proto/netlib.h b/protocols/YAMN/src/proto/netlib.h index 141fdc84ba..ab0ff11a4c 100644 --- a/protocols/YAMN/src/proto/netlib.h +++ b/protocols/YAMN/src/proto/netlib.h @@ -1,23 +1,28 @@ #ifndef __NETLIB_H #define __NETLIB_H -class CNLClient: public CNetClient +class CNLClient : public MZeroedObject { + HNETLIBCONN hConnection; + BOOL isTLSed; + + int LocalNetlib_Send(HNETLIBCONN hConn, const char *buf, int len, int flags); + int LocalNetlib_Recv(HNETLIBCONN hConn, char *buf, int len, int flags); + public: - CNLClient() {} - void Connect(const char* servername, const int port); + void Connect(const char *servername, const int port); void Send(const char *query); - char* Recv(char *buf= nullptr, int buflen = 65536); + char *Recv(char *buf = nullptr, int buflen = 65536); void Disconnect(); void SSLify(); - - inline BOOL Connected() {return hConnection != nullptr;} -protected: - HNETLIBCONN hConnection = nullptr; - BOOL isTLSed = false; - int LocalNetlib_Send(HNETLIBCONN hConn, const char *buf, int len, int flags); - int LocalNetlib_Recv(HNETLIBCONN hConn, char *buf, int len, int flags); + bool Connected() const { return hConnection != nullptr; } + + BOOL Stopped; + int Rcv; + uint32_t NetworkError; + uint32_t SystemError; + BOOL ifTLSed; }; void SSL_DebugLog(const char *fmt, ...); diff --git a/protocols/YAMN/src/proto/pop3/pop3.h b/protocols/YAMN/src/proto/pop3/pop3.h index 963a584d30..ae7ca29b8c 100644 --- a/protocols/YAMN/src/proto/pop3/pop3.h +++ b/protocols/YAMN/src/proto/pop3/pop3.h @@ -18,6 +18,9 @@ class CPop3Client { + BOOL SearchFromEnd(char *end, int bs, int mode); + BOOL SearchFromStart(char *end, int bs, int mode); + public: CPop3Client(): NetClient(nullptr), Stopped(FALSE) {} ~CPop3Client() { delete NetClient; } @@ -40,10 +43,7 @@ public: BOOL Stopped; uint32_t POP3Error; - class CNetClient *NetClient; //here the network layout is defined (TCP or SSL+TCP etc.) -private: - BOOL SearchFromEnd(char *end,int bs,int mode); - BOOL SearchFromStart(char *end,int bs,int mode); + CNLClient *NetClient; //here the network layout is defined (TCP or SSL+TCP etc.) }; enum |