]>
Commit | Line | Data |
---|---|---|
ead42efc | 1 | /** @file\r |
0a6f4824 | 2 | \r |
630d580d | 3 | UEFI Component Name(2) protocol implementation header file for IDE Bus driver.\r |
0a6f4824 LG |
4 | \r |
5 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
c0a00b14 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
ead42efc | 7 | \r |
8 | **/\r | |
9 | \r | |
eeefcb9d | 10 | #ifndef _IDE_BUS_COMPONENT_NAME_H_\r |
11 | #define _IDE_BUS_COMPONENT_NAME_H_\r | |
ead42efc | 12 | \r |
630d580d | 13 | #define ADD_IDE_ATAPI_NAME(x) AddName ((x));\r |
ead42efc | 14 | \r |
733f03aa | 15 | extern EFI_COMPONENT_NAME_PROTOCOL gIDEBusComponentName;\r |
16 | extern EFI_COMPONENT_NAME2_PROTOCOL gIDEBusComponentName2;\r | |
ead42efc | 17 | \r |
18 | \r | |
19 | //\r | |
20 | // EFI Component Name Functions\r | |
21 | //\r | |
22 | /**\r | |
733f03aa | 23 | Retrieves a Unicode string that is the user readable name of the driver.\r |
ead42efc | 24 | \r |
733f03aa | 25 | This function retrieves the user readable name of a driver in the form of a\r |
26 | Unicode string. If the driver specified by This has a user readable name in\r | |
27 | the language specified by Language, then a pointer to the driver name is\r | |
28 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
29 | by This does not support the language specified by Language,\r | |
30 | then EFI_UNSUPPORTED is returned.\r | |
ead42efc | 31 | \r |
733f03aa | 32 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r |
33 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
34 | \r | |
35 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
36 | array indicating the language. This is the\r | |
37 | language of the driver name that the caller is\r | |
38 | requesting, and it must match one of the\r | |
39 | languages specified in SupportedLanguages. The\r | |
40 | number of languages supported by a driver is up\r | |
41 | to the driver writer. Language is specified\r | |
4bca47e1 | 42 | in RFC 4646 or ISO 639-2 language code format.\r |
733f03aa | 43 | \r |
44 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
45 | This Unicode string is the name of the\r | |
46 | driver specified by This in the language\r | |
47 | specified by Language.\r | |
48 | \r | |
49 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
50 | This and the language specified by Language was\r | |
51 | returned in DriverName.\r | |
52 | \r | |
53 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
54 | \r | |
55 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
56 | \r | |
57 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
58 | the language specified by Language.\r | |
ead42efc | 59 | \r |
60 | **/\r | |
61 | EFI_STATUS\r | |
62 | EFIAPI\r | |
63 | IDEBusComponentNameGetDriverName (\r | |
64 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
65 | IN CHAR8 *Language,\r | |
66 | OUT CHAR16 **DriverName\r | |
733f03aa | 67 | );\r |
ead42efc | 68 | \r |
ead42efc | 69 | \r |
733f03aa | 70 | /**\r |
71 | Retrieves a Unicode string that is the user readable name of the controller\r | |
72 | that is being managed by a driver.\r | |
73 | \r | |
74 | This function retrieves the user readable name of the controller specified by\r | |
75 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
76 | driver specified by This has a user readable name in the language specified by\r | |
77 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
78 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
79 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
80 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
81 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
82 | \r | |
83 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
84 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
85 | \r | |
86 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
87 | specified by This is managing. This handle\r | |
88 | specifies the controller whose name is to be\r | |
89 | returned.\r | |
90 | \r | |
91 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
92 | the name of. This is an optional parameter that\r | |
93 | may be NULL. It will be NULL for device\r | |
94 | drivers. It will also be NULL for a bus drivers\r | |
95 | that wish to retrieve the name of the bus\r | |
96 | controller. It will not be NULL for a bus\r | |
97 | driver that wishes to retrieve the name of a\r | |
98 | child controller.\r | |
99 | \r | |
100 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
101 | array indicating the language. This is the\r | |
102 | language of the driver name that the caller is\r | |
103 | requesting, and it must match one of the\r | |
104 | languages specified in SupportedLanguages. The\r | |
105 | number of languages supported by a driver is up\r | |
106 | to the driver writer. Language is specified in\r | |
4bca47e1 | 107 | RFC 4646 or ISO 639-2 language code format.\r |
733f03aa | 108 | \r |
109 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
110 | This Unicode string is the name of the\r | |
111 | controller specified by ControllerHandle and\r | |
112 | ChildHandle in the language specified by\r | |
113 | Language from the point of view of the driver\r | |
114 | specified by This.\r | |
115 | \r | |
116 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
117 | the language specified by Language for the\r | |
118 | driver specified by This was returned in\r | |
119 | DriverName.\r | |
120 | \r | |
c2d9a4d2 | 121 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r |
733f03aa | 122 | \r |
123 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
124 | EFI_HANDLE.\r | |
125 | \r | |
126 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
127 | \r | |
128 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
129 | \r | |
130 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
131 | managing the controller specified by\r | |
132 | ControllerHandle and ChildHandle.\r | |
133 | \r | |
134 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
135 | the language specified by Language.\r | |
ead42efc | 136 | \r |
137 | **/\r | |
138 | EFI_STATUS\r | |
139 | EFIAPI\r | |
140 | IDEBusComponentNameGetControllerName (\r | |
141 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
142 | IN EFI_HANDLE ControllerHandle,\r | |
143 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
144 | IN CHAR8 *Language,\r | |
145 | OUT CHAR16 **ControllerName\r | |
733f03aa | 146 | );\r |
147 | \r | |
ead42efc | 148 | \r |
149 | /**\r | |
630d580d | 150 | Add the component name for the IDE/ATAPI device\r |
ead42efc | 151 | \r |
630d580d | 152 | @param IdeBlkIoDevicePtr A pointer to the IDE_BLK_IO_DEV instance.\r |
ead42efc | 153 | \r |
154 | **/\r | |
155 | VOID\r | |
156 | AddName (\r | |
157 | IN IDE_BLK_IO_DEV *IdeBlkIoDevicePtr\r | |
ed66e1bc | 158 | );\r |
ead42efc | 159 | \r |
160 | #endif\r |