]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | ComponentName.c\r | |
14 | \r | |
15 | Abstract:\r | |
16 | PxeDhcp4 component name protocol declarations\r | |
17 | \r | |
18 | --*/\r | |
19 | \r | |
20 | \r | |
21 | #include "PxeDhcp4.h"\r | |
22 | \r | |
878ddf1f | 23 | //\r |
24 | // EFI Component Name Protocol\r | |
25 | //\r | |
26 | EFI_COMPONENT_NAME_PROTOCOL gPxeDhcp4ComponentName = {\r | |
27 | PxeDhcp4ComponentNameGetDriverName,\r | |
28 | PxeDhcp4ComponentNameGetControllerName,\r | |
29 | "eng"\r | |
30 | };\r | |
31 | \r | |
32 | static EFI_UNICODE_STRING_TABLE mPxeDhcp4DriverNameTable[] = {\r | |
33 | {\r | |
34 | "eng",\r | |
35 | (CHAR16 *) L"PXE DHCPv4 Driver"\r | |
36 | },\r | |
37 | {\r | |
38 | NULL,\r | |
39 | NULL\r | |
40 | }\r | |
41 | };\r | |
42 | \r | |
43 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r | |
44 | EFI_STATUS\r | |
45 | EFIAPI\r | |
46 | PxeDhcp4ComponentNameGetDriverName (\r | |
47 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
48 | IN CHAR8 *Language,\r | |
49 | OUT CHAR16 **DriverName\r | |
50 | )\r | |
51 | /*++\r | |
52 | \r | |
53 | Routine Description:\r | |
54 | Retrieves a Unicode string that is the user readable name of the EFI Driver.\r | |
55 | \r | |
56 | Arguments:\r | |
57 | This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
58 | Language - A pointer to a three character ISO 639-2 language identifier.\r | |
59 | This is the language of the driver name that that the caller \r | |
60 | is requesting, and it must match one of the languages specified\r | |
61 | in SupportedLanguages. The number of languages supported by a \r | |
62 | driver is up to the driver writer.\r | |
63 | DriverName - A pointer to the Unicode string to return. This Unicode string\r | |
64 | is the name of the driver specified by This in the language \r | |
65 | specified by Language.\r | |
66 | \r | |
67 | Returns:\r | |
68 | EFI_SUCCESS - The Unicode string for the Driver specified by This\r | |
69 | and the language specified by Language was returned \r | |
70 | in DriverName.\r | |
71 | EFI_INVALID_PARAMETER - Language is NULL.\r | |
72 | EFI_INVALID_PARAMETER - DriverName is NULL.\r | |
73 | EFI_UNSUPPORTED - The driver specified by This does not support the \r | |
74 | language specified by Language.\r | |
75 | \r | |
76 | --*/\r | |
77 | {\r | |
78 | return LookupUnicodeString (\r | |
79 | Language,\r | |
80 | gPxeDhcp4ComponentName.SupportedLanguages,\r | |
81 | mPxeDhcp4DriverNameTable,\r | |
82 | DriverName\r | |
83 | );\r | |
84 | }\r | |
85 | \r | |
86 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r | |
87 | EFI_STATUS\r | |
88 | EFIAPI\r | |
89 | PxeDhcp4ComponentNameGetControllerName (\r | |
90 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
91 | IN EFI_HANDLE ControllerHandle,\r | |
92 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
93 | IN CHAR8 *Language,\r | |
94 | OUT CHAR16 **ControllerName\r | |
95 | )\r | |
96 | /*++\r | |
97 | \r | |
98 | Routine Description:\r | |
99 | Retrieves a Unicode string that is the user readable name of the controller\r | |
100 | that is being managed by an EFI Driver.\r | |
101 | \r | |
102 | Arguments:\r | |
103 | This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
104 | ControllerHandle - The handle of a controller that the driver specified by \r | |
105 | This is managing. This handle specifies the controller \r | |
106 | whose name is to be returned.\r | |
107 | ChildHandle - The handle of the child controller to retrieve the name \r | |
108 | of. This is an optional parameter that may be NULL. It \r | |
109 | will be NULL for device drivers. It will also be NULL \r | |
110 | for a bus drivers that wish to retrieve the name of the \r | |
111 | bus controller. It will not be NULL for a bus driver \r | |
112 | that wishes to retrieve the name of a child controller.\r | |
113 | Language - A pointer to a three character ISO 639-2 language \r | |
114 | identifier. This is the language of the controller name \r | |
115 | that that the caller is requesting, and it must match one\r | |
116 | of the languages specified in SupportedLanguages. The \r | |
117 | number of languages supported by a driver is up to the \r | |
118 | driver writer.\r | |
119 | ControllerName - A pointer to the Unicode string to return. This Unicode\r | |
120 | string is the name of the controller specified by \r | |
121 | ControllerHandle and ChildHandle in the language specified\r | |
122 | by Language from the point of view of the driver specified\r | |
123 | by This. \r | |
124 | \r | |
125 | Returns:\r | |
126 | EFI_SUCCESS - The Unicode string for the user readable name in the \r | |
127 | language specified by Language for the driver \r | |
128 | specified by This was returned in DriverName.\r | |
129 | EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r | |
130 | EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
131 | EFI_INVALID_PARAMETER - Language is NULL.\r | |
132 | EFI_INVALID_PARAMETER - ControllerName is NULL.\r | |
133 | EFI_UNSUPPORTED - The driver specified by This is not currently managing \r | |
134 | the controller specified by ControllerHandle and \r | |
135 | ChildHandle.\r | |
136 | EFI_UNSUPPORTED - The driver specified by This does not support the \r | |
137 | language specified by Language.\r | |
138 | \r | |
139 | --*/\r | |
140 | {\r | |
141 | return EFI_UNSUPPORTED;\r | |
142 | }\r | |
143 | \r | |
144 | /* EOF - ComponentName.c */\r |