![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cSyncDir.h>
Public Member Functions | |
cSyncBuilder (cSyncContext &context) | |
virtual | ~cSyncBuilder () |
bool | isEstimateComplete () const |
HRESULT | BuildOpList (const FILECHAR_t *pszRelativePath=nullptr, CSYNC_TYPE eSyncType=CSYNC_Pull) |
![]() | |
cManifestBuilder (cManifestContext &context) | |
virtual | ~cManifestBuilder () |
HRESULT | DoBuildManifest (const FILECHAR_t *pszRelativePath=nullptr) |
UNITTEST_FRIEND (cManifestDir) | |
Public Attributes | |
cSyncContext & | m_Context |
bool | m_bRootOnly |
just sync the root only. don't descend child dirs. More... | |
CSYNC_TYPE | m_eSyncType |
What type of sync do i want to perform. More... | |
cArraySortString< FILECHAR_t > | m_aLockedFiles |
Files/Directories to be ignored. (NOT synced even tho the manifest says they should be) More... | |
cStreamProgress | m_Remote |
Total bytes declared in the top level server/remote manifest. >= m_Context.m_Rx. More... | |
cStreamProgress | m_Local |
Total bytes declared in the top level local/client manifest. >= m_Context.m_Tx. More... | |
bool | m_bEstimateComplete |
the estimation pass is complete. m_Context.m_Rx and m_Context.m_Tx are set. More... | |
![]() | |
cManifestContext & | m_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 | |
HRESULT | UpdateProgress () |
void | BuildOpAdd (cSyncOp *pOp) |
HRESULT | BuildOpDir2 (cSyncOp *pOpDir, COMPARE_t iComp, cManifestElem *pFileElem) |
HRESULT | BuildOpElem (cSyncOp *pOpDir, const cManifestDir &manLocal, cManifestElem *pFileRemote, cManifestElem *pFileLocal) |
HRESULT | BuildOpDir (cSyncOp *pOpDir) |
![]() | |
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) |
Additional Inherited Members | |
![]() | |
cStreamProgressF | m_ManProgress |
How far into processing the full tree are we? More... | |
Build the list of commands/operations to do for the sync. build manifests as well if needed. This estimates the amount of work to do. Sets m_Context.m_Rx and m_Context.m_Tx. Similar to linux "rsync"
GrayLib::cSyncBuilder::cSyncBuilder | ( | cSyncContext & | context | ) |
|
virtual |
|
protected |
Add this operation to the list of things we should do. Estimate the total bytes requested/sent to/from server.
create/sync a remote directory that may not yet exist locally the Remote/Server list = files as they should be (read Remote manifest from the server) Sync this against the local files.
ERROR_REQUEST_ABORTED = canceled. ERROR_PATH_NOT_FOUND, ERROR_FILE_NOT_FOUND = doesn't exist on one side or the other. HRESULT_WIN32_C(ERROR_INVALID_TABLE) = corrupt file.0 = changes
|
protected |
|
protected |
test if we should move a single file/dir to/from the server.
HRESULT GrayLib::cSyncBuilder::BuildOpList | ( | const FILECHAR_t * | pszRelativePath = nullptr , |
CSYNC_TYPE | eSyncType = CSYNC_Pull |
||
) |
First pass. estimate how much to move. ASSUME Local manifests are valid. m_pRemoteConnect = the underlying connection can be XProtocol, HTTP, File, FTP?
|
inline |
Estimation pass is complete?
|
protected |
Push progress to a subscriber. Get total progress for cSyncBuilder.
cArraySortString<FILECHAR_t> GrayLib::cSyncBuilder::m_aLockedFiles |
Files/Directories to be ignored. (NOT synced even tho the manifest says they should be)
bool GrayLib::cSyncBuilder::m_bEstimateComplete |
the estimation pass is complete. m_Context.m_Rx and m_Context.m_Tx are set.
bool GrayLib::cSyncBuilder::m_bRootOnly |
just sync the root only. don't descend child dirs.
cSyncContext& GrayLib::cSyncBuilder::m_Context |
CSYNC_TYPE GrayLib::cSyncBuilder::m_eSyncType |
What type of sync do i want to perform.
cStreamProgress GrayLib::cSyncBuilder::m_Local |
Total bytes declared in the top level local/client manifest. >= m_Context.m_Tx.
cStreamProgress GrayLib::cSyncBuilder::m_Remote |
Total bytes declared in the top level server/remote manifest. >= m_Context.m_Rx.