-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathPBWatch+Version.h
42 lines (33 loc) · 1.35 KB
/
PBWatch+Version.h
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
//
// PBWatch+Version.h
// PebbleKit
//
// Created by Martijn The on 9/17/12.
// Copyright (c) 2012 Pebble Technology. All rights reserved.
//
#import <PebbleKit-Static/PBWatch.h>
#import <PebbleKit-Static/PBDefines.h>
#import <PebbleKit-Static/PBVersionInfo.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^PBVersionInfoCompletionBlock)(PBWatch *watch, PBVersionInfo *__nullable versionInfo);
PB_EXTERN NSTimeInterval const PBVersionInfoResponseTimeout;
/**
* Instances of PBFirmwareMetadata describe a firmware in terms of
* its version, whether it is a recovery firmware and its intended hardware
* platform.
* @see PBVersionInfo
*/
@interface PBWatch (Version)
/**
* Requests the version info from the receiver.
* Must be called from the main thread.
* @param handler The handler that will be called when the version info response has been received.
* @param onTimeout The handler that will be called if the watch did not respond within 5 seconds.
* @param watch The watch for which the version info was requested.
* @param versionInfo The version info response.
* @discussion The <PBVersionInfo> response will be cached. The latest version info can be
* accessed through the <versionInfo> property of <PBWatch>.
*/
- (void)getVersionInfo:(PBVersionInfoCompletionBlock)handler onTimeout:(void (^ __nullable)(PBWatch *watch))onTimeout;
@end
NS_ASSUME_NONNULL_END