Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayFTP::cFTPAccount Class Reference

#include <cFTPAccount.h>

Inheritance diagram for GrayFTP::cFTPAccount:
Gray::cRefBase IUnknown

Public Member Functions

 cFTPAccount (const char *pszAccount, const char *pszPass, const char *pszGroup)
 
virtual ~cFTPAccount ()
 
StrLen_t MakeGroupRegName (FILECHAR_t *pszRegPath, const char *pszGroupName) const
 
StrLen_t GetSubGroups (const char *pszGroup, char *pszGroups, StrLen_t iLenMax) const
 
bool IsSubGroup (const char *pszGroup, const char *pszSubGroup) const
 
const char * SeparateGroupPath (char *pszGroup, const char *pszUserPath) const
 
cStringA get_Name () const
 
bool isAnon () const
 
bool CheckPass (const char *pszPass)
 
StrLen_t LoginGreet (cClientFTP *pClient, char *pszGreet, StrLen_t iSizeMax)
 
HTTPRET_TYPE CheckRights (const char *pszUserPath, FILECHAR_t *pszSysPath, StrLen_t nLenSysMax, cClientFTP *pClient, FTP_PRIV_MASK &wRights) const
 
StrLen_t ListGroups (const char *pszUserPath, char *pBuffer, StrLen_t iSizeMax, bool bVerbose, TZ_TYPE nTZDisp)
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 

Static Public Member Functions

static StrLen_t GRAYCALL MakeRegName (FILECHAR_t *pszRegPath, const char *pszBase, const char *pszBranch)
 

Detailed Description

Each user can have different exposure/rights to the folder structure. Read Account info as needed from the registry.

Constructor & Destructor Documentation

◆ cFTPAccount()

GrayFTP::cFTPAccount::cFTPAccount ( const char *  pszAccount,
const char *  pszPass,
const char *  pszGroup 
)

◆ ~cFTPAccount()

GrayFTP::cFTPAccount::~cFTPAccount ( )
virtual

Member Function Documentation

◆ CheckPass()

bool GrayFTP::cFTPAccount::CheckPass ( const char *  pszPass)

We are attempting to login to this account. plain text. Is this the correct password for the account they say.

◆ CheckRights()

HTTPRET_TYPE GrayFTP::cFTPAccount::CheckRights ( const char *  pszUserPath,
FILECHAR_t pszSysPath,
StrLen_t  nLenSysMax,
cClientFTP pClient,
FTP_PRIV_MASK wRights 
) const

Convert the pszUserPath to pszSysPath What rights do i have in this user path. pszUserPath is always based on the users root.

Note
ASSUME the UserPath is valid character wise ! No need to check if this exists.
Returns
The system path equiv. in pszSysPath The access rights i have to this dir (if any) FTP_PRIV_LIST

◆ get_Name()

cStringA GrayFTP::cFTPAccount::get_Name ( ) const
inline

◆ GetSubGroups()

StrLen_t GrayFTP::cFTPAccount::GetSubGroups ( const char *  pszGroup,
char *  pszGroups,
StrLen_t  iLenMax 
) const

Get list of sub groups for this group. Not parsed. NOTE: if pszGroupName is empty then use the account as base.

◆ isAnon()

bool GrayFTP::cFTPAccount::isAnon ( ) const
inline

◆ IsSubGroup()

bool GrayFTP::cFTPAccount::IsSubGroup ( const char *  pszGroup,
const char *  pszSubGroup 
) const

is pszSubGroup a sub group of pszGroupName NOTE: if pszGroupName is empty then use the account as base.

◆ ListGroups()

StrLen_t GrayFTP::cFTPAccount::ListGroups ( const char *  pszUserPath,
char *  pBuffer,
StrLen_t  iSizeMax,
bool  bVerbose,
TZ_TYPE  nTZDisp 
)

Get the list of sub groups belonging to this group.

Returns
the size of the data transfered.

◆ LoginGreet()

StrLen_t GrayFTP::cFTPAccount::LoginGreet ( cClientFTP pClient,
char *  pszGreet,
StrLen_t  iSizeMax 
)

Load all account params. Get my greeting.

◆ MakeGroupRegName()

StrLen_t GrayFTP::cFTPAccount::MakeGroupRegName ( FILECHAR_t pszRegPath,
const char *  pszGroupName 
) const

◆ MakeRegName()

StrLen_t GrayFTP::cFTPAccount::MakeRegName ( FILECHAR_t pszRegPath,
const char *  pszBase,
const char *  pszBranch 
)
static

Make a registry path name for the account. Assuming the account is stored in the registry _MAX_PATH

◆ SeparateGroupPath()

const char * GrayFTP::cFTPAccount::SeparateGroupPath ( char *  pszGroup,
const char *  pszUserPath 
) const

Separate a group path from pszUserPath

Returns
pszGroup = resultant group. (may be empty) Directory part of path. nullptr = group only i guess.

The documentation for this class was generated from the following files: