2013-10-10 08:36:24 +02:00
|
|
|
|
|
|
|
#ifndef _LIBQUBES_QFILE_UTILS_H
|
|
|
|
#define _LIBQUBES_QFILE_UTILS_H 1
|
|
|
|
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <gui-fatal.h>
|
|
|
|
#include <libqubes-rpc-filecopy.h>
|
|
|
|
|
|
|
|
enum {
|
|
|
|
PROGRESS_FLAG_NORMAL,
|
|
|
|
PROGRESS_FLAG_INIT,
|
|
|
|
PROGRESS_FLAG_DONE
|
|
|
|
};
|
|
|
|
|
2013-11-09 19:00:37 +01:00
|
|
|
extern unsigned long crc32_sum;
|
|
|
|
extern int ignore_symlinks;
|
2013-10-10 08:36:24 +02:00
|
|
|
|
|
|
|
void notify_progress(int size, int flag);
|
|
|
|
void do_notify_progress(long long total, int flag);
|
2013-12-30 11:35:46 +01:00
|
|
|
void notify_end_and_wait_for_result(void);
|
2013-10-10 08:36:24 +02:00
|
|
|
|
2013-12-30 11:35:46 +01:00
|
|
|
void write_headers(const struct file_header *hdr, const char *filename);
|
2013-10-10 08:36:24 +02:00
|
|
|
|
2013-12-30 11:35:46 +01:00
|
|
|
int write_all_with_crc(int fd, const void *buf, int size);
|
2013-10-10 08:36:24 +02:00
|
|
|
|
2013-12-30 11:35:46 +01:00
|
|
|
int single_file_processor(const char *filename, const struct stat *st);
|
2013-10-10 08:36:24 +02:00
|
|
|
|
2013-12-30 11:35:46 +01:00
|
|
|
void wait_for_result(void);
|
2013-10-10 08:36:24 +02:00
|
|
|
|
|
|
|
#endif /* _LIBQUBES_QFILE_UTILS_H */
|