]> git.proxmox.com Git - mirror_edk2.git/blob - OldMdePkg/Include/Protocol/ComponentName2.h
MdePkg:
[mirror_edk2.git] / OldMdePkg / Include / Protocol / ComponentName2.h
1 /** @file
2 EFI Component Name 2 Protocol
3
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: ComponentName2.h
14
15 @par Revision Reference:
16 Component Name 2 Protocol from the UEFI 2.1 specification.
17
18 **/
19
20 #ifndef _EFI_COMPONENT_NAME2_H_
21 #define _EFI_COMPONENT_NAME2_H_
22
23 //
24 // Global ID for the Component Name Protocol
25 //
26
27 #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
28 { \
29 0x6a7a5cff, 0xe8d9, 0x4f70, {0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14} \
30 }
31
32 typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;
33
34 /**
35 Retrieves a Unicode string that is the user readable name of the EFI Driver.
36
37 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
38 instance.
39 @param Language A pointer to a Null-terminated ASCII string array indicating the
40 language. This is the language of the driver name that the caller
41 is requesting, and it must match one of the languages specified in
42 SupportedLanguages. The number of languages supported by a
43 driver is up to the driver writer. Language is specified in RFC
44 3066 language code format.
45 @param DriverName A pointer to the Unicode string to return. This
46 Unicode string is the name of the driver
47 specified by This in the language specified by
48 Language.
49
50 @retval EFI_SUCCESS The Unicode string for the Driver specified by
51 This and the language specified by Language was
52 returned in DriverName.
53 @retval EFI_INVALID_PARAMETER Language is NULL or DriverName is NULL.
54 @retval EFI_UNSUPPORTED The driver specified by This does not support
55 the language specified by Language.
56
57 **/
58 typedef
59 EFI_STATUS
60 (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
61 IN EFI_COMPONENT_NAME2_PROTOCOL *This,
62 IN CHAR8 *Language,
63 OUT CHAR16 **DriverName
64 );
65
66 /**
67 Retrieves a Unicode string that is the user readable name of the controller
68 that is being managed by an EFI Driver.
69
70 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
71 instance.
72 @param ControllerHandle The handle of a controller that the driver
73 specified by This is managing. This handle
74 specifies the controller whose name is to be
75 returned.
76 @param ChildHandle The handle of the child controller to retrieve
77 the name of. This is an optional parameter
78 that may be NULL. It will be NULL for device
79 drivers. It will also be NULL for a bus
80 drivers that wish to retrieve the name of the
81 bus controller. It will not be NULL for a bus
82 driver that wishes to retrieve the name of a
83 child controller.
84 @param Language A pointer to a Null- terminated ASCII string array indicating the
85 language. This is the language of the controller name that the
86 caller is requesting, and it must match one of the languages
87 specified in SupportedLanguages. The number of languages
88 supported by a driver is up to the driver writer. Language is
89 specified in RFC 3066 language code format.
90 @param ControllerName A pointer to the Unicode string to return. This
91 Unicode string is the name of the controller
92 specified by ControllerHandle and ChildHandle
93 in the language specified by Language from the
94 point of view of the driver specified by This.
95
96 @retval EFI_SUCCESS The Unicode string for the user readable name in
97 the language specified by Language for the
98 driver specified by This was returned in
99 DriverName.
100 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE;
101 ChildHandle is not NULL and it is not a valid
102 EFI_HANDLE;Language is NULL;ControllerName is
103 NULL.
104 @retval EFI_UNSUPPORTED The driver specified by This is not currently
105 managing the controller specified by
106 ControllerHandle and ChildHandle;The driver
107 specified by This does not support the language
108 specified by Language.
109
110 **/
111 typedef
112 EFI_STATUS
113 (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
114 IN EFI_COMPONENT_NAME2_PROTOCOL *This,
115 IN EFI_HANDLE ControllerHandle,
116 IN EFI_HANDLE ChildHandle OPTIONAL,
117 IN CHAR8 *Language,
118 OUT CHAR16 **ControllerName
119 );
120
121
122 //
123 // Interface structure for the Component Name 2 Protocol
124 //
125 struct _EFI_COMPONENT_NAME2_PROTOCOL {
126 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
127 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
128 CHAR8 *SupportedLanguages;
129 };
130
131 //
132 // Extern the GUID for protocol users.
133 //
134 extern EFI_GUID gEfiComponentName2ProtocolGuid;
135
136 #endif