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