]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/IfrSupportLib.h
Use doxygen comment style for document entity such as struct, enum, variable that...
[mirror_edk2.git] / MdePkg / Include / Library / IfrSupportLib.h
index b8d3183e878ef51deadfcec5bf818e7c5334dc4f..a187b9e0a6a9390d2e0c8d3369146344b14259ad 100644 (file)
@@ -2,7 +2,7 @@
   The file contain all library functions and definitions for IFR opcode creation and 
   related Form Browser utility Operations.
 
-  Copyright (c) 2007, Intel Corporation
+  Copyright (c) 2007 - 2008, 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
@@ -13,8 +13,8 @@
 
 **/
 
-#ifndef _IFR_SUPPORT_LIBRARY_H
-#define _IFR_SUPPORT_LIBRARY_H
+#ifndef _IFR_SUPPORT_LIBRARY_H_
+#define _IFR_SUPPORT_LIBRARY_H_
 
 
 #include <Protocol/HiiFont.h>
@@ -224,8 +224,8 @@ CreateGotoOpCode (
 /**
   Create EFI_IFR_ONE_OF_OPTION_OP opcode.
 
-  @param  QuestionId             Question ID
-  @param  OptionList             The list of Options.
+  @param  OptionCount            The number of options.
+  @param  OptionsList            The list of Options.
   @param  Type                   The data type.
   @param  Data                   Destination for the created opcode binary
 
@@ -287,7 +287,7 @@ CreateOneOfOpCode (
   @param  Prompt                 String ID for Prompt
   @param  Help                   String ID for Help
   @param  QuestionFlags          Flags in Question Header
-  @param  Flags                  Flags for ordered list opcode
+  @param  OrderedListFlags       Flags for ordered list opcode
   @param  DataType               Type for option value
   @param  MaxContainers          Maximum count for options in this ordered list
   @param  OptionsList            List of options
@@ -308,7 +308,7 @@ CreateOrderedListOpCode (
   IN      EFI_STRING_ID       Prompt,
   IN      EFI_STRING_ID       Help,
   IN      UINT8               QuestionFlags,
-  IN      UINT8               Flags,
+  IN      UINT8               OrderedListFlags,
   IN      UINT8               DataType,
   IN      UINT8               MaxContainers,
   IN      IFR_OPTION          *OptionsList,
@@ -422,6 +422,20 @@ CreateStringOpCode (
   )
 ;
 
+/**
+  Converts the unicode character of the string from uppercase to lowercase.
+
+  @param Str     String to be converted
+
+**/
+VOID
+EFIAPI
+ToLower (
+  IN OUT CHAR16    *Str
+  )
+;
+
 /**
   Converts binary buffer to Unicode string in reversed byte order to BufToHexString().
 
@@ -464,6 +478,58 @@ HexStringToBuffer (
   )
 ;
 
+/**
+  Convert binary representation Config string (e.g. "0041004200430044") to the
+  original string (e.g. "ABCD"). Config string appears in <ConfigHdr> (i.e.
+  "&NAME=<string>"), or Name/Value pair in <ConfigBody> (i.e. "label=<string>").
+
+  @param UnicodeString  Original Unicode string.
+  @param StrBufferLen   On input: Length in bytes of buffer to hold the Unicode string.
+                                    Includes tailing '\0' character.
+                                    On output:
+                                      If return EFI_SUCCESS, containing length of Unicode string buffer.
+                                      If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.
+  @param ConfigString   Binary representation of Unicode String, <string> := (<HexCh>4)+
+
+  @retval EFI_SUCCESS          Routine success.
+  @retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
+
+**/
+EFI_STATUS
+EFIAPI
+ConfigStringToUnicode (
+  IN OUT CHAR16                *UnicodeString,
+  IN OUT UINTN                 *StrBufferLen,
+  IN CHAR16                    *ConfigString
+  )
+;
+
+/**
+  Convert Unicode string to binary representation Config string, e.g.
+  "ABCD" => "0041004200430044". Config string appears in <ConfigHdr> (i.e.
+  "&NAME=<string>"), or Name/Value pair in <ConfigBody> (i.e. "label=<string>").
+
+  @param ConfigString   Binary representation of Unicode String, <string> := (<HexCh>4)+
+  @param  StrBufferLen  On input: Length in bytes of buffer to hold the Unicode string.
+                                    Includes tailing '\0' character.
+                                    On output:
+                                      If return EFI_SUCCESS, containing length of Unicode string buffer.
+                                      If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.
+  @param  UnicodeString  Original Unicode string.
+
+  @retval EFI_SUCCESS           Routine success.
+  @retval EFI_BUFFER_TOO_SMALL  The string buffer is too small.
+
+**/
+EFI_STATUS
+EFIAPI
+UnicodeToConfigString (
+  IN OUT CHAR16                *ConfigString,
+  IN OUT UINTN                 *StrBufferLen,
+  IN CHAR16                    *UnicodeString
+  )
+;
+
 /**
   Construct <ConfigHdr> using routing information GUID/NAME/PATH.
 
@@ -578,7 +644,7 @@ SetBrowserData (
   @param  NumberOfLines          The number of lines for the dialog box
   @param  KeyValue               The EFI_KEY value returned if HotKey is TRUE..
   @param  String                 Pointer to the first string in the list
-  @param  ...                    A series of (quantity == NumberOfLines) text
+  @param  ...                    A series of (quantity == NumberOfLines - 1) text
                                  strings which will be used to construct the dialog
                                  box
 
@@ -586,7 +652,6 @@ SetBrowserData (
   @retval EFI_INVALID_PARAMETER  One of the parameters was invalid.
 
 **/
-
 EFI_STATUS
 EFIAPI
 IfrLibCreatePopUp (