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