Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

A Complete FTP Server

, 30 May 2005
This article presents a fully functional implementation of a FTP server.
#if !defined(AFX_USERMANAGER_H__80FCDEAE_C56D_4E25_998D_8BE0511F7C10__INCLUDED_)
#define AFX_USERMANAGER_H__80FCDEAE_C56D_4E25_998D_8BE0511F7C10__INCLUDED_

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


class CUser : public CObject
{
	DECLARE_SERIAL(CUser)

	CUser();
	virtual ~CUser();

public:
	virtual void Serialize(CArchive&);
	CUser (const CUser &user);				// copy-constructor
	CUser &operator=(const CUser &user);	// =-operator

	CString m_strName;
	CString m_strPassword;

	BOOL m_bAccountDisabled;

	CString m_strHomeDirectory;
	BOOL m_bAllowDownload;
	BOOL m_bAllowUpload;
	BOOL m_bAllowRename;
	BOOL m_bAllowDelete;
	BOOL m_bAllowCreateDirectory;
};



class CUserManager  
{
public:
	void GetUserList(CArray<CUser, CUser&>&array);
	void UpdateUserList(CArray<CUser, CUser&>&array);
	CUserManager();
	virtual ~CUserManager();
	
	CArray<CUser, CUser&> m_UserArray;

	BOOL Serialize(BOOL bStoring);
	BOOL GetUser(LPCTSTR lpszUser, CUser &user);
protected:
	CString m_strFilename;
	CCriticalSection m_CriticalSection;
};

#endif // !defined(AFX_USERMANAGER_H__80FCDEAE_C56D_4E25_998D_8BE0511F7C10__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Pablo van der Meer
Web Developer
Netherlands Netherlands
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 30 May 2005
Article Copyright 2002 by Pablo van der Meer
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid