zig/lib/std/os/uefi/protocols/hii_database_protocol.zig
Andrew Kelley d29871977f remove redundant license headers from zig standard library
We already have a LICENSE file that covers the Zig Standard Library. We
no longer need to remind everyone that the license is MIT in every single
file.

Previously this was introduced to clarify the situation for a fork of
Zig that made Zig's LICENSE file harder to find, and replaced it with
their own license that required annual payments to their company.
However that fork now appears to be dead. So there is no need to
reinforce the copyright notice in every single file.
2021-08-24 12:25:09 -07:00

49 lines
2.4 KiB
Zig

const uefi = @import("std").os.uefi;
const Guid = uefi.Guid;
const Status = uefi.Status;
const hii = uefi.protocols.hii;
/// Database manager for HII-related data structures.
pub const HIIDatabaseProtocol = extern struct {
_new_package_list: Status, // TODO
_remove_package_list: fn (*const HIIDatabaseProtocol, hii.HIIHandle) callconv(.C) Status,
_update_package_list: fn (*const HIIDatabaseProtocol, hii.HIIHandle, *const hii.HIIPackageList) callconv(.C) Status,
_list_package_lists: fn (*const HIIDatabaseProtocol, u8, ?*const Guid, *usize, [*]hii.HIIHandle) callconv(.C) Status,
_export_package_lists: fn (*const HIIDatabaseProtocol, ?hii.HIIHandle, *usize, *hii.HIIPackageList) callconv(.C) Status,
_register_package_notify: Status, // TODO
_unregister_package_notify: Status, // TODO
_find_keyboard_layouts: Status, // TODO
_get_keyboard_layout: Status, // TODO
_set_keyboard_layout: Status, // TODO
_get_package_list_handle: Status, // TODO
/// Removes a package list from the HII database.
pub fn removePackageList(self: *const HIIDatabaseProtocol, handle: hii.HIIHandle) Status {
return self._remove_package_list(self, handle);
}
/// Update a package list in the HII database.
pub fn updatePackageList(self: *const HIIDatabaseProtocol, handle: hii.HIIHandle, buffer: *const hii.HIIPackageList) Status {
return self._update_package_list(self, handle, buffer);
}
/// Determines the handles that are currently active in the database.
pub fn listPackageLists(self: *const HIIDatabaseProtocol, package_type: u8, package_guid: ?*const Guid, buffer_length: *usize, handles: [*]hii.HIIHandle) Status {
return self._list_package_lists(self, package_type, package_guid, buffer_length, handles);
}
/// Exports the contents of one or all package lists in the HII database into a buffer.
pub fn exportPackageLists(self: *const HIIDatabaseProtocol, handle: ?hii.HIIHandle, buffer_size: *usize, buffer: *hii.HIIPackageList) Status {
return self._export_package_lists(self, handle, buffer_size, buffer);
}
pub const guid align(8) = Guid{
.time_low = 0xef9fc172,
.time_mid = 0xa1b2,
.time_high_and_version = 0x4693,
.clock_seq_high_and_reserved = 0xb3,
.clock_seq_low = 0x27,
.node = [_]u8{ 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 },
};
};