~urbanape/ubuntuone-ios-client/2.0-13-prerelease

« back to all changes in this revision

Viewing changes to musicstreaming/utilities/operations/AlbumArtLoader.h

  • Committer: Jason Foreman
  • Date: 2011-06-16 18:33:42 UTC
  • mfrom: (191.1.60 master)
  • Revision ID: jason.foreman@canonical.com-20110616183342-vl7a4804xsf0s1b5
Merging branches for v 2.0.

lp:~threeve/ubuntuone-ios-client/master
lp:~urbanape/ubuntuone-ios-client/downloader

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
//  ImageLoader.h
 
2
//  AlbumArtLoader.h
3
3
//  iSub
4
4
//
5
5
//  Created by Aaron Brethorst on 5/4/11.
7
7
//
8
8
 
9
9
#import <UIKit/UIKit.h>
10
 
#import "ImageLoadingOperation.h"
 
10
#import "AlbumArtLoadingOperation.h"
11
11
 
12
 
@protocol ImageLoaderDelegate<NSObject>
 
12
@protocol AlbumArtLoaderDelegate<NSObject>
13
13
- (void)reloadImages;
14
14
@optional
15
15
- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait;
16
16
@end
17
17
 
18
18
 
19
 
@interface ImageLoader : NSObject <ImageLoadingOperationDelegate>
 
19
@interface AlbumArtLoader : NSObject <AlbumArtLoadingOperationDelegate>
20
20
{
21
21
        NSMutableSet *downloadedURLs;
22
22
        NSMutableDictionary *downloadCache;
23
23
        NSOperationQueue *queue;
24
 
        id<ImageLoaderDelegate> delegate;
 
24
        id<AlbumArtLoaderDelegate> delegate;
25
25
        int imageSize;
 
26
    UIImage *defaultAlbumArt;
26
27
}
27
28
@property(nonatomic) int imageSize;
28
 
@property(nonatomic,assign) id<ImageLoaderDelegate> delegate;
29
 
- (UIImage*)imageForArtID:(NSString*)artID;
 
29
@property(nonatomic,assign) id<AlbumArtLoaderDelegate> delegate;
 
30
@property(nonatomic,retain) UIImage *defaultAlbumArt;
 
31
- (UIImage*)imageForArtID:(NSString*)artID error:(NSError**)error;
30
32
- (void)download:(NSString*)artID;
 
33
+ (NSString*)cacheSize;
31
34
@end