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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
/// The string representation of the UUID for the extended properties descriptor.
/// The corresponding value for this descriptor is an
/// <code>
/// NSNumber
/// </code>
/// object.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidcharacteristicextendedpropertiesstring?language=objc)
pub static CBUUIDCharacteristicExtendedPropertiesString: &'static NSString;
}
extern "C" {
/// The string representation of the UUID for the user description descriptor.
/// The corresponding value for this descriptor is an
/// <code>
/// NSString
/// </code>
/// object.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidcharacteristicuserdescriptionstring?language=objc)
pub static CBUUIDCharacteristicUserDescriptionString: &'static NSString;
}
extern "C" {
/// The string representation of the UUID for the client configuration descriptor.
/// The corresponding value for this descriptor is an
/// <code>
/// NSNumber
/// </code>
/// object.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidclientcharacteristicconfigurationstring?language=objc)
pub static CBUUIDClientCharacteristicConfigurationString: &'static NSString;
}
extern "C" {
/// The string representation of the UUID for the server configuration descriptor.
/// The corresponding value for this descriptor is an
/// <code>
/// NSNumber
/// </code>
/// object.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidservercharacteristicconfigurationstring?language=objc)
pub static CBUUIDServerCharacteristicConfigurationString: &'static NSString;
}
extern "C" {
/// The string representation of the UUID for the presentation format descriptor.
/// The corresponding value for this descriptor is an
/// <code>
/// NSData
/// </code>
/// object.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidcharacteristicformatstring?language=objc)
pub static CBUUIDCharacteristicFormatString: &'static NSString;
}
extern "C" {
/// The string representation of the UUID for the aggregate descriptor.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidcharacteristicaggregateformatstring?language=objc)
pub static CBUUIDCharacteristicAggregateFormatString: &'static NSString;
}
extern "C" {
/// Data representing the valid min/max values accepted for a characteristic.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidcharacteristicvalidrangestring?language=objc)
pub static CBUUIDCharacteristicValidRangeString: &'static NSString;
}
extern "C" {
/// Data representing the observation schedule for a characteristic.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidcharacteristicobservationschedulestring?language=objc)
pub static CBUUIDCharacteristicObservationScheduleString: &'static NSString;
}
extern "C" {
/// The PSM (a little endian uint16_t) of an L2CAP Channel associated with the GATT service
/// containing this characteristic. Servers can publish this characteristic with the UUID
/// ABDD3056-28FA-441D-A470-55A75A52553A
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuidl2cappsmcharacteristicstring?language=objc)
pub static CBUUIDL2CAPPSMCharacteristicString: &'static NSString;
}
extern_class!(
/// A 16-bit, 32-bit, or 128-bit Bluetooth UUID.
/// 16-bit and 32-bit UUIDs are implicitly pre-filled with the Bluetooth Base UUID.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbuuid?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CBUUID;
);
extern_conformance!(
unsafe impl NSCopying for CBUUID {}
);
unsafe impl CopyingHelper for CBUUID {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CBUUID {}
);
impl CBUUID {
extern_methods!(
/// The UUID as NSData.
#[unsafe(method(data))]
#[unsafe(method_family = none)]
pub unsafe fn data(&self) -> Retained<NSData>;
/// The UUID as NSString.
#[unsafe(method(UUIDString))]
#[unsafe(method_family = none)]
pub unsafe fn UUIDString(&self) -> Retained<NSString>;
/// Creates a CBUUID with a 16-bit, 32-bit, or 128-bit UUID string representation.
/// The expected format for 128-bit UUIDs is a string punctuated by hyphens, for example 68753A44-4D6F-1226-9C60-0050E4C00067.
#[unsafe(method(UUIDWithString:))]
#[unsafe(method_family = none)]
pub unsafe fn UUIDWithString(the_string: &NSString) -> Retained<CBUUID>;
/// Creates a CBUUID with a 16-bit, 32-bit, or 128-bit UUID data container.
#[unsafe(method(UUIDWithData:))]
#[unsafe(method_family = none)]
pub unsafe fn UUIDWithData(the_data: &NSData) -> Retained<CBUUID>;
#[cfg(feature = "objc2-core-foundation")]
/// Creates a CBUUID with a CFUUIDRef.
#[deprecated]
#[unsafe(method(UUIDWithCFUUID:))]
#[unsafe(method_family = none)]
pub unsafe fn UUIDWithCFUUID(the_uuid: &CFUUID) -> Retained<CBUUID>;
/// Creates a CBUUID with an NSUUID.
#[unsafe(method(UUIDWithNSUUID:))]
#[unsafe(method_family = none)]
pub unsafe fn UUIDWithNSUUID(the_uuid: &NSUUID) -> Retained<CBUUID>;
);
}
/// Methods declared on superclass `NSObject`.
impl CBUUID {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}