-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathResponseLoader.h
35 lines (29 loc) · 970 Bytes
/
ResponseLoader.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
//
// ResponseLoader.h
// Jayson
//
// Created by Ben Yellin on 12/22/10.
// Copyright 2010 Been Yelling. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "Response.h"
/*@protocol ResponseLoaderDelegate <NSObject>;
- (void)responseLoaderDidBegin:(ResponseLoader *)loader;
- (void)responseLoader:(ResponseLoader *)loader didFinishWithResponse:(Response *)aResponse;
- (void)responseLoader:(ResponseLoader *)loader didFailWithError:(NSError *)error;
@end*/
@interface ResponseLoader : NSObject {
NSURL *url;
NSMutableData *responseData;
NSString *mimeType;
id delegate;
}
@property (nonatomic, assign) id delegate;
- (id)initWithURL:(NSURL *)aURL;
- (void)start;
@end
@interface NSObject (ResponseLoaderDelegate)
- (void)responseLoaderDidBegin:(ResponseLoader *)loader;
- (void)responseLoader:(ResponseLoader *)loader didFinishWithResponse:(Response *)aResponse;
- (void)responseLoader:(ResponseLoader *)loader didFailWithError:(NSError *)error;
@end