]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Library/HandleParsingLib.h
Refine the select language logic.
[mirror_edk2.git] / ShellPkg / Include / Library / HandleParsingLib.h
index 8c0b81d12c34a9c46bb9ed486565044f2ae8b40d..c2e182bd9d955395c5ec1e8b57ca90076dab6384 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides interface to advanced shell functionality for parsing both handle and protocol database.\r
 \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -95,6 +95,27 @@ GetStringNameFromHandle(
   IN CONST CHAR8      *Language\r
   );\r
 \r
+/**\r
+  Get best support language for this driver.\r
+  \r
+  First base on the user input language  to search, second base on the current \r
+  platform used language to search, third get the first language from the \r
+  support language list. The caller need to free the buffer of the best language.\r
+\r
+  @param[in] SupportedLanguages      The support languages for this driver.\r
+  @param[in] InputLanguage           The user input language.\r
+  @param[in] Iso639Language          Whether get language for ISO639.\r
+\r
+  @return                            The best support language for this driver.\r
+**/\r
+CHAR8 *\r
+EFIAPI\r
+GetBestLanguageForDriver (\r
+  IN CONST CHAR8  *SupportedLanguages,\r
+  IN CONST CHAR8  *InputLanguage,\r
+  IN BOOLEAN      Iso639Language\r
+  );\r
+\r
 #define HR_UNKNOWN                     0\r
 #define HR_IMAGE_HANDLE                BIT1\r
 #define HR_DRIVER_BINDING_HANDLE       BIT2 // has driver binding\r