remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / AtapiPassThruDxe / ComponentName.c
1 /** @file
2 Copyright (c) 2006, Intel Corporation
3 All rights reserved. This program and the accompanying materials
4 are licensed and made available under the terms and conditions of the BSD License
5 which accompanies this distribution. The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php
7
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10
11 Module Name: ComponentName.c
12
13 **/
14 #include "AtapiPassThru.h"
15
16 ///
17 /// EFI Component Name Protocol
18 ///
19 EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName = {
20 AtapiScsiPassThruComponentNameGetDriverName,
21 AtapiScsiPassThruComponentNameGetControllerName,
22 "eng"
23 };
24
25 static EFI_UNICODE_STRING_TABLE mAtapiScsiPassThruDriverNameTable[] = {
26 { "eng", (CHAR16 *) L"ATAPI SCSI Pass Thru Driver" },
27 { NULL , NULL }
28 };
29
30 /**
31 Retrieves a Unicode string that is the user readable name of the EFI Driver.
32
33 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
34 @param Language A pointer to a three character ISO 639-2 language identifier.
35 This is the language of the driver name that that the caller
36 is requesting, and it must match one of the languages specified
37 in SupportedLanguages. The number of languages supported by a
38 driver is up to the driver writer.
39 @param DriverName A pointer to the Unicode string to return. This Unicode string
40 is the name of the driver specified by This in the language
41 specified by Language.
42
43 @retval EFI_SUCCESS The Unicode string for the Driver specified by This
44 and the language specified by Language was returned
45 in DriverName.
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 the
49 language specified by Language.
50
51 **/
52 EFI_STATUS
53 EFIAPI
54 AtapiScsiPassThruComponentNameGetDriverName (
55 IN EFI_COMPONENT_NAME_PROTOCOL *This,
56 IN CHAR8 *Language,
57 OUT CHAR16 **DriverName
58 )
59 {
60 return LookupUnicodeString (
61 Language,
62 gAtapiScsiPassThruComponentName.SupportedLanguages,
63 mAtapiScsiPassThruDriverNameTable,
64 DriverName
65 );
66 }
67
68 /**
69 Retrieves a Unicode string that is the user readable name of the controller
70 that is being managed by an EFI Driver.
71
72 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
73 @param ControllerHandle The handle of a controller that the driver specified by
74 This is managing. This handle specifies the controller
75 whose name is to be returned.
76 @param ChildHandle The handle of the child controller to retrieve the name
77 of. This is an optional parameter that may be NULL. It
78 will be NULL for device drivers. It will also be NULL
79 for a bus drivers that wish to retrieve the name of the
80 bus controller. It will not be NULL for a bus driver
81 that wishes to retrieve the name of a child controller.
82 @param Language A pointer to a three character ISO 639-2 language
83 identifier. This is the language of the controller name
84 that that the caller is requesting, and it must match one
85 of the languages specified in SupportedLanguages. The
86 number of languages supported by a driver is up to the
87 driver writer.
88 @param ControllerName A pointer to the Unicode string to return. This Unicode
89 string is the name of the controller specified by
90 ControllerHandle and ChildHandle in the language
91 specified by Language from the point of view of the
92 driver specified by This.
93
94 @retval EFI_SUCCESS The Unicode string for the user readable name in the
95 language specified by Language for the driver
96 specified by This was returned in DriverName.
97 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
98 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
99 EFI_HANDLE.
100 @retval EFI_INVALID_PARAMETER Language is NULL.
101 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
102 @retval EFI_UNSUPPORTED The driver specified by This is not currently
103 managing the controller specified by
104 ControllerHandle and ChildHandle.
105 @retval EFI_UNSUPPORTED The driver specified by This does not support the
106 language specified by Language.
107
108 **/
109 EFI_STATUS
110 EFIAPI
111 AtapiScsiPassThruComponentNameGetControllerName (
112 IN EFI_COMPONENT_NAME_PROTOCOL *This,
113 IN EFI_HANDLE ControllerHandle,
114 IN EFI_HANDLE ChildHandle OPTIONAL,
115 IN CHAR8 *Language,
116 OUT CHAR16 **ControllerName
117 )
118 {
119 return EFI_UNSUPPORTED;
120 }