Cleaned up EFI Console Variable usage
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConPlatformDxe / ConPlatform.h
CommitLineData
95276127 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 ConPlatform.h\r
15 \r
16Abstract:\r
17\r
18--*/\r
19\r
20#ifndef CON_MANAGE_H_\r
21#define CON_MANAGE_H_\r
22\r
859b72fa
A
23#include <Uefi.h>\r
24#include <Protocol/SimpleTextOut.h>\r
25#include <Guid/GlobalVariable.h>\r
26#include <Guid/ConsoleInDevice.h>\r
27#include <Protocol/DevicePath.h>\r
28#include <Protocol/SimpleTextIn.h>\r
29#include <Guid/HotPlugDevice.h>\r
30#include <Guid/StandardErrorDevice.h>\r
31#include <Guid/ConsoleOutDevice.h>\r
32#include <Library/DebugLib.h>\r
33#include <Library/UefiDriverEntryPoint.h>\r
34#include <Library/UefiLib.h>\r
35#include <Library/BaseMemoryLib.h>\r
36#include <Library/UefiBootServicesTableLib.h>\r
37#include <Library/UefiRuntimeServicesTableLib.h>\r
38#include <Library/DevicePathLib.h>\r
39#include <Library/MemoryAllocationLib.h>\r
40\r
95276127 41//\r
859b72fa 42// Driver Binding Externs\r
95276127 43//\r
859b72fa
A
44extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;\r
45extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
46extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;\r
47extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
95276127 48\r
95276127 49\r
50typedef enum {\r
51 CHECK,\r
52 APPEND,\r
53 DELETE\r
54} CONPLATFORM_VAR_OPERATION;\r
55\r
56EFI_STATUS\r
57ConPlatformDriverBindingSupported (\r
58 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
59 IN EFI_HANDLE ControllerHandle,\r
60 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,\r
61 IN EFI_GUID *ProtocolGuid\r
62 );\r
63\r
64EFI_STATUS\r
65EFIAPI\r
66ConPlatformTextInDriverBindingSupported (\r
67 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
68 IN EFI_HANDLE Handle,\r
69 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
70 );\r
71\r
72EFI_STATUS\r
73EFIAPI\r
74ConPlatformTextOutDriverBindingSupported (\r
75 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
76 IN EFI_HANDLE Handle,\r
77 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
78 );\r
79\r
80EFI_STATUS\r
81EFIAPI\r
82ConPlatformTextInDriverBindingStart (\r
83 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
84 IN EFI_HANDLE Handle,\r
85 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
86 );\r
87\r
88EFI_STATUS\r
89EFIAPI\r
90ConPlatformTextOutDriverBindingStart (\r
91 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
92 IN EFI_HANDLE Handle,\r
93 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
94 );\r
95\r
96EFI_STATUS\r
97EFIAPI\r
98ConPlatformTextInDriverBindingStop (\r
99 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
100 IN EFI_HANDLE Handle,\r
101 IN UINTN NumberOfChildren,\r
102 IN EFI_HANDLE *ChildHandleBuffer\r
103 );\r
104\r
105EFI_STATUS\r
106EFIAPI\r
107ConPlatformTextOutDriverBindingStop (\r
108 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
109 IN EFI_HANDLE Handle,\r
110 IN UINTN NumberOfChildren,\r
111 IN EFI_HANDLE *ChildHandleBuffer\r
112 );\r
113\r
114VOID\r
115ConPlatformUnInstallProtocol (\r
116 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
117 IN EFI_HANDLE Handle,\r
118 IN EFI_GUID *ProtocolGuid\r
119 );\r
120\r
121VOID *\r
122ConPlatformGetVariable (\r
123 IN CHAR16 *Name\r
124 );\r
125\r
126EFI_STATUS\r
127ConPlatformMatchDevicePaths (\r
128 IN EFI_DEVICE_PATH_PROTOCOL * Multi,\r
129 IN EFI_DEVICE_PATH_PROTOCOL * Single,\r
130 IN EFI_DEVICE_PATH_PROTOCOL **NewDevicePath OPTIONAL,\r
131 IN BOOLEAN Delete\r
132 );\r
133\r
134EFI_STATUS\r
135ConPlatformUpdateDeviceVariable (\r
136 IN CHAR16 *VariableName,\r
137 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
138 IN CONPLATFORM_VAR_OPERATION Operation\r
139 );\r
140\r
141BOOLEAN\r
142IsHotPlugDevice (\r
143 EFI_HANDLE DriverBindingHandle,\r
144 EFI_HANDLE ControllerHandle\r
145 );\r
146\r
859b72fa
A
147//\r
148// EFI Component Name Functions\r
149//\r
150EFI_STATUS\r
151EFIAPI\r
152ConPlatformComponentNameGetDriverName (\r
153 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
154 IN CHAR8 *Language,\r
155 OUT CHAR16 **DriverName\r
156 );\r
157\r
158EFI_STATUS\r
159EFIAPI\r
160ConPlatformComponentNameGetControllerName (\r
161 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
162 IN EFI_HANDLE ControllerHandle,\r
163 IN EFI_HANDLE ChildHandle OPTIONAL,\r
164 IN CHAR8 *Language,\r
165 OUT CHAR16 **ControllerName\r
166 );\r
167\r
95276127 168#endif\r