+extern AUTH_VAR_LIB_CONTEXT_OUT mAuthContextOut;\r
+\r
+/**\r
+ Finds variable in storage blocks of volatile and non-volatile storage areas.\r
+\r
+ This code finds variable in storage blocks of volatile and non-volatile storage areas.\r
+ If VariableName is an empty string, then we just return the first\r
+ qualified variable without comparing VariableName and VendorGuid.\r
+\r
+ @param[in] VariableName Name of the variable to be found.\r
+ @param[in] VendorGuid Variable vendor GUID to be found.\r
+ @param[out] AuthVariableInfo Pointer to AUTH_VARIABLE_INFO structure for\r
+ output of the variable found.\r
+\r
+ @retval EFI_INVALID_PARAMETER If VariableName is not an empty string,\r
+ while VendorGuid is NULL.\r
+ @retval EFI_SUCCESS Variable successfully found.\r
+ @retval EFI_NOT_FOUND Variable not found\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+VariableExLibFindVariable (\r
+ IN CHAR16 *VariableName,\r
+ IN EFI_GUID *VendorGuid,\r
+ OUT AUTH_VARIABLE_INFO *AuthVariableInfo\r
+ );\r
+\r
+/**\r
+ Finds next variable in storage blocks of volatile and non-volatile storage areas.\r
+\r
+ This code finds next variable in storage blocks of volatile and non-volatile storage areas.\r
+ If VariableName is an empty string, then we just return the first\r
+ qualified variable without comparing VariableName and VendorGuid.\r
+\r
+ @param[in] VariableName Name of the variable to be found.\r
+ @param[in] VendorGuid Variable vendor GUID to be found.\r
+ @param[out] AuthVariableInfo Pointer to AUTH_VARIABLE_INFO structure for\r
+ output of the next variable.\r
+\r
+ @retval EFI_INVALID_PARAMETER If VariableName is not an empty string,\r
+ while VendorGuid is NULL.\r
+ @retval EFI_SUCCESS Variable successfully found.\r
+ @retval EFI_NOT_FOUND Variable not found\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+VariableExLibFindNextVariable (\r
+ IN CHAR16 *VariableName,\r
+ IN EFI_GUID *VendorGuid,\r
+ OUT AUTH_VARIABLE_INFO *AuthVariableInfo\r
+ );\r
+\r
+/**\r
+ Update the variable region with Variable information.\r
+\r
+ @param[in] AuthVariableInfo Pointer AUTH_VARIABLE_INFO structure for\r
+ input of the variable.\r
+\r
+ @retval EFI_SUCCESS The update operation is success.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
+ @retval EFI_WRITE_PROTECTED Variable is write-protected.\r
+ @retval EFI_OUT_OF_RESOURCES There is not enough resource.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+VariableExLibUpdateVariable (\r
+ IN AUTH_VARIABLE_INFO *AuthVariableInfo\r
+ );\r
+\r
+/**\r
+ Get scratch buffer.\r
+\r
+ @param[in, out] ScratchBufferSize Scratch buffer size. If input size is greater than\r
+ the maximum supported buffer size, this value contains\r
+ the maximum supported buffer size as output.\r
+ @param[out] ScratchBuffer Pointer to scratch buffer address.\r
+\r
+ @retval EFI_SUCCESS Get scratch buffer successfully.\r
+ @retval EFI_UNSUPPORTED If input size is greater than the maximum supported buffer size.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+VariableExLibGetScratchBuffer (\r
+ IN OUT UINTN *ScratchBufferSize,\r
+ OUT VOID **ScratchBuffer\r
+ );\r
+\r
+/**\r
+ This function is to check if the remaining variable space is enough to set\r
+ all Variables from argument list successfully. The purpose of the check\r
+ is to keep the consistency of the Variables to be in variable storage.\r
+\r
+ Note: Variables are assumed to be in same storage.\r
+ The set sequence of Variables will be same with the sequence of VariableEntry from argument list,\r
+ so follow the argument sequence to check the Variables.\r
+\r
+ @param[in] Attributes Variable attributes for Variable entries.\r
+ @param ... The variable argument list with type VARIABLE_ENTRY_CONSISTENCY *.\r
+ A NULL terminates the list. The VariableSize of\r
+ VARIABLE_ENTRY_CONSISTENCY is the variable data size as input.\r
+ It will be changed to variable total size as output.\r
+\r
+ @retval TRUE Have enough variable space to set the Variables successfully.\r
+ @retval FALSE No enough variable space to set the Variables successfully.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+VariableExLibCheckRemainingSpaceForConsistency (\r
+ IN UINT32 Attributes,\r
+ ...\r
+ );\r
+\r
+/**\r
+ Return TRUE if at OS runtime.\r
+\r
+ @retval TRUE If at OS runtime.\r
+ @retval FALSE If at boot time.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+VariableExLibAtRuntime (\r
+ VOID\r
+ );\r
+\r