Added public object functionality.
[pithos-ios] / Classes / Image.h
1 //
2 //  Image.h
3 //  OpenStack
4 //
5 //  Created by Mike Mayo on 10/1/10.
6 //  The OpenStack project is provided under the Apache 2.0 license.
7 //
8
9 #import "ComputeModel.h"
10
11 #define kCustomImage @"custom"
12 #define kCloudServersIcon @"cloud-servers-icon.png"
13
14 @interface Image : ComputeModel <NSCoding, NSCopying> {
15     NSString *status;
16     NSDate *created;
17     NSDate *updated;
18     
19     // images from GET /images can be used to make new servers, but the API
20     // doesn't provide any sort of flag for this, so we'll store it ourselves
21     BOOL canBeLaunched;
22 }
23
24 @property (nonatomic, retain) NSString *status;
25 @property (nonatomic, retain) NSDate *created;
26 @property (nonatomic, retain) NSDate *updated;
27 @property (nonatomic, assign) BOOL canBeLaunched;
28
29 + (Image *)fromJSON:(NSDictionary *)dict;
30
31 // returns part of the name of the logo (ex: "ubuntu")
32 // used to look up images for views
33 - (NSString *)logoPrefix;
34
35 @end