Garden all the private headers with description and null-ability annotation

This commit is contained in:
DreamPiggy 2020-02-27 15:55:53 +08:00
parent f7d0fae94d
commit b395243d37
7 changed files with 14 additions and 11 deletions

View File

@ -11,6 +11,7 @@
@class SDAsyncBlockOperation; @class SDAsyncBlockOperation;
typedef void (^SDAsyncBlock)(SDAsyncBlockOperation * __nonnull asyncOperation); typedef void (^SDAsyncBlock)(SDAsyncBlockOperation * __nonnull asyncOperation);
/// A async block operation, success after you call `completer` (not like `NSBlockOperation` which is for sync block, success on return)
@interface SDAsyncBlockOperation : NSOperation @interface SDAsyncBlockOperation : NSOperation
- (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block; - (nonnull instancetype)initWithBlock:(nonnull SDAsyncBlock)block;

View File

@ -9,6 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SDWebImageCompat.h" #import "SDWebImageCompat.h"
/// Device information helper methods
@interface SDDeviceHelper : NSObject @interface SDDeviceHelper : NSObject
+ (NSUInteger)totalMemory; + (NSUInteger)totalMemory;

View File

@ -9,9 +9,8 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SDWebImageCompat.h" #import "SDWebImageCompat.h"
// Cross-platform display link wrapper. Do not retain the target /// Cross-platform display link wrapper. Do not retain the target
// Use `CADisplayLink` on iOS/tvOS, `CVDisplayLink` on macOS, `NSTimer` on watchOS /// Use `CADisplayLink` on iOS/tvOS, `CVDisplayLink` on macOS, `NSTimer` on watchOS
@interface SDDisplayLink : NSObject @interface SDDisplayLink : NSObject
@property (readonly, nonatomic, weak, nullable) id target; @property (readonly, nonatomic, weak, nullable) id target;

View File

@ -7,12 +7,13 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
/// File Extended Attribute (xattr) helper methods
@interface SDFileAttributeHelper : NSObject @interface SDFileAttributeHelper : NSObject
+ (NSArray*)extendedAttributeNamesAtPath:(NSString*)path traverseLink:(BOOL)follow error:(NSError**)err; + (nullable NSArray<NSString *> *)extendedAttributeNamesAtPath:(nonnull NSString*)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
+ (BOOL)hasExtendedAttribute:(NSString*)name atPath:(NSString*)path traverseLink:(BOOL)follow error:(NSError**)err; + (BOOL)hasExtendedAttribute:(nonnull NSString *)name atPath:(nonnull NSString*)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
+ (NSData*)extendedAttribute:(NSString*)name atPath:(NSString*)path traverseLink:(BOOL)follow error:(NSError**)err; + (nullable NSData *)extendedAttribute:(nonnull NSString*)name atPath:(nonnull NSString*)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
+ (BOOL)setExtendedAttribute:(NSString*)name value:(NSData*)value atPath:(NSString*)path traverseLink:(BOOL)follow overwrite:(BOOL)overwrite error:(NSError**)err; + (BOOL)setExtendedAttribute:(nonnull NSString*)name value:(nonnull NSData *)value atPath:(nonnull NSString*)path traverseLink:(BOOL)follow overwrite:(BOOL)overwrite error:(NSError * _Nullable * _Nullable)err;
+ (BOOL)removeExtendedAttribute:(NSString*)name atPath:(NSString*)path traverseLink:(BOOL)follow error:(NSError**)err; + (BOOL)removeExtendedAttribute:(nonnull NSString*)name atPath:(nonnull NSString*)path traverseLink:(BOOL)follow error:(NSError * _Nullable * _Nullable)err;
@end @end

View File

@ -9,8 +9,8 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SDWebImageCompat.h" #import "SDWebImageCompat.h"
// Apple parse the Asset Catalog compiled file(`Assets.car`) by CoreUI.framework, however it's a private framework and there are no other ways to directly get the data. So we just process the normal bundle files :) /// A Image-Asset manager to work like UIKit/AppKit's image cache behavior
/// Apple parse the Asset Catalog compiled file(`Assets.car`) by CoreUI.framework, however it's a private framework and there are no other ways to directly get the data. So we just process the normal bundle files :)
@interface SDImageAssetManager : NSObject @interface SDImageAssetManager : NSObject
@property (nonatomic, strong, nonnull) NSMapTable<NSString *, UIImage *> *imageTable; @property (nonatomic, strong, nonnull) NSMapTable<NSString *, UIImage *> *imageTable;

View File

@ -9,7 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SDWebImageCompat.h" #import "SDWebImageCompat.h"
// This is used for operation management, but not for operation queue execute /// This is used for operation management, but not for operation queue execute
@interface SDImageCachesManagerOperation : NSOperation @interface SDImageCachesManagerOperation : NSOperation
@property (nonatomic, assign, readonly) NSUInteger pendingCount; @property (nonatomic, assign, readonly) NSUInteger pendingCount;

View File

@ -9,6 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "SDWebImageCompat.h" #import "SDWebImageCompat.h"
/// A weak proxy which forward all the message to the target
@interface SDWeakProxy : NSProxy @interface SDWeakProxy : NSProxy
@property (nonatomic, weak, readonly, nullable) id target; @property (nonatomic, weak, readonly, nullable) id target;