]> git.saurik.com Git - apple/security.git/blob - keychain/ot/proto/generated_source/OTGlobalEnums.h
Security-59754.41.1.tar.gz
[apple/security.git] / keychain / ot / proto / generated_source / OTGlobalEnums.h
1 // This file was automatically generated by protocompiler
2 // DO NOT EDIT!
3 // Compiled from OTPairingMessage.proto
4
5 #include <stdint.h>
6 #ifdef __OBJC__
7 #include <Foundation/Foundation.h>
8 #endif
9
10 #ifndef NS_ENUM
11 #if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum))
12 #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
13 #else
14 #define NS_ENUM(_type, _name) _type _name; enum
15 #endif
16 #endif // !defined(NS_ENUM)
17
18 typedef NS_ENUM(int32_t, OTSupportType) {
19 OTSupportType_unknown = 0,
20 OTSupportType_supported = 1,
21 OTSupportType_not_supported = 2,
22 };
23 #ifdef __OBJC__
24 NS_INLINE NSString *OTSupportTypeAsString(OTSupportType value)
25 {
26 switch (value)
27 {
28 case OTSupportType_unknown: return @"unknown";
29 case OTSupportType_supported: return @"supported";
30 case OTSupportType_not_supported: return @"not_supported";
31 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
32 }
33 }
34 #endif /* __OBJC__ */
35 #ifdef __OBJC__
36 NS_INLINE OTSupportType StringAsOTSupportType(NSString *value)
37 {
38 if ([value isEqualToString:@"unknown"]) return OTSupportType_unknown;
39 if ([value isEqualToString:@"supported"]) return OTSupportType_supported;
40 if ([value isEqualToString:@"not_supported"]) return OTSupportType_not_supported;
41 return OTSupportType_unknown;
42 }
43 #endif /* __OBJC__ */