mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Clean and document header files.
- Add missing doc comments to header files - Move allocate_kernel_args to main.cpp - Split functions out into pointer_manipulation.h
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/// \file console.h
|
||||
/// Text output and status message handling
|
||||
#pragma once
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
@@ -6,6 +8,7 @@
|
||||
|
||||
namespace boot {
|
||||
|
||||
/// Object providing basic output functionality to the UEFI console
|
||||
class console
|
||||
{
|
||||
public:
|
||||
@@ -32,16 +35,30 @@ private:
|
||||
static console *s_console;
|
||||
};
|
||||
|
||||
/// Scoped status line reporter. Prints a message and an "OK" if no errors
|
||||
/// or warnings were reported before destruction, otherwise reports the
|
||||
/// error or warning.
|
||||
class status_line
|
||||
{
|
||||
public:
|
||||
/// Constructor.
|
||||
/// \arg message Description of the operation in progress
|
||||
/// \arg context If non-null, printed after `message` and a colon
|
||||
status_line(const wchar_t *message, const wchar_t *context = nullptr);
|
||||
~status_line();
|
||||
|
||||
/// Set the state to warning, and print a message. If the state is already at
|
||||
/// warning or error, the state is unchanged but the message is still printed.
|
||||
/// \arg message The warning message to print
|
||||
/// \arg error If non-null, printed after `message`
|
||||
inline static void warn(const wchar_t *message, const wchar_t *error = nullptr) {
|
||||
if (s_current) s_current->do_warn(message, error);
|
||||
}
|
||||
|
||||
/// Set the state to error, and print a message. If the state is already at
|
||||
/// error, the state is unchanged but the message is still printed.
|
||||
/// \arg message The error message to print
|
||||
/// \arg error If non-null, printed after `message`
|
||||
inline static void fail(const wchar_t *message, const wchar_t *error = nullptr) {
|
||||
if (s_current) s_current->do_fail(message, error);
|
||||
}
|
||||
@@ -60,15 +77,4 @@ private:
|
||||
static status_line *s_current;
|
||||
};
|
||||
|
||||
uefi::status
|
||||
con_get_framebuffer(
|
||||
uefi::boot_services *bs,
|
||||
void **buffer,
|
||||
size_t *buffer_size,
|
||||
uint32_t *hres,
|
||||
uint32_t *vres,
|
||||
uint32_t *rmask,
|
||||
uint32_t *gmask,
|
||||
uint32_t *bmask);
|
||||
|
||||
} // namespace boot
|
||||
|
||||
Reference in New Issue
Block a user