-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathPBVersionInfo.h
112 lines (91 loc) · 3.66 KB
/
PBVersionInfo.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
// PBVersionInfo.h
// PebbleKit
//
// Created by Marcel Jackwerth on 20/08/15.
// Copyright (c) 2015 Pebble Technology. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <PebbleKit-Static/PBDefines.h>
#import <PebbleKit-Static/PBFirmwareVersion.h>
#import <PebbleKit-Static/PBFirmwareMetadata.h>
#import <PebbleKit-Static/PBResourceMetadata.h>
typedef NS_OPTIONS(uint64_t, PBRemoteProtocolCapabilitiesFlags) {
PBRemoteProtocolCapabilitiesFlagsAppRunState = 1 << 0,
PBRemoteProtocolCapabilitiesFlagsInfiniteLogDumping = 1 << 1, // unused
PBRemoteProtocolCapabilitiesFlagsUpdateMusicProtocol = 1 << 2, // unused
PBRemoteProtocolCapabilitiesFlagsExtendedNotificationService = 1 << 3, // unused
PBRemoteProtocolCapabilitiesFlagsLanguagePacksSupported = 1 << 4, // unused
PBRemoteProtocolCapabilitiesFlagsAppMessage8kSupported = 1 << 5,
PBRemoteProtocolCapabilitiesFlagsInsightsSupport = 1 << 6,
PBRemoteProtocolCapabilitiesFlagsThirdPartyVoiceSupported = 1 << 7,
PBRemoteProtocolCapabilitiesFlagsSendTextSupported = 1 << 8,
PBRemoteProtocolCapabilitiesFlagsNotificationsFilteringSupported = 1 << 9,
PBRemoteProtocolCapabilitiesFlagsUnreadCoredumpSupport = 1 << 10, // unused
PBRemoteProtocolCapabilitiesFlagsWeatherApp2 = 1 << 11,
PBRemoteProtocolCapabilitiesFlagsReminderApp = 1 << 12,
PBRemoteProtocolCapabilitiesFlagsWorkoutApp = 1 << 13,
// 14 not used in the FW
// 15 not used in the FW
PBRemoteProtocolCapabilitiesFlagsJSBytecodeVersionAppended = 1 << 16,
};
NS_ASSUME_NONNULL_BEGIN
/**
* An instance of PBVersionInfo describes all the different system software (Pebble OS)
* on a Pebble watch and other auxiliary information.
* @see PBWatch
*/
PB_EXTERN_CLASS @interface PBVersionInfo : NSObject
/**
* The metadata of the firmware that is running.
*/
@property (nonatomic, readonly, strong, nullable) PBFirmwareMetadata *runningFirmwareMetadata;
/**
* The metadata of the recovery firmware that is in storage.
*/
@property (nonatomic, readonly, strong, nullable) PBFirmwareMetadata *recoveryFirmwareMetadata;
/**
* The metadata of the system resources.
*/
@property (nonatomic, readonly, strong) PBResourceMetadata *systemResources;
/**
* The version of the bootloader.
*/
@property (nonatomic, readonly) UInt32 bootloaderVersion;
/**
* The version of the hardware.
*/
@property (nonatomic, readonly, strong) NSString *hardwareVersion;
/**
* The serial number.
*/
@property (nonatomic, readonly, strong) NSString *serialNumber;
/**
* The current Bluetooth device address.
*/
@property (nonatomic, readonly, strong) NSData *deviceAddress;
/**
* Flags for the supported protocol features of the watch.
*/
@property (nonatomic, readonly, assign) PBRemoteProtocolCapabilitiesFlags remoteProtocolCapabilitiesFlags;
/**
* Indicates if the previous connection for the watch was to this device.
*
* If the watch has been connected to this device, but connects to other
* device before connecting again to this device, the value will be YES.
*/
@property (nonatomic, readonly, assign) BOOL hasBeenUnfaithful;
/**
* YES if valid recovery firmware is installed, NO if not.
*/
- (BOOL)hasRecoveryFirmware;
/**
* YES if valid system resources are installed, NO if not.
*/
- (BOOL)hasSystemResources;
/**
* YES if app messages are supported, NO if not.
*/
- (BOOL)appMessagesSupported;
@end
NS_ASSUME_NONNULL_END