audk/EdkModulePkg/Universal/Debugger/Debugport/Dxe/ComponentName.c

109 lines
3.5 KiB
C

/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
ComponentName.c
Abstract:
Component name protocol member functions for DebugPort...
--*/
#include "DebugPort.h"
//
// EFI Component Name Protocol
//
EFI_COMPONENT_NAME_PROTOCOL gDebugPortComponentName = {
DebugPortComponentNameGetDriverName,
DebugPortComponentNameGetControllerName,
"eng"
};
static EFI_UNICODE_STRING_TABLE mDebugPortDriverNameTable[] = {
{
"eng",
(CHAR16 *) L"DebugPort Driver"
},
{
NULL,
NULL
}
};
EFI_STATUS
EFIAPI
DebugPortComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
)
/*++
Routine Description:
Retrieves a Unicode string that is the user readable name of the EFI Driver.
Arguments:
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
Language - A pointer to a three character ISO 639-2 language identifier.
This is the language of the driver name that that the caller
is requesting, and it must match one of the languages specified
in SupportedLanguages. The number of languages supported by a
driver is up to the driver writer.
DriverName - A pointer to the Unicode string to return. This Unicode string
is the name of the driver specified by This in the language
specified by Language.
Returns:
EFI_SUCCESS - The Unicode string for the Driver specified by This
and the language specified by Language was returned
in DriverName.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - DriverName is NULL.
EFI_UNSUPPORTED - The driver specified by This does not support the
language specified by Language.
--*/
{
return LookupUnicodeString (
Language,
gDebugPortComponentName.SupportedLanguages,
mDebugPortDriverNameTable,
DriverName
);
}
EFI_STATUS
EFIAPI
DebugPortComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
/*++
Routine Description:
The debug port driver does not support GetControllerName, so this function
is just stubbed and returns EFI_UNSUPPORTED.
Arguments:
Per EFI 1.10 driver model
Returns:
EFI_UNSUPPORTED
--*/
{
return EFI_UNSUPPORTED;
}