VirtualBox

Changeset 31623 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Aug 13, 2010 12:24:14 AM (14 years ago)
Author:
vboxsync
Message:

Runtime: add progress callback support to the tar backend

File:
1 edited

Legend:

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

    r28800 r31623  
    44
    55/*
    6  * Copyright (C) 2009 Oracle Corporation
     6 * Copyright (C) 2009-2010 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    7676 * (The matching is case sensitive.)
    7777 *
    78  * @note    Currently only regular files are supported. Also some of the heade
     78 * @note    Currently only regular files are supported. Also some of the header
    7979 *          fields are not used (uid, gid, uname, gname, mtime).
    8080 *
    8181 * @returns iprt status code.
    8282 *
    83  * @param   pszTarFile      Tar file to extract files from.
    84  * @param   pszOutputDir    Where to store the extracted files. Must exist.
    85  * @param   papszFiles      Which files should be extracted.
    86  * @param   cFiles          The number of files in papszFiles.
     83 * @param   pszTarFile           Tar file to extract files from.
     84 * @param   pszOutputDir         Where to store the extracted files. Must exist.
     85 * @param   papszFiles           Which files should be extracted.
     86 * @param   cFiles               The number of files in papszFiles.
     87 * @param   pfnProgressCallback  Progress callback function. Optional.
     88 * @param   pvUser               User defined data for the progress
     89 *                               callback. Optional.
    8790 */
    88 RTR3DECL(int) RTTarExtractFiles(const char *pszTarFile, const char *pszOutputDir, const char * const *papszFiles, size_t cFiles);
     91RTR3DECL(int) RTTarExtractFiles(const char *pszTarFile, const char *pszOutputDir, const char * const *papszFiles, size_t cFiles, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
    8992
    9093/**
     
    97100 * @retval  VERR_FILE_NOT_FOUND when the index isn't valid.
    98101 *
    99  * @param   pszTarFile      Tar file to extract the file from.
    100  * @param   pszOutputDir    Where to store the extracted file. Must exist.
    101  * @param   iIndex          Which file should be extracted, 0 based.
    102  * @param   ppszFileName    On success the filename of the extracted file. Must
    103  *                          be freed with RTStrFree.
     102 * @param   pszTarFile           Tar file to extract the file from.
     103 * @param   pszOutputDir         Where to store the extracted file. Must exist.
     104 * @param   iIndex               Which file should be extracted, 0 based.
     105 * @param   ppszFileName         On success the filename of the extracted file. Must
     106 *                               be freed with RTStrFree.
     107 * @param   pfnProgressCallback  Progress callback function. Optional.
     108 * @param   pvUser               User defined data for the progress
     109 *                               callback. Optional.
    104110 */
    105 RTR3DECL(int) RTTarExtractByIndex(const char *pszTarFile, const char *pszOutputDir, size_t iIndex, char **ppszFileName);
     111RTR3DECL(int) RTTarExtractByIndex(const char *pszTarFile, const char *pszOutputDir, size_t iIndex, char **ppszFileName, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
     112
     113/**
     114 * Extract all files of the archive.
     115 *
     116 * @note    Currently only regular files are supported. Also some of the header
     117 *          fields are not used (uid, gid, uname, gname, mtime).
     118 *
     119 * @returns iprt status code.
     120 *
     121 * @param   pszTarFile           Tar file to extract the files from.
     122 * @param   pszOutputDir         Where to store the extracted files. Must exist.
     123 * @param   pfnProgressCallback  Progress callback function. Optional.
     124 * @param   pvUser               User defined data for the progress
     125 *                               callback. Optional.
     126 */
     127RTR3DECL(int) RTTarExtractAll(const char *pszTarFile, const char *pszOutputDir, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
    106128
    107129/**
     
    112134 * @returns iprt status code.
    113135 *
    114  * @param   pszTarFile      Where to create the Tar archive.
    115  * @param   papszFiles      Which files should be included.
    116  * @param   cFiles          The number of files in papszFiles.
     136 * @param   pszTarFile           Where to create the Tar archive.
     137 * @param   papszFiles           Which files should be included.
     138 * @param   cFiles               The number of files in papszFiles.
     139 * @param   pfnProgressCallback  Progress callback function. Optional.
     140 * @param   pvUser               User defined data for the progress
     141 *                               callback. Optional.
    117142 */
    118 RTR3DECL(int) RTTarCreate(const char *pszTarFile, const char * const *papszFiles, size_t cFiles);
     143RTR3DECL(int) RTTarCreate(const char *pszTarFile, const char * const *papszFiles, size_t cFiles, PFNRTPROGRESS pfnProgressCallback, void *pvUser);
    119144
    120145/** @} */
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