iPXE
ConsoleControl.h
Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
00004 This program and the accompanying materials
00005 are licensed and made available under the terms and conditions of the BSD License
00006 which accompanies this distribution.  The full text of the license may be found at
00007 http://opensource.org/licenses/bsd-license.php
00008 
00009 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00010 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00011 
00012 Module Name:
00013 
00014   ConsoleControl.h
00015 
00016 Abstract:
00017 
00018   Abstraction of a Text mode or GOP/UGA screen
00019 
00020 --*/
00021 
00022 #ifndef __CONSOLE_CONTROL_H__
00023 #define __CONSOLE_CONTROL_H__
00024 
00025 FILE_LICENCE ( BSD3 );
00026 
00027 #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
00028   { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
00029 
00030 typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL   EFI_CONSOLE_CONTROL_PROTOCOL;
00031 
00032 
00033 typedef enum {
00034   EfiConsoleControlScreenText,
00035   EfiConsoleControlScreenGraphics,
00036   EfiConsoleControlScreenMaxValue
00037 } EFI_CONSOLE_CONTROL_SCREEN_MODE;
00038 
00039 
00040 typedef
00041 EFI_STATUS
00042 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
00043   IN  EFI_CONSOLE_CONTROL_PROTOCOL      *This,
00044   OUT EFI_CONSOLE_CONTROL_SCREEN_MODE   *Mode,
00045   OUT BOOLEAN                           *GopUgaExists,  OPTIONAL
00046   OUT BOOLEAN                           *StdInLocked    OPTIONAL
00047   )
00048 /*++
00049 
00050   Routine Description:
00051     Return the current video mode information. Also returns info about existence
00052     of Graphics Output devices or UGA Draw devices in system, and if the Std In
00053     device is locked. All the arguments are optional and only returned if a non
00054     NULL pointer is passed in.
00055 
00056   Arguments:
00057     This         - Protocol instance pointer.
00058     Mode         - Are we in text of grahics mode.
00059     GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device
00060     StdInLocked  - TRUE if StdIn device is keyboard locked
00061 
00062   Returns:
00063     EFI_SUCCESS     - Mode information returned.
00064 
00065 --*/
00066 ;
00067 
00068 
00069 typedef
00070 EFI_STATUS
00071 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
00072   IN  EFI_CONSOLE_CONTROL_PROTOCOL      *This,
00073   IN  EFI_CONSOLE_CONTROL_SCREEN_MODE   Mode
00074   )
00075 /*++
00076 
00077   Routine Description:
00078     Set the current mode to either text or graphics. Graphics is
00079     for Quiet Boot.
00080 
00081   Arguments:
00082     This  - Protocol instance pointer.
00083     Mode  - Mode to set the
00084 
00085   Returns:
00086     EFI_SUCCESS     - Mode information returned.
00087 
00088 --*/
00089 ;
00090 
00091 
00092 typedef
00093 EFI_STATUS
00094 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
00095   IN  EFI_CONSOLE_CONTROL_PROTOCOL      *This,
00096   IN CHAR16                             *Password
00097   )
00098 /*++
00099 
00100   Routine Description:
00101     Lock Std In devices until Password is typed.
00102 
00103   Arguments:
00104     This     - Protocol instance pointer.
00105     Password - Password needed to unlock screen. NULL means unlock keyboard
00106 
00107   Returns:
00108     EFI_SUCCESS      - Mode information returned.
00109     EFI_DEVICE_ERROR - Std In not locked
00110 
00111 --*/
00112 ;
00113 
00114 
00115 
00116 struct _EFI_CONSOLE_CONTROL_PROTOCOL {
00117   EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE           GetMode;
00118   EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE           SetMode;
00119   EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN        LockStdIn;
00120 };
00121 
00122 extern EFI_GUID gEfiConsoleControlProtocolGuid;
00123 
00124 #endif