Skip to content

Commit

Permalink
New version of XADMaster
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Rauchfuss authored and Alexander Rauchfuss committed Feb 8, 2017
1 parent b054ff0 commit ce1dd9d
Show file tree
Hide file tree
Showing 22 changed files with 345 additions and 1,198 deletions.
1 change: 0 additions & 1 deletion Frameworks/UniversalDetector.framework/Headers

This file was deleted.

1 change: 0 additions & 1 deletion Frameworks/UniversalDetector.framework/Resources

This file was deleted.

1 change: 0 additions & 1 deletion Frameworks/UniversalDetector.framework/UniversalDetector

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion Frameworks/UniversalDetector.framework/Versions/Current

This file was deleted.

7 changes: 7 additions & 0 deletions Frameworks/XADMaster.framework/Versions/A/Headers/CSHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ extern NSString *CSNotSupportedException;
-(uint32_t)readUInt32LE;
-(uint64_t)readUInt64LE;

-(int16_t)readInt16InBigEndianOrder:(BOOL)isbigendian;
-(int32_t)readInt32InBigEndianOrder:(BOOL)isbigendian;
-(int64_t)readInt64InBigEndianOrder:(BOOL)isbigendian;
-(uint16_t)readUInt16InBigEndianOrder:(BOOL)isbigendian;
-(uint32_t)readUInt32InBigEndianOrder:(BOOL)isbigendian;
-(uint64_t)readUInt64InBigEndianOrder:(BOOL)isbigendian;

-(uint32_t)readID;

-(uint32_t)readBits:(int)bits;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

typedef struct CSInputBuffer
{
CSHandle *parent;
__unsafe_unretained CSHandle *parent;
off_t startoffs;
BOOL eof;

Expand All @@ -25,6 +25,11 @@ void CSInputBufferFree(CSInputBuffer *self);

void CSInputSetMemoryBuffer(CSInputBuffer *self,uint8_t *buffer,int length,off_t startoffs);

static inline CSHandle *CSInputHandle(CSInputBuffer *self)
{
return self->parent;
}



// Buffer and file positioning
Expand Down
8 changes: 8 additions & 0 deletions Frameworks/XADMaster.framework/Versions/A/Headers/Checksums.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "CSHandle.h"
#import "CSSubHandle.h"
#import "CSStreamHandle.h"

@interface CSHandle (Checksums)

Expand All @@ -15,6 +16,13 @@

@end

@interface CSStreamHandle (Checksums)

-(BOOL)hasChecksum;
-(BOOL)isChecksumCorrect;

@end

#define CSChecksumWrapperHandle XADChecksumWrapperHandle

@interface CSChecksumWrapperHandle:CSHandle
Expand Down
29 changes: 18 additions & 11 deletions Frameworks/XADMaster.framework/Versions/A/Headers/XADArchive.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>

#import "XADArchiveParser.h"
#import "XADUnarchiver.h"
#import "XADException.h"

typedef int XADAction;
Expand All @@ -22,16 +23,18 @@ extern NSString *XADFinderFlags;
@interface XADArchive:NSObject
{
XADArchiveParser *parser;
XADUnarchiver *unarchiver;

id delegate;
NSTimeInterval update_interval;
XADError lasterror;

NSMutableArray *dataentries,*resourceentries;
NSMutableArray *deferredentries;
NSMutableDictionary *namedict;

off_t extractsize,totalsize;
int extractingentry;
BOOL extractingresource;
NSString *immediatedestination;
BOOL immediatesubarchives,immediatefailed;
off_t immediatesize;
Expand Down Expand Up @@ -95,7 +98,6 @@ extern NSString *XADFinderFlags;
-(NSDictionary *)combinedParserDictionaryForEntry:(int)n;

-(NSString *)nameOfEntry:(int)n;
-(XADString *)rawNameOfEntry:(int)n;
-(BOOL)entryHasSize:(int)n;
-(off_t)uncompressedSizeOfEntry:(int)n;
-(off_t)compressedSizeOfEntry:(int)n;
Expand All @@ -113,6 +115,7 @@ extern NSString *XADFinderFlags;
-(CSHandle *)resourceHandleForEntry:(int)n;
-(CSHandle *)resourceHandleForEntry:(int)n error:(XADError *)error;
-(NSData *)contentsOfEntry:(int)n;
-(NSData *)contentsOfEntry:(int)n withLength:(NSInteger)length;
//-(NSData *)resourceContentsOfEntry:(int)n;

-(BOOL)extractTo:(NSString *)destination;
Expand All @@ -121,18 +124,22 @@ extern NSString *XADFinderFlags;
-(BOOL)extractEntries:(NSIndexSet *)entryset to:(NSString *)destination subArchives:(BOOL)sub;
-(BOOL)extractEntry:(int)n to:(NSString *)destination;
-(BOOL)extractEntry:(int)n to:(NSString *)destination deferDirectories:(BOOL)defer;
-(BOOL)extractEntry:(int)n to:(NSString *)destination deferDirectories:(BOOL)defer resourceFork:(BOOL)resfork;
-(BOOL)extractEntry:(int)n to:(NSString *)destination deferDirectories:(BOOL)defer
resourceFork:(BOOL)resfork;
-(BOOL)extractEntry:(int)n to:(NSString *)destination deferDirectories:(BOOL)defer
dataFork:(BOOL)datafork resourceFork:(BOOL)resfork;
//-(BOOL)extractEntry:(int)n to:(NSString *)destination deferDirectories:(BOOL)defer
//dataFork:(BOOL)datafork resourceFork:(BOOL)resfork;
-(BOOL)extractArchiveEntry:(int)n to:(NSString *)destination;

-(BOOL)_extractEntry:(int)n as:(NSString *)destfile;
-(BOOL)_extractFileEntry:(int)n as:(NSString *)destfile;
-(BOOL)_extractDirectoryEntry:(int)n as:(NSString *)destfile;
-(BOOL)_extractLinkEntry:(int)n as:(NSString *)destfile;
-(BOOL)_ensureDirectoryExists:(NSString *)directory;
-(BOOL)_changeAllAttributesForEntry:(int)n atPath:(NSString *)path deferDirectories:(BOOL)defer resourceFork:(BOOL)resfork;
-(BOOL)_extractEntry:(int)n as:(NSString *)destfile deferDirectories:(BOOL)defer
dataFork:(BOOL)datafork resourceFork:(BOOL)resfork;

-(void)updateAttributesForDeferredDirectories;

//Tim Oliver
- (BOOL)extractContentsOfEntry:(int)n toPath:(NSString *)destination;

// Deprecated

+(NSArray *)volumesForFile:(NSString *)filename;
Expand Down Expand Up @@ -184,8 +191,8 @@ extern NSString *XADFinderFlags;
#define XADOverwrite XADOverwriteAction
#define XADRename XADRenameAction

typedef XADError xadERROR;
typedef off_t xadSize;
//typedef XADError xadERROR;
//typedef off_t xadSize;

#define XADERR_NO XADNoError
#if 0
Expand Down
Loading

0 comments on commit ce1dd9d

Please sign in to comment.