remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / ComponentName.c
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 ComponentName.c
15
16 Abstract:
17
18 --*/
19
20 #include "GraphicsConsole.h"
21
22 //
23 // EFI Component Name Protocol
24 //
25 EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName = {
26 GraphicsConsoleComponentNameGetDriverName,
27 GraphicsConsoleComponentNameGetControllerName,
28 "eng"
29 };
30
31 STATIC EFI_UNICODE_STRING_TABLE mGraphicsConsoleDriverNameTable[] = {
32 {
33 "eng",
34 (CHAR16 *)L"UGA Console Driver"
35 },
36 {
37 NULL,
38 NULL
39 }
40 };
41
42 EFI_STATUS
43 EFIAPI
44 GraphicsConsoleComponentNameGetDriverName (
45 IN EFI_COMPONENT_NAME_PROTOCOL *This,
46 IN CHAR8 *Language,
47 OUT CHAR16 **DriverName
48 )
49 /*++
50
51 Routine Description:
52 Retrieves a Unicode string that is the user readable name of the EFI Driver.
53
54 Arguments:
55 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
56 Language - A pointer to a three character ISO 639-2 language identifier.
57 This is the language of the driver name that that the caller
58 is requesting, and it must match one of the languages specified
59 in SupportedLanguages. The number of languages supported by a
60 driver is up to the driver writer.
61 DriverName - A pointer to the Unicode string to return. This Unicode string
62 is the name of the driver specified by This in the language
63 specified by Language.
64
65 Returns:
66 EFI_SUCCESS - The Unicode string for the Driver specified by This
67 and the language specified by Language was returned
68 in DriverName.
69 EFI_INVALID_PARAMETER - Language is NULL.
70 EFI_INVALID_PARAMETER - DriverName is NULL.
71 EFI_UNSUPPORTED - The driver specified by This does not support the
72 language specified by Language.
73
74 --*/
75 {
76 return LookupUnicodeString (
77 Language,
78 gGraphicsConsoleComponentName.SupportedLanguages,
79 mGraphicsConsoleDriverNameTable,
80 DriverName
81 );
82 }
83
84 EFI_STATUS
85 EFIAPI
86 GraphicsConsoleComponentNameGetControllerName (
87 IN EFI_COMPONENT_NAME_PROTOCOL *This,
88 IN EFI_HANDLE ControllerHandle,
89 IN EFI_HANDLE ChildHandle OPTIONAL,
90 IN CHAR8 *Language,
91 OUT CHAR16 **ControllerName
92 )
93 /*++
94
95 Routine Description:
96 Retrieves a Unicode string that is the user readable name of the controller
97 that is being managed by an EFI Driver.
98
99 Arguments:
100 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
101 ControllerHandle - The handle of a controller that the driver specified by
102 This is managing. This handle specifies the controller
103 whose name is to be returned.
104 ChildHandle - The handle of the child controller to retrieve the name
105 of. This is an optional parameter that may be NULL. It
106 will be NULL for device drivers. It will also be NULL
107 for a bus drivers that wish to retrieve the name of the
108 bus controller. It will not be NULL for a bus driver
109 that wishes to retrieve the name of a child controller.
110 Language - A pointer to a three character ISO 639-2 language
111 identifier. This is the language of the controller name
112 that that the caller is requesting, and it must match one
113 of the languages specified in SupportedLanguages. The
114 number of languages supported by a driver is up to the
115 driver writer.
116 ControllerName - A pointer to the Unicode string to return. This Unicode
117 string is the name of the controller specified by
118 ControllerHandle and ChildHandle in the language specified
119 by Language from the point of view of the driver specified
120 by This.
121
122 Returns:
123 EFI_SUCCESS - The Unicode string for the user readable name in the
124 language specified by Language for the driver
125 specified by This was returned in DriverName.
126 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
127 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
128 EFI_INVALID_PARAMETER - Language is NULL.
129 EFI_INVALID_PARAMETER - ControllerName is NULL.
130 EFI_UNSUPPORTED - The driver specified by This is not currently managing
131 the controller specified by ControllerHandle and
132 ChildHandle.
133 EFI_UNSUPPORTED - The driver specified by This does not support the
134 language specified by Language.
135
136 --*/
137 {
138 return EFI_UNSUPPORTED;
139 }