Refactored OPML
This commit is contained in:
@@ -1,26 +1,27 @@
|
||||
//
|
||||
// RSOPMLItem.h
|
||||
// RSXML
|
||||
//
|
||||
// Created by Brent Simmons on 2/28/16.
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import Foundation;
|
||||
|
||||
@class RSOPMLFeedSpecifier;
|
||||
// OPML allows for arbitrary attributes.
|
||||
// These are the common attributes in OPML files used as RSS subscription lists.
|
||||
|
||||
extern NSString *OPMLTextKey; //text
|
||||
extern NSString *OPMLTitleKey; //title
|
||||
extern NSString *OPMLDescriptionKey; //description
|
||||
extern NSString *OPMLTypeKey; //type
|
||||
extern NSString *OPMLVersionKey; //version
|
||||
extern NSString *OPMLHMTLURLKey; //htmlUrl
|
||||
extern NSString *OPMLXMLURLKey; //xmlUrl
|
||||
|
||||
|
||||
@interface RSOPMLItem : NSObject
|
||||
|
||||
@property (nonatomic) NSArray<RSOPMLItem*> *children;
|
||||
@property (nonatomic) NSDictionary *attributes;
|
||||
@property (nonatomic) NSArray *children;
|
||||
@property (nonatomic, readonly) BOOL isFolder; // true if children.count > 0
|
||||
@property (nonatomic, readonly) NSString *displayName; //May be nil.
|
||||
|
||||
- (void)addChild:(RSOPMLItem *)child;
|
||||
- (void)setAttribute:(id)value forKey:(NSString *)key;
|
||||
- (id)attributeForKey:(NSString *)key;
|
||||
|
||||
@property (nonatomic, readonly) RSOPMLFeedSpecifier *OPMLFeedSpecifier; //May be nil.
|
||||
|
||||
@property (nonatomic, readonly) NSString *titleFromAttributes; //May be nil.
|
||||
@property (nonatomic, readonly) BOOL isFolder;
|
||||
|
||||
- (NSString *)recursiveDescription;
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user