18 #ifndef _pbd_archive_h_
19 #define _pbd_archive_h_
24 #include <archive_entry.h>
65 , query_length (false)
68 pthread_mutex_init (&_lock, NULL);
69 pthread_cond_init (&_ready, NULL);
79 pthread_mutex_destroy (&_lock);
80 pthread_cond_destroy (&_ready);
95 void lock () { pthread_mutex_lock (&_lock); }
96 void unlock () { pthread_mutex_unlock (&_lock); }
97 void signal () { pthread_cond_signal (&_ready); }
98 void wait () { pthread_cond_wait (&_ready, &_lock); }
122 url = strdup (u.c_str());
135 if (!strncmp (url,
"https://", 8) || !strncmp (url,
"http://", 7) || !strncmp (url,
"ftp://", 6)) {
162 std::string
fetch (
const std::string & url,
const std::string& destdir)
const;
std::vector< std::string > contents_file()
int inflate(const std::string &destdir)
std::vector< std::string > contents()
FileArchive(const std::string &url, Progress *p=NULL)
int do_extract(struct archive *a)
std::string next_file_name()
int extract_current_file(const std::string &destpath)
int create(const std::string &srcdir, CompressionLevel compression_level=CompressGood)
std::string fetch(const std::string &url, const std::string &destdir) const
std::vector< std::string > get_contents(struct archive *a)
struct archive_entry * _current_entry
struct archive * setup_file_archive()
struct archive * _archive
int create(const std::map< std::string, std::string > &filemap, CompressionLevel compression_level=CompressGood)
std::vector< std::string > contents_url()
PBD::PropertyDescriptor< timecnt_t > length
Request(const std::string &u, Progress *p)