forked from mattgemmell/MGTwitterEngine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MGTwitterTouchJSONParser.h
45 lines (39 loc) · 1.32 KB
/
MGTwitterTouchJSONParser.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
42
43
44
45
//
// MGTwitterTouchJSONParser.h
// MGTwitterEngine
//
// Created by Steve Streza on 3/24/10.
// Copyright 2010 MGTwitterEngine. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MGTwitterParserDelegate.h"
#import "MGTwitterEngineDelegate.h"
@interface MGTwitterTouchJSONParser : NSObject {
__weak NSObject <MGTwitterParserDelegate> *delegate; // weak ref
NSString *identifier;
MGTwitterRequestType requestType;
MGTwitterResponseType responseType;
NSURL *URL;
NSData *json;
NSMutableArray *parsedObjects;
MGTwitterEngineDeliveryOptions deliveryOptions;
}
+ (id)parserWithJSON:(NSData *)theJSON
delegate:(NSObject *)theDelegate
connectionIdentifier:(NSString *)identifier
requestType:(MGTwitterRequestType)reqType
responseType:(MGTwitterResponseType)respType
URL:(NSURL *)URL
deliveryOptions:(MGTwitterEngineDeliveryOptions)deliveryOptions;
- (id)initWithJSON:(NSData *)theJSON
delegate:(NSObject *)theDelegate
connectionIdentifier:(NSString *)identifier
requestType:(MGTwitterRequestType)reqType
responseType:(MGTwitterResponseType)respType
URL:(NSURL *)URL
deliveryOptions:(MGTwitterEngineDeliveryOptions)deliveryOptions;
// delegate callbacks
- (void)_parsingDidEnd;
- (void)_parsingErrorOccurred:(NSError *)parseError;
- (void)_parsedObject:(NSDictionary *)dictionary;
@end