summaryrefslogtreecommitdiffstats
path: root/Classes/PhotoSource.h
blob: 9aadb93315d9a6144382b9ae45578ec2d539c3e3 (plain)
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
#import <Three20/Three20.h>

///////////////////////////////////////////////////////////////////////////////////////////////////

typedef enum {
  PhotoSourceNormal = 0,
  PhotoSourceDelayed = 1,
  PhotoSourceVariableCount = 2,
  PhotoSourceLoadError = 4,
} PhotoSourceType;

///////////////////////////////////////////////////////////////////////////////////////////////////

@interface PhotoSource : TTURLRequestModel <TTPhotoSource> {
  PhotoSourceType _type;
  NSString* _title;
  NSMutableArray* _photos;
  NSArray* _tempPhotos;
  NSTimer* _fakeLoadTimer;
}

- (id)initWithType:(PhotoSourceType)type title:(NSString*)title
      photos:(NSArray*)photos photos2:(NSArray*)photos2;

@end

///////////////////////////////////////////////////////////////////////////////////////////////////

@interface Photo : NSObject <TTPhoto> {
  id<TTPhotoSource> _photoSource;
  NSString* _thumbURL;
  NSString* _smallURL;
  NSString* _URL;
  CGSize _size;
  NSInteger _index;
  NSString* _caption;
}

- (id)initWithURL:(NSString*)URL smallURL:(NSString*)smallURL size:(CGSize)size;

- (id)initWithURL:(NSString*)URL smallURL:(NSString*)smallURL size:(CGSize)size
      caption:(NSString*)caption;

@end