2009-05-07 20:46:18 +02:00
|
|
|
/** @file
|
|
|
|
EFI Shell Interface protocol from EDK shell (no spec).
|
|
|
|
|
|
|
|
Shell Interface - additional information (over image_info) provided
|
|
|
|
to an application started by the shell.
|
|
|
|
|
2010-09-14 07:18:09 +02:00
|
|
|
ConIo provides a file-style interface to the console.
|
2009-05-07 20:46:18 +02:00
|
|
|
|
|
|
|
The shell interface's and data (including ConIo) are only valid during
|
|
|
|
the applications Entry Point. Once the application returns from it's
|
|
|
|
entry point the data is freed by the invoking shell.
|
2010-01-25 21:05:08 +01:00
|
|
|
|
|
|
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
2019-04-04 01:07:06 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2009-05-07 20:46:18 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
2010-09-14 07:18:09 +02:00
|
|
|
#ifndef _SHELLINTERFACE_H_
|
2009-05-07 20:46:18 +02:00
|
|
|
#define _SHELLINTERFACE_H_
|
|
|
|
|
2010-09-14 07:18:09 +02:00
|
|
|
#include <Protocol/SimpleFileSystem.h>
|
|
|
|
|
2009-05-07 20:46:18 +02:00
|
|
|
#define SHELL_INTERFACE_PROTOCOL_GUID \
|
|
|
|
{ \
|
2009-11-18 06:59:10 +01:00
|
|
|
0x47c7b223, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \
|
2009-05-07 20:46:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// Bit definitions for EFI_SHELL_ARG_INFO
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
typedef enum {
|
|
|
|
ARG_NO_ATTRIB = 0x0,
|
2009-06-15 20:42:13 +02:00
|
|
|
ARG_IS_QUOTED = BIT0,
|
|
|
|
ARG_PARTIALLY_QUOTED = BIT1,
|
|
|
|
ARG_FIRST_HALF_QUOTED = BIT2,
|
|
|
|
ARG_FIRST_CHAR_IS_ESC = BIT3
|
|
|
|
} EFI_SHELL_ARG_INFO_TYPES;
|
2009-05-07 20:46:18 +02:00
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// Attributes for an argument.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
typedef struct _EFI_SHELL_ARG_INFO {
|
|
|
|
UINT32 Attributes;
|
|
|
|
} EFI_SHELL_ARG_INFO;
|
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// This protocol provides access to additional information about a shell application.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
typedef struct {
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// Handle back to original image handle & image information.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
EFI_HANDLE ImageHandle;
|
|
|
|
EFI_LOADED_IMAGE_PROTOCOL *Info;
|
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// Parsed arg list converted more C-like format.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
CHAR16 **Argv;
|
|
|
|
UINTN Argc;
|
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// Storage for file redirection args after parsing.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
CHAR16 **RedirArgv;
|
|
|
|
UINTN RedirArgc;
|
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// A file style handle for console io.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
EFI_FILE_PROTOCOL *StdIn;
|
|
|
|
EFI_FILE_PROTOCOL *StdOut;
|
|
|
|
EFI_FILE_PROTOCOL *StdErr;
|
2009-05-07 20:46:18 +02:00
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// List of attributes for each argument.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
EFI_SHELL_ARG_INFO *ArgInfo;
|
|
|
|
|
|
|
|
///
|
2010-09-14 07:18:09 +02:00
|
|
|
/// Whether we are echoing.
|
2009-05-07 20:46:18 +02:00
|
|
|
///
|
|
|
|
BOOLEAN EchoOn;
|
|
|
|
} EFI_SHELL_INTERFACE;
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiShellInterfaceGuid;
|
|
|
|
|
|
|
|
#endif
|