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