Adjust directory structures.
[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
49#define VarConsoleInpDev L"ConInDev"\r
50#define VarConsoleInp L"ConIn"\r
51#define VarConsoleOutDev L"ConOutDev"\r
52#define VarConsoleOut L"ConOut"\r
53#define VarErrorOutDev L"ErrOutDev"\r
54#define VarErrorOut L"ErrOut"\r
55\r
56typedef enum {\r
57 CHECK,\r
58 APPEND,\r
59 DELETE\r
60} CONPLATFORM_VAR_OPERATION;\r
61\r
62EFI_STATUS\r
63ConPlatformDriverBindingSupported (\r
64 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
65 IN EFI_HANDLE ControllerHandle,\r
66 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,\r
67 IN EFI_GUID *ProtocolGuid\r
68 );\r
69\r
70EFI_STATUS\r
71EFIAPI\r
72ConPlatformTextInDriverBindingSupported (\r
73 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
74 IN EFI_HANDLE Handle,\r
75 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
76 );\r
77\r
78EFI_STATUS\r
79EFIAPI\r
80ConPlatformTextOutDriverBindingSupported (\r
81 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
82 IN EFI_HANDLE Handle,\r
83 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
84 );\r
85\r
86EFI_STATUS\r
87EFIAPI\r
88ConPlatformTextInDriverBindingStart (\r
89 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
90 IN EFI_HANDLE Handle,\r
91 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
92 );\r
93\r
94EFI_STATUS\r
95EFIAPI\r
96ConPlatformTextOutDriverBindingStart (\r
97 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
98 IN EFI_HANDLE Handle,\r
99 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
100 );\r
101\r
102EFI_STATUS\r
103EFIAPI\r
104ConPlatformTextInDriverBindingStop (\r
105 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
106 IN EFI_HANDLE Handle,\r
107 IN UINTN NumberOfChildren,\r
108 IN EFI_HANDLE *ChildHandleBuffer\r
109 );\r
110\r
111EFI_STATUS\r
112EFIAPI\r
113ConPlatformTextOutDriverBindingStop (\r
114 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
115 IN EFI_HANDLE Handle,\r
116 IN UINTN NumberOfChildren,\r
117 IN EFI_HANDLE *ChildHandleBuffer\r
118 );\r
119\r
120VOID\r
121ConPlatformUnInstallProtocol (\r
122 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
123 IN EFI_HANDLE Handle,\r
124 IN EFI_GUID *ProtocolGuid\r
125 );\r
126\r
127VOID *\r
128ConPlatformGetVariable (\r
129 IN CHAR16 *Name\r
130 );\r
131\r
132EFI_STATUS\r
133ConPlatformMatchDevicePaths (\r
134 IN EFI_DEVICE_PATH_PROTOCOL * Multi,\r
135 IN EFI_DEVICE_PATH_PROTOCOL * Single,\r
136 IN EFI_DEVICE_PATH_PROTOCOL **NewDevicePath OPTIONAL,\r
137 IN BOOLEAN Delete\r
138 );\r
139\r
140EFI_STATUS\r
141ConPlatformUpdateDeviceVariable (\r
142 IN CHAR16 *VariableName,\r
143 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
144 IN CONPLATFORM_VAR_OPERATION Operation\r
145 );\r
146\r
147BOOLEAN\r
148IsHotPlugDevice (\r
149 EFI_HANDLE DriverBindingHandle,\r
150 EFI_HANDLE ControllerHandle\r
151 );\r
152\r
859b72fa
A
153//\r
154// EFI Component Name Functions\r
155//\r
156EFI_STATUS\r
157EFIAPI\r
158ConPlatformComponentNameGetDriverName (\r
159 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
160 IN CHAR8 *Language,\r
161 OUT CHAR16 **DriverName\r
162 );\r
163\r
164EFI_STATUS\r
165EFIAPI\r
166ConPlatformComponentNameGetControllerName (\r
167 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
168 IN EFI_HANDLE ControllerHandle,\r
169 IN EFI_HANDLE ChildHandle OPTIONAL,\r
170 IN CHAR8 *Language,\r
171 OUT CHAR16 **ControllerName\r
172 );\r
173\r
95276127 174#endif\r