~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName2.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
  UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.
 
3
  This protocol is used to retrieve user readable names of drivers
 
4
  and controllers managed by UEFI Drivers.
 
5
 
 
6
  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
 
7
  This program and the accompanying materials
 
8
  are licensed and made available under the terms and conditions of the BSD License
 
9
  which accompanies this distribution.  The full text of the license may be found at
 
10
  http://opensource.org/licenses/bsd-license.php
 
11
 
 
12
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 
13
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
14
 
 
15
**/
 
16
 
 
17
#ifndef __EFI_COMPONENT_NAME2_H__
 
18
#define __EFI_COMPONENT_NAME2_H__
 
19
 
 
20
FILE_LICENCE ( BSD3 );
 
21
 
 
22
///
 
23
/// Global ID for the Component Name Protocol
 
24
///
 
25
#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
 
26
  {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
 
27
 
 
28
typedef struct _EFI_COMPONENT_NAME2_PROTOCOL  EFI_COMPONENT_NAME2_PROTOCOL;
 
29
 
 
30
 
 
31
/**
 
32
  Retrieves a string that is the user readable name of
 
33
  the EFI Driver.
 
34
 
 
35
  @param  This       A pointer to the
 
36
                     EFI_COMPONENT_NAME2_PROTOCOL instance.
 
37
 
 
38
  @param  Language   A pointer to a Null-terminated ASCII string
 
39
                     array indicating the language. This is the
 
40
                     language of the driver name that the caller
 
41
                     is requesting, and it must match one of the
 
42
                     languages specified in SupportedLanguages.
 
43
                     The number of languages supported by a
 
44
                     driver is up to the driver writer. Language
 
45
                     is specified in RFC 4646 language code
 
46
                     format.
 
47
 
 
48
  @param  DriverName A pointer to the string to return.
 
49
                     This string is the name of the
 
50
                     driver specified by This in the language
 
51
                     specified by Language.
 
52
 
 
53
  @retval EFI_SUCCESS           The string for the
 
54
                                Driver specified by This and the
 
55
                                language specified by Language
 
56
                                was returned in DriverName.
 
57
 
 
58
  @retval EFI_INVALID_PARAMETER Language is NULL.
 
59
 
 
60
  @retval EFI_INVALID_PARAMETER DriverName is NULL.
 
61
 
 
62
  @retval EFI_UNSUPPORTED       The driver specified by This
 
63
                                does not support the language
 
64
                                specified by Language.
 
65
 
 
66
**/
 
67
typedef
 
68
EFI_STATUS
 
69
(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(
 
70
  IN EFI_COMPONENT_NAME2_PROTOCOL          *This,
 
71
  IN  CHAR8                                *Language,
 
72
  OUT CHAR16                               **DriverName
 
73
  );
 
74
 
 
75
 
 
76
/**
 
77
  Retrieves a string that is the user readable name of
 
78
  the controller that is being managed by an EFI Driver.
 
79
 
 
80
  @param  This             A pointer to the
 
81
                           EFI_COMPONENT_NAME2_PROTOCOL instance.
 
82
 
 
83
  @param  ControllerHandle The handle of a controller that the
 
84
                           driver specified by This is managing.
 
85
                           This handle specifies the controller
 
86
                           whose name is to be returned.
 
87
 
 
88
  @param  ChildHandle      The handle of the child controller to
 
89
                           retrieve the name of.  This is an
 
90
                           optional parameter that may be NULL.
 
91
                           It will be NULL for device drivers.
 
92
                           It will also be NULL for bus
 
93
                           drivers that wish to retrieve the
 
94
                           name of the bus controller.  It will
 
95
                           not be NULL for a bus driver that
 
96
                           wishes to retrieve the name of a
 
97
                           child controller.
 
98
 
 
99
  @param  Language         A pointer to a Null-terminated ASCII
 
100
                           string array indicating the language.
 
101
                           This is the language of the driver
 
102
                           name that the caller is requesting,
 
103
                           and it must match one of the
 
104
                           languages specified in
 
105
                           SupportedLanguages. The number of
 
106
                           languages supported by a driver is up
 
107
                           to the driver writer. Language is
 
108
                           specified in RFC 4646 language code
 
109
                           format.
 
110
 
 
111
  @param  ControllerName   A pointer to the string to return.
 
112
                           This string is the name of the controller
 
113
                           specified by ControllerHandle and ChildHandle
 
114
                           in the language specified by Language
 
115
                           from the point of view of the driver
 
116
                           specified by This.
 
117
 
 
118
  @retval EFI_SUCCESS           The string for the user
 
119
                                readable name in the language
 
120
                                specified by Language for the
 
121
                                driver specified by This was
 
122
                                returned in DriverName.
 
123
 
 
124
  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
 
125
 
 
126
  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
 
127
                                is not a valid EFI_HANDLE.
 
128
 
 
129
  @retval EFI_INVALID_PARAMETER Language is NULL.
 
130
 
 
131
  @retval EFI_INVALID_PARAMETER ControllerName is NULL.
 
132
 
 
133
  @retval EFI_UNSUPPORTED       The driver specified by This is
 
134
                                not currently managing the
 
135
                                controller specified by
 
136
                                ControllerHandle and
 
137
                                ChildHandle.
 
138
 
 
139
  @retval EFI_UNSUPPORTED       The driver specified by This
 
140
                                does not support the language
 
141
                                specified by Language.
 
142
 
 
143
**/
 
144
typedef
 
145
EFI_STATUS
 
146
(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(
 
147
  IN EFI_COMPONENT_NAME2_PROTOCOL *This,
 
148
  IN  EFI_HANDLE                  ControllerHandle,
 
149
  IN  EFI_HANDLE                  ChildHandle        OPTIONAL,
 
150
  IN  CHAR8                       *Language,
 
151
  OUT CHAR16                      **ControllerName
 
152
  );
 
153
 
 
154
///
 
155
/// This protocol is used to retrieve user readable names of drivers
 
156
/// and controllers managed by UEFI Drivers.
 
157
///
 
158
struct _EFI_COMPONENT_NAME2_PROTOCOL {
 
159
  EFI_COMPONENT_NAME2_GET_DRIVER_NAME      GetDriverName;
 
160
  EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME  GetControllerName;
 
161
 
 
162
  ///
 
163
  /// A Null-terminated ASCII string array that contains one or more
 
164
  /// supported language codes. This is the list of language codes that
 
165
  /// this protocol supports. The number of languages supported by a
 
166
  /// driver is up to the driver writer. SupportedLanguages is
 
167
  /// specified in RFC 4646 format.
 
168
  ///
 
169
  CHAR8                                    *SupportedLanguages;
 
170
};
 
171
 
 
172
extern EFI_GUID gEfiComponentName2ProtocolGuid;
 
173
 
 
174
#endif