]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOpCodeCreation.c
Fix coding style issue.
[mirror_edk2.git] / IntelFrameworkPkg / Library / FrameworkIfrSupportLib / IfrOpCodeCreation.c
index 305532083b0f84d7cda4410de01ee917a2dd75f8..cbb5cfa07cc9213bdd79527a74b036575412cf1c 100644 (file)
@@ -1,4 +1,7 @@
 /** @file\r
+  Library Routines to create IFR independent of string data - assume tokens already exist\r
+  Primarily to be used for exporting op-codes at a label in pre-defined forms.\r
+\r
 Copyright (c) 2006, 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
@@ -8,15 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 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
 \r
-Module Name:\r
-  IfrOpCodeCreation.c\r
-\r
-Abstract:\r
-\r
-  Library Routines to create IFR independent of string data - assume tokens already exist\r
-  Primarily to be used for exporting op-codes at a label in pre-defined forms.\r
-\r
-Revision History:\r
 \r
 **/\r
 \r
@@ -25,31 +19,22 @@ Revision History:
 //\r
 #include "IfrSupportLibInternal.h"\r
 \r
-EFI_STATUS\r
-CreateSubTitleOpCode (\r
-  IN      STRING_REF          StringToken,\r
-  IN OUT  VOID                *FormBuffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Create a SubTitle opcode independent of string creation\r
   This is used primarily by users who need to create just one particular valid op-code and the string\r
   data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
   location to pre-defined forms in HII)\r
   \r
-Arguments:\r
+  @param StringToken      StringToken of the subtitle\r
+  @param FormBuffer       Output of subtitle as a form\r
   \r
-  StringToken     - StringToken of the subtitle\r
-  \r
-  FormBuffer      - Output of subtitle as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS     - Subtitle created to be a form\r
-\r
---*/\r
+  @retval EFI_SUCCESS     Subtitle created to be a form\r
+**/\r
+EFI_STATUS\r
+CreateSubTitleOpCode (\r
+  IN      STRING_REF          StringToken,\r
+  IN OUT  VOID                *FormBuffer\r
+  )\r
 {\r
   FRAMEWORK_EFI_IFR_SUBTITLE  Subtitle;\r
 \r
@@ -61,7 +46,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Create a Text opcode independent of string creation\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+\r
+  @param StringToken               - First string token of the text\r
+  @param StringTokenTwo            - Second string token of the text\r
+  @param StringTokenThree          - Help string token of the text\r
+  @param Flags                     - Flag of the text\r
+  @param Key                       - Key of the text\r
+  @param FormBuffer                - Output of text as a form\r
 \r
+  @retval EFI_SUCCESS       - Text created to be a form\r
+**/\r
 EFI_STATUS\r
 CreateTextOpCode (\r
   IN      STRING_REF          StringToken,\r
@@ -71,34 +70,6 @@ CreateTextOpCode (
   IN      UINT16              Key,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a Text opcode independent of string creation\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-  \r
-Arguments:\r
-  \r
-  StringToken               - First string token of the text\r
-  \r
-  StringTokenTwo            - Second string token of the text\r
-  \r
-  StringTokenThree          - Help string token of the text\r
-  \r
-  Flags                     - Flag of the text\r
-  \r
-  Key                       - Key of the text\r
-  \r
-  FormBuffer                - Output of text as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS       - Text created to be a form\r
-\r
---*/\r
 {\r
   FRAMEWORK_EFI_IFR_TEXT  Text;\r
 \r
@@ -116,7 +87,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Create a hyperlink opcode independent of string creation\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+  \r
 \r
+  @param FormId          - Form ID of the hyperlink\r
+  @param StringToken     - Prompt string token of the hyperlink\r
+  @param StringTokenTwo  - Help string token of the hyperlink\r
+  @param Flags           - Flags of the hyperlink\r
+  @param Key             - Key of the hyperlink\r
+  @param FormBuffer      - Output of hyperlink as a form\r
+  @retval EFI_SUCCESS   - Hyperlink created to be a form\r
+--*/\r
 EFI_STATUS\r
 CreateGotoOpCode (\r
   IN      UINT16              FormId,\r
@@ -126,34 +111,7 @@ CreateGotoOpCode (
   IN      UINT16              Key,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
 \r
-Routine Description:\r
-\r
-  Create a hyperlink opcode independent of string creation\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-  \r
-Arguments:\r
-  \r
-  FormId          - Form ID of the hyperlink\r
-  \r
-  StringToken     - Prompt string token of the hyperlink\r
-  \r
-  StringTokenTwo  - Help string token of the hyperlink\r
-  \r
-  Flags           - Flags of the hyperlink\r
-  \r
-  Key             - Key of the hyperlink\r
-  \r
-  FormBuffer      - Output of hyperlink as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS   - Hyperlink created to be a form\r
-\r
---*/\r
 {\r
   FRAMEWORK_EFI_IFR_REF Hyperlink;\r
 \r
@@ -170,7 +128,27 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Create a one-of opcode with a set of option op-codes to choose from independent of string creation.\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+\r
+  OptionsList is a pointer to a null-terminated list of option descriptions.  Ensure that OptionsList[x].StringToken\r
+  has been filled in since this routine will not generate StringToken values.\r
+  \r
+  @param QuestionId      - Question ID of the one-of box\r
+  @param DataWidth       - DataWidth of the one-of box\r
+  @param PromptToken     - Prompt string token of the one-of box\r
+  @param HelpToken       - Help string token of the one-of box\r
+  @param OptionsList     - Each string in it is an option of the one-of box\r
+  @param OptionCount     - Option string count\r
+  @param FormBuffer      - Output of One-Of box as a form\r
+  \r
 \r
+  @retval EFI_SUCCESS         - One-Of box created to be a form\r
+  @retval EFI_DEVICE_ERROR    - DataWidth > 2\r
+**/\r
 EFI_STATUS\r
 CreateOneOfOpCode (\r
   IN      UINT16              QuestionId,\r
@@ -181,41 +159,6 @@ CreateOneOfOpCode (
   IN      UINTN               OptionCount,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a one-of opcode with a set of option op-codes to choose from independent of string creation.\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-\r
-  OptionsList is a pointer to a null-terminated list of option descriptions.  Ensure that OptionsList[x].StringToken\r
-  has been filled in since this routine will not generate StringToken values.\r
-  \r
-Arguments:\r
-  \r
-  QuestionId      - Question ID of the one-of box\r
-  \r
-  DataWidth       - DataWidth of the one-of box\r
-  \r
-  PromptToken     - Prompt string token of the one-of box\r
-  \r
-  HelpToken       - Help string token of the one-of box\r
-  \r
-  OptionsList     - Each string in it is an option of the one-of box\r
-  \r
-  OptionCount     - Option string count\r
-  \r
-  FormBuffer      - Output of One-Of box as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS         - One-Of box created to be a form\r
-  \r
-  EFI_DEVICE_ERROR    - DataWidth > 2\r
-\r
---*/\r
 {\r
   UINTN                 Index;\r
   FRAMEWORK_EFI_IFR_ONE_OF        OneOf;\r
@@ -268,6 +211,25 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Create a ordered list opcode with a set of option op-codes to choose from independent of string creation.\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+\r
+  OptionsList is a pointer to a null-terminated list of option descriptions.  Ensure that OptionsList[x].StringToken\r
+  has been filled in since this routine will not generate StringToken values.\r
+  \r
+  @param QuestionId      - Question ID of the ordered list\r
+  @param MaxEntries      - MaxEntries of the ordered list\r
+  @param PromptToken     - Prompt string token of the ordered list\r
+  @param HelpToken       - Help string token of the ordered list\r
+  @param OptionsList     - Each string in it is an option of the ordered list\r
+  @param OptionCount     - Option string count\r
+  @param FormBuffer      - Output of ordered list as a form\r
+  \r
+  @retval EFI_SUCCESS     - Ordered list created to be a form\r
+**/\r
 EFI_STATUS\r
 CreateOrderedListOpCode (\r
   IN      UINT16              QuestionId,\r
@@ -278,39 +240,6 @@ CreateOrderedListOpCode (
   IN      UINTN               OptionCount,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a ordered list opcode with a set of option op-codes to choose from independent of string creation.\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-\r
-  OptionsList is a pointer to a null-terminated list of option descriptions.  Ensure that OptionsList[x].StringToken\r
-  has been filled in since this routine will not generate StringToken values.\r
-  \r
-Arguments:\r
-  \r
-  QuestionId      - Question ID of the ordered list\r
-  \r
-  MaxEntries      - MaxEntries of the ordered list\r
-  \r
-  PromptToken     - Prompt string token of the ordered list\r
-  \r
-  HelpToken       - Help string token of the ordered list\r
-  \r
-  OptionsList     - Each string in it is an option of the ordered list\r
-  \r
-  OptionCount     - Option string count\r
-  \r
-  FormBuffer      - Output of ordered list as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS     - Ordered list created to be a form\r
-\r
---*/\r
 {\r
   UINTN                 Index;\r
   FRAMEWORK_EFI_IFR_ORDERED_LIST  OrderedList;\r
@@ -356,6 +285,23 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Create a checkbox opcode independent of string creation\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+\r
+  @param QuestionId      - Question ID of the check box\r
+  @param DataWidth       - DataWidth of the check box\r
+  @param PromptToken     - Prompt string token of the check box\r
+  @param HelpToken       - Help string token of the check box\r
+  @param Flags           - Flags of the check box\r
+  @param Key             - Key of the check box\r
+  @param FormBuffer      - Output of the check box as a form\r
+\r
+  @retval EFI_SUCCESS       - Checkbox created to be a form\r
+  @retval EFI_DEVICE_ERROR  - DataWidth > 1\r
+**/\r
 EFI_STATUS\r
 CreateCheckBoxOpCode (\r
   IN      UINT16              QuestionId,\r
@@ -366,38 +312,7 @@ CreateCheckBoxOpCode (
   IN      UINT16              Key,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
 \r
-Routine Description:\r
-\r
-  Create a checkbox opcode independent of string creation\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-  \r
-Arguments:\r
-  \r
-  QuestionId      - Question ID of the check box\r
-  \r
-  DataWidth       - DataWidth of the check box\r
-  \r
-  PromptToken     - Prompt string token of the check box\r
-  \r
-  HelpToken       - Help string token of the check box\r
-  \r
-  Flags           - Flags of the check box\r
-  \r
-  Key             - Key of the check box\r
-  \r
-  FormBuffer      - Output of the check box as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS       - Checkbox created to be a form\r
-  \r
-  EFI_DEVICE_ERROR  - DataWidth > 1\r
-\r
---*/\r
 {\r
   FRAMEWORK_EFI_IFR_CHECKBOX  CheckBox;\r
 \r
@@ -423,7 +338,28 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
+/**\r
+  Create a numeric opcode independent of string creation\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+  \r
+  @param QuestionId      - Question ID of the numeric\r
+  @param DataWidth       - DataWidth of the numeric\r
+  @param PromptToken     - Prompt string token of the numeric\r
+  @param HelpToken       - Help string token of the numeric\r
+  @param Minimum         - Minumun boundary of the numeric\r
+  @param Maximum         - Maximum boundary of the numeric\r
+  @param Step            - Step of the numeric\r
+  @param Default         - Default value of the numeric\r
+  @param Flags           - Flags of the numeric\r
+  @param Key             - Key of the numeric\r
+  @param FormBuffer      - Output of the numeric as a form\r
\r
+\r
+  @retval EFI_SUCCESS       - The numeric created to be a form.\r
+  @retval EFI_DEVICE_ERROR  - DataWidth > 2\r
+**/\r
 EFI_STATUS\r
 CreateNumericOpCode (\r
   IN      UINT16              QuestionId,\r
@@ -438,46 +374,7 @@ CreateNumericOpCode (
   IN      UINT16              Key,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a numeric opcode independent of string creation\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-  \r
-Arguments:\r
-  \r
-  QuestionId      - Question ID of the numeric\r
-  \r
-  DataWidth       - DataWidth of the numeric\r
-  \r
-  PromptToken     - Prompt string token of the numeric\r
-  \r
-  HelpToken       - Help string token of the numeric\r
-  \r
-  Minimum         - Minumun boundary of the numeric\r
-  \r
-  Maximum         - Maximum boundary of the numeric\r
-  \r
-  Step            - Step of the numeric\r
-  \r
-  Default         - Default value of the numeric\r
-  \r
-  Flags           - Flags of the numeric\r
-  \r
-  Key             - Key of the numeric\r
-  \r
-  FormBuffer      - Output of the numeric as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS       - The numeric created to be a form.\r
-  \r
-  EFI_DEVICE_ERROR  - DataWidth > 2\r
 \r
---*/\r
 {\r
   FRAMEWORK_EFI_IFR_NUMERIC Numeric;\r
 \r
@@ -507,7 +404,24 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
+/**\r
+  Create a numeric opcode independent of string creation\r
+  This is used primarily by users who need to create just one particular valid op-code and the string\r
+  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
+  location to pre-defined forms in HII)\r
+  \r
+  @param QuestionId       Question ID of the string\r
+  @param DataWidth        DataWidth of the string\r
+  @param PromptToken      Prompt token of the string\r
+  @param HelpToken        Help token of the string\r
+  @param MinSize          Min size boundary of the string\r
+  @param MaxSize          Max size boundary of the string\r
+  @param Flags            Flags of the string\r
+  @param Key              Key of the string\r
+  @param FormBuffer       Output of the string as a form\r
+  \r
+  @retval EFI_SUCCESS     String created to be a form.\r
+**/\r
 EFI_STATUS\r
 CreateStringOpCode (\r
   IN      UINT16              QuestionId,\r
@@ -520,40 +434,7 @@ CreateStringOpCode (
   IN      UINT16              Key,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
 \r
-  Create a numeric opcode independent of string creation\r
-  This is used primarily by users who need to create just one particular valid op-code and the string\r
-  data will be assumed to exist in the HiiDatabase already.  (Useful when exporting op-codes at a label\r
-  location to pre-defined forms in HII)\r
-  \r
-Arguments:\r
-  \r
-  QuestionId      - Question ID of the string\r
-  \r
-  DataWidth       - DataWidth of the string\r
-  \r
-  PromptToken     - Prompt token of the string\r
-  \r
-  HelpToken       - Help token of the string\r
-  \r
-  MinSize         - Min size boundary of the string\r
-  \r
-  MaxSize         - Max size boundary of the string\r
-    \r
-  Flags           - Flags of the string\r
-  \r
-  Key             - Key of the string\r
-  \r
-  FormBuffer      - Output of the string as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS       - String created to be a form.\r
-\r
---*/\r
 {\r
   FRAMEWORK_EFI_IFR_STRING  String;\r
 \r
@@ -574,7 +455,16 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Create a banner opcode.  This is primarily used by the FrontPage implementation from BDS.\r
+  \r
+  @param Title       - Title of the banner\r
+  @param LineNumber  - LineNumber of the banner\r
+  @param Alignment   - Alignment of the banner\r
+  @param FormBuffer  - Output of banner as a form\r
 \r
+  @retval EFI_SUCCESS     - Banner created to be a form.\r
+**/\r
 EFI_STATUS\r
 CreateBannerOpCode (\r
   IN      UINT16              Title,\r
@@ -582,27 +472,7 @@ CreateBannerOpCode (
   IN      UINT8               Alignment,\r
   IN OUT  VOID                *FormBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a banner opcode.  This is primarily used by the FrontPage implementation from BDS.\r
-  \r
-Arguments:\r
-  \r
-  Title       - Title of the banner\r
-  \r
-  LineNumber  - LineNumber of the banner\r
-  \r
-  Alignment   - Alignment of the banner\r
-  \r
-  FormBuffer  - Output of banner as a form\r
-  \r
-Returns: \r
-\r
-  EFI_SUCCESS     - Banner created to be a form.\r
 \r
---*/\r
 {\r
   FRAMEWORK_EFI_IFR_BANNER  Banner;\r
 \r
@@ -616,3 +486,5 @@ Returns:
 \r
   return EFI_SUCCESS;\r
 }\r
+\r
+\r