]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/UnicodeCollation.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / UnicodeCollation.h
index 4efa515d0862ccfeda0589438469d9ab6f1dac8e..c337c7bdf474db20ce83bd7e07332bc6c4737775 100644 (file)
@@ -1,16 +1,10 @@
 /** @file\r
   Unicode Collation protocol that follows the UEFI 2.0 specification.\r
-  This protocol is used to allow code running in the boot services environment \r
+  This protocol is used to allow code running in the boot services environment\r
   to perform lexical comparison functions on Unicode strings for given languages.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
-  All rights reserved. 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
-  http://opensource.org/licenses/bsd-license.php                                            \r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -32,12 +26,12 @@ typedef struct _EFI_UNICODE_COLLATION_PROTOCOL  EFI_UNICODE_COLLATION_PROTOCOL;
 \r
 ///\r
 /// Protocol GUID name defined in EFI1.1.\r
-/// \r
+///\r
 #define UNICODE_COLLATION_PROTOCOL              EFI_UNICODE_COLLATION_PROTOCOL_GUID\r
 \r
 ///\r
 /// Protocol defined in EFI1.1.\r
-/// \r
+///\r
 typedef EFI_UNICODE_COLLATION_PROTOCOL          UNICODE_COLLATION_INTERFACE;\r
 \r
 ///\r
@@ -49,16 +43,15 @@ typedef EFI_UNICODE_COLLATION_PROTOCOL          UNICODE_COLLATION_INTERFACE;
 // Protocol member functions\r
 //\r
 /**\r
-  Performs a case-insensitive comparison of two Null-terminated Unicode \r
-  strings.\r
+  Performs a case-insensitive comparison of two Null-terminated strings.\r
 \r
-  @param  This Protocol instance pointer.\r
-  @param  Str1 A pointer to a Null-terminated Unicode string.\r
-  @param  Str2 A pointer to a Null-terminated Unicode string.\r
+  @param  This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.\r
+  @param  Str1 A pointer to a Null-terminated string.\r
+  @param  Str2 A pointer to a Null-terminated string.\r
 \r
-  @retval 0   Str1 is equivalent to Str2\r
-  @retval >_0 Str1 is lexically greater than Str2\r
-  @retval <_0 Str1 is lexically less than Str2\r
+  @retval 0   Str1 is equivalent to Str2.\r
+  @retval >0  Str1 is lexically greater than Str2.\r
+  @retval <0  Str1 is lexically less than Str2.\r
 \r
 **/\r
 typedef\r
@@ -70,12 +63,12 @@ INTN
   );\r
 \r
 /**\r
-  Performs a case-insensitive comparison of a Null-terminated Unicode \r
-  pattern string and a Null-terminated Unicode string.\r
+  Performs a case-insensitive comparison of a Null-terminated\r
+  pattern string and a Null-terminated string.\r
 \r
-  @param  This    Protocol instance pointer.\r
-  @param  String  A pointer to a Null-terminated Unicode string.\r
-  @param  Pattern A pointer to a Null-terminated Unicode pattern string.\r
+  @param  This    A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.\r
+  @param  String  A pointer to a Null-terminated string.\r
+  @param  Pattern A pointer to a Null-terminated pattern string.\r
 \r
   @retval TRUE    Pattern was found in String.\r
   @retval FALSE   Pattern was not found in String.\r
@@ -90,11 +83,11 @@ BOOLEAN
   );\r
 \r
 /**\r
-  Converts all the Unicode characters in a Null-terminated Unicode string to \r
-  lower case Unicode characters.\r
+  Converts all the characters in a Null-terminated string to\r
+  lower case characters.\r
 \r
-  @param  This   Protocol instance pointer.\r
-  @param  String A pointer to a Null-terminated Unicode string.\r
+  @param  This   A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.\r
+  @param  String A pointer to a Null-terminated string.\r
 \r
 **/\r
 typedef\r
@@ -105,11 +98,11 @@ VOID
   );\r
 \r
 /**\r
-  Converts all the Unicode characters in a Null-terminated Unicode string to upper\r
-  case Unicode characters.\r
+  Converts all the characters in a Null-terminated string to upper\r
+  case characters.\r
 \r
-  @param  This   Protocol instance pointer.\r
-  @param  String A pointer to a Null-terminated Unicode string.\r
+  @param  This   A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.\r
+  @param  String A pointer to a Null-terminated string.\r
 \r
 **/\r
 typedef\r
@@ -120,15 +113,15 @@ VOID
   );\r
 \r
 /**\r
-  Converts an 8.3 FAT file name in an OEM character set to a Null-terminated \r
-  Unicode string.\r
+  Converts an 8.3 FAT file name in an OEM character set to a Null-terminated\r
+  string.\r
 \r
-  @param  This    Protocol instance pointer.\r
+  @param  This    A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.\r
   @param  FatSize The size of the string Fat in bytes.\r
   @param  Fat     A pointer to a Null-terminated string that contains an 8.3 file\r
-                  name using an OEM character set.\r
-  @param  String  A pointer to a Null-terminated Unicode string. The string must\r
-                  be preallocated to hold FatSize Unicode characters.\r
+                  name using an 8-bit OEM character set.\r
+  @param  String  A pointer to a Null-terminated string. The string must\r
+                  be allocated in advance to hold FatSize characters.\r
 \r
 **/\r
 typedef\r
@@ -141,18 +134,17 @@ VOID
   );\r
 \r
 /**\r
-  Converts a Null-terminated Unicode string to legal characters in a FAT \r
-  filename using an OEM character set. \r
+  Converts a Null-terminated string to legal characters in a FAT\r
+  filename using an OEM character set.\r
 \r
-  @param  This    Protocol instance pointer.\r
-  @param  String  A pointer to a Null-terminated Unicode string. The string must\r
-                  be preallocated to hold FatSize Unicode characters.\r
+  @param  This    A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.\r
+  @param  String  A pointer to a Null-terminated string.\r
   @param  FatSize The size of the string Fat in bytes.\r
-  @param  Fat     A pointer to a Null-terminated string that contains an 8.3 file\r
-                  name using an OEM character set.\r
+  @param  Fat     A pointer to a string that contains the converted version of\r
+                  String using legal FAT characters from an OEM character set.\r
 \r
-  @retval TRUE    Fat is a Long File Name\r
-  @retval FALSE   Fat is an 8.3 file name\r
+  @retval TRUE    One or more conversions failed and were substituted with '_'\r
+  @retval FALSE   None of the conversions failed.\r
 \r
 **/\r
 typedef\r
@@ -165,8 +157,8 @@ BOOLEAN
   );\r
 \r
 ///\r
-/// The EFI_UNICODE_COLLATION_PROTOCOL is used to perform case-insensitive \r
-/// comparisons of Unicode strings. \r
+/// The EFI_UNICODE_COLLATION_PROTOCOL is used to perform case-insensitive\r
+/// comparisons of strings.\r
 ///\r
 struct _EFI_UNICODE_COLLATION_PROTOCOL {\r
   EFI_UNICODE_COLLATION_STRICOLL    StriColl;\r
@@ -179,10 +171,11 @@ struct _EFI_UNICODE_COLLATION_PROTOCOL {
   //\r
   EFI_UNICODE_COLLATION_FATTOSTR    FatToStr;\r
   EFI_UNICODE_COLLATION_STRTOFAT    StrToFat;\r
-  \r
+\r
   ///\r
-  /// A Null-terminated ASCII string array that contains one or more \r
-  /// language codes. This array is specified in RFC 4646 format.\r
+  /// A Null-terminated ASCII string array that contains one or more language codes.\r
+  /// When this field is used for UnicodeCollation2, it is specified in RFC 4646 format.\r
+  /// When it is used for UnicodeCollation, it is specified in ISO 639-2 format.\r
   ///\r
   CHAR8                             *SupportedLanguages;\r
 };\r