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
WFDisplayConnection.h
Go to the documentation of this file.
1 //
2 // WFDisplayConnection.h
3 // WFConnector
4 //
5 // Created by Murray Hughes on 23/05/12.
6 // Copyright (c) 2012 Wahoo Fitness. All rights reserved.
7 //
8 
9 #import <QuartzCore/QuartzCore.h>
10 #import <Foundation/Foundation.h>
11 #import <WFConnector/WFSensorConnection.h>
14 #import "WFDisplayData.h"
15 #import "WFDisplayTypes.h"
16 
17 
18 // RELEASE_TODO: clean up and document.
19 
20 @class WFDisplaySensorConfiguration;
21 
25 @interface WFDisplayConnection : WFSensorConnection
26 {
27  id<WFDisplayConnectionDelegate> _displayConnectionDelegate;
28 
29 
30  int currentPage;
31  NSMutableArray* updateQueue;
32  WFDisplaySensorConfiguration* configuration;
33 
34  float _lastLoadingProgress;
35  BOOL didSendConfigWithDelegate;
36 }
37 
38 
39 @property (nonatomic, assign) id<WFDisplayConnectionDelegate> displayConnectionDelegate;
40 
41 - (NSString*) currentPageKey;
42 
43 // Returns a list of page keys that the API recomends for element updates
44 - (NSArray*) recomendedPageKeysToUpdate;
45 
46 - (WFDisplayData*) getDisplayData;
47 
48 // Load a new configuation
49 - (void) loadConfiguration:(WFDisplayConfiguration*) configuation;
50 
51 // Begin a group of updates
52 - (void) beginUpdates;
53 
54 // Begin a group of updates that are sent regardless of the current page.
55 // Used mostly for hidden pages
56 - (void) beginForcedUpdates;
57 
58 // End group updates
59 - (void) endUpdates;
60 
61 - (void) endUpdatesCompletion:(void (^)(void)) completionBlock;
62 
63 
64 // Updates a element with a new value. Currently only applies to strings
65 - (BOOL) setValue:(id)value forElementWithKey:(NSString *)key;
66 
67 // Updates the element's frame
68 - (BOOL) setFrame:(CGRect)frame forElementWithKey:(NSString *)key;
69 
70 // Hide/Show the element with key
71 - (BOOL) setHidden:(BOOL)hidden forElementWithKey:(NSString *)key;
72 
73 // Hide/Show the page with key
74 - (BOOL) setPageHidden:(BOOL)hidden forPageWithKey:(NSString*)key;
75 
76 // Plays sound/beep with given key
77 - (BOOL) playSoundWithKey:(NSString*) key;
78 
79 
80 
91 - (BOOL) setPageVisibleWithKey:(NSString*) pageKey timeout:(NSTimeInterval) timeout;
92 
93 
97  - (BOOL) setPageVisableWithKey:(NSString*) pageKey timeout:(NSTimeInterval) timeout DEPRECATED_ATTRIBUTE;
98 
99 
100 
105 - (BOOL) setBacklightOn:(UCHAR)ucPercentOn;
106 
107 - (BOOL) setBacklightOn:(UCHAR)ucPercentOn withTimeout:(NSTimeInterval) timeout;
108 
109 
117 - (BOOL) setDisplayInverted:(BOOL) inverted;
118 - (BOOL) getDisplayInverted;
119 
127 - (BOOL) setNotificationDisplay:(BOOL) enabled;
128 - (BOOL) getNotificationDisplay;
129 
138 - (BOOL) setAutoPageScrollWithDelay:(NSTimeInterval) delay;
139 
145 - (BOOL) setAutoPageScrollDisabled;
146 
147 
159 - (BOOL) setShouldSleepOnDisconnect:(BOOL) sleepOnDisconnect;
160 
161 
171 -(BOOL)setAltimeterStandardPressure:(double)pressure;
172 
181 -(BOOL)setAltimeterCurrentElevation:(double)elevation;
182 
183 @end
Definition: WFDisplayConfiguration.h:13
signed char BOOL
Definition: types.h:110
unsigned char UCHAR
Definition: types.h:118
Definition: WFDisplayData.h:14
Represents the connection for an ANT sensor.
Definition: WFSensorConnection.h:43