5 // Created by Mike Mayo on 9/30/10.
6 // The OpenStack project is provided under the Apache 2.0 license.
9 #import <Foundation/Foundation.h>
12 @interface Provider : NSObject <NSCoding> {
16 "name": "Rackspace Cloud (US)", "auth_endpoint_url": "https://auth.api.rackspacecloud.com/v1.0",
18 { "name": "Cloud Servers Status", "url": "http://whatever" },
19 { "name": "Cloud Files Status", "url": "http://whatever" },
20 { "name": "Cloud Sites Status", "url": "http://whatever" },
21 { "name": "Rackspace Cloud Blog", "url": "http://whatever" }
24 { "name": "US Phone Support", "url": "tel://8001112222" }
28 "landscape_logo": "url to 279x62 logo",
29 "landscape_logo_2x": "url to 558x124 logo",
30 "provider_icon": "url to 35x35 logo",
31 "provider_icon_2x": "url to 70x70 logo",
32 "provider_icon_72": "url to 72x72 logo",
33 "provider_large": "url to 1000x1000 logo",
34 "compute_icon": "35x35 compute logo",
35 "compute_icon_2x": "70x70 compute logo",
36 "compute_logo": "1000x1000 compute logo",
37 "storage_icon": "35x35 storage logo",
38 "storage_icon_2x": "70x70 storage logo",
39 "storage_logo": "1000x1000 storage logo",
43 // the name of the provider (example: Rackspace Cloud)
46 // endpoint for authentication (example: https://auth.api.rackspacecloud.com/v1.0)
47 NSURL *authEndpointURL;
49 // URLs to RSS feeds, typically for system statuses, but it could be anything
52 // URLs to ways to contact the provider. Can be any type of URL. In the app,
53 // touching will open the URL if the device supports it.
55 // http://support.rackspacecloud.com
58 // mailto:support@rackspacecloud
59 // maps://string-that-works-with-google-maps
62 // Dictionary of logos. All logos should be PNG with transparent backgrounds.
63 // Should follow this format ("key": "value"):
64 // "provider_icon": "url to 35x35 logo" <-- sort of required
65 // "provider_icon_2x": "url to 70x70 logo" <-- sort of required
66 // "provider_large": "url to 1000x1000 logo" <-- sort of required
67 // "compute_icon": "35x35 compute logo"
68 // "compute_icon_2x": "70x70 compute logo"
69 // "compute_logo": "1000x1000 compute logo"
70 // "storage_icon": "35x35 storage logo"
71 // "storage_icon_2x": "70x70 storage logo"
72 // "storage_logo": "1000x1000 storage logo"
74 // If no provider* logos are provided, the OpenStack logo will be used where
75 // a provider's logo should appear.
76 // Compute and storage logos are used in their respective sections in the app.
77 // If they are not present, the provider logo will be used, and if the provider
78 // logo is not present, the OpenStack logo will be used.
79 // If the logo value is not a URL, it should be included in this application's
81 NSDictionary *logoURLs;
83 // UIImage objects serialized after the images are loaded from URLs
84 NSDictionary *logoObjects;
86 NSString *authHelpMessage;
89 + (NSArray *)providers;
90 + (Provider *)fromJSON:(NSDictionary *)dict;
92 - (BOOL)isRackspaceUS;
93 - (BOOL)isRackspaceUK;
95 @property (nonatomic, retain) NSString *name;
96 @property (nonatomic, retain) NSURL *authEndpointURL;
97 @property (nonatomic, retain) NSString *authHelpMessage;
98 @property (nonatomic, retain) NSArray *rssFeeds;
99 @property (nonatomic, retain) NSArray *contactURLs;
100 @property (nonatomic, retain) NSDictionary *logoURLs;
101 @property (nonatomic, retain) NSDictionary *logoObjects;