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