html-to-markdown 2.27.2 → 2.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
- data/lib/html_to_markdown/version.rb +1 -1
- data/rust-vendor/getrandom/.cargo-checksum.json +1 -1
- data/rust-vendor/getrandom/.cargo_vcs_info.json +1 -1
- data/rust-vendor/getrandom/CHANGELOG.md +62 -43
- data/rust-vendor/getrandom/Cargo.lock +49 -56
- data/rust-vendor/getrandom/Cargo.toml +2 -2
- data/rust-vendor/getrandom/Cargo.toml.orig +2 -2
- data/rust-vendor/getrandom/src/backends/efi_rng.rs +8 -10
- data/rust-vendor/getrandom/src/backends/getentropy.rs +13 -4
- data/rust-vendor/getrandom/src/backends/linux_android_with_fallback.rs +10 -25
- data/rust-vendor/getrandom/src/backends/netbsd.rs +17 -25
- data/rust-vendor/getrandom/src/backends/rdrand.rs +15 -9
- data/rust-vendor/getrandom/src/backends/rndr.rs +2 -1
- data/rust-vendor/getrandom/src/backends/vxworks.rs +7 -3
- data/rust-vendor/getrandom/src/backends/windows.rs +21 -5
- data/rust-vendor/getrandom/src/utils/lazy_bool.rs +39 -0
- data/rust-vendor/getrandom/src/utils/lazy_ptr.rs +57 -0
- data/rust-vendor/html-to-markdown-rs/Cargo.toml +2 -2
- data/rust-vendor/html-to-markdown-rs/src/converter/text_node.rs +2 -1
- data/rust-vendor/html-to-markdown-rs/tests/issue_216_217_regressions.rs +82 -0
- data/rust-vendor/quote/.cargo-checksum.json +1 -1
- data/rust-vendor/quote/.cargo_vcs_info.json +1 -1
- data/rust-vendor/quote/.github/workflows/ci.yml +2 -2
- data/rust-vendor/quote/Cargo.lock +21 -21
- data/rust-vendor/quote/Cargo.toml +2 -2
- data/rust-vendor/quote/Cargo.toml.orig +2 -2
- data/rust-vendor/quote/README.md +0 -1
- data/rust-vendor/quote/src/lib.rs +1 -1
- data/rust-vendor/quote/src/to_tokens.rs +7 -0
- data/rust-vendor/quote/tests/ui/not-quotable.stderr +1 -1
- data/rust-vendor/quote/tests/ui/not-repeatable.stderr +3 -11
- data/rust-vendor/r-efi/.cargo-checksum.json +1 -1
- data/rust-vendor/r-efi/.cargo_vcs_info.json +1 -1
- data/rust-vendor/r-efi/AUTHORS +1 -0
- data/rust-vendor/r-efi/Cargo.lock +1 -1
- data/rust-vendor/r-efi/Cargo.toml +1 -3
- data/rust-vendor/r-efi/Cargo.toml.orig +1 -5
- data/rust-vendor/r-efi/NEWS.md +16 -0
- data/rust-vendor/r-efi/src/base.rs +1 -1
- data/rust-vendor/r-efi/src/lib.rs +27 -12
- data/rust-vendor/r-efi/src/protocols/absolute_pointer.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/block_io.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/bus_specific_driver_override.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/debug_support.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/debugport.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/decompress.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_from_text.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_to_text.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_utilities.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/disk_io.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/disk_io2.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/driver_binding.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/driver_diagnostics2.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/driver_family_override.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/file.rs +28 -28
- data/rust-vendor/r-efi/src/protocols/graphics_output.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/hii_database.rs +24 -24
- data/rust-vendor/r-efi/src/protocols/hii_font.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/hii_font_ex.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/hii_string.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/ip4.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/ip6.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/load_file.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/loaded_image.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/managed_network.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/memory_attribute.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/mp_services.rs +15 -15
- data/rust-vendor/r-efi/src/protocols/pci_io.rs +26 -26
- data/rust-vendor/r-efi/src/protocols/platform_driver_override.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/rng.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/service_binding.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/shell.rs +81 -81
- data/rust-vendor/r-efi/src/protocols/shell_dynamic_command.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/simple_file_system.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/simple_network.rs +26 -26
- data/rust-vendor/r-efi/src/protocols/simple_text_input.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/simple_text_input_ex.rs +11 -11
- data/rust-vendor/r-efi/src/protocols/simple_text_output.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/tcp4.rs +20 -20
- data/rust-vendor/r-efi/src/protocols/tcp6.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/timestamp.rs +3 -3
- data/rust-vendor/r-efi/src/protocols/udp4.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/udp6.rs +14 -14
- data/rust-vendor/r-efi/src/system.rs +115 -115
- data/rust-vendor/r-efi/src/vendor/intel/console_control.rs +6 -6
- data/rust-vendor/r-efi-5.3.0/.cargo-checksum.json +1 -0
- data/rust-vendor/r-efi-5.3.0/.cargo_vcs_info.json +6 -0
- data/rust-vendor/r-efi-5.3.0/.github/workflows/publish.yml +39 -0
- data/rust-vendor/r-efi-5.3.0/.github/workflows/rust-tests.yml +125 -0
- data/rust-vendor/r-efi-5.3.0/AUTHORS +74 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.lock +16 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.toml +70 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.toml.orig +51 -0
- data/rust-vendor/r-efi-5.3.0/Makefile +85 -0
- data/rust-vendor/r-efi-5.3.0/NEWS.md +301 -0
- data/rust-vendor/r-efi-5.3.0/README.md +99 -0
- data/rust-vendor/r-efi-5.3.0/examples/freestanding.rs +34 -0
- data/rust-vendor/r-efi-5.3.0/examples/gop-query.rs +188 -0
- data/rust-vendor/r-efi-5.3.0/examples/hello-world.rs +55 -0
- data/rust-vendor/r-efi-5.3.0/src/base.rs +993 -0
- data/rust-vendor/r-efi-5.3.0/src/hii.rs +1300 -0
- data/rust-vendor/r-efi-5.3.0/src/lib.rs +182 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/absolute_pointer.rs +69 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/block_io.rs +70 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/bus_specific_driver_override.rs +32 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/debug_support.rs +835 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/debugport.rs +42 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/decompress.rs +37 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path.rs +82 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_from_text.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_to_text.rs +30 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_utilities.rs +63 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/disk_io.rs +40 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/disk_io2.rs +58 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_binding.rs +42 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_diagnostics2.rs +38 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_family_override.rs +23 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/file.rs +183 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/graphics_output.rs +103 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_database.rs +299 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_font.rs +87 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_font_ex.rs +107 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_package_list.rs +14 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_string.rs +71 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/ip4.rs +202 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/ip6.rs +264 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/load_file.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/load_file2.rs +15 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/loaded_image.rs +39 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/loaded_image_device_path.rs +13 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/managed_network.rs +147 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/memory_attribute.rs +40 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/mp_services.rs +121 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/pci_io.rs +203 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/platform_driver_override.rs +46 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/rng.rs +83 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/service_binding.rs +20 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell.rs +295 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell_dynamic_command.rs +33 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell_parameters.rs +23 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_file_system.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_network.rs +196 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_input.rs +38 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_input_ex.rs +85 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_output.rs +86 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/tcp4.rs +224 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/tcp6.rs +202 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/timestamp.rs +32 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/udp4.rs +151 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/udp6.rs +137 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols.rs +54 -0
- data/rust-vendor/r-efi-5.3.0/src/system.rs +1130 -0
- data/rust-vendor/r-efi-5.3.0/src/vendor/intel/console_control.rs +37 -0
- data/rust-vendor/r-efi-5.3.0/src/vendor.rs +10 -0
- data/rust-vendor/tokio/.cargo-checksum.json +1 -1
- data/rust-vendor/tokio/.cargo_vcs_info.json +1 -1
- data/rust-vendor/tokio/CHANGELOG.md +94 -0
- data/rust-vendor/tokio/Cargo.lock +1549 -0
- data/rust-vendor/tokio/Cargo.toml +96 -83
- data/rust-vendor/tokio/Cargo.toml.orig +7 -7
- data/rust-vendor/tokio/README.md +1 -1
- data/rust-vendor/tokio/src/fs/open_options.rs +4 -1
- data/rust-vendor/tokio/src/fs/read.rs +4 -1
- data/rust-vendor/tokio/src/fs/write.rs +4 -1
- data/rust-vendor/tokio/src/io/async_write.rs +3 -4
- data/rust-vendor/tokio/src/io/poll_evented.rs +23 -1
- data/rust-vendor/tokio/src/io/stderr.rs +15 -1
- data/rust-vendor/tokio/src/io/stdout.rs +14 -0
- data/rust-vendor/tokio/src/io/util/async_write_ext.rs +2 -2
- data/rust-vendor/tokio/src/io/util/write_buf.rs +11 -2
- data/rust-vendor/tokio/src/lib.rs +12 -28
- data/rust-vendor/tokio/src/macros/select.rs +6 -8
- data/rust-vendor/tokio/src/net/tcp/socket.rs +25 -1
- data/rust-vendor/tokio/src/net/tcp/stream.rs +40 -1
- data/rust-vendor/tokio/src/process/unix/pidfd_reaper.rs +1 -41
- data/rust-vendor/tokio/src/runtime/blocking/pool.rs +18 -14
- data/rust-vendor/tokio/src/runtime/builder.rs +10 -4
- data/rust-vendor/tokio/src/runtime/handle.rs +3 -2
- data/rust-vendor/tokio/src/runtime/io/driver/uring.rs +49 -61
- data/rust-vendor/tokio/src/runtime/io/driver.rs +6 -5
- data/rust-vendor/tokio/src/runtime/mod.rs +20 -1
- data/rust-vendor/tokio/src/runtime/runtime.rs +71 -1
- data/rust-vendor/tokio/src/runtime/scheduler/current_thread/mod.rs +24 -8
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker.rs +5 -0
- data/rust-vendor/tokio/src/runtime/task/core.rs +1 -0
- data/rust-vendor/tokio/src/runtime/task/join.rs +7 -3
- data/rust-vendor/tokio/src/runtime/task/list.rs +5 -3
- data/rust-vendor/tokio/src/runtime/task/mod.rs +0 -5
- data/rust-vendor/tokio/src/runtime/tests/loom_blocking.rs +39 -1
- data/rust-vendor/tokio/src/signal/mod.rs +6 -17
- data/rust-vendor/tokio/src/signal/registry.rs +1 -1
- data/rust-vendor/tokio/src/signal/unix.rs +24 -44
- data/rust-vendor/tokio/src/signal/windows/sys.rs +52 -64
- data/rust-vendor/tokio/src/signal/windows.rs +35 -23
- data/rust-vendor/tokio/src/sync/mpsc/mod.rs +3 -1
- data/rust-vendor/tokio/src/sync/oneshot.rs +13 -0
- data/rust-vendor/tokio/src/sync/rwlock.rs +4 -5
- data/rust-vendor/tokio/src/sync/tests/loom_oneshot.rs +27 -1
- data/rust-vendor/tokio/src/task/blocking.rs +16 -1
- data/rust-vendor/tokio/src/task/builder.rs +2 -2
- data/rust-vendor/tokio/src/task/mod.rs +1 -1
- data/rust-vendor/tokio/src/task/spawn.rs +8 -3
- data/rust-vendor/tokio/src/task/yield_now.rs +13 -23
- data/rust-vendor/tokio/src/time/clock.rs +62 -0
- data/rust-vendor/tokio/src/util/memchr.rs +32 -4
- data/rust-vendor/tokio/src/util/sharded_list.rs +6 -4
- data/rust-vendor/tokio/tests/fs_link.rs +54 -0
- data/rust-vendor/tokio/tests/io_async_fd_memory_leak.rs +209 -0
- data/rust-vendor/tokio/tests/io_write_buf.rs +56 -0
- data/rust-vendor/tokio/tests/process_issue_7144.rs +8 -0
- data/rust-vendor/tokio/tests/rt_basic.rs +41 -0
- data/rust-vendor/tokio/tests/rt_common_before_park.rs +92 -0
- data/rust-vendor/tokio/tests/rt_metrics.rs +1 -1
- data/rust-vendor/tokio/tests/rt_panic.rs +12 -0
- data/rust-vendor/tokio/tests/rt_shutdown_err.rs +82 -0
- data/rust-vendor/tokio/tests/rt_threaded.rs +49 -1
- data/rust-vendor/tokio/tests/rt_unstable_metrics.rs +32 -0
- data/rust-vendor/tokio/tests/tcp_connect.rs +2 -3
- data/rust-vendor/tokio/tests/tcp_shutdown.rs +1 -3
- data/rust-vendor/tokio/tests/tcp_socket.rs +3 -4
- data/rust-vendor/tokio/tests/tcp_stream.rs +3 -0
- metadata +78 -3
- data/rust-vendor/getrandom/src/utils/lazy.rs +0 -64
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
//! Shell Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! Provides shell services to UEFI applications.
|
|
4
|
+
|
|
5
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
6
|
+
0x6302d008,
|
|
7
|
+
0x7f9b,
|
|
8
|
+
0x4f30,
|
|
9
|
+
0x87,
|
|
10
|
+
0xac,
|
|
11
|
+
&[0x60, 0xc9, 0xfe, 0xf5, 0xda, 0x4e],
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
pub const MAJOR_VERSION: u32 = 0x00000002;
|
|
15
|
+
pub const MINOR_VERSION: u32 = 0x00000002;
|
|
16
|
+
|
|
17
|
+
pub type FileHandle = *mut core::ffi::c_void;
|
|
18
|
+
|
|
19
|
+
pub type DeviceNameFlags = u32;
|
|
20
|
+
pub const DEVICE_NAME_USE_COMPONENT_NAME: DeviceNameFlags = 0x00000001;
|
|
21
|
+
pub const DEVICE_NAME_USE_DEVICE_PATH: DeviceNameFlags = 0x00000002;
|
|
22
|
+
|
|
23
|
+
#[repr(C)]
|
|
24
|
+
pub struct ListEntry {
|
|
25
|
+
pub flink: *mut ListEntry,
|
|
26
|
+
pub blink: *mut ListEntry,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#[repr(C)]
|
|
30
|
+
pub struct FileInfo {
|
|
31
|
+
pub link: ListEntry,
|
|
32
|
+
pub status: crate::base::Status,
|
|
33
|
+
pub full_name: *mut crate::base::Char16,
|
|
34
|
+
pub file_name: *mut crate::base::Char16,
|
|
35
|
+
pub handle: FileHandle,
|
|
36
|
+
pub info: *mut crate::protocols::file::Info,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
pub type Execute = eficall! {fn(
|
|
40
|
+
*mut crate::base::Handle,
|
|
41
|
+
*mut crate::base::Char16,
|
|
42
|
+
*mut *mut crate::base::Char16,
|
|
43
|
+
*mut crate::base::Status,
|
|
44
|
+
) -> crate::base::Status};
|
|
45
|
+
|
|
46
|
+
pub type GetEnv = eficall! {fn(
|
|
47
|
+
*mut crate::base::Char16,
|
|
48
|
+
) -> *mut crate::base::Char16};
|
|
49
|
+
|
|
50
|
+
pub type SetEnv = eficall! {fn(
|
|
51
|
+
*mut crate::base::Char16,
|
|
52
|
+
*mut crate::base::Char16,
|
|
53
|
+
crate::base::Boolean,
|
|
54
|
+
) -> crate::base::Status};
|
|
55
|
+
|
|
56
|
+
pub type GetAlias = eficall! {fn(
|
|
57
|
+
*mut crate::base::Char16,
|
|
58
|
+
*mut crate::base::Boolean,
|
|
59
|
+
) -> *mut crate::base::Char16};
|
|
60
|
+
|
|
61
|
+
pub type SetAlias = eficall! {fn(
|
|
62
|
+
*mut crate::base::Char16,
|
|
63
|
+
*mut crate::base::Char16,
|
|
64
|
+
crate::base::Boolean,
|
|
65
|
+
crate::base::Boolean,
|
|
66
|
+
) -> crate::base::Status};
|
|
67
|
+
|
|
68
|
+
pub type GetHelpText = eficall! {fn(
|
|
69
|
+
*mut crate::base::Char16,
|
|
70
|
+
*mut crate::base::Char16,
|
|
71
|
+
*mut *mut crate::base::Char16,
|
|
72
|
+
) -> crate::base::Status};
|
|
73
|
+
|
|
74
|
+
pub type GetDevicePathFromMap = eficall! {fn(
|
|
75
|
+
*mut crate::base::Char16,
|
|
76
|
+
) -> *mut crate::protocols::device_path::Protocol};
|
|
77
|
+
|
|
78
|
+
pub type GetMapFromDevicePath = eficall! {fn(
|
|
79
|
+
*mut *mut crate::protocols::device_path::Protocol,
|
|
80
|
+
) -> *mut crate::base::Char16};
|
|
81
|
+
|
|
82
|
+
pub type GetDevicePathFromFilePath = eficall! {fn(
|
|
83
|
+
*mut crate::base::Char16,
|
|
84
|
+
) -> *mut crate::protocols::device_path::Protocol};
|
|
85
|
+
|
|
86
|
+
pub type GetFilePathFromDevicePath = eficall! {fn(
|
|
87
|
+
*mut crate::protocols::device_path::Protocol,
|
|
88
|
+
) -> *mut crate::base::Char16};
|
|
89
|
+
|
|
90
|
+
pub type SetMap = eficall! {fn(
|
|
91
|
+
*mut crate::protocols::device_path::Protocol,
|
|
92
|
+
*mut crate::base::Char16,
|
|
93
|
+
) -> crate::base::Status};
|
|
94
|
+
|
|
95
|
+
pub type GetCurDir = eficall! {fn(
|
|
96
|
+
*mut crate::base::Char16,
|
|
97
|
+
) -> *mut crate::base::Char16};
|
|
98
|
+
|
|
99
|
+
pub type SetCurDir = eficall! {fn(
|
|
100
|
+
*mut crate::base::Char16,
|
|
101
|
+
*mut crate::base::Char16,
|
|
102
|
+
) -> crate::base::Status};
|
|
103
|
+
|
|
104
|
+
pub type OpenFileList = eficall! {fn(
|
|
105
|
+
*mut crate::base::Char16,
|
|
106
|
+
u64,
|
|
107
|
+
*mut *mut FileInfo,
|
|
108
|
+
) -> crate::base::Status};
|
|
109
|
+
|
|
110
|
+
pub type FreeFileList = eficall! {fn(
|
|
111
|
+
*mut *mut FileInfo,
|
|
112
|
+
) -> crate::base::Status};
|
|
113
|
+
|
|
114
|
+
pub type RemoveDupInFileList = eficall! {fn(
|
|
115
|
+
*mut *mut FileInfo,
|
|
116
|
+
) -> crate::base::Status};
|
|
117
|
+
|
|
118
|
+
pub type BatchIsActive = eficall! {fn() -> crate::base::Boolean};
|
|
119
|
+
|
|
120
|
+
pub type IsRootShell = eficall! {fn() -> crate::base::Boolean};
|
|
121
|
+
|
|
122
|
+
pub type EnablePageBreak = eficall! {fn()};
|
|
123
|
+
|
|
124
|
+
pub type DisablePageBreak = eficall! {fn()};
|
|
125
|
+
|
|
126
|
+
pub type GetPageBreak = eficall! {fn() -> crate::base::Boolean};
|
|
127
|
+
|
|
128
|
+
pub type GetDeviceName = eficall! {fn(
|
|
129
|
+
crate::base::Handle,
|
|
130
|
+
DeviceNameFlags,
|
|
131
|
+
*mut crate::base::Char8,
|
|
132
|
+
*mut *mut crate::base::Char16,
|
|
133
|
+
) -> crate::base::Status};
|
|
134
|
+
|
|
135
|
+
pub type GetFileInfo = eficall! {fn(
|
|
136
|
+
FileHandle,
|
|
137
|
+
) -> *mut crate::protocols::file::Info};
|
|
138
|
+
|
|
139
|
+
pub type SetFileInfo = eficall! {fn(
|
|
140
|
+
FileHandle,
|
|
141
|
+
*mut crate::protocols::file::Info
|
|
142
|
+
) -> crate::base::Status};
|
|
143
|
+
|
|
144
|
+
pub type OpenFileByName = eficall! {fn(
|
|
145
|
+
*mut crate::base::Char16,
|
|
146
|
+
*mut FileHandle,
|
|
147
|
+
u64,
|
|
148
|
+
) -> crate::base::Status};
|
|
149
|
+
|
|
150
|
+
pub type CloseFile = eficall! {fn(
|
|
151
|
+
FileHandle,
|
|
152
|
+
) -> crate::base::Status};
|
|
153
|
+
|
|
154
|
+
pub type CreateFile = eficall! {fn(
|
|
155
|
+
*mut crate::base::Char16,
|
|
156
|
+
u64,
|
|
157
|
+
*mut FileHandle,
|
|
158
|
+
) -> crate::base::Status};
|
|
159
|
+
|
|
160
|
+
pub type ReadFile = eficall! {fn(
|
|
161
|
+
FileHandle,
|
|
162
|
+
*mut usize,
|
|
163
|
+
*mut core::ffi::c_void,
|
|
164
|
+
) -> crate::base::Status};
|
|
165
|
+
|
|
166
|
+
pub type WriteFile = eficall! {fn(
|
|
167
|
+
FileHandle,
|
|
168
|
+
*mut usize,
|
|
169
|
+
*mut core::ffi::c_void,
|
|
170
|
+
) -> crate::base::Status};
|
|
171
|
+
|
|
172
|
+
pub type DeleteFile = eficall! {fn(
|
|
173
|
+
FileHandle,
|
|
174
|
+
) -> crate::base::Status};
|
|
175
|
+
|
|
176
|
+
pub type DeleteFileByName = eficall! {fn(
|
|
177
|
+
*mut crate::base::Char16,
|
|
178
|
+
) -> crate::base::Status};
|
|
179
|
+
|
|
180
|
+
pub type GetFilePosition = eficall! {fn(
|
|
181
|
+
FileHandle,
|
|
182
|
+
*mut u64,
|
|
183
|
+
) -> crate::base::Status};
|
|
184
|
+
|
|
185
|
+
pub type SetFilePosition = eficall! {fn(
|
|
186
|
+
FileHandle,
|
|
187
|
+
u64,
|
|
188
|
+
) -> crate::base::Status};
|
|
189
|
+
|
|
190
|
+
pub type FlushFile = eficall! {fn(
|
|
191
|
+
FileHandle,
|
|
192
|
+
) -> crate::base::Status};
|
|
193
|
+
|
|
194
|
+
pub type FindFiles = eficall! {fn(
|
|
195
|
+
*mut crate::base::Char16,
|
|
196
|
+
*mut *mut FileInfo,
|
|
197
|
+
) -> crate::base::Status};
|
|
198
|
+
|
|
199
|
+
pub type FindFilesInDir = eficall! {fn(
|
|
200
|
+
FileHandle,
|
|
201
|
+
*mut *mut FileInfo,
|
|
202
|
+
) -> crate::base::Status};
|
|
203
|
+
|
|
204
|
+
pub type GetFileSize = eficall! {fn(
|
|
205
|
+
FileHandle,
|
|
206
|
+
*mut u64,
|
|
207
|
+
) -> crate::base::Status};
|
|
208
|
+
|
|
209
|
+
pub type OpenRoot = eficall! {fn(
|
|
210
|
+
*mut crate::protocols::device_path::Protocol,
|
|
211
|
+
*mut FileHandle,
|
|
212
|
+
) -> crate::base::Status};
|
|
213
|
+
|
|
214
|
+
pub type OpenRootByHandle = eficall! {fn(
|
|
215
|
+
crate::base::Handle,
|
|
216
|
+
*mut FileHandle,
|
|
217
|
+
) -> crate::base::Status};
|
|
218
|
+
|
|
219
|
+
pub type RegisterGuidName = eficall! {fn(
|
|
220
|
+
*mut crate::base::Guid,
|
|
221
|
+
*mut crate::base::Char16,
|
|
222
|
+
) -> crate::base::Status};
|
|
223
|
+
|
|
224
|
+
pub type GetGuidName = eficall! {fn(
|
|
225
|
+
*mut crate::base::Guid,
|
|
226
|
+
*mut *mut crate::base::Char16,
|
|
227
|
+
) -> crate::base::Status};
|
|
228
|
+
|
|
229
|
+
pub type GetGuidFromName = eficall! {fn(
|
|
230
|
+
*mut crate::base::Char16,
|
|
231
|
+
*mut crate::base::Guid,
|
|
232
|
+
) -> crate::base::Status};
|
|
233
|
+
|
|
234
|
+
pub type GetEnvEx = eficall! {fn(
|
|
235
|
+
*mut crate::base::Char16,
|
|
236
|
+
*mut u32,
|
|
237
|
+
) -> *mut crate::base::Char16};
|
|
238
|
+
|
|
239
|
+
#[repr(C)]
|
|
240
|
+
pub struct Protocol {
|
|
241
|
+
pub execute: Execute,
|
|
242
|
+
pub get_env: GetEnv,
|
|
243
|
+
pub set_env: SetEnv,
|
|
244
|
+
pub get_alias: GetAlias,
|
|
245
|
+
pub set_alias: SetAlias,
|
|
246
|
+
pub get_help_text: GetHelpText,
|
|
247
|
+
pub get_device_path_from_map: GetDevicePathFromMap,
|
|
248
|
+
pub get_map_from_device_path: GetMapFromDevicePath,
|
|
249
|
+
pub get_device_path_from_file_path: GetDevicePathFromFilePath,
|
|
250
|
+
pub get_file_path_from_device_path: GetFilePathFromDevicePath,
|
|
251
|
+
pub set_map: SetMap,
|
|
252
|
+
|
|
253
|
+
pub get_cur_dir: GetCurDir,
|
|
254
|
+
pub set_cur_dir: SetCurDir,
|
|
255
|
+
pub open_file_list: OpenFileList,
|
|
256
|
+
pub free_file_list: FreeFileList,
|
|
257
|
+
pub remove_dup_in_file_list: RemoveDupInFileList,
|
|
258
|
+
|
|
259
|
+
pub batch_is_active: BatchIsActive,
|
|
260
|
+
pub is_root_shell: IsRootShell,
|
|
261
|
+
pub enable_page_break: EnablePageBreak,
|
|
262
|
+
pub disable_page_break: DisablePageBreak,
|
|
263
|
+
pub get_page_break: GetPageBreak,
|
|
264
|
+
pub get_device_name: GetDeviceName,
|
|
265
|
+
|
|
266
|
+
pub get_file_info: GetFileInfo,
|
|
267
|
+
pub set_file_info: SetFileInfo,
|
|
268
|
+
pub open_file_by_name: OpenFileByName,
|
|
269
|
+
pub close_file: CloseFile,
|
|
270
|
+
pub create_file: CreateFile,
|
|
271
|
+
pub read_file: ReadFile,
|
|
272
|
+
pub write_file: WriteFile,
|
|
273
|
+
pub delete_file: DeleteFile,
|
|
274
|
+
pub delete_file_by_name: DeleteFileByName,
|
|
275
|
+
pub get_file_position: GetFilePosition,
|
|
276
|
+
pub set_file_position: SetFilePosition,
|
|
277
|
+
pub flush_file: FlushFile,
|
|
278
|
+
pub find_files: FindFiles,
|
|
279
|
+
pub find_files_in_dir: FindFilesInDir,
|
|
280
|
+
pub get_file_size: GetFileSize,
|
|
281
|
+
|
|
282
|
+
pub open_root: OpenRoot,
|
|
283
|
+
pub open_root_by_handle: OpenRootByHandle,
|
|
284
|
+
|
|
285
|
+
pub execution_break: crate::base::Event,
|
|
286
|
+
|
|
287
|
+
pub major_version: u32,
|
|
288
|
+
pub minor_version: u32,
|
|
289
|
+
pub register_guid_name: RegisterGuidName,
|
|
290
|
+
pub get_guid_name: GetGuidName,
|
|
291
|
+
pub get_guid_from_name: GetGuidFromName,
|
|
292
|
+
|
|
293
|
+
// Shell 2.1
|
|
294
|
+
pub get_env_ex: GetEnvEx,
|
|
295
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//! Shell Dynamic Command Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! Defined in UEFI Shell Specification, Section 2.4
|
|
4
|
+
|
|
5
|
+
use super::{shell, shell_parameters};
|
|
6
|
+
|
|
7
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
8
|
+
0x3c7200e9,
|
|
9
|
+
0x005f,
|
|
10
|
+
0x4ea4,
|
|
11
|
+
0x87,
|
|
12
|
+
0xde,
|
|
13
|
+
&[0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3],
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
pub type CommandHandler = eficall! {fn(
|
|
17
|
+
*mut Protocol,
|
|
18
|
+
*mut crate::system::SystemTable,
|
|
19
|
+
*mut shell_parameters::Protocol,
|
|
20
|
+
*mut shell::Protocol,
|
|
21
|
+
) -> crate::base::Status};
|
|
22
|
+
|
|
23
|
+
pub type CommandGetHelp = eficall! {fn(
|
|
24
|
+
*mut Protocol,
|
|
25
|
+
*mut crate::base::Char8,
|
|
26
|
+
) -> crate::base::Status};
|
|
27
|
+
|
|
28
|
+
#[repr(C)]
|
|
29
|
+
pub struct Protocol {
|
|
30
|
+
pub command_name: *mut crate::base::Char16,
|
|
31
|
+
pub handler: CommandHandler,
|
|
32
|
+
pub get_help: CommandGetHelp,
|
|
33
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//! Shell Parameters Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! Defined in the UEFI Shell Specification, Section 2.3.
|
|
4
|
+
|
|
5
|
+
use super::shell;
|
|
6
|
+
|
|
7
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
8
|
+
0x752f3136,
|
|
9
|
+
0x4e16,
|
|
10
|
+
0x4fdc,
|
|
11
|
+
0xa2,
|
|
12
|
+
0x2a,
|
|
13
|
+
&[0xe5, 0xf4, 0x68, 0x12, 0xf4, 0xca],
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
#[repr(C)]
|
|
17
|
+
pub struct Protocol {
|
|
18
|
+
pub argv: *mut *mut crate::base::Char16,
|
|
19
|
+
pub argc: usize,
|
|
20
|
+
pub std_in: shell::FileHandle,
|
|
21
|
+
pub std_out: shell::FileHandle,
|
|
22
|
+
pub std_err: shell::FileHandle,
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//! Simple File System Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! Provides the `open_volume` function returning a file protocol representing the root directory
|
|
4
|
+
//! of a filesystem.
|
|
5
|
+
|
|
6
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
7
|
+
0x964e5b22,
|
|
8
|
+
0x6459,
|
|
9
|
+
0x11d2,
|
|
10
|
+
0x8e,
|
|
11
|
+
0x39,
|
|
12
|
+
&[0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b],
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
pub const REVISION: u64 = 0x0000000000010000u64;
|
|
16
|
+
|
|
17
|
+
pub type ProtocolOpenVolume = eficall! {fn(
|
|
18
|
+
*mut Protocol,
|
|
19
|
+
*mut *mut crate::protocols::file::Protocol,
|
|
20
|
+
) -> crate::base::Status};
|
|
21
|
+
|
|
22
|
+
#[repr(C)]
|
|
23
|
+
pub struct Protocol {
|
|
24
|
+
pub revision: u64,
|
|
25
|
+
pub open_volume: ProtocolOpenVolume,
|
|
26
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
//! Simple Network Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! The simple network protcol provides services to initialize a network interface, transmit
|
|
4
|
+
//! packets, receive packets, and close a network interface.
|
|
5
|
+
|
|
6
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
7
|
+
0xa19832b9,
|
|
8
|
+
0xac25,
|
|
9
|
+
0x11d3,
|
|
10
|
+
0x9a,
|
|
11
|
+
0x2d,
|
|
12
|
+
&[0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d],
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
pub const REVISION: u64 = 0x0000000000010000u64;
|
|
16
|
+
|
|
17
|
+
pub const MAX_MCAST_FILTER_CNT: usize = 16;
|
|
18
|
+
|
|
19
|
+
pub const RECEIVE_UNICAST: u32 = 0x00000001u32;
|
|
20
|
+
pub const RECEIVE_MULTICAST: u32 = 0x00000002u32;
|
|
21
|
+
pub const RECEIVE_BROADCAST: u32 = 0x00000004u32;
|
|
22
|
+
pub const RECEIVE_PROMISCUOUS: u32 = 0x00000008u32;
|
|
23
|
+
pub const RECEIVE_PROMISCUOUS_MULTICAST: u32 = 0x00000010u32;
|
|
24
|
+
|
|
25
|
+
pub const RECEIVE_INTERRUPT: u32 = 0x00000001u32;
|
|
26
|
+
pub const TRANSMIT_INTERRUPT: u32 = 0x00000002u32;
|
|
27
|
+
pub const COMMAND_INTERRUPT: u32 = 0x00000004u32;
|
|
28
|
+
pub const SOFTWARE_INTERRUPT: u32 = 0x000000008u32;
|
|
29
|
+
|
|
30
|
+
#[repr(C)]
|
|
31
|
+
#[derive(Clone, Copy, Debug)]
|
|
32
|
+
pub struct Mode {
|
|
33
|
+
pub state: u32,
|
|
34
|
+
pub hw_address_size: u32,
|
|
35
|
+
pub media_header_size: u32,
|
|
36
|
+
pub max_packet_size: u32,
|
|
37
|
+
pub nvram_size: u32,
|
|
38
|
+
pub nvram_access_size: u32,
|
|
39
|
+
pub receive_filter_mask: u32,
|
|
40
|
+
pub receive_filter_setting: u32,
|
|
41
|
+
pub max_mcast_filter_count: u32,
|
|
42
|
+
pub mcast_filter_count: u32,
|
|
43
|
+
pub mcast_filter: [crate::base::MacAddress; MAX_MCAST_FILTER_CNT],
|
|
44
|
+
pub current_address: crate::base::MacAddress,
|
|
45
|
+
pub broadcast_address: crate::base::MacAddress,
|
|
46
|
+
pub permanent_address: crate::base::MacAddress,
|
|
47
|
+
pub if_type: u8,
|
|
48
|
+
pub mac_address_changeable: crate::base::Boolean,
|
|
49
|
+
pub multiple_tx_supported: crate::base::Boolean,
|
|
50
|
+
pub media_present_supported: crate::base::Boolean,
|
|
51
|
+
pub media_present: crate::base::Boolean,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
pub type State = u32;
|
|
55
|
+
|
|
56
|
+
pub const STOPPED: State = 0x00000000;
|
|
57
|
+
pub const STARTED: State = 0x00000001;
|
|
58
|
+
pub const INITIALIZED: State = 0x00000002;
|
|
59
|
+
pub const MAX_STATE: State = 0x00000003;
|
|
60
|
+
|
|
61
|
+
#[repr(C)]
|
|
62
|
+
#[derive(Clone, Copy, Debug)]
|
|
63
|
+
pub struct Statistics {
|
|
64
|
+
pub rx_total_frames: u64,
|
|
65
|
+
pub rx_good_frames: u64,
|
|
66
|
+
pub rx_undersize_frames: u64,
|
|
67
|
+
pub rx_oversize_frames: u64,
|
|
68
|
+
pub rx_dropped_frames: u64,
|
|
69
|
+
pub rx_unicast_frames: u64,
|
|
70
|
+
pub rx_broadcast_frames: u64,
|
|
71
|
+
pub rx_multicast_frames: u64,
|
|
72
|
+
pub rx_crc_error_frames: u64,
|
|
73
|
+
pub rx_total_bytes: u64,
|
|
74
|
+
pub tx_total_frames: u64,
|
|
75
|
+
pub tx_good_frames: u64,
|
|
76
|
+
pub tx_undersize_frames: u64,
|
|
77
|
+
pub tx_oversize_frames: u64,
|
|
78
|
+
pub tx_dropped_frames: u64,
|
|
79
|
+
pub tx_unicast_frames: u64,
|
|
80
|
+
pub tx_broadcast_frames: u64,
|
|
81
|
+
pub tx_multicast_frames: u64,
|
|
82
|
+
pub tx_crc_error_frames: u64,
|
|
83
|
+
pub tx_total_bytes: u64,
|
|
84
|
+
pub collisions: u64,
|
|
85
|
+
pub unsupported_protocol: u64,
|
|
86
|
+
pub rx_duplicated_frames: u64,
|
|
87
|
+
pub rx_decrypt_error_frames: u64,
|
|
88
|
+
pub tx_error_frames: u64,
|
|
89
|
+
pub tx_retry_frames: u64,
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
pub type ProtocolStart = eficall! {fn(
|
|
93
|
+
*mut Protocol,
|
|
94
|
+
) -> crate::base::Status};
|
|
95
|
+
|
|
96
|
+
pub type ProtocolStop = eficall! {fn(
|
|
97
|
+
*mut Protocol,
|
|
98
|
+
) -> crate::base::Status};
|
|
99
|
+
|
|
100
|
+
pub type ProtocolInitialize = eficall! {fn(
|
|
101
|
+
*mut Protocol,
|
|
102
|
+
usize,
|
|
103
|
+
usize,
|
|
104
|
+
) -> crate::base::Status};
|
|
105
|
+
|
|
106
|
+
pub type ProtocolReset = eficall! {fn(
|
|
107
|
+
*mut Protocol,
|
|
108
|
+
crate::base::Boolean,
|
|
109
|
+
) -> crate::base::Status};
|
|
110
|
+
|
|
111
|
+
pub type ProtocolShutdown = eficall! {fn(
|
|
112
|
+
*mut Protocol,
|
|
113
|
+
) -> crate::base::Status};
|
|
114
|
+
|
|
115
|
+
pub type ProtocolReceiveFilters = eficall! {fn(
|
|
116
|
+
*mut Protocol,
|
|
117
|
+
u32,
|
|
118
|
+
u32,
|
|
119
|
+
crate::base::Boolean,
|
|
120
|
+
usize,
|
|
121
|
+
*mut crate::base::MacAddress,
|
|
122
|
+
) -> crate::base::Status};
|
|
123
|
+
|
|
124
|
+
pub type ProtocolStationAddress = eficall! {fn(
|
|
125
|
+
*mut Protocol,
|
|
126
|
+
crate::base::Boolean,
|
|
127
|
+
*mut crate::base::MacAddress,
|
|
128
|
+
) -> crate::base::Status};
|
|
129
|
+
|
|
130
|
+
pub type ProtocolStatistics = eficall! {fn(
|
|
131
|
+
*mut Protocol,
|
|
132
|
+
crate::base::Boolean,
|
|
133
|
+
*mut usize,
|
|
134
|
+
*mut Statistics,
|
|
135
|
+
) -> crate::base::Status};
|
|
136
|
+
|
|
137
|
+
pub type ProtocolMcastIpToMac = eficall! {fn(
|
|
138
|
+
*mut Protocol,
|
|
139
|
+
crate::base::Boolean,
|
|
140
|
+
*mut crate::base::IpAddress,
|
|
141
|
+
*mut crate::base::MacAddress,
|
|
142
|
+
) -> crate::base::Status};
|
|
143
|
+
|
|
144
|
+
pub type ProtocolNvData = eficall! {fn(
|
|
145
|
+
*mut Protocol,
|
|
146
|
+
crate::base::Boolean,
|
|
147
|
+
usize,
|
|
148
|
+
usize,
|
|
149
|
+
*mut core::ffi::c_void,
|
|
150
|
+
) -> crate::base::Status};
|
|
151
|
+
|
|
152
|
+
pub type ProtocolGetStatus = eficall! {fn(
|
|
153
|
+
*mut Protocol,
|
|
154
|
+
*mut u32,
|
|
155
|
+
*mut *mut core::ffi::c_void,
|
|
156
|
+
) -> crate::base::Status};
|
|
157
|
+
|
|
158
|
+
pub type ProtocolTransmit = eficall! {fn(
|
|
159
|
+
*mut Protocol,
|
|
160
|
+
usize,
|
|
161
|
+
usize,
|
|
162
|
+
*mut core::ffi::c_void,
|
|
163
|
+
*mut crate::base::MacAddress,
|
|
164
|
+
*mut crate::base::MacAddress,
|
|
165
|
+
*mut u16,
|
|
166
|
+
) -> crate::base::Status};
|
|
167
|
+
|
|
168
|
+
pub type ProtocolReceive = eficall! {fn(
|
|
169
|
+
*mut Protocol,
|
|
170
|
+
*mut usize,
|
|
171
|
+
*mut usize,
|
|
172
|
+
*mut core::ffi::c_void,
|
|
173
|
+
*mut crate::base::MacAddress,
|
|
174
|
+
*mut crate::base::MacAddress,
|
|
175
|
+
*mut u16,
|
|
176
|
+
) -> crate::base::Status};
|
|
177
|
+
|
|
178
|
+
#[repr(C)]
|
|
179
|
+
pub struct Protocol {
|
|
180
|
+
pub revision: u64,
|
|
181
|
+
pub start: ProtocolStart,
|
|
182
|
+
pub stop: ProtocolStop,
|
|
183
|
+
pub initialize: ProtocolInitialize,
|
|
184
|
+
pub reset: ProtocolReset,
|
|
185
|
+
pub shutdown: ProtocolShutdown,
|
|
186
|
+
pub receive_filters: ProtocolReceiveFilters,
|
|
187
|
+
pub station_address: ProtocolStationAddress,
|
|
188
|
+
pub statistics: ProtocolStatistics,
|
|
189
|
+
pub mcast_ip_to_mac: ProtocolMcastIpToMac,
|
|
190
|
+
pub nv_data: ProtocolNvData,
|
|
191
|
+
pub get_status: ProtocolGetStatus,
|
|
192
|
+
pub transmit: ProtocolTransmit,
|
|
193
|
+
pub receive: ProtocolReceive,
|
|
194
|
+
pub wait_for_packet: crate::base::Event,
|
|
195
|
+
pub mode: *mut Mode,
|
|
196
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//! Simple Text Input Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! The simple-text-input protocol defines how to read basic key-strokes. It is limited to
|
|
4
|
+
//! non-modifiers and lacks any detailed reporting. It is mostly useful for debugging and admin
|
|
5
|
+
//! interaction.
|
|
6
|
+
|
|
7
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
8
|
+
0x387477c1,
|
|
9
|
+
0x69c7,
|
|
10
|
+
0x11d2,
|
|
11
|
+
0x8e,
|
|
12
|
+
0x39,
|
|
13
|
+
&[0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b],
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
#[repr(C)]
|
|
17
|
+
#[derive(Clone, Copy, Debug, Default)]
|
|
18
|
+
pub struct InputKey {
|
|
19
|
+
pub scan_code: u16,
|
|
20
|
+
pub unicode_char: crate::base::Char16,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
pub type ProtocolReset = eficall! {fn(
|
|
24
|
+
*mut Protocol,
|
|
25
|
+
crate::base::Boolean,
|
|
26
|
+
) -> crate::base::Status};
|
|
27
|
+
|
|
28
|
+
pub type ProtocolReadKeyStroke = eficall! {fn(
|
|
29
|
+
*mut Protocol,
|
|
30
|
+
*mut InputKey,
|
|
31
|
+
) -> crate::base::Status};
|
|
32
|
+
|
|
33
|
+
#[repr(C)]
|
|
34
|
+
pub struct Protocol {
|
|
35
|
+
pub reset: ProtocolReset,
|
|
36
|
+
pub read_key_stroke: ProtocolReadKeyStroke,
|
|
37
|
+
pub wait_for_key: crate::base::Event,
|
|
38
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//! Extended Simple Text Input Protocol
|
|
2
|
+
//!
|
|
3
|
+
//! The simple-text-input-ex protocol extends the simple-text-input protocol by allowing more
|
|
4
|
+
//! details reporting about modifiers, etc.
|
|
5
|
+
|
|
6
|
+
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
|
|
7
|
+
0xdd9e7534,
|
|
8
|
+
0x7762,
|
|
9
|
+
0x4698,
|
|
10
|
+
0x8c,
|
|
11
|
+
0x14,
|
|
12
|
+
&[0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa],
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
pub const SHIFT_STATE_VALID: u32 = 0x80000000u32;
|
|
16
|
+
pub const RIGHT_SHIFT_PRESSED: u32 = 0x00000001u32;
|
|
17
|
+
pub const LEFT_SHIFT_PRESSED: u32 = 0x00000002u32;
|
|
18
|
+
pub const RIGHT_CONTROL_PRESSED: u32 = 0x00000004u32;
|
|
19
|
+
pub const LEFT_CONTROL_PRESSED: u32 = 0x00000008u32;
|
|
20
|
+
pub const RIGHT_ALT_PRESSED: u32 = 0x00000010u32;
|
|
21
|
+
pub const LEFT_ALT_PRESSED: u32 = 0x00000020u32;
|
|
22
|
+
pub const RIGHT_LOGO_PRESSED: u32 = 0x00000040u32;
|
|
23
|
+
pub const LEFT_LOGO_PRESSED: u32 = 0x00000080u32;
|
|
24
|
+
pub const MENU_KEY_PRESSED: u32 = 0x00000100u32;
|
|
25
|
+
pub const SYS_REQ_PRESSED: u32 = 0x00000200u32;
|
|
26
|
+
|
|
27
|
+
pub const TOGGLE_STATE_VALID: u8 = 0x80u8;
|
|
28
|
+
pub const KEY_STATE_EXPOSED: u8 = 0x40u8;
|
|
29
|
+
pub const SCROLL_LOCK_ACTIVE: u8 = 0x01u8;
|
|
30
|
+
pub const NUM_LOCK_ACTIVE: u8 = 0x02u8;
|
|
31
|
+
pub const CAPS_LOCK_ACTIVE: u8 = 0x04u8;
|
|
32
|
+
|
|
33
|
+
pub type KeyToggleState = u8;
|
|
34
|
+
pub type KeyNotifyFunction = eficall! {fn(*mut KeyData) -> crate::base::Status};
|
|
35
|
+
|
|
36
|
+
#[repr(C)]
|
|
37
|
+
#[derive(Clone, Copy, Debug, Default)]
|
|
38
|
+
pub struct KeyState {
|
|
39
|
+
pub key_shift_state: u32,
|
|
40
|
+
pub key_toggle_state: KeyToggleState,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#[repr(C)]
|
|
44
|
+
#[derive(Clone, Copy, Debug, Default)]
|
|
45
|
+
pub struct KeyData {
|
|
46
|
+
pub key: crate::protocols::simple_text_input::InputKey,
|
|
47
|
+
pub key_state: KeyState,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
pub type ProtocolReset = eficall! {fn(
|
|
51
|
+
*mut Protocol,
|
|
52
|
+
crate::base::Boolean,
|
|
53
|
+
) -> crate::base::Status};
|
|
54
|
+
|
|
55
|
+
pub type ProtocolReadKeyStrokeEx = eficall! {fn(
|
|
56
|
+
*mut Protocol,
|
|
57
|
+
*mut KeyData,
|
|
58
|
+
) -> crate::base::Status};
|
|
59
|
+
|
|
60
|
+
pub type ProtocolSetState = eficall! {fn(
|
|
61
|
+
*mut Protocol,
|
|
62
|
+
*mut KeyToggleState,
|
|
63
|
+
) -> crate::base::Status};
|
|
64
|
+
|
|
65
|
+
pub type ProtocolRegisterKeyNotify = eficall! {fn(
|
|
66
|
+
*mut Protocol,
|
|
67
|
+
*mut KeyData,
|
|
68
|
+
KeyNotifyFunction,
|
|
69
|
+
*mut *mut core::ffi::c_void,
|
|
70
|
+
) -> crate::base::Status};
|
|
71
|
+
|
|
72
|
+
pub type ProtocolUnregisterKeyNotify = eficall! {fn(
|
|
73
|
+
*mut Protocol,
|
|
74
|
+
*mut core::ffi::c_void,
|
|
75
|
+
) -> crate::base::Status};
|
|
76
|
+
|
|
77
|
+
#[repr(C)]
|
|
78
|
+
pub struct Protocol {
|
|
79
|
+
pub reset: ProtocolReset,
|
|
80
|
+
pub read_key_stroke_ex: ProtocolReadKeyStrokeEx,
|
|
81
|
+
pub wait_for_key_ex: crate::base::Event,
|
|
82
|
+
pub set_state: ProtocolSetState,
|
|
83
|
+
pub register_key_notify: ProtocolRegisterKeyNotify,
|
|
84
|
+
pub unregister_key_notify: ProtocolUnregisterKeyNotify,
|
|
85
|
+
}
|