summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-11 11:58:33 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-11 11:58:33 +0300
commit92d9501792831f79263ba5b01b372d52ca48c2f2 (patch)
treebe4bc015de07f5b9dcb2e0e406eb1d4c02b079c9
parent71dcdadb1231ee3cd79cc880ae4cfb5e2c3ea641 (diff)
YAMN: useless class deleted
-rw-r--r--protocols/YAMN/YAMN.vcxproj1
-rw-r--r--protocols/YAMN/YAMN.vcxproj.filters3
-rw-r--r--protocols/YAMN/src/proto/netclient.h24
-rw-r--r--protocols/YAMN/src/proto/netlib.h27
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3.h8
-rw-r--r--protocols/YAMN/src/stdafx.h2
6 files changed, 21 insertions, 44 deletions
diff --git a/protocols/YAMN/YAMN.vcxproj b/protocols/YAMN/YAMN.vcxproj
index 0f6af4ca09..889075d551 100644
--- a/protocols/YAMN/YAMN.vcxproj
+++ b/protocols/YAMN/YAMN.vcxproj
@@ -65,7 +65,6 @@
<ClCompile Include="src\yamn.cpp" />
<ClInclude Include="src\browser\browser.h" />
<ClInclude Include="src\mails\decode.h" />
- <ClInclude Include="src\proto\netclient.h" />
<ClInclude Include="src\proto\netlib.h" />
<ClInclude Include="src\proto\pop3\pop3.h" />
<ClInclude Include="src\proto\pop3\pop3comm.h" />
diff --git a/protocols/YAMN/YAMN.vcxproj.filters b/protocols/YAMN/YAMN.vcxproj.filters
index 3d9a1b8eb9..522437edf9 100644
--- a/protocols/YAMN/YAMN.vcxproj.filters
+++ b/protocols/YAMN/YAMN.vcxproj.filters
@@ -61,9 +61,6 @@
<ClInclude Include="src\mails\decode.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\proto\netclient.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\proto\netlib.h">
<Filter>Header Files</Filter>
</ClInclude>
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
diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h
index b27689652b..98d6d40465 100644
--- a/protocols/YAMN/src/stdafx.h
+++ b/protocols/YAMN/src/stdafx.h
@@ -35,7 +35,7 @@
#include "resource.h"
#include "debug.h"
#include "version.h"
-#include "proto/netclient.h"
+
#include "proto/netlib.h"
#include "proto/pop3/pop3.h"
#include "proto/pop3/pop3comm.h"