]>
Commit | Line | Data |
---|---|---|
06fb8ffd | 1 | /** @file\r |
2 | EFI Component Name 2 Protocol\r | |
3 | \r | |
4 | Copyright (c) 2007, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
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 | |
9 | \r | |
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 | |
12 | \r | |
13 | Module Name: ComponentName2.h\r | |
14 | \r | |
15 | @par Revision Reference:\r | |
16 | Component Name 2 Protocol from the UEFI 2.1 specification.\r | |
17 | \r | |
18 | **/\r | |
19 | \r | |
20 | #ifndef _EFI_COMPONENT_NAME2_H_\r | |
21 | #define _EFI_COMPONENT_NAME2_H_\r | |
22 | \r | |
23 | //\r | |
24 | // Global ID for the Component Name Protocol\r | |
25 | //\r | |
26 | \r | |
27 | #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \\r | |
28 | { \\r | |
29 | 0x6a7a5cff, 0xe8d9, 0x4f70, {0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14} \\r | |
30 | }\r | |
31 | \r | |
32 | typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;\r | |
33 | \r | |
34 | /**\r | |
35 | Retrieves a Unicode string that is the user readable name of the EFI Driver.\r | |
36 | \r | |
37 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL \r | |
38 | instance. \r | |
39 | @param Language A pointer to a Null-terminated ASCII string array indicating the\r | |
40 | language. This is the language of the driver name that the caller\r | |
41 | is requesting, and it must match one of the languages specified in\r | |
42 | SupportedLanguages. The number of languages supported by a\r | |
43 | driver is up to the driver writer. Language is specified in RFC\r | |
44 | 3066 language code format.\r | |
45 | @param DriverName A pointer to the Unicode string to return. This \r | |
46 | Unicode string is the name of the driver \r | |
47 | specified by This in the language specified by \r | |
48 | Language. \r | |
49 | \r | |
50 | @retval EFI_SUCCESS The Unicode string for the Driver specified by \r | |
51 | This and the language specified by Language was \r | |
52 | returned in DriverName. \r | |
53 | @retval EFI_INVALID_PARAMETER Language is NULL or DriverName is NULL. \r | |
54 | @retval EFI_UNSUPPORTED The driver specified by This does not support \r | |
55 | the language specified by Language. \r | |
56 | \r | |
57 | **/\r | |
58 | typedef\r | |
59 | EFI_STATUS\r | |
60 | (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (\r | |
61 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r | |
62 | IN CHAR8 *Language,\r | |
63 | OUT CHAR16 **DriverName\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 an EFI Driver.\r | |
69 | \r | |
70 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL \r | |
71 | instance. \r | |
72 | @param ControllerHandle The handle of a controller that the driver \r | |
73 | specified by This is managing. This handle \r | |
74 | specifies the controller whose name is to be \r | |
75 | returned. \r | |
76 | @param ChildHandle The handle of the child controller to retrieve \r | |
77 | the name of. This is an optional parameter \r | |
78 | that may be NULL. It will be NULL for device \r | |
79 | drivers. It will also be NULL for a bus \r | |
80 | drivers that wish to retrieve the name of the \r | |
81 | bus controller. It will not be NULL for a bus \r | |
82 | driver that wishes to retrieve the name of a \r | |
83 | child controller. \r | |
84 | @param Language A pointer to a Null- terminated ASCII string array indicating the\r | |
85 | language. This is the language of the controller name that the\r | |
86 | caller is requesting, and it must match one of the languages\r | |
87 | specified in SupportedLanguages. The number of languages\r | |
88 | supported by a driver is up to the driver writer. Language is\r | |
89 | specified in RFC 3066 language code format.\r | |
90 | @param ControllerName A pointer to the Unicode string to return. This \r | |
91 | Unicode string is the name of the controller \r | |
92 | specified by ControllerHandle and ChildHandle \r | |
93 | in the language specified by Language from the \r | |
94 | point of view of the driver specified by This. \r | |
95 | \r | |
96 | @retval EFI_SUCCESS The Unicode string for the user readable name in \r | |
97 | the language specified by Language for the \r | |
98 | driver specified by This was returned in \r | |
99 | DriverName. \r | |
100 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE; \r | |
101 | ChildHandle is not NULL and it is not a valid \r | |
102 | EFI_HANDLE;Language is NULL;ControllerName is \r | |
103 | NULL. \r | |
104 | @retval EFI_UNSUPPORTED The driver specified by This is not currently \r | |
105 | managing the controller specified by \r | |
106 | ControllerHandle and ChildHandle;The driver \r | |
107 | specified by This does not support the language \r | |
108 | specified by Language. \r | |
109 | \r | |
110 | **/\r | |
111 | typedef\r | |
112 | EFI_STATUS\r | |
113 | (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (\r | |
114 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r | |
115 | IN EFI_HANDLE ControllerHandle,\r | |
116 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
117 | IN CHAR8 *Language,\r | |
118 | OUT CHAR16 **ControllerName\r | |
119 | );\r | |
120 | \r | |
121 | \r | |
122 | //\r | |
123 | // Interface structure for the Component Name 2 Protocol\r | |
124 | //\r | |
125 | struct _EFI_COMPONENT_NAME2_PROTOCOL {\r | |
126 | EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r | |
127 | EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r | |
128 | CHAR8 *SupportedLanguages;\r | |
129 | };\r | |
130 | \r | |
131 | //\r | |
132 | // Extern the GUID for protocol users.\r | |
133 | //\r | |
134 | extern EFI_GUID gEfiComponentName2ProtocolGuid;\r | |
135 | \r | |
136 | #endif\r |