00001
00002
00003
00004
00005
00006
00007
00008 #import <Cocoa/Cocoa.h>
00009 #import <HexFiend/HFTYpes.h>
00010
00017 @class HFByteArray, HFProgressTracker;
00018
00024 struct HFEditInstruction_t {
00026 HFRange src;
00027
00029 HFRange dst;
00030 };
00031
00032 @interface HFByteArrayEditScript : NSObject {
00033 HFByteArray *source;
00034 HFByteArray *destination;
00035
00036 unsigned long long sourceLength;
00037 unsigned long long destLength;
00038
00039 volatile const int *cancelRequested;
00040 volatile int64_t *currentProgress;
00041
00042 int32_t concurrentProcesses;
00043 dispatch_queue_t insnQueue;
00044 __strong struct HFEditInstruction_t *insns;
00045 size_t insnCount, insnCapacity;
00046 }
00047
00049 - (id)initWithDifferenceFromSource:(HFByteArray *)src toDestination:(HFByteArray *)dst trackingProgress:(HFProgressTracker *)progressTracker;
00050
00052 - (void)applyToByteArray:(HFByteArray *)byteArray;
00053
00055 - (NSUInteger)numberOfInstructions;
00056
00058 - (struct HFEditInstruction_t)instructionAtIndex:(NSUInteger)index;
00059
00060 @end