5 #ifndef _INC_cSyncDir_H
6 #define _INC_cSyncDir_H
11 #include "../FileSys/cManifestDir.h"
31 #define cSyncDirOpDef(a,b) CSYNCOP_##a,
72 return m_pElem->get_Name();
76 return m_pElem->m_ElemData.isAttrDir();
81 if (m_pParent !=
nullptr)
91 return(eOp < CSYNCOP_RemoteStub);
95 return IsOpPull(m_eOp);
100 if (eOp == CSYNCOP_Null)
116 AddChildOpType(pOp->
m_eOp);
117 m_aChildElems.
Add(pOp);
204 return m_bEstimateComplete;
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
Definition: cManifestDir.h:238
Definition: cManifestDir.h:215
Definition: cManifestDir.h:97
Definition: cManifestDir.h:72
Definition: cSyncDir.h:167
CSYNC_TYPE m_eSyncType
What type of sync do i want to perform.
Definition: cSyncDir.h:180
bool isEstimateComplete() const
Definition: cSyncDir.h:200
cSyncContext & m_Context
Definition: cSyncDir.h:176
bool m_bRootOnly
just sync the root only. don't descend child dirs.
Definition: cSyncDir.h:179
cArraySortString< FILECHAR_t > m_aLockedFiles
Files/Directories to be ignored. (NOT synced even tho the manifest says they should be)
Definition: cSyncDir.h:181
bool m_bEstimateComplete
the estimation pass is complete. m_Context.m_Rx and m_Context.m_Tx are set.
Definition: cSyncDir.h:186
cStreamProgress m_Local
Total bytes declared in the top level local/client manifest. >= m_Context.m_Tx.
Definition: cSyncDir.h:185
cStreamProgress m_Remote
Total bytes declared in the top level server/remote manifest. >= m_Context.m_Rx.
Definition: cSyncDir.h:184
Definition: cSyncDir.h:123
IFileCopier * m_pRemoteConnect
transfer remote files via this connection to a remote file system. If we are CSYNC_Push then it must ...
Definition: cSyncDir.h:131
TIMESECD_t m_nManifestCacheAge
allow remote/server Manifest cache to be this old. (seconds), 0=no cache.
Definition: cSyncDir.h:134
cStreamProgress m_Tx
total file data to push.
Definition: cSyncDir.h:138
cSyncOpPtr m_pOpRoot
full list/tree of operations to be performed on all dirs
Definition: cSyncDir.h:132
cStringF m_sManCachePrefix
file path prefix (Destination directory) for caching manifests.
Definition: cSyncDir.h:135
cStreamProgress m_Rx
total file data to pull.
Definition: cSyncDir.h:137
Definition: cSyncDir.h:211
bool m_bRecycleDeletes
send deletes to the recycle bin.
Definition: cSyncDir.h:225
FILE_SIZE_t m_TxPrev
previous to the IStreamProgressCallback callback.
Definition: cSyncDir.h:229
cSyncOpPtr m_pOpCur
the current operation/action for ExecSyncOp.
Definition: cSyncDir.h:233
cSyncContext & m_Context
Definition: cSyncDir.h:223
FILE_SIZE_t m_RxPrev
How many bytes to move? (on ExecSyncOps)
Definition: cSyncDir.h:228
Definition: cSyncDir.h:38
cSyncOp(cSyncOp *pParent, CSYNCOP_TYPE eOp, cManifestElem *pElem)
Definition: cSyncDir.h:53
bool IsOpPull() const
Definition: cSyncDir.h:93
CSYNCOP_TYPE m_eOp
What operation to perform on m_pElem?
Definition: cSyncDir.h:45
CSYNC_TYPE m_eChildOpTypes
If this is a directory.
Definition: cSyncDir.h:49
cSyncOp *const m_pParent
May parent directory operation.
Definition: cSyncDir.h:44
cManifestElemPtr const m_pElem
the file that will result from this operation. (local manifest)
Definition: cSyncDir.h:46
~cSyncOp()
Definition: cSyncDir.h:62
cArraySortName< cSyncOp > m_aChildElems
the list of file operations to perform in this directory.
Definition: cSyncDir.h:50
cStringF get_Name() const
Definition: cSyncDir.h:70
static bool IsOpPull(CSYNCOP_TYPE eOp)
Definition: cSyncDir.h:89
void AddChildOp(cSyncOp *pOp)
Definition: cSyncDir.h:112
cStringF get_RelativePath() const
Definition: cSyncDir.h:79
bool isAttrDir() const
Definition: cSyncDir.h:74
void AddChildOpType(CSYNCOP_TYPE eOp)
Definition: cSyncDir.h:98
Definition: cArraySortRef.h:199
ITERATE_t Add(TYPE_ARG pNew)
Definition: cArraySort.h:186
static cStringF __stdcall CombineFilePathX(const FILECHAR_t *pszBase, const FILECHAR_t *pszName, FILECHAR_t chSep=k_DirSep)
Definition: cFilePath.cpp:596
Definition: cLogAppender.h:168
Definition: cRefPtr.h:225
CSYNC_TYPE
Definition: cSyncDir.h:17
@ CSYNC_Push
Push local to remote/server. local is master copy.
Definition: cSyncDir.h:23
@ CSYNC_Newer
Push or pull if the file is newer than the other side. AKA Sync. neither side is master copy.
Definition: cSyncDir.h:24
@ CSYNC_Pull
Pull remote/server side file to local. server is master copy. (normal case)
Definition: cSyncDir.h:22
@ CSYNC_None
Don't do any sync on this directory. local manifest build only.
Definition: cSyncDir.h:21
@ CSYNC_QTY
Unknown/default sync.
Definition: cSyncDir.h:25
CSYNCOP_TYPE
Definition: cSyncDir.h:29
@ CSYNCOP_QTY
Definition: cSyncDir.h:34
cRefPtr< cSyncOp > cSyncOpPtr
Definition: cSyncDir.h:120
int COMPARE_t
result of compare. 0=same, 1=a>b, -1=a<b
Definition: cValT.h:17
LOGLEV_TYPE
Definition: cLogLevel.h:22
UINT32 LOG_ATTR_MASK_t
Definition: cLogAppender.h:56
int TIMESECD_t
signed delta seconds. like TIMESEC_t. redefined in TimeUnits.h.
Definition: cTimeSys.h:19
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
char LOGCHAR_t
always just use UTF8 for logs, don't bother with UNICODE.
Definition: cLogLevel.h:17
UINT64 FILE_SIZE_t
similar to STREAM_POS_t size_t
Definition: cFileStatus.h:31
Definition: cFileCopier.h:17
Definition: cStreamProgress.h:168