1 use crate::{guid, Guid, Handle, Status}; 2 3 #[derive(Debug)] 4 #[repr(C)] 5 pub struct ComponentName2Protocol { 6 pub get_driver_name: unsafe extern "efiapi" fn( 7 this: *const Self, 8 language: *const u8, 9 driver_name: *mut *const u16, 10 ) -> Status, 11 pub get_controller_name: unsafe extern "efiapi" fn( 12 this: *const Self, 13 controller_handle: Handle, 14 child_handle: Handle, 15 language: *const u8, 16 controller_name: *mut *const u16, 17 ) -> Status, 18 pub supported_languages: *const u8, 19 } 20 21 impl ComponentName2Protocol { 22 pub const GUID: Guid = guid!("6a7a5cff-e8d9-4f70-bada-75ab3025ce14"); 23 24 /// GUID of the original `EFI_COMPONENT_NAME_PROTOCOL`. This protocol was 25 /// deprecated in UEFI 2.1 in favor of the new 26 /// `EFI_COMPONENT_NAME2_PROTOCOL`. The two protocols are identical 27 /// except the encoding of supported languages changed from ISO 639-2 to RFC 28 /// 4646. 29 pub const DEPRECATED_COMPONENT_NAME_GUID: Guid = guid!("107a772c-d5e1-11d4-9a46-0090273fc14d"); 30 } 31 32 #[derive(Debug)] 33 #[repr(C)] 34 pub struct ServiceBindingProtocol { 35 pub create_child: 36 unsafe extern "efiapi" fn(this: *mut Self, child_handle: *mut Handle) -> Status, 37 pub destroy_child: unsafe extern "efiapi" fn(this: *mut Self, child_handle: Handle) -> Status, 38 } 39