Ardour  9.0-pre0-582-g084a23a80d
PBD::FileArchive Class Reference

#include <file_archive.h>

Inheritance diagram for PBD::FileArchive:
[legend]

Classes

struct  MemPipe
 
struct  Request
 

Public Types

enum  CompressionLevel { CompressNone = -1 , CompressFast = 0 , CompressGood = 6 }
 

Public Member Functions

 FileArchive (const std::string &url, Progress *p=NULL)
 
 ~FileArchive ()
 
int inflate (const std::string &destdir)
 
std::vector< std::string > contents ()
 
std::string next_file_name ()
 
int extract_current_file (const std::string &destpath)
 
int create (const std::string &srcdir, CompressionLevel compression_level=CompressGood)
 
int create (const std::map< std::string, std::string > &filemap, CompressionLevel compression_level=CompressGood)
 

Private Member Functions

int process_file ()
 
int process_url ()
 
std::vector< std::string > contents_url ()
 
std::vector< std::string > contents_file ()
 
int extract_url ()
 
int extract_file ()
 
int do_extract (struct archive *a)
 
std::vector< std::string > get_contents (struct archive *a)
 
bool is_url ()
 
struct archive * setup_file_archive ()
 
std::string fetch (const std::string &url, const std::string &destdir) const
 

Private Attributes

Request _req
 
pthread_t _tid
 
Progress_progress
 
struct archive_entry * _current_entry
 
struct archive * _archive
 

Detailed Description

Definition at line 37 of file file_archive.h.

Member Enumeration Documentation

◆ CompressionLevel

Enumerator
CompressNone 
CompressFast 
CompressGood 

Definition at line 52 of file file_archive.h.

Constructor & Destructor Documentation

◆ FileArchive()

PBD::FileArchive::FileArchive ( const std::string &  url,
Progress p = NULL 
)

◆ ~FileArchive()

PBD::FileArchive::~FileArchive ( )

Member Function Documentation

◆ contents()

std::vector<std::string> PBD::FileArchive::contents ( )

◆ contents_file()

std::vector<std::string> PBD::FileArchive::contents_file ( )
private

◆ contents_url()

std::vector<std::string> PBD::FileArchive::contents_url ( )
private

◆ create() [1/2]

int PBD::FileArchive::create ( const std::map< std::string, std::string > &  filemap,
CompressionLevel  compression_level = CompressGood 
)

◆ create() [2/2]

int PBD::FileArchive::create ( const std::string &  srcdir,
CompressionLevel  compression_level = CompressGood 
)

◆ do_extract()

int PBD::FileArchive::do_extract ( struct archive *  a)
private

◆ extract_current_file()

int PBD::FileArchive::extract_current_file ( const std::string &  destpath)

◆ extract_file()

int PBD::FileArchive::extract_file ( )
private

◆ extract_url()

int PBD::FileArchive::extract_url ( )
private

◆ fetch()

std::string PBD::FileArchive::fetch ( const std::string &  url,
const std::string &  destdir 
) const
private

◆ get_contents()

std::vector<std::string> PBD::FileArchive::get_contents ( struct archive *  a)
private

◆ inflate()

int PBD::FileArchive::inflate ( const std::string &  destdir)

◆ is_url()

bool PBD::FileArchive::is_url ( )
private

◆ next_file_name()

std::string PBD::FileArchive::next_file_name ( )

◆ process_file()

int PBD::FileArchive::process_file ( )
private

◆ process_url()

int PBD::FileArchive::process_url ( )
private

◆ setup_file_archive()

struct archive* PBD::FileArchive::setup_file_archive ( )
private

Member Data Documentation

◆ _archive

struct archive* PBD::FileArchive::_archive
private

Definition at line 170 of file file_archive.h.

◆ _current_entry

struct archive_entry* PBD::FileArchive::_current_entry
private

Definition at line 169 of file file_archive.h.

◆ _progress

Progress* PBD::FileArchive::_progress
private

Definition at line 167 of file file_archive.h.

◆ _req

Request PBD::FileArchive::_req
private

Definition at line 164 of file file_archive.h.

◆ _tid

pthread_t PBD::FileArchive::_tid
private

Definition at line 165 of file file_archive.h.


The documentation for this class was generated from the following file: