-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathPBFirmwareMetadata.h
87 lines (75 loc) · 2.8 KB
/
PBFirmwareMetadata.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
//
// PBFirmwareMetadata.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>
@class PBFirmwareVersion;
/**
* Values specifying the Pebble hardware platform variant.
*/
typedef NS_ENUM(uint8_t, FirmwareMetadataPlatform) {
FirmwareMetadataPlatformUnknown = 0,
FirmwareMetadataPlatformPebbleOneEV1 = 1,
FirmwareMetadataPlatformPebbleOneEV2 = 2,
FirmwareMetadataPlatformPebbleOneEV2_3 = 3,
FirmwareMetadataPlatformPebbleOneEV2_4 = 4,
FirmwareMetadataPlatformPebbleOnePointFive = 5,
FirmwareMetadataPlatformPebbleTwoPointZero = 6,
FirmwareMetadataPlatformPebbleSnowyEVT2 = 7,
FirmwareMetadataPlatformPebbleSnowyDVT = 8,
FirmwareMetadataPlatformPebbleSpaldingEVT = 9,
FirmwareMetadataPlatformPebbleBobbySmilesPVT = 10,
FirmwareMetadataPlatformPebbleSpalding = 11,
FirmwareMetadataPlatformPebbleSilkEVT = 12,
FirmwareMetadataPlatformPebbleRobertEVT = 13,
FirmwareMetadataPlatformPebbleSilk = 14,
FirmwareMetadataPlatformPebbleOneBigboard = 0xff,
FirmwareMetadataPlatformPebbleOneBigboard2 = 0xfe,
FirmwareMetadataPlatformPebbleSnowyBigboard = 0xfd,
FirmwareMetadataPlatformPebbleSnowyBigboard2 = 0xfc,
FirmwareMetadataPlatformPebbleSpaldingBigboard = 0xfb,
FirmwareMetadataPlatformPebbleSilkBigboard = 0xfa,
FirmwareMetadataPlatformPebbleRobertBigboard = 0xf9,
FirmwareMetadataPlatformPebbleSilkBigboard2 = 0xf8,
FirmwareMetadataPlatformPebbleRobertBigboard2 = 0xf7,
};
NS_ASSUME_NONNULL_BEGIN
/**
* Metainformation about a firmware running in a watch.
*
* The information contains the firmware version, the firmware hardware
* platform, and other values.
*/
PB_EXTERN_CLASS @interface PBFirmwareMetadata : NSObject
/**
* The version of the firmware.
* @see PBFirmwareVersion
*/
@property (nonatomic, readonly) PBFirmwareVersion *version;
/**
* YES if the firmware is a recovery firmware, NO if it is a regular firmware.
*/
@property (nonatomic, readonly) BOOL isRecoveryFirmware;
/**
* The hardware platform variant with which the firmware is compatible.
*/
@property (nonatomic, readonly) FirmwareMetadataPlatform hardwarePlatform;
/**
* Converts a <FirmwareMetadataPlatform> value to a string.
* @param hardwarePlatform The hardware platform value to convert
* @return A string of the hardware platform
*/
+ (NSString*)hardwarePlatformToString:(FirmwareMetadataPlatform)hardwarePlatform;
/**
* Converts an NSString hardware platform string to the corresponding
* FirmwareMetadataPlatform value.
* @param hardwarePlatformString The string representing the hardware platform.
* @return The hardware platform enum value
*/
+ (FirmwareMetadataPlatform)stringToHardwarePlatform:(NSString *)hardwarePlatformString;
@end
NS_ASSUME_NONNULL_END