Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cClientFTPBase.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_cClientFTPBase_H
6 #define _INC_cClientFTPBase_H
7 #ifndef NO_PRAGMA_ONCE
8 #pragma once
9 #endif
10 
11 #include "../GrayFTPInt.h"
13 
14 namespace GrayFTP
15 {
17  {
21  LOG_ATTR2_CONNECT = 0x0002,
22  LOG_ATTR2_USER = 0x0004,
23  LOG_ATTR2_HACK = 0x0008,
24 
25  LOG_ATTR2_RX_FILE = 0x0010,
26  LOG_ATTR2_TX_FILE = 0x0020,
27  LOG_ATTR2_DIR_MOD = 0x0040,
28 
29  LOG_ATTR2_CMD = 0x0100,
30  LOG_ATTR2_CMD_MAJ = 0x0200,
31  LOG_ATTR2_CMD_ERR = 0x0400,
32  };
33 
34  class cClientFTPBase : public cRefBase, public cProtocolStream
35  {
39 
40  typedef cProtocolStream SUPER_t;
41 
42  public:
44  public:
45  cClientFTPBase(IProtocolFactory* pFactory, IUnkObject* pServerConnection, cStreamInput* pStreamInp, cStreamOutput* pStreamOut)
46  : cProtocolStream(pFactory, pServerConnection, pStreamInp, pStreamOut)
47  , m_timeLast(cTimeSys::GetTimeNow())
48  {
49  }
50  virtual ~cClientFTPBase()
51  {
52  }
53 
54  HASHCODE_t get_HashCode() const noexcept
55  {
56  return SUPER_t::get_HashCode();
57  }
59  {
60  return static_cast<cNetServerConnection*>(m_pServerConnection);
61  }
62 
64  };
65 
66 }
67 #endif
Definition: cClientFTPBase.h:35
cNetServerConnection * get_NetStream() const
Definition: cClientFTPBase.h:58
cClientFTPBase(IProtocolFactory *pFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
Definition: cClientFTPBase.h:45
TIMESYS_t m_timeLast
time of last command/action.
Definition: cClientFTPBase.h:43
HASHCODE_t get_HashCode() const noexcept
Definition: cClientFTPBase.h:54
virtual ~cClientFTPBase()
Definition: cClientFTPBase.h:50
Definition: cNetServer.h:52
Definition: cProtocol.h:24
IUnkObject *const m_pServerConnection
the cNetServerConnection or other top level parent for this protocol.
Definition: cProtocol.h:35
HASHCODE_t get_HashCode() const noexcept
Definition: cProtocol.h:48
Definition: cRefPtr.h:22
Definition: cStream.h:306
Definition: cStream.h:126
Definition: cTimeSys.h:93
Definition: cFTPAccount.h:14
LOG_ATTR2_TYPE_
Definition: cClientFTPBase.h:17
@ LOG_ATTR2_CMD
All commands and responses.
Definition: cClientFTPBase.h:29
@ LOG_ATTR2_CONNECT
Connects and disconnects.
Definition: cClientFTPBase.h:21
@ LOG_ATTR2_RX_FILE
Received files.
Definition: cClientFTPBase.h:25
@ LOG_ATTR2_HACK
Odd things seen that could be hacking.
Definition: cClientFTPBase.h:23
@ LOG_ATTR2_CMD_ERR
Command error responses.
Definition: cClientFTPBase.h:31
@ LOG_ATTR2_DIR_MOD
Modifications to the directory structure.
Definition: cClientFTPBase.h:27
@ LOG_ATTR2_TX_FILE
Transmitted files.
Definition: cClientFTPBase.h:26
@ LOG_ATTR2_USER
Users logging in and out.
Definition: cClientFTPBase.h:22
@ LOG_ATTR2_SYS_ERR
Definition: cClientFTPBase.h:20
@ LOG_ATTR2_CMD_MAJ
Major commands.
Definition: cClientFTPBase.h:30
UINT_PTR HASHCODE_t
could hold a pointer converted to a number? maybe 64 or 32 bit ? same as size_t.
Definition: GrayCore.h:116
UINT32 TIMESYS_t
TIMESYS_t = The normal system tick timer. milli-seconds since start of system/app ?
Definition: cTimeSys.h:27
Definition: cProtocol.h:125