-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHFConnectionOpertation.h
More file actions
45 lines (30 loc) · 930 Bytes
/
Copy pathHFConnectionOpertation.h
File metadata and controls
45 lines (30 loc) · 930 Bytes
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
//
// HFConnectionOperation.h
// HFConnection
//
// Created by LiQiu Yu on 15-9-28.
// Copyright (c) 2015年 LiQiu Yu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "HFRequest.h"
#import "HFResponse.h"
#import "HFFileHandle.h"
@protocol HFConnectionDelegate;
@class HFRequest;
@class HFFileHandle;
@protocol HFConnectionDelegate <NSObject>
- (void)downloadFinished:(HFResponse *)response;
- (void)downloadInprogress:(HFResponse *)response;
@end
@interface HFConnectionOpertation : NSOperation {
NSURLConnection *connection;
NSMutableData *responseData;
BOOL isFinished;
unsigned long long startOffset;
HFFileHandle *fileHandle;
}
@property (nonatomic, LW_STRONG) HFRequest *request;
@property (nonatomic, LW_STRONG) HFResponse *response;
@property (nonatomic, LW_WEAK) NSObject <HFConnectionDelegate> *delegate;
- (id)initWithRequest:(HFRequest *)request_;
@end