![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cSyncDir.h>
Public Member Functions | |
cSyncDir (cSyncContext &context) | |
virtual | ~cSyncDir () |
HRESULT | ExecSyncOps () |
![]() | |
virtual | ~ IStreamProgressCallback () |
Public Attributes | |
cSyncContext & | m_Context |
bool | m_bRecycleDeletes |
send deletes to the recycle bin. More... | |
FILE_SIZE_t | m_RxPrev |
How many bytes to move? (on ExecSyncOps) More... | |
FILE_SIZE_t | m_TxPrev |
previous to the IStreamProgressCallback callback. More... | |
Static Public Attributes | |
static const LOGCHAR_t | sm_szFileInLimbo [] = "Can't sync file in use." |
file is placed in sm_szLimboDir More... | |
Protected Member Functions | |
virtual HRESULT _stdcall | onProgressCallback (const cStreamProgress &progress) override |
HRESULT | DoOp_LocalAttr (cManifestDir *pManLocal) |
HRESULT | DoOp_PullFromRemote (cManifestDir *pManLocal) |
HRESULT | DoOp_LocalDelete (cManifestDir *pManLocal) |
HRESULT | DoOp_RemoteAttr () |
HRESULT | DoOp_PushToRemote () |
HRESULT | DoOp_RemoteDelete () |
HRESULT | DoOp_Dir () |
HRESULT | ExecSyncOp (cManifestDir *pManLocal, cSyncOp *pOp) |
Protected Attributes | |
cSyncOpPtr | m_pOpCur |
the current operation/action for ExecSyncOp. More... | |
Sync 2 directories. a local and remote. may be a large list of operations. Assume manifests exist for all files before we start. We must rebuild the manifests when we are done. IStreamProgressCallback = status of the sub operations. Similar to linux "rsync"
GrayLib::cSyncDir::cSyncDir | ( | cSyncContext & | context | ) |
|
virtual |
|
protected |
Push or pull a whole directory.
|
protected |
CSYNCOP_LocalAttr CSYNCOP_LocalAttrName CRC says the file/dir is the same content. adjust the time stamp, case, and attributes. Updates pManLocal with pOp->m_pElem.
|
protected |
CSYNCOP_LocalDelete Sync dictates that the local file/dir should be deleted. pulled from remote/server but the file/dir is not in the server list!
|
protected |
CSYNCOP_PullFromRemote get file element from the remote/server.
|
protected |
CSYNCOP_PushToRemote CSYNC_Push Push a file to the remote/server.
|
protected |
CSYNCOP_RemoteAttr CSYNC_Push Push a files attributes to the remote/server.
|
protected |
CSYNCOP_RemoteDelete CSYNC_Push Tell the remote/server to delete its copy of a file or directory.
|
protected |
manLocal will be modified if this is a local operation. CSYNC_Pull
just set the attributes on the local file. date stamp, case, attribute flags.
get file from the remote/server to this local machine.
replace file from the remote/server to this local machine.
Delete a local file.
just set the attributes for the remote/server file. date stamp, case.
push file to the remote/server from the local machine.
replace file on the remote/server from this local machine.
Delete a remote/server side file.
HRESULT GrayLib::cSyncDir::ExecSyncOps | ( | ) |
Second pass. start moving the files.
|
overrideprotectedvirtual |
Report progress from a single sub action and roll it into progress for all actions. Get total status for Exec. ASSUME from call to m_pRemoteConnect->RequestFile()
Reimplemented from Gray::IStreamProgressCallback.
bool GrayLib::cSyncDir::m_bRecycleDeletes |
send deletes to the recycle bin.
cSyncContext& GrayLib::cSyncDir::m_Context |
|
protected |
the current operation/action for ExecSyncOp.
FILE_SIZE_t GrayLib::cSyncDir::m_RxPrev |
How many bytes to move? (on ExecSyncOps)
previous to the IStreamProgressCallback callback.
FILE_SIZE_t GrayLib::cSyncDir::m_TxPrev |
previous to the IStreamProgressCallback callback.
|
static |
file is placed in sm_szLimboDir
file is in use. put in LIMBO ?