Added nullability annotations

This commit is contained in:
Gianluca Bertani
2015-09-06 11:26:52 +02:00
parent 4be16c97b0
commit b87bd38b66
8 changed files with 40 additions and 40 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
#pragma mark -
#pragma mark Initialization
- (instancetype) initWithName:(NSString *)name length:(unsigned long long)length level:(OZZipCompressionLevel)level crypted:(BOOL)crypted size:(unsigned long long)size date:(NSDate *)date crc32:(NSUInteger)crc32;
- (nonnull instancetype) initWithName:(nonnull NSString *)name length:(unsigned long long)length level:(OZZipCompressionLevel)level crypted:(BOOL)crypted size:(unsigned long long)size date:(nonnull NSDate *)date crc32:(NSUInteger)crc32;
@end
+2 -2
View File
@@ -42,12 +42,12 @@
#pragma mark -
#pragma mark Properties
@property (nonatomic, readonly) NSString *name;
@property (nonatomic, readonly, nonnull) NSString *name;
@property (nonatomic, readonly) unsigned long long length;
@property (nonatomic, readonly) OZZipCompressionLevel level;
@property (nonatomic, readonly) BOOL crypted;
@property (nonatomic, readonly) unsigned long long size;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, readonly, nonnull) NSDate *date;
@property (nonatomic, readonly) NSUInteger crc32;
+4 -4
View File
@@ -59,11 +59,11 @@
#pragma mark -
#pragma mark Initialization
+ (OZZipException *) zipExceptionWithReason:(NSString *)format, ...;
+ (OZZipException *) zipExceptionWithError:(NSInteger)error reason:(NSString *)format, ...;
+ (nonnull OZZipException *) zipExceptionWithReason:(nonnull NSString *)format, ...;
+ (nonnull OZZipException *) zipExceptionWithError:(NSInteger)error reason:(nonnull NSString *)format, ...;
- (instancetype) initWithReason:(NSString *)reason;
- (instancetype) initWithError:(NSInteger)error reason:(NSString *)reason;
- (nonnull instancetype) initWithReason:(nonnull NSString *)reason;
- (nonnull instancetype) initWithError:(NSInteger)error reason:(nonnull NSString *)reason;
@end
+25 -25
View File
@@ -47,30 +47,30 @@
#pragma mark -
#pragma mark Initialization
- (instancetype) initWithFileName:(NSString *)fileName mode:(OZZipFileMode)mode;
- (instancetype) initWithFileName:(NSString *)fileName mode:(OZZipFileMode)mode legacy32BitMode:(BOOL)legacy32BitMode;
- (nonnull instancetype) initWithFileName:(nonnull NSString *)fileName mode:(OZZipFileMode)mode;
- (nonnull instancetype) initWithFileName:(nonnull NSString *)fileName mode:(OZZipFileMode)mode legacy32BitMode:(BOOL)legacy32BitMode;
#pragma mark -
#pragma mark Initialization (NSError variants)
- (instancetype) initWithFileName:(NSString *)fileName mode:(OZZipFileMode)mode error:(NSError * __autoreleasing *)error;
- (instancetype) initWithFileName:(NSString *)fileName mode:(OZZipFileMode)mode legacy32BitMode:(BOOL)legacy32BitMode error:(NSError * __autoreleasing *)error;
- (nullable instancetype) initWithFileName:(nonnull NSString *)fileName mode:(OZZipFileMode)mode error:(NSError * __autoreleasing __nullable * __nullable)error;
- (nullable instancetype) initWithFileName:(nonnull NSString *)fileName mode:(OZZipFileMode)mode legacy32BitMode:(BOOL)legacy32BitMode error:(NSError * __autoreleasing __nullable * __nullable)error;
#pragma mark -
#pragma mark File writing
- (OZZipWriteStream *) writeFileInZipWithName:(NSString *)fileNameInZip compressionLevel:(OZZipCompressionLevel)compressionLevel;
- (OZZipWriteStream *) writeFileInZipWithName:(NSString *)fileNameInZip fileDate:(NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel;
- (OZZipWriteStream *) writeFileInZipWithName:(NSString *)fileNameInZip fileDate:(NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel password:(NSString *)password crc32:(NSUInteger)crc32;
- (nonnull OZZipWriteStream *) writeFileInZipWithName:(nonnull NSString *)fileNameInZip compressionLevel:(OZZipCompressionLevel)compressionLevel;
- (nonnull OZZipWriteStream *) writeFileInZipWithName:(nonnull NSString *)fileNameInZip fileDate:(nonnull NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel;
- (nonnull OZZipWriteStream *) writeFileInZipWithName:(nonnull NSString *)fileNameInZip fileDate:(nonnull NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel password:(nonnull NSString *)password crc32:(NSUInteger)crc32;
#pragma mark -
#pragma mark File writing (NSError variants)
- (OZZipWriteStream *) writeFileInZipWithName:(NSString *)fileNameInZip compressionLevel:(OZZipCompressionLevel)compressionLevel error:(NSError * __autoreleasing *)error;
- (OZZipWriteStream *) writeFileInZipWithName:(NSString *)fileNameInZip fileDate:(NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel error:(NSError * __autoreleasing *)error;
- (OZZipWriteStream *) writeFileInZipWithName:(NSString *)fileNameInZip fileDate:(NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel password:(NSString *)password crc32:(NSUInteger)crc32 error:(NSError * __autoreleasing *)error;
- (nullable OZZipWriteStream *) writeFileInZipWithName:(nonnull NSString *)fileNameInZip compressionLevel:(OZZipCompressionLevel)compressionLevel error:(NSError * __autoreleasing __nullable * __nullable)error;
- (nullable OZZipWriteStream *) writeFileInZipWithName:(nonnull NSString *)fileNameInZip fileDate:(nonnull NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel error:(NSError * __autoreleasing __nullable * __nullable)error;
- (nullable OZZipWriteStream *) writeFileInZipWithName:(nonnull NSString *)fileNameInZip fileDate:(nonnull NSDate *)fileDate compressionLevel:(OZZipCompressionLevel)compressionLevel password:(nonnull NSString *)password crc32:(NSUInteger)crc32 error:(NSError * __autoreleasing __nullable * __nullable)error;
#pragma mark -
@@ -78,37 +78,37 @@
- (void) goToFirstFileInZip;
- (BOOL) goToNextFileInZip;
- (BOOL) locateFileInZip:(NSString *)fileNameInZip;
- (BOOL) locateFileInZip:(nonnull NSString *)fileNameInZip;
- (NSUInteger) numFilesInZip;
- (NSArray *) listFileInZipInfos;
- (OZFileInZipInfo *) getCurrentFileInZipInfo;
- (nonnull NSArray *) listFileInZipInfos;
- (nonnull OZFileInZipInfo *) getCurrentFileInZipInfo;
#pragma mark -
#pragma mark File seeking and info (NSError variants)
- (BOOL) goToFirstFileInZipWithError:(NSError * __autoreleasing *)error;
- (BOOL) goToNextFileInZipWithError:(NSError * __autoreleasing *)error;
- (BOOL) locateFileInZip:(NSString *)fileNameInZip error:(NSError * __autoreleasing *)error;
- (BOOL) goToFirstFileInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (BOOL) goToNextFileInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (BOOL) locateFileInZip:(nonnull NSString *)fileNameInZip error:(NSError * __autoreleasing __nullable * __nullable)error;
- (NSUInteger) numFilesInZipWithError:(NSError * __autoreleasing *)error;
- (NSArray *) listFileInZipInfosWithError:(NSError * __autoreleasing *)error;
- (OZFileInZipInfo *) getCurrentFileInZipInfoWithError:(NSError * __autoreleasing *)error;
- (NSUInteger) numFilesInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (nullable NSArray *) listFileInZipInfosWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (nullable OZFileInZipInfo *) getCurrentFileInZipInfoWithError:(NSError * __autoreleasing __nullable * __nullable)error;
#pragma mark -
#pragma mark File reading
- (OZZipReadStream *) readCurrentFileInZip;
- (OZZipReadStream *) readCurrentFileInZipWithPassword:(NSString *)password;
- (nonnull OZZipReadStream *) readCurrentFileInZip;
- (nonnull OZZipReadStream *) readCurrentFileInZipWithPassword:(nonnull NSString *)password;
#pragma mark -
#pragma mark File reading (NSError variants)
- (OZZipReadStream *) readCurrentFileInZipWithError:(NSError * __autoreleasing *)error;
- (OZZipReadStream *) readCurrentFileInZipWithPassword:(NSString *)password error:(NSError * __autoreleasing *)error;
- (nullable OZZipReadStream *) readCurrentFileInZipWithError:(NSError * __autoreleasing __nullable * __nullable)error;
- (nullable OZZipReadStream *) readCurrentFileInZipWithPassword:(nonnull NSString *)password error:(NSError * __autoreleasing __nullable * __nullable)error;
#pragma mark -
@@ -120,13 +120,13 @@
#pragma mark -
#pragma mark Closing (NSError variants)
- (BOOL) closeWithError:(NSError * __autoreleasing *)error;
- (BOOL) closeWithError:(NSError * __autoreleasing __nullable * __nullable)error;
#pragma mark -
#pragma mark Properties
@property (nonatomic, readonly) NSString *fileName;
@property (nonatomic, readonly, nonnull) NSString *fileName;
@property (nonatomic, readonly) OZZipFileMode mode;
@property (nonatomic, readonly) BOOL legacy32BitMode;
+1 -1
View File
@@ -42,7 +42,7 @@
#pragma mark -
#pragma mark Initialization
- (instancetype) initWithUnzFileStruct:(unzFile)unzFile fileNameInZip:(NSString *)fileNameInZip;
- (nonnull instancetype) initWithUnzFileStruct:(nonnull unzFile)unzFile fileNameInZip:(nonnull NSString *)fileNameInZip;
@end
+3 -3
View File
@@ -40,15 +40,15 @@
#pragma mark -
#pragma mark Reading data
- (NSUInteger) readDataWithBuffer:(NSMutableData *)buffer;
- (NSUInteger) readDataWithBuffer:(nonnull NSMutableData *)buffer;
- (void) finishedReading;
#pragma mark -
#pragma mark Reading data (NSError variants)
- (NSUInteger) readDataWithBuffer:(NSMutableData *)buffer error:(NSError * __autoreleasing *)error;
- (BOOL) finishedReadingWithError:(NSError * __autoreleasing *)error;
- (NSUInteger) readDataWithBuffer:(nonnull NSMutableData *)buffer error:(NSError * __autoreleasing __nullable * __nullable)error;
- (BOOL) finishedReadingWithError:(NSError * __autoreleasing __nullable * __nullable)error;
@end
+1 -1
View File
@@ -42,7 +42,7 @@
#pragma mark -
#pragma mark Initialization
- (instancetype) initWithZipFileStruct:(zipFile)zipFile fileNameInZip:(NSString *)fileNameInZip;
- (nonnull instancetype) initWithZipFileStruct:(nonnull zipFile)zipFile fileNameInZip:(nonnull NSString *)fileNameInZip;
@end
+3 -3
View File
@@ -40,15 +40,15 @@
#pragma mark -
#pragma mark Writing data
- (void) writeData:(NSData *)data;
- (void) writeData:(nonnull NSData *)data;
- (void) finishedWriting;
#pragma mark -
#pragma mark Writing data (NSError variants)
- (BOOL) writeData:(NSData *)data error:(NSError * __autoreleasing *)error;
- (BOOL) finishedWritingWithError:(NSError * __autoreleasing *)error;
- (BOOL) writeData:(nonnull NSData *)data error:(NSError * __autoreleasing __nullable * __nullable)error;
- (BOOL) finishedWritingWithError:(NSError * __autoreleasing __nullable * __nullable)error;
@end