-
Notifications
You must be signed in to change notification settings - Fork 2
/
SRDownloadManager.h
42 lines (32 loc) · 1.21 KB
/
SRDownloadManager.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
//
// SRDownloadManager.h
// Soundrocket
//
// Created by Sebastian Boldt on 30.05.15.
// Copyright (c) 2015 sebastianboldt. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Track.h"
/**
* This class is responsible for downloading tracks
*/
@interface SRDownloadManager : NSObject
/*
-(void)downloadFileForURL:(NSString*)string
withProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead)) progressBlock
andCompletionBlockForSuccess:(void(^)(AFHTTPRequestOperation *operation, id responseObject)) successBlockBlock andFailure:(void(^)(AFHTTPRequestOperation *operation, NSError *error))failureBlock directory:(NSString*)directory;
// Returns a shared Singleton Class Instance
+(SRDownloadManager *)sharedManager;
// Array of downloaded tracks
-(NSMutableArray*)downloadedTracks;
// Saves a Track to NSUserDefaults
-(void)saveTrack:(Track *)track key:(NSString *)key;
// Pause current Download Operation
-(void)pauseOperation;
// Resume current Download Operation
-(void)resumeOperation;
// Cancel Current Download Operation
-(void)cancelOperation;
// Removes Track from NSUserDefaults and Harddrive
-(BOOL)removeTrack:(Track*)trackToDelete;*/
@end