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