~ubuntu-branches/debian/sid/filezilla/sid

« back to all changes in this revision

Viewing changes to src/engine/transfersocket.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Cécile (Le_Vert)
  • Date: 2008-07-05 21:00:24 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080705210024-mvzp21zlyheschi6
Tags: 3.0.11.1-1
* wxWidgets 2.8 just entered unstable ! Upload to unstable.
* New upstream release.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define __TRANSFERSOCKET_H__
3
3
 
4
4
#include "iothread.h"
 
5
#include "backend.h"
 
6
#include "ControlSocket.h"
5
7
 
6
8
class CFileZillaEnginePrivate;
7
9
class CFtpControlSocket;
16
18
};
17
19
 
18
20
class CIOThread;
 
21
class CTlsSocket;
19
22
class CTransferSocket : public wxEvtHandler
20
23
{
21
24
public:
31
34
 
32
35
        bool m_binaryMode;
33
36
 
 
37
        enum TransferEndReason GetTransferEndreason() const { return m_transferEndReason; }
 
38
 
34
39
protected:
35
40
        bool CheckGetNextWriteBuffer();
36
41
        bool CheckGetNextReadBuffer();
37
42
        void FinalizeWrite();
38
43
 
39
 
        void TransferEnd(int reason);
 
44
        void TransferEnd(enum TransferEndReason reason);
 
45
 
 
46
        bool InitBackend();
 
47
        bool InitTls(const CTlsSocket* pPrimaryTlsSocket);
40
48
 
41
49
        virtual void OnSocketEvent(wxSocketEvent &event);
42
50
        virtual void OnConnect(wxSocketEvent &event);
47
55
 
48
56
        // Create a socket server
49
57
        wxSocketServer* CreateSocketServer();
 
58
        wxSocketServer* CreateSocketServer(const wxIPV4address& addr);
 
59
 
 
60
        void SetSocketBufferSizes(wxSocketBase* pSocket);
50
61
 
51
62
        DECLARE_EVENT_TABLE();
52
63
 
53
64
        wxSocketBase *m_pSocket; // Will point to either client or server socket
54
65
 
55
 
        // Only one of the following will be non-zero
56
 
        wxSocketClient *m_pSocketClient;
 
66
        // Will be set only while creating active mode connections
57
67
        wxSocketServer *m_pSocketServer;
58
68
 
59
69
        CFileZillaEnginePrivate *m_pEngine;
60
70
        CFtpControlSocket *m_pControlSocket;
61
71
 
62
72
        bool m_bActive;
63
 
        bool m_transferEnd; // Set to true if TransferEnd was called
 
73
        enum TransferEndReason m_transferEndReason;
64
74
 
65
75
        enum TransferMode m_transferMode;
66
76
 
74
84
 
75
85
        bool m_postponedReceive;
76
86
        bool m_postponedSend;
 
87
        void TriggerPostponedEvents();
 
88
 
 
89
        CBackend* m_pBackend;
 
90
 
 
91
        CTlsSocket* m_pTlsSocket;
 
92
        bool m_shutdown;
 
93
 
 
94
        // Needed for the madeProgress field in CTransferStatus
 
95
        // Initially 0, 2 if made progress
 
96
        // On uploads, 1 after first WSAE_WOULDBLOCK
 
97
        int m_madeProgress;
77
98
};
78
99
 
79
100
#endif