NS_ASSUME_NONNULL

This commit is contained in:
relikd
2020-01-17 22:26:54 +01:00
parent c2ba9b06a4
commit 2e46fdc8fd
8 changed files with 31 additions and 2 deletions

View File

@@ -23,6 +23,10 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSDictionary (RSXML)
- (nullable id)rsxml_objectForCaseInsensitiveKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END

View File

@@ -24,6 +24,8 @@
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
@interface NSString (RSXML)
- (NSString *)rsxml_stringByDecodingHTMLEntities;
@@ -32,3 +34,4 @@
@end
NS_ASSUME_NONNULL_END

View File

@@ -31,6 +31,8 @@ typedef enum {
RSFeedTypeAtom
} RSFeedType;
NS_ASSUME_NONNULL_BEGIN
RSFeedType RSFeedTypeFromLinkTypeAttribute(NSString * typeStr);
@@ -65,3 +67,5 @@ RSFeedType RSFeedTypeFromLinkTypeAttribute(NSString * typeStr);
@interface RSHTMLMetadataAnchor : RSHTMLMetadataLink // title: anchor text-value
@property (nonatomic, copy, nullable) NSString *tooltip;
@end
NS_ASSUME_NONNULL_END

View File

@@ -27,6 +27,8 @@
#define OPML_EXPORT 0
#endif
NS_ASSUME_NONNULL_BEGIN
// OPML allows for arbitrary attributes.
// These are the common attributes in OPML files used as RSS subscription lists.
@@ -55,7 +57,7 @@
/// Sets a value in the internal dictionary (creates new empty dictionary if necessary).
- (void)setAttribute:(id)value forKey:(NSString *)key;
/// @return Value for key (case-independent).
- (id)attributeForKey:(NSString *)key;
- (nullable id)attributeForKey:(NSString *)key;
/// Print object description for debugging purposes.
- (NSString *)recursiveDescription;
@@ -64,3 +66,5 @@
- (NSXMLDocument *)exportXML;
#endif
@end
NS_ASSUME_NONNULL_END

View File

@@ -24,6 +24,8 @@
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Parsed result type for articles. Does contain article specific attributes like abstract and content.
@interface RSParsedArticle : NSObject
@property (nonatomic, readonly, nonnull) NSURL *feedURL;
@@ -47,3 +49,4 @@
@end
NS_ASSUME_NONNULL_END

View File

@@ -24,6 +24,8 @@
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
@class RSParsedArticle;
/// Parsed result type for feeds. Does contain feed specific attributes and a sorted list or articles.
@@ -41,3 +43,5 @@
- (RSParsedArticle *)appendNewArticle;
@end
NS_ASSUME_NONNULL_END

View File

@@ -25,6 +25,8 @@
@import Foundation;
#import "RSXMLParser.h"
NS_ASSUME_NONNULL_BEGIN
@class RSXMLParser;
/// Wrapper class for xml data. Returns the designated parser for any given xml data.
@@ -42,3 +44,5 @@
- (BOOL)canParseData;
@end
NS_ASSUME_NONNULL_END

View File

@@ -29,6 +29,8 @@
@class RSXMLData;
NS_ASSUME_NONNULL_BEGIN
// ---------------------------------------------------------------
// | MARK: - Parser Delegate
// ---------------------------------------------------------------
@@ -55,7 +57,7 @@
/// @return @c YES if parser supports parsing HTML files.
+ (BOOL)isHTMLParser;
/// Will be called after the parsing is finished. @return Reference to parsed object.
- (id)xmlParserWillReturnDocument;
- (nullable id)xmlParserWillReturnDocument;
@end
@@ -91,3 +93,4 @@
@end
NS_ASSUME_NONNULL_END