libextractor  1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
  Fossies Dox: libextractor-1.11.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

archive_extractor.c File Reference

plugin to support archives (such as TAR) More...

#include "platform.h"
#include "extractor.h"
#include <archive.h>
#include <archive_entry.h>
Include dependency graph for archive_extractor.c:

Go to the source code of this file.

Macros

#define __LA_INT64_T   size_t
 

Functions

static ssize_t read_cb (struct archive *a, void *client_data, const void **buff)
 
static size_t skip_cb (struct archive *a, void *client_data, size_t request)
 
void EXTRACTOR_archive_extract_method (struct EXTRACTOR_ExtractContext *ec)
 

Detailed Description

plugin to support archives (such as TAR)

Author
Christian Grothoff

Definition in file archive_extractor.c.

Macro Definition Documentation

◆ __LA_INT64_T

#define __LA_INT64_T   size_t

Older versions of libarchive do not define __LA_INT64_T.

Definition at line 57 of file archive_extractor.c.

Function Documentation

◆ EXTRACTOR_archive_extract_method()

void EXTRACTOR_archive_extract_method ( struct EXTRACTOR_ExtractContext ec)

Main entry method for the ARCHIVE extraction plugin.

Parameters
ecextraction context provided to the plugin

Definition at line 92 of file archive_extractor.c.

References EXTRACTOR_ExtractContext::cls, EXTRACTOR_METAFORMAT_UTF8, EXTRACTOR_METATYPE_FILENAME, EXTRACTOR_METATYPE_FORMAT, NULL, EXTRACTOR_ExtractContext::proc, read_cb(), and skip_cb().

◆ read_cb()

static ssize_t read_cb ( struct archive *  a,
void *  client_data,
const void **  buff 
)
static

Callback for libarchive for 'reading'.

Parameters
aarchive handle
client_dataour 'struct EXTRACTOR_ExtractContext'
buffwhere to store data with pointer to data
Returns
number of bytes read

Definition at line 39 of file archive_extractor.c.

References EXTRACTOR_ExtractContext::cls, NULL, and EXTRACTOR_ExtractContext::read.

Referenced by EXTRACTOR_archive_extract_method().

◆ skip_cb()

static size_t skip_cb ( struct archive *  a,
void *  client_data,
size_t  request 
)
static

Callback for libarchive for 'skipping'.

Parameters
aarchive handle
client_dataour 'struct EXTRACTOR_ExtractContext'
requestnumber of bytes to skip
Returns
number of bytes skipped

Definition at line 74 of file archive_extractor.c.

References EXTRACTOR_ExtractContext::cls, and EXTRACTOR_ExtractContext::seek.

Referenced by EXTRACTOR_archive_extract_method().