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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
use serde::{Deserialize, Serialize}; /// System #[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq)] pub struct System { /// A Boolean value that indicates whether your app has permission to activate or /// deactivate system extensions. /// /// To add this entitlement to your app, enable the System Extension capability in /// Xcode. Add this entitlement for all system extension types, including /// DriverKit extensions. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * Bundle resources #[serde(rename = "System Extensions", skip_serializing_if = "Option::is_none")] pub system_extension: Option<SystemExtensions>, /// A Boolean that indicates whether the app can act as a user’s default mail client. /// /// ## Availability /// * iOS 14.0+ /// /// ## Framework /// * Core Services #[serde( rename = "com.apple.developer.mail-client", skip_serializing_if = "Option::is_none" )] pub mail_client: Option<bool>, /// A Boolean that indicates whether the app can act as the user’s default web /// browser. /// /// ## Availability /// * iOS 14.0+ /// /// ## Framework /// * Core Services #[serde( rename = "com.apple.developer.web-browser", skip_serializing_if = "Option::is_none" )] pub web_browser: Option<bool>, } /// System Extensions #[derive(Serialize, Deserialize, Default, Clone, PartialEq, Debug)] pub struct SystemExtensions { /// A Boolean value that indicates whether other development teams may distribute a /// system extension you create. /// /// Add this entitlement to a system extension that you create and sign using your /// development team credentials, but which other development teams distribute in /// their apps. This extension allows a distributing app to have a different team /// ID than the one associated with the system extension. If this entitlement /// isn't present, the team ID of the app and system extension must match. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * System Extensions #[serde( rename = "com.apple.developer.system-extension.redistributable", skip_serializing_if = "Option::is_none" )] pub system_extension_redistributable: Option<bool>, /// The entitlement required to monitor system events for potentially malicious /// activity. /// /// You must request this entitlement from Apple. /// For information about how to request the entitlement, see System Extensions and /// DriverKit. /// /// If your app or extension lacks this requirement, es_new_client fails with the /// result ES_NEW_CLIENT_RESULT_ERR_NOT_ENTITLED. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * Endpoint Security #[serde( rename = "com.apple.developer.endpoint-security.client", skip_serializing_if = "Option::is_none" )] pub endpoint_security_client: Option<bool>, /// A Boolean value that indicates whether your extension has permission to run as a /// user-space driver. /// /// Add this entitlement to every DriverKit driver you create. /// You must request this entitlement from Apple. /// For information about how to request the entitlement, see System Extensions and /// DriverKit. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit", skip_serializing_if = "Option::is_none" )] pub driverkit: Option<bool>, /// A Boolean value indicating whether to match the driver against devices that /// communicate using networking protocols. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit.family.networking", skip_serializing_if = "Option::is_none" )] pub driverkit_family_networking: Option<bool>, /// A Boolean value that indicates whether to match the driver against devices with /// SCSI controllers. /// /// Add this entitlement to the default entitlements file that Xcode created for your /// driver project. /// /// ## Availability /// * macOS 11.3+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit.family.scsicontroller", skip_serializing_if = "Option::is_none" )] pub driverkit_family_scsi_controller: Option<bool>, /// A Boolean value that indicates whether to match the driver against devices with /// serial communication interfaces. /// /// Add this entitlement to the default entitlements file that Xcode created for your /// driver project. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit.family.serial", skip_serializing_if = "Option::is_none" )] pub driverkit_family_serial: Option<bool>, /// An array of PCI device descriptors that your custom driver supports. /// /// Each element in the array is a dictionary whose keys identify a supported device. /// The values of these keys correspond to values stored in the PCI device’s /// configuration registers. /// /// You can provide several matching values for a key, separated by spaces. /// You can also specify an optional mask for the configuration register value by /// putting the mask after the value, prepended with an & character. /// /// Examples: /// * Key = IOPCIMatch. Value = 0x00261011. Result = Matches a device whose vendor ID /// is 0x1011, and device ID is 0x0026, including subsystem IDs. /// * Key = IOPCIMatch. Value = 0x00789004&0x00ffffff 0x78009004&0x0xff00ffff. Result /// = Matches with any device with a vendor ID of 0x9004, and a device ID of 0xzz78 /// or 0x78zz, where ‘z’ is any hexadecimal digit. /// * Key = IOPCIClassMatch. Value = 0x02000000&0xffff0000. Result = Matches a device /// whose class code is 0x0200zz (where ‘z’ is any hexadecimal digit), an ethernet /// device. /// /// ### Note /// You also use the keys defined by this entitlement in your app’s Info.plist, to /// identify which devices your driver loads on. /// /// ## Availability /// * macOS 10.15.4+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit.transport.pci", skip_serializing_if = "Option::is_none" )] pub driverkit_transport_pci: Option<Vec<DriverkitTransportPci>>, /// An array of dictionaries that identify the USB devices the driver supports. /// /// Each element in the array is a dictionary whose keys and values identify a /// specific type of supported device. The keys in the dictionary correspond to /// field names of the device descriptor associated with the USB device. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit.transport.usb", skip_serializing_if = "Option::is_none" )] pub driverkit_transport_usb: Option<Vec<DriverkitTransportUsb>>, /// An array of strings that represent driver extensions which may communicate with /// other DriverKit services. /// /// Add this entitlement to your app that opens the IOUserClient. /// Set its value to an array of bundle IDs of driver extensions that you want to use /// with DriverKit. If you have only one bundle ID, you can use either a single /// string or a one-element array. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde( rename = "com.apple.developer.driverkit.userclient-access", skip_serializing_if = "Option::is_none" )] pub driverkit_userclient_access: Option<Vec<String>>, /// A Boolean value that indicates whether the driver provides a HID-related service /// to the system. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * HIDDriverKit #[serde( rename = "com.apple.developer.driverkit.family.hid.device", skip_serializing_if = "Option::is_none" )] pub driverkit_family_hid_device: Option<bool>, /// A Boolean value that indicates whether the driver provides a HID-related event /// service to the system. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * HIDDriverKit #[serde( rename = "com.apple.developer.driverkit.family.hid.eventservice", skip_serializing_if = "Option::is_none" )] pub driverkit_family_hid_eventservice: Option<bool>, /// A Boolean value that indicates whether the driver communicates with human /// interface devices. /// /// This entitlement gives your driver permission to interact with the hardware for a /// human interface device. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * HIDDriverKit #[serde( rename = "com.apple.developer.driverkit.transport.hid", skip_serializing_if = "Option::is_none" )] pub driverkit_transport_hid: Option<bool>, /// A Boolean value that indicates whether the driver creates a virtual HID device. /// /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * HIDDriverKit #[serde( rename = "com.apple.developer.hid.virtual.device", skip_serializing_if = "Option::is_none" )] pub hid_virtual_device: Option<bool>, } /// Driver Kit Transport PCI #[derive(Serialize, Deserialize, Default, Clone, PartialEq, Debug)] pub struct DriverkitTransportPci { /// A key to match PCI devices by vendor and device ID registers or subsystem /// registers. /// /// This value of this key matches the vendor and device ID (0x00) register, or the /// subsystem register (0x2c). /// /// ## Availability /// * macOS 10.15.4+ /// /// ## Framework /// * DriverKit #[serde(rename = "IOPCIMatch", skip_serializing_if = "Option::is_none")] pub pci_match: Option<String>, /// A key to match PCI devices by vendor and device ID registers. /// /// This value of this key matches the vendor and device ID (0x00) register. /// /// ## Availability /// * macOS 10.15.4+ /// /// ## Framework /// * DriverKit #[serde(rename = "IOPCIPrimaryMatch", skip_serializing_if = "Option::is_none")] pub primary_match: Option<String>, /// A key to match PCI devices by subsystem vendor ID and device ID registers. /// /// This value of this key matches the subsystem register (0x2c). /// /// ## Availability /// * macOS 10.15.4+ /// /// ## Framework /// * DriverKit #[serde( rename = "IOPCISecondaryMatch", skip_serializing_if = "Option::is_none" )] pub secondary_match: Option<String>, /// A key to match PCI devices by class code register. /// /// This value of this key matches the class code register (0x08). The default mask /// for this register is 0xffffff00. /// /// ## Availability /// * macOS 10.15.4+ /// /// ## Framework /// * DriverKit #[serde(rename = "IOPCIClassMatch", skip_serializing_if = "Option::is_none")] pub class_match: Option<String>, } #[derive(Serialize, Deserialize, Default, Clone, PartialEq, Debug)] pub struct DriverkitTransportUsb { /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde( rename = "bConfigurationValue", skip_serializing_if = "Option::is_none" )] pub configuration_value: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bDeviceClass", skip_serializing_if = "Option::is_none")] pub device_class: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bDeviceProtocol", skip_serializing_if = "Option::is_none")] pub device_protocol: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bDeviceSubClass", skip_serializing_if = "Option::is_none")] pub device_sub_class: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bInterfaceClass", skip_serializing_if = "Option::is_none")] pub interface_class: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bInterfaceNumber", skip_serializing_if = "Option::is_none")] pub interface_number: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bInterfaceProtocol", skip_serializing_if = "Option::is_none")] pub interface_protocol: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bInterfaceSubClass", skip_serializing_if = "Option::is_none")] pub interface_sub_class: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "bcdDevice", skip_serializing_if = "Option::is_none")] pub device: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "idProduct", skip_serializing_if = "Option::is_none")] pub product: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "idProductArray", skip_serializing_if = "Option::is_none")] pub product_array: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "idProductMask", skip_serializing_if = "Option::is_none")] pub product_mask: Option<String>, /// ## Availability /// * macOS 10.15+ /// /// ## Framework /// * DriverKit #[serde(rename = "idVendor", skip_serializing_if = "Option::is_none")] pub vendor: Option<i32>, }