|
| 1 | +// SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | + |
| 3 | +//! EFI Shell Protocol v2.2 |
| 4 | +
|
| 5 | +use crate::{guid, Event, Guid}; |
| 6 | + |
| 7 | +/// Shell Protocol |
| 8 | +#[derive(Debug)] |
| 9 | +#[repr(C)] |
| 10 | +pub struct ShellProtocol { |
| 11 | + pub execute: usize, |
| 12 | + pub get_env: usize, |
| 13 | + pub set_env: usize, |
| 14 | + pub get_alias: usize, |
| 15 | + pub set_alias: usize, |
| 16 | + pub get_help_text: usize, |
| 17 | + pub get_device_path_from_map: usize, |
| 18 | + pub get_map_from_device_path: usize, |
| 19 | + pub get_device_path_from_file_path: usize, |
| 20 | + pub get_file_path_from_device_path: usize, |
| 21 | + pub set_map: usize, |
| 22 | + |
| 23 | + pub get_cur_dir: usize, |
| 24 | + pub set_cur_dir: usize, |
| 25 | + pub open_file_list: usize, |
| 26 | + pub free_file_list: usize, |
| 27 | + pub remove_dup_in_file_list: usize, |
| 28 | + |
| 29 | + pub batch_is_active: usize, |
| 30 | + pub is_root_shell: usize, |
| 31 | + pub enable_page_break: usize, |
| 32 | + pub disable_page_break: usize, |
| 33 | + pub get_page_break: usize, |
| 34 | + pub get_device_name: usize, |
| 35 | + |
| 36 | + pub get_file_info: usize, |
| 37 | + pub set_file_info: usize, |
| 38 | + pub open_file_by_name: usize, |
| 39 | + pub close_file: usize, |
| 40 | + pub create_file: usize, |
| 41 | + pub read_file: usize, |
| 42 | + pub write_file: usize, |
| 43 | + pub delete_file: usize, |
| 44 | + pub delete_file_by_name: usize, |
| 45 | + pub get_file_position: usize, |
| 46 | + pub set_file_position: usize, |
| 47 | + pub flush_file: usize, |
| 48 | + pub find_files: usize, |
| 49 | + pub find_files_in_dir: usize, |
| 50 | + pub get_file_size: usize, |
| 51 | + |
| 52 | + pub open_root: usize, |
| 53 | + pub open_root_by_handle: usize, |
| 54 | + |
| 55 | + pub execution_break: Event, |
| 56 | + |
| 57 | + pub major_version: u32, |
| 58 | + pub minor_version: u32, |
| 59 | + pub register_guid_name: usize, |
| 60 | + pub get_guid_name: usize, |
| 61 | + pub get_guid_from_name: usize, |
| 62 | + pub get_env_ex: usize, |
| 63 | +} |
| 64 | + |
| 65 | +impl ShellProtocol { |
| 66 | + pub const GUID: Guid = guid!("6302d008-7f9b-4f30-87ac-60c9fef5da4e"); |
| 67 | +} |
0 commit comments