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

#include <cManifestDir.h>

Inheritance diagram for GrayLib::cManifestBuilder:
GrayLib::cSyncBuilder GrayX::cCmdManifestBuild

Public Member Functions

 cManifestBuilder (cManifestContext &context)
 
virtual ~cManifestBuilder ()
 
HRESULT DoBuildManifest (const FILECHAR_t *pszRelativePath=nullptr)
 
 UNITTEST_FRIEND (cManifestDir)
 

Public Attributes

cManifestContextm_Context
 Config info regarding my root and preferences. More...
 
bool m_bTrustCRC
 trust manifest CRC if file matches by date & size. so don't bother recalculating CRC. default=true. More...
 
cArraySortString< FILECHAR_t > * m_pChangeList
 Don't trust these paths. Assume they have changed. nullptr = descend all directories. More...
 
int m_iChanges
 Count changes for the last DoBuildManifest. More...
 

Protected Member Functions

bool isTrustedDir (const FILECHAR_t *pszDirPath) const
 
virtual HRESULT onFilePrep (cManifestDir *pManLocal, cFileFindEntry &FileEntry, cManifestElem *pElementOld)
 override these to process the manifests differently. More...
 
virtual HRESULT onDirComplete (cManifestDir *pManLocal, HRESULT hRes)
 
virtual HRESULT onChangeManifest (cManifestDir *pManLocal, const FILECHAR_t *pszElemName)
 

Protected Attributes

cStreamProgressF m_ManProgress
 How far into processing the full tree are we? More...
 

Friends

class cManifestDir
 

Detailed Description

Build/check all the manifests for the root. Override the virtual onDirComplete() to add extra processing to the manifest building. Override the virtual onFilePrep() to exclude files/directories from the manifest.

Constructor & Destructor Documentation

◆ cManifestBuilder()

GrayLib::cManifestBuilder::cManifestBuilder ( cManifestContext context)

◆ ~cManifestBuilder()

GrayLib::cManifestBuilder::~cManifestBuilder ( )
virtual

Member Function Documentation

◆ DoBuildManifest()

HRESULT GrayLib::cManifestBuilder::DoBuildManifest ( const FILECHAR_t pszRelativePath = nullptr)

Build up the new manifest file(s) from the old manifests and the dir info.

  • pszRelativePath = build for all files at this level and below. (nullptr = root)
    Returns
    S_FALSE = not changed. S_OK = changes.

◆ isTrustedDir()

bool GrayLib::cManifestBuilder::isTrustedDir ( const FILECHAR_t pszDirPath) const
protected

Do we trust this has not changed ? Should we descend into this dir ? Not on change list ?

◆ onChangeManifest()

HRESULT GrayLib::cManifestBuilder::onChangeManifest ( cManifestDir pManLocal,
const FILECHAR_t pszElemName 
)
protectedvirtual

call this when some sort of change has been detected.

◆ onDirComplete()

HRESULT GrayLib::cManifestBuilder::onDirComplete ( cManifestDir pManLocal,
HRESULT  hRes 
)
protectedvirtual

callback when local dir manifest is verified/computed. CRC's are computed so i can match against some other dir.

  • pManLocal = the local directories manifest. hRes = S_FALSE = no changes detected in the local files against the local manifest.

◆ onFilePrep()

HRESULT GrayLib::cManifestBuilder::onFilePrep ( cManifestDir pManLocal,
cFileFindEntry FileEntry,
cManifestElem pElementOld 
)
protectedvirtual

override these to process the manifests differently.

callback when file is about to be checked. do i want this file ?

Note
FileEntry can be changed!
Returns
E_NOINTERFACE = don't record this file. Ignore It.

Reimplemented in GrayX::cCmdManifestBuild.

◆ UNITTEST_FRIEND()

GrayLib::cManifestBuilder::UNITTEST_FRIEND ( cManifestDir  )

Friends And Related Function Documentation

◆ cManifestDir

friend class cManifestDir
friend

Member Data Documentation

◆ m_bTrustCRC

bool GrayLib::cManifestBuilder::m_bTrustCRC

trust manifest CRC if file matches by date & size. so don't bother recalculating CRC. default=true.

◆ m_Context

cManifestContext& GrayLib::cManifestBuilder::m_Context

Config info regarding my root and preferences.

◆ m_iChanges

int GrayLib::cManifestBuilder::m_iChanges

Count changes for the last DoBuildManifest.

◆ m_ManProgress

cStreamProgressF GrayLib::cManifestBuilder::m_ManProgress
protected

How far into processing the full tree are we?

◆ m_pChangeList

cArraySortString<FILECHAR_t>* GrayLib::cManifestBuilder::m_pChangeList

Don't trust these paths. Assume they have changed. nullptr = descend all directories.


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