Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Union

OpenProtocolArgs

Public Union
std.os.uefi.tables.OpenProtocolArgs
pub const OpenProtocolArgs = union(OpenProtocolAttributes)

Fields

by_handle_protocol: struct { agent: ?Handle = null, controller: ?Handle = null }

Used in the implementation of handleProtocol.

get_protocol: struct { agent: ?Handle = null, controller: ?Handle = null }

Used by a driver to get a protocol interface from a handle. Care must be taken when using this open mode because the driver that opens a protocol interface in this manner will not be informed if the protocol interface is uninstalled or reinstalled. The caller is also not required to close the protocol interface with closeProtocol.

test_protocol: struct { agent: ?Handle = null, controller: ?Handle = null }

Used by a driver to test for the existence of a protocol interface on a handle. The caller only use the return status code. The caller is also not required to close the protocol interface with closeProtocol.

by_child_controller: struct { agent: Handle, controller: Handle }

Used by bus drivers to show that a protocol interface is being used by one of the child controllers of a bus. This information is used by BootServices.connectController to recursively connect all child controllers and by BootServices.disconnectController to get the list of child controllers that a bus driver created.

by_driver: struct { agent: Handle, controller: Handle }

Used by a driver to gain access to a protocol interface. When this mode is used, the driver’s Stop() function will be called by BootServices.disconnectController if the protocol interface is reinstalled or uninstalled. Once a protocol interface is opened by a driver with this attribute, no other drivers will be allowed to open the same protocol interface with the .by_driver attribute.

by_driver_exclusive: struct { agent: Handle, controller: Handle }

Used by a driver to gain exclusive access to a protocol interface. If any other drivers have the protocol interface opened with an attribute of .by_driver, then an attempt will be made to remove them with BootServices.disconnectController.

exclusive: struct { agent: Handle, controller: ?Handle = null }

Used by applications to gain exclusive access to a protocol interface. If any drivers have the protocol interface opened with an attribute of .by_driver, then an attempt will be made to remove them by calling the driver’s Stop() function.

File

os/uefi/tables.zig:213
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
pub const OpenProtocolArgs = union(OpenProtocolAttributes) {
    /// Used in the implementation of `handleProtocol`.
    by_handle_protocol: struct { agent: ?Handle = null, controller: ?Handle = null },
    /// Used by a driver to get a protocol interface from a handle. Care must be
    /// taken when using this open mode because the driver that opens a protocol
    /// interface in this manner will not be informed if the protocol interface
    /// is uninstalled or reinstalled. The caller is also not required to close
    /// the protocol interface with `closeProtocol`.
    get_protocol: struct { agent: ?Handle = null, controller: ?Handle = null },
    /// Used by a driver to test for the existence of a protocol interface on a
    /// handle. The caller only use the return status code. The caller is also
    /// not required to close the protocol interface with `closeProtocol`.
    test_protocol: struct { agent: ?Handle = null, controller: ?Handle = null },
    /// Used by bus drivers to show that a protocol interface is being used by one
    /// of the child controllers of a bus. This information is used by
    /// `BootServices.connectController` to recursively connect all child controllers
    /// and by `BootServices.disconnectController` to get the list of child
    /// controllers that a bus driver created.
    by_child_controller: struct { agent: Handle, controller: Handle },
    /// Used by a driver to gain access to a protocol interface. When this mode
    /// is used, the driver’s Stop() function will be called by
    /// `BootServices.disconnectController` if the protocol interface is reinstalled
    /// or uninstalled. Once a protocol interface is opened by a driver with this
    /// attribute, no other drivers will be allowed to open the same protocol interface
    /// with the `.by_driver` attribute.
    by_driver: struct { agent: Handle, controller: Handle },
    /// Used by a driver to gain exclusive access to a protocol interface. If any
    /// other drivers have the protocol interface opened with an attribute of
    /// `.by_driver`, then an attempt will be made to remove them with
    /// `BootServices.disconnectController`.
    by_driver_exclusive: struct { agent: Handle, controller: Handle },
    /// Used by applications to gain exclusive access to a protocol interface. If
    /// any drivers have the protocol interface opened with an attribute of
    /// `.by_driver`, then an attempt will be made to remove them by calling the
    /// driver’s Stop() function.
    exclusive: struct { agent: Handle, controller: ?Handle = null },
}