]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/ComponentName.c
Add in VgaMiniPortDxe
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / VgaMiniPortDxe / ComponentName.c
1 /** @file
2
3 Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved
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
13 Module Name:
14
15 ComponentName.c
16
17 Abstract:
18
19
20 **/
21
22 #include "VgaMiniPort.h"
23
24 //
25 // EFI Component Name Functions
26 //
27 EFI_STATUS
28 EFIAPI
29 PciVgaMiniPortComponentNameGetDriverName (
30 IN EFI_COMPONENT_NAME_PROTOCOL *This,
31 IN CHAR8 *Language,
32 OUT CHAR16 **DriverName
33 );
34
35 EFI_STATUS
36 EFIAPI
37 PciVgaMiniPortComponentNameGetControllerName (
38 IN EFI_COMPONENT_NAME_PROTOCOL *This,
39 IN EFI_HANDLE ControllerHandle,
40 IN EFI_HANDLE ChildHandle OPTIONAL,
41 IN CHAR8 *Language,
42 OUT CHAR16 **ControllerName
43 );
44
45 //
46 // EFI Component Name Protocol
47 //
48 EFI_COMPONENT_NAME_PROTOCOL gPciVgaMiniPortComponentName = {
49 PciVgaMiniPortComponentNameGetDriverName,
50 PciVgaMiniPortComponentNameGetControllerName,
51 "eng"
52 };
53
54 static EFI_UNICODE_STRING_TABLE mPciVgaMiniPortDriverNameTable[] = {
55 {
56 "eng",
57 L"PCI VGA Mini Port Driver"
58 },
59 {
60 NULL,
61 NULL
62 }
63 };
64
65 EFI_STATUS
66 EFIAPI
67 PciVgaMiniPortComponentNameGetDriverName (
68 IN EFI_COMPONENT_NAME_PROTOCOL *This,
69 IN CHAR8 *Language,
70 OUT CHAR16 **DriverName
71 )
72 /*++
73
74 Routine Description:
75 Retrieves a Unicode string that is the user readable name of the EFI Driver.
76
77 Arguments:
78 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
79 Language - A pointer to a three character ISO 639-2 language identifier.
80 This is the language of the driver name that that the caller
81 is requesting, and it must match one of the languages specified
82 in SupportedLanguages. The number of languages supported by a
83 driver is up to the driver writer.
84 DriverName - A pointer to the Unicode string to return. This Unicode string
85 is the name of the driver specified by This in the language
86 specified by Language.
87
88 Returns:
89 EFI_SUCCESS - The Unicode string for the Driver specified by This
90 and the language specified by Language was returned
91 in DriverName.
92 EFI_INVALID_PARAMETER - Language is NULL.
93 EFI_INVALID_PARAMETER - DriverName is NULL.
94 EFI_UNSUPPORTED - The driver specified by This does not support the
95 language specified by Language.
96
97 --*/
98 {
99 return LookupUnicodeString (
100 Language,
101 gPciVgaMiniPortComponentName.SupportedLanguages,
102 mPciVgaMiniPortDriverNameTable,
103 DriverName
104 );
105 }
106
107 EFI_STATUS
108 EFIAPI
109 PciVgaMiniPortComponentNameGetControllerName (
110 IN EFI_COMPONENT_NAME_PROTOCOL *This,
111 IN EFI_HANDLE ControllerHandle,
112 IN EFI_HANDLE ChildHandle OPTIONAL,
113 IN CHAR8 *Language,
114 OUT CHAR16 **ControllerName
115 )
116 /*++
117
118 Routine Description:
119 Retrieves a Unicode string that is the user readable name of the controller
120 that is being managed by an EFI Driver.
121
122 Arguments:
123 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
124 ControllerHandle - The handle of a controller that the driver specified by
125 This is managing. This handle specifies the controller
126 whose name is to be returned.
127 ChildHandle - The handle of the child controller to retrieve the name
128 of. This is an optional parameter that may be NULL. It
129 will be NULL for device drivers. It will also be NULL
130 for a bus drivers that wish to retrieve the name of the
131 bus controller. It will not be NULL for a bus driver
132 that wishes to retrieve the name of a child controller.
133 Language - A pointer to a three character ISO 639-2 language
134 identifier. This is the language of the controller name
135 that that the caller is requesting, and it must match one
136 of the languages specified in SupportedLanguages. The
137 number of languages supported by a driver is up to the
138 driver writer.
139 ControllerName - A pointer to the Unicode string to return. This Unicode
140 string is the name of the controller specified by
141 ControllerHandle and ChildHandle in the language
142 specified by Language from the point of view of the
143 driver specified by This.
144
145 Returns:
146 EFI_SUCCESS - The Unicode string for the user readable name in the
147 language specified by Language for the driver
148 specified by This was returned in DriverName.
149 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
150 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
151 EFI_HANDLE.
152 EFI_INVALID_PARAMETER - Language is NULL.
153 EFI_INVALID_PARAMETER - ControllerName is NULL.
154 EFI_UNSUPPORTED - The driver specified by This is not currently
155 managing the controller specified by
156 ControllerHandle and ChildHandle.
157 EFI_UNSUPPORTED - The driver specified by This does not support the
158 language specified by Language.
159
160 --*/
161 {
162 return EFI_UNSUPPORTED;
163 }