// FTPDemoView.h : interface of the CFTPDemoView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_FTPDEMOVIEW_H__ECB8B10D_7F38_11D2_9CFF_080009EE62AA__INCLUDED_)
#define AFX_FTPDEMOVIEW_H__ECB8B10D_7F38_11D2_9CFF_080009EE62AA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CFTPDemoView : public CFormView
{
protected: // create from serialization only
	CFTPDemoView();
	DECLARE_DYNCREATE(CFTPDemoView)

public:
	virtual ~CFTPDemoView();
	CString m_LocalDir; // Name of local directory
	//{{AFX_DATA(CFTPDemoView)
	enum { IDD = IDD_FTPDEMO_FORM };
	CListCtrl	m_ClientList;
	CListCtrl	m_SrvrList;
	CString	m_URL;
	CString	m_Password;
	CString	m_Login;
	//}}AFX_DATA

// Attributes
public:
	CFTPDemoDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFTPDemoView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	// Helper functions:
	void CloseConnection();
	bool MakeConnection();
	void BuildFileList( CFileFind& Files, CListCtrl& List );
	void BuildClientFileList();
	void SetupList( CListCtrl& List );
	void BuildSrvrFileList();
	void SetControls();
	
	// Internet Access objects:
	CFtpConnection* m_FTPConnection;
	CInternetSession m_InternetSession;
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFTPDemoView)
	afx_msg void OnConnect();
	afx_msg void OnGet();
	afx_msg void OnSend();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in FTPDemoView.cpp
inline CFTPDemoDoc* CFTPDemoView::GetDocument()
   { return (CFTPDemoDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FTPDEMOVIEW_H__ECB8B10D_7F38_11D2_9CFF_080009EE62AA__INCLUDED_)
