-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRSSParser.h
41 lines (33 loc) · 1.13 KB
/
RSSParser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// RSSParser.h
// RSSParser
//
// Created by Peter Willsey on 11-08-03.
// Copyright 2011 Peter Willsey. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol RSSParserDelegate;
@interface RSSParser : NSObject <NSXMLParserDelegate> {
id<RSSParserDelegate> delegate;
@private
NSMutableData *RSSData;
NSMutableString *currentString;
NSMutableDictionary *channel;
NSMutableDictionary *currentItem;
NSMutableArray *elements;
}
@property (nonatomic, assign) id<RSSParserDelegate> delegate;
@property (nonatomic, retain) NSMutableData *RSSData;
@property (nonatomic, retain) NSMutableString *currentString;
@property (nonatomic, retain) NSMutableDictionary *channel;
@property (nonatomic, retain) NSMutableDictionary *currentItem;
@property (nonatomic, retain) NSMutableArray *elements;
- (void)downloadAndParseFeed:(NSURL *)feedURL;
@end
@protocol RSSParserDelegate <NSObject>
@optional
- (void)parserDidFinishParsing:(RSSParser *)parser;
- (void)parserDidParseChannel:(NSDictionary *)channel;
- (void)parserDidParseItem:(NSDictionary *)feedItem;
- (void)parser:(RSSParser *)parser didEncounterError:(NSError *)error;
@end