]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseCustomDecompressLibNull/BaseCustomDecompressLibNull.c
Update CustomDecompress library to support algorithm guid and Update DxeIpl and DxeCo...
[mirror_edk2.git] / MdePkg / Library / BaseCustomDecompressLibNull / BaseCustomDecompressLibNull.c
index 96c538b15a7fe03a5611e99e5572c2e3e6de73d7..4635e87e4db3fb9fa428fbf43eec24546fc6f15d 100644 (file)
@@ -1,84 +1,86 @@
-/*++\r
+/** @file\r
+  Null implementation of the custom decompress library\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
-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 - 2007, Intel Corporation.<BR>\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
-Module Name:\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
 \r
-  BaseCustomDecompressLibNull.c\r
-\r
-Abstract:\r
-\r
-  NULL Custom Decompress Library \r
-\r
---*/\r
+**/\r
 \r
 #include <Base.h>\r
 #include <Library/CustomDecompressLib.h>\r
 \r
 \r
+/**
+  The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().\r
+
+  @param[in]     Source           The source buffer containing the compressed data.
+  @param[in]     SourceSize       The size of source buffer
+  @param[out]    DestinationSize  The size of destination buffer.
+  @param[out]    ScratchSize      The size of scratch buffer.
+
+  @retval  RETURN_SUCCESS           The size of destination buffer and the size of scratch buffer are successull retrieved.\r
+  @retval  RETURN_INVALID_PARAMETER The source data is corrupted
+
+**/\r
 RETURN_STATUS\r
 EFIAPI\r
 CustomDecompressGetInfo (\r
+  IN  CONST GUID  *DecompressGuid,\r
   IN  CONST VOID  *Source,\r
   IN  UINT32      SourceSize,\r
   OUT UINT32      *DestinationSize,\r
   OUT UINT32      *ScratchSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().\r
-\r
-Arguments:\r
-\r
-  Source          - The source buffer containing the compressed data.\r
-  SourceSize      - The size of source buffer\r
-  DestinationSize - The size of destination buffer.\r
-  ScratchSize     - The size of scratch buffer.\r
-\r
-Returns:\r
-\r
-  RETURN_SUCCESS           - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
-  RETURN_INVALID_PARAMETER - The source data is corrupted\r
-\r
---*/\r
 {\r
   return RETURN_UNSUPPORTED;\r
 }\r
 \r
+\r
+/**
+  The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().\r
+
+  @param[in]     Source           The source buffer containing the compressed data.
+  @param[in]     Destination      The destination buffer to store the decompressed data
+  @param[out]    Scratch          The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.\r
+
+
+  @retval  RETURN_SUCCESS            Decompression is successfull\r
+  @retval  RETURN_INVALID_PARAMETER The source data is corrupted
+
+**/\r
 RETURN_STATUS\r
 EFIAPI\r
 CustomDecompress (\r
+  IN const GUID  *DecompressGuid,\r
   IN CONST VOID  *Source,\r
   IN OUT VOID    *Destination,\r
   IN OUT VOID    *Scratch\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().\r
-\r
-Arguments:\r
-\r
-  Source          - The source buffer containing the compressed data.\r
-  Destination     - The destination buffer to store the decompressed data\r
-  Scratch         - The buffer used internally by the decompress routine. This  buffer is needed to store intermediate data.\r
-\r
-Returns:\r
+{\r
+  return RETURN_UNSUPPORTED;\r
+}\r
 \r
-  RETURN_SUCCESS           - Decompression is successfull\r
-  RETURN_INVALID_PARAMETER - The source data is corrupted\r
+/**
+  Get decompress method guid list.\r
 \r
---*/\r
+  @param[in, out]  AlgorithmGuidTable   The decompress method guid list.
+  @param[in, out]  NumberOfAlgorithms   The number of decompress methods.
+
+  @retval  RETURN_SUCCESS            Get all algorithmes list successfully..
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+CustomDecompressGetAlgorithms (\r
+   IN OUT  GUID   **AlgorithmGuidTable,\r
+   IN OUT  UINTN  *NumberOfAlgorithms\r
+  )\r
 {\r
-  return RETURN_UNSUPPORTED;\r
+  *NumberOfAlgorithms = 0;\r
+  return RETURN_SUCCESS; \r
 }\r