diff options
author | Abhi Beckert <abhi@abhibeckert.com> | 2016-01-29 06:40:18 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@abhibeckert.com> | 2016-01-29 06:40:18 +1000 |
commit | f4c4300dca0c416c12b3992204778ef9f37981ec (patch) | |
tree | e76a4747bf1c3f82bc037990bf84e3f13062601e /Source/SPFileHandle.h | |
parent | 465062dacc96c2c84bfe9cff1ded58c14d01bdcd (diff) | |
parent | 3aadea1be33212ca50e7faffcd0620ea976f9d59 (diff) | |
download | sequelpro-f4c4300dca0c416c12b3992204778ef9f37981ec.tar.gz sequelpro-f4c4300dca0c416c12b3992204778ef9f37981ec.tar.bz2 sequelpro-f4c4300dca0c416c12b3992204778ef9f37981ec.zip |
Merge remote-tracking branch 'sequelpro/master'
Diffstat (limited to 'Source/SPFileHandle.h')
-rw-r--r-- | Source/SPFileHandle.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Source/SPFileHandle.h b/Source/SPFileHandle.h index 23162385..5622b1b6 100644 --- a/Source/SPFileHandle.h +++ b/Source/SPFileHandle.h @@ -28,6 +28,7 @@ // // More info at <https://github.com/sequelpro/sequelpro> +union SPSomeFileHandle; /** * @class SPFileHandle SPFileHandle.h * @@ -39,7 +40,7 @@ */ @interface SPFileHandle : NSObject { - void *wrappedFile; + union SPSomeFileHandle *wrappedFile; char *wrappedFilePath; NSMutableData *buffer; @@ -53,7 +54,6 @@ BOOL dataWritten; BOOL allDataWritten; BOOL fileIsClosed; - BOOL useCompression; SPFileCompressionFormat compressionFormat; } @@ -69,7 +69,7 @@ #pragma mark Initialisation // Returns a file handle initialised with a file -- (id)initWithFile:(void *)theFile fromPath:(const char *)path mode:(int)mode; +- (id)initWithFile:(FILE *)theFile fromPath:(const char *)path mode:(int)mode; #pragma mark - #pragma mark Data reading @@ -87,7 +87,11 @@ #pragma mark Data writing // Set whether data should be written in the supplied compression format (defaults to NO on a fresh object) -- (void)setShouldWriteWithCompressionFormat:(SPFileCompressionFormat)useCompressionFormat; +// This has no influence on reading data. +- (void)setCompressionFormat:(SPFileCompressionFormat)useCompressionFormat; + +// Returns the compression format being used. Currently gzip or bzip2 only. +- (SPFileCompressionFormat)compressionFormat; // Write the provided data to the file - (void)writeData:(NSData *)data; @@ -98,13 +102,4 @@ // Prevents further access to the file - (void)closeFile; -#pragma mark - -#pragma mark File information - -// Returns whether compression is enabled on the file -- (BOOL)isCompressed; - -// Returns the compression format being used. Currently gzip or bzip2 only. -- (SPFileCompressionFormat)compressionFormat; - @end |