Skip to content

Commit a9226d9

Browse files
uefi-raw: Add UnicodeCollationProtocol
1 parent 9917f1a commit a9226d9

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

uefi-raw/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# uefi-raw - [Unreleased]
22

3+
## Changed
4+
5+
- Added `protocol::string::UnicodeCollationProtocol`.
6+
37

48
# uefi-raw - 0.9.0 (2024-10-23)
59

uefi-raw/src/protocol/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ pub mod misc;
1717
pub mod network;
1818
pub mod rng;
1919
pub mod shell_params;
20+
pub mod string;

uefi-raw/src/protocol/string.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
use crate::{guid, Char16, Char8, Guid};
2+
3+
#[derive(Debug)]
4+
#[repr(C)]
5+
pub struct UnicodeCollationProtocol {
6+
pub stri_coll:
7+
unsafe extern "efiapi" fn(this: *const Self, s1: *const Char16, s2: *const Char16) -> isize,
8+
pub metai_match: unsafe extern "efiapi" fn(
9+
this: *const Self,
10+
string: *const Char16,
11+
pattern: *const Char16,
12+
) -> bool,
13+
pub str_lwr: unsafe extern "efiapi" fn(this: *const Self, s: *mut Char16),
14+
pub str_upr: unsafe extern "efiapi" fn(this: *const Self, s: *mut Char16),
15+
pub fat_to_str: unsafe extern "efiapi" fn(
16+
this: *const Self,
17+
fat_size: usize,
18+
fat: *const Char8,
19+
s: *mut Char16,
20+
),
21+
pub str_to_fat: unsafe extern "efiapi" fn(
22+
this: *const Self,
23+
s: *const Char16,
24+
fat_size: usize,
25+
fat: *mut Char8,
26+
) -> bool,
27+
pub supported_languages: *const Char8,
28+
}
29+
30+
impl UnicodeCollationProtocol {
31+
pub const GUID: Guid = guid!("a4c751fc-23ae-4c3e-92e9-4964cf63f349");
32+
}

0 commit comments

Comments
 (0)