VirtualBox

Changeset 33289 in vbox for trunk/include


Ignore:
Timestamp:
Oct 21, 2010 10:00:15 AM (14 years ago)
Author:
vboxsync
Message:

Runtime;Main-OVF-Import: added online creation of SHA1 sums; preread/calc is done in a second worker thread; reading is cached; directly read out of an ova file; started to make reading fully streaming aware

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/manifest.h

    r33057 r33289  
    4444{
    4545    /** The filename. */
    46     char *pszTestFile;
     46    const char *pszTestFile;
    4747    /** The SHA1 digest of the file. */
    48     char *pszTestDigest;
     48    const char *pszTestDigest;
    4949} RTMANIFESTTEST;
    5050/** Pointer to the input structure. */
     
    106106
    107107/**
     108 * Verify the given SHA1 digests against the entries in the manifest file in
     109 * memory.
     110 *
     111 * @returns iprt status code.
     112 *
     113 * @param   pvBuf                Pointer to memory buffer of the manifest file.
     114 * @param   cbSize               Size of the memory buffer.
     115 * @param   paTests              Array of file names and digests.
     116 * @param   cTest                Number of entries in paTests.
     117 * @param   piFailed             A index to paTests in the
     118 *                               VERR_MANIFEST_DIGEST_MISMATCH error case
     119 *                               (optional).
     120 */
     121RTR3DECL(int) RTManifestVerifyFilesBuf(void *pvBuf, size_t cbSize, PRTMANIFESTTEST paTests, size_t cTests, size_t *piFailed);
     122
     123/**
    108124 * Creates a manifest file in memory for a set of files. The manifest file
    109125 * contains SHA1 sums of every provided file and could be used to verify the
     
    114130 * @param   ppvBuf               Pointer to resulting memory buffer.
    115131 * @param   pcbSize              Pointer for the size of the memory buffer.
    116  * @param   papszFileNames       Array of file names.
    117  * @param   papszFileDigests     Array of file digests.
    118  * @param   cFiles               Number of entries in papszFileNames and papszFileDigests.
     132 * @param   paFiles              Array of file names and digests.
     133 * @param   cFiles               Number of entries in paFiles.
    119134 */
    120 RTR3DECL(int) RTManifestWriteFilesBuf(void **ppvBuf, size_t *pcbSize, const char * const *papszFileNames, const char * const *papszFileDigests, size_t cFiles);
     135RTR3DECL(int) RTManifestWriteFilesBuf(void **ppvBuf, size_t *pcbSize, PRTMANIFESTTEST paFiles, size_t cFiles);
    121136
    122137/** @} */
  • trunk/include/iprt/tar.h

    r32751 r33289  
    6464 * @param   fMode          Open flags, i.e a combination of the RTFILE_O_* defines.
    6565 *                         The ACCESS, ACTION and DENY flags are mandatory!
    66  */
    67 RTR3DECL(int) RTTarOpen(PRTTAR phTar, const char* pszTarname, uint32_t fMode);
     66 * @param   fStream        Open the file in stream mode. Within this mode no
     67 *                         seeking is allowed. Use this together with
     68 *                         RTTarFileCurrent, RTTarFileOpenCurrent,
     69 *                         RTTarFileSeekNextFile and the read method to
     70 *                         sequential read a tar file. Currently ignored with
     71 *                         RTFILE_O_WRITE.
     72 */
     73RTR3DECL(int) RTTarOpen(PRTTAR phTar, const char* pszTarname, uint32_t fMode, bool fStream);
    6874
    6975/**
     
    380386RTR3DECL(int) RTTarCreate(const char *pszTarFile, const char * const *papszFiles, size_t cFiles, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
    381387
     388/******************************************************************************
     389 *   Streaming Functions                                                      *
     390 ******************************************************************************/
     391
     392/**
     393 * Return the filename where RTTar currently stays at.
     394 *
     395 * @returns IPRT status code.
     396 *
     397 * @param   hTar           Handle to the RTTAR interface.
     398 * @param   ppszFilename   On success the filename.
     399 */
     400RTR3DECL(int) RTTarCurrentFile(RTTAR hTar, char **ppszFilename);
     401
     402/**
     403 * Jumps to the next file from the current RTTar position.
     404 *
     405 * @returns IPRT status code.
     406 *
     407 * @param   hTar           Handle to the RTTAR interface.
     408 */
     409RTR3DECL(int) RTTarSeekNextFile(RTTAR hTar);
     410
     411/**
     412 * Opens the file where RTTar currently stays at.
     413 *
     414 * @returns IPRT status code.
     415 *
     416 * @param   hTar           Handle to the RTTAR interface.
     417 * @param   phFile         Where to store the handle to the opened file.
     418 * @param   ppszFilename   On success the filename.
     419 * @param   fOpen          Open flags, i.e a combination of the RTFILE_O_* defines.
     420 *                         The ACCESS, ACTION flags are mandatory! Currently
     421 *                         only RTFILE_O_OPEN | RTFILE_O_READ is supported.
     422 */
     423RTR3DECL(int) RTTarFileOpenCurrentFile(RTTAR hTar, PRTTARFILE phFile, char **ppszFilename, uint32_t fOpen);
     424
     425
    382426/** @} */
    383427
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette