ReconItem.h (1934B)
1 /* ReconItem */ 2 3 #import <Cocoa/Cocoa.h> 4 5 @class OCamlValue; 6 7 @interface ReconItem : NSObject 8 { 9 ReconItem *parent; 10 NSString *path; 11 NSString *fullPath; 12 BOOL selected; 13 NSImage *direction; 14 NSString *directionSortString; 15 double fileSize; 16 double bytesTransferred; 17 BOOL resolved; 18 } 19 - (BOOL)selected; 20 - (void)setSelected:(BOOL)x; 21 - (NSString *)path; 22 - (NSString *)fullPath; 23 - (NSString *)left; 24 - (NSString *)right; 25 - (NSImage *)direction; 26 - (NSImage *)fileIcon; 27 - (long)fileCount; 28 - (double)fileSize; 29 - (NSString *)fileSizeString; 30 - (double)bytesTransferred; 31 - (NSString *)bytesTransferredString; 32 - (void)setDirection:(char *)d; 33 - (void) doAction:(unichar)action; 34 - (void) doIgnore:(unichar)action; 35 - (NSString *)progress; 36 - (NSString *)progressString; 37 - (void)resetProgress; 38 - (NSString *)details; 39 - (NSString *)updateDetails; 40 - (BOOL)isConflict; 41 - (BOOL)changedFromDefault; 42 - (void)revertDirection; 43 - (BOOL)canDiff; 44 - (void)showDiffs; 45 - (NSString *)leftSortKey; 46 - (NSString *)rightSortKey; 47 - (NSString *)replicaSortKey:(NSString *)sortString; 48 - (NSString *)directionSortKey; 49 - (NSString *)progressSortKey; 50 - (NSString *)pathSortKey; 51 - (NSArray *)children; 52 - (ReconItem *)collapseParentsWithSingleChildren:(BOOL)isRoot; 53 - (ReconItem *)parent; 54 - (void)setPath:(NSString *)aPath; 55 - (void)setFullPath:(NSString *)p; 56 - (void)setParent:(ReconItem *)p; 57 - (void)willChange; 58 @end 59 60 @interface LeafReconItem : ReconItem 61 { 62 NSString *left; 63 NSString *right; 64 NSString *progress; 65 NSString *details; 66 OCamlValue *ri; // an ocaml Common.reconItem 67 long index; // index in Ri list 68 } 69 - initWithRiAndIndex:(OCamlValue *)v index:(long)i; 70 @end 71 72 @interface ParentReconItem : ReconItem 73 { 74 NSMutableArray *_children; 75 long fileCount; 76 } 77 - (void)addChild:(ReconItem *)item nested:(BOOL)useNesting; 78 - (void)sortUsingDescriptors:(NSArray *)sortDescriptors; 79 - (BOOL)hasConflictedChildren; 80 @end