Split filenodecmp in actionfilenode*
This commit is contained in:
64
src/actionfilenode.h
Normal file
64
src/actionfilenode.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef _ACTIONFILENODE_H_
|
||||
#define _ACTIONFILENODE_H_
|
||||
|
||||
#include "filenode.h"
|
||||
|
||||
typedef enum {
|
||||
ActionFileCmp_Nothing,
|
||||
ActionFileCmp_LeftToRight,
|
||||
ActionFileCmp_RightToLeft,
|
||||
ActionFileCmp_DeleteLeft,
|
||||
ActionFileCmp_DeleteRight,
|
||||
ActionFileCmp_DateLeftToRight,
|
||||
ActionFileCmp_DateRightToLeft,
|
||||
ActionFileCmp_MakeRightDirectory,
|
||||
ActionFileCmp_MakeLeftDirectory
|
||||
} ActionFileCmp;
|
||||
|
||||
typedef struct TActionFileNode TActionFileNode, *ActionFileNode;
|
||||
struct TActionFileNode {
|
||||
ActionFileCmp action;
|
||||
FileNode left;
|
||||
FileNode right;
|
||||
ActionFileNode next;
|
||||
};
|
||||
|
||||
ActionFileNode ActionFileNode_Create();
|
||||
void AccionFileNode_Destroy(ActionFileNode actionFileNode);
|
||||
ActionFileNode ActionFileNode_CreateNormal(FileNode fileNodeLeft,
|
||||
FileNode fileNodeRight);
|
||||
|
||||
void AccionFileNode_CompareChilds(
|
||||
ActionFileNode actionFileNodeRoot,
|
||||
ActionFileNode *actionFileNodeQueue,
|
||||
void(*CheckPair)(FileNode fileNodeLeft, FileNode fileNodeRight,
|
||||
ActionFileNode *actionFileNodeQueue));
|
||||
|
||||
typedef struct SActionQueueStatistics {
|
||||
long long readLeft;
|
||||
long long writeLeft;
|
||||
long long readRight;
|
||||
long long writeRight;
|
||||
int fullCopyCount;
|
||||
int dateCopyCount;
|
||||
int directoryCount;
|
||||
int deleteCount;
|
||||
long long deleteLeft;
|
||||
long long deleteRight;
|
||||
} ActionQueueStatistics;
|
||||
|
||||
void ActionFileNode_Statistics(ActionFileNode actionFileNode,
|
||||
ActionQueueStatistics *statistics);
|
||||
|
||||
void ActionFileNode_Print(ActionFileNode actionFileNode);
|
||||
|
||||
void ActionFileNode_RunList(ActionFileNode actionFileNode, char *pathLeft,
|
||||
char *pathRight);
|
||||
|
||||
|
||||
// Common utilities
|
||||
|
||||
void AccionFileNode_DeletePair(FileNode fileNodeLeft, FileNode fileNodeRight,
|
||||
ActionFileNode *actionFileNodeQueue);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user