Wahoo Fitness API  3.6.1
Documentation for the iPhone version of the Wahoo Fitness API.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
WFDisplayConfiguration.h
Go to the documentation of this file.
1 //
2 // WFDisplayConfiguration.h
3 // WFConnector
4 //
5 // Created by Murray Hughes on 16/12/12.
6 // Copyright (c) 2012 Wahoo Fitness. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
11 @class WFDisplayPage;
12 
13 @interface WFDisplayConfiguration : NSObject <NSCopying>
14 {
15  NSMutableArray* _buttons;
16  NSMutableArray* _mutablePages;
17  NSMutableArray* _errors;
18 
19  NSString* _configurationID;
20  NSArray* _pages;
21  NSString* _comment;
22 
23  NSMutableArray* _sounds;
24  NSMutableArray* _strings;
25 
26 @private
27  int _type;
28  NSString* _passwordHash;
29  BOOL assignedBinaryKeys;
30  BOOL hasHardwareNextPageButton;
31  BOOL hasHardwarePreviousPageButton;
32 }
33 
34 
35 // String that can be used to ID the config file, not used internally
36 @property (nonatomic, copy) NSString* configurationID;
37 
38 // Array of all the pages in the config.
39 @property (nonatomic, readonly) NSArray* pages;
40 
41 // Array of all the sounds in the config
42 @property (nonatomic, retain) NSMutableArray* sounds;
43 
44 // Array of all the sounds in the config
45 @property (nonatomic, retain) NSMutableArray* strings;
46 
47 // Array of all the button in the config
48 @property (nonatomic, retain) NSMutableArray* buttons;
49 
50 // String that can be used to store anything you want, not used internally
51 @property (nonatomic, copy) NSString* comment;
52 
53 // Loads the display config from a dictionary representation
54 + (id)instanceFromDictionary:(NSDictionary *)aDictionary;
55 
56 // Loads the display config directly from a json file at the path
57 + (id) instanceWithContentsOfFile:(NSString*) filepath;
58 
59 // Saves the JSON represesntation to a given filepath
60 - (NSInteger) writeToFile:(NSString*) filepath error:(NSError**) error;
61 
62 // Returns a dictionary represenstation of the conf
63 - (NSDictionary *)dictionaryRepresentation;
64 
65 // manage display pages
66 - (void) addPage:(WFDisplayPage*) page;
67 - (void) insertPage:(WFDisplayPage*)page atIndex:(NSUInteger)index;
68 - (void) removePage:(WFDisplayPage*)page;
69 - (void) removePageAtIndex:(NSUInteger)index;
70 - (void) removeAllPages;
71 
72 // returns the page for a given config
73 - (WFDisplayPage*) pageForKey:(NSString*) key;
74 
75 // return all elements in the display pages with a given key
76 - (NSArray*) elementsForKey:(NSString*) key;
77 
78 - (NSString*) functionForButtonGestureNamed:(NSString*) buttonGestureName;
79 
80 - (void) setFunction:(NSString*)function forButtonGestureNamed:(NSString*) buttonGestureName;
81 
82 
83 @end
84 
85 
86 
Definition: WFDisplayConfiguration.h:13
NSMutableArray * _strings
Definition: WFDisplayConfiguration.h:25
NSMutableArray * _errors
Definition: WFDisplayConfiguration.h:18
NSMutableArray * _mutablePages
Definition: WFDisplayConfiguration.h:17
NSArray * _pages
Definition: WFDisplayConfiguration.h:21
signed char BOOL
Definition: types.h:110
NSString * _comment
Definition: WFDisplayConfiguration.h:22
NSString * _configurationID
Definition: WFDisplayConfiguration.h:20
NSMutableArray * _buttons
Definition: WFDisplayConfiguration.h:16
NSMutableArray * _sounds
Definition: WFDisplayConfiguration.h:24