2007-10-14 12:20:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Adapter to libisoburn, libisofs and libburn for xorriso,
|
|
|
|
a command line oriented batch and dialog tool which creates, loads,
|
|
|
|
manipulates and burns ISO 9660 filesystem images.
|
|
|
|
|
|
|
|
Copyright 2007 Thomas Schmitt, <scdbackup@gmx.net>
|
|
|
|
|
|
|
|
Provided under GPL version 2.
|
|
|
|
|
|
|
|
This file contains the inner isofs- and burn-library interface of xorriso.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef Xorrisoburn_includeD
|
|
|
|
#define Xorrisoburn_includeD yes
|
|
|
|
|
|
|
|
struct XorrisO;
|
|
|
|
|
|
|
|
int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag);
|
|
|
|
|
2007-10-15 15:27:51 +00:00
|
|
|
int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag);
|
|
|
|
|
|
|
|
int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag);
|
|
|
|
|
|
|
|
int Xorriso_write_growing(struct XorrisO *xorriso, int flag);
|
|
|
|
|
2007-10-27 22:41:24 +00:00
|
|
|
/* @param flag bit0=graft in as empty directory, not as copy from disk
|
|
|
|
@return <=0 = error , 1 = added simple node , 2 = added directory
|
2007-10-21 09:48:17 +00:00
|
|
|
*/
|
2007-10-15 15:27:51 +00:00
|
|
|
int Xorriso_graft_in(struct XorrisO *xorriso, char *disk_path, char *img_path,
|
|
|
|
int flag);
|
|
|
|
|
2007-10-16 21:09:36 +00:00
|
|
|
int Xorriso__text_to_sev(char *severity_name, int *severity_number,int flag);
|
2007-10-15 15:27:51 +00:00
|
|
|
|
2007-11-02 14:36:26 +00:00
|
|
|
/* @param flag bit0=short report form
|
|
|
|
*/
|
2007-10-17 18:30:37 +00:00
|
|
|
int Xorriso_toc(struct XorrisO *xorriso, int flag);
|
|
|
|
|
2007-10-18 17:14:09 +00:00
|
|
|
int Xorriso_show_devices(struct XorrisO *xorriso, int flag);
|
|
|
|
|
2007-10-20 19:48:36 +00:00
|
|
|
int Xorriso_tell_media_space(struct XorrisO *xorriso,
|
|
|
|
int *media_space, int *free_space, int flag);
|
2007-10-18 18:32:32 +00:00
|
|
|
|
2007-10-19 20:41:34 +00:00
|
|
|
int Xorriso_blank_media(struct XorrisO *xorriso, int flag);
|
|
|
|
|
|
|
|
int Xorriso_format_media(struct XorrisO *xorriso, int flag);
|
|
|
|
|
2007-11-07 12:37:19 +00:00
|
|
|
/* @param boss_iter Opaque internal handle. Use NULL outside xorrisoburn.c :
|
|
|
|
If not NULL then this is an iterator suitable for
|
|
|
|
iso_tree_node_remove_iter() which is then to be used instead
|
|
|
|
of iso_tree_node_remove().
|
|
|
|
@param flag bit0= remove whole sub tree: rm -r
|
|
|
|
bit1= remove empty directory: rmdir
|
|
|
|
bit2= recursion: do not reassure in mode 2 "tree"
|
|
|
|
bit3= this is for overwriting and not for plain removal
|
2007-10-21 09:48:17 +00:00
|
|
|
@return <=0 = error
|
|
|
|
1 = removed simple node
|
2007-11-07 12:37:19 +00:00
|
|
|
2 = removed directory or tree
|
|
|
|
3 = did not remove on user revocation
|
2007-10-21 09:48:17 +00:00
|
|
|
*/
|
2007-11-07 12:37:19 +00:00
|
|
|
int Xorriso_rmi(struct XorrisO *xorriso, void *boss_iter,
|
|
|
|
char *path, int flag);
|
2007-10-21 09:48:17 +00:00
|
|
|
|
2007-10-29 21:41:17 +00:00
|
|
|
/* @param flag bit0= long format */
|
|
|
|
int Xorriso_ls_filev(struct XorrisO *xorriso, int filec, char **filev,
|
2007-11-01 19:11:56 +00:00
|
|
|
off_t boss_mem, int flag);
|
2007-10-29 21:41:17 +00:00
|
|
|
|
2007-10-31 16:55:55 +00:00
|
|
|
/* This function needs less buffer memory than Xorriso_ls_filev() but cannot
|
|
|
|
perform structured pattern matching.
|
|
|
|
@param flag bit0= long format
|
|
|
|
bit1= only check for directory existence
|
|
|
|
bit2= do not apply search pattern but accept any file
|
|
|
|
*/
|
|
|
|
int Xorriso_ls(struct XorrisO *xorriso, int flag);
|
|
|
|
|
2007-10-24 17:53:54 +00:00
|
|
|
/* @param eff_path returns resulting effective path.
|
|
|
|
Must provide at least SfileadrL bytes of storage.
|
|
|
|
@param flag bit0= do not produce problem events (unless faulty path format)
|
2007-10-21 18:52:03 +00:00
|
|
|
bit1= work purely literally, do not use libisofs
|
2007-10-27 23:04:35 +00:00
|
|
|
bit2= (with bit1) this is an address in the disk world
|
2007-10-24 17:53:54 +00:00
|
|
|
@return -1 = faulty path format, 0 = not found ,
|
|
|
|
1 = found simple node , 2 = found directory
|
2007-10-21 15:10:41 +00:00
|
|
|
*/
|
|
|
|
int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *img_path,
|
|
|
|
char eff_path[], int flag);
|
2007-10-17 18:30:37 +00:00
|
|
|
|
2007-10-28 16:54:29 +00:00
|
|
|
int Xorriso_rename(struct XorrisO *xorriso, char *origin, char *dest,int flag);
|
|
|
|
|
|
|
|
/* @param flag bit0= do not produce info message on success
|
|
|
|
@return 1=success, 0=was already directory, -1=was other type, -2=bad path
|
|
|
|
*/
|
|
|
|
int Xorriso_mkdir(struct XorrisO *xorriso, char *img_path, int flag);
|
2007-10-27 22:41:24 +00:00
|
|
|
|
2007-11-09 19:30:25 +00:00
|
|
|
/* @param flag bit0= a match count !=1 is a SORRY event */
|
2007-10-30 21:44:08 +00:00
|
|
|
int Xorriso_expand_pattern(struct XorrisO *xorriso,
|
2007-11-09 19:30:25 +00:00
|
|
|
int num_patterns, char **patterns, int extra_filec,
|
2007-11-01 19:11:56 +00:00
|
|
|
int *filec, char ***filev, off_t *mem, int flag);
|
2007-10-29 21:41:17 +00:00
|
|
|
|
2007-11-07 19:18:31 +00:00
|
|
|
int Xorriso_set_st_mode(struct XorrisO *xorriso, char *path,
|
|
|
|
mode_t mode_and, mode_t mode_or, int flag);
|
|
|
|
|
2007-11-07 22:55:37 +00:00
|
|
|
int Xorriso_set_uid(struct XorrisO *xorriso, char *in_path, uid_t uid,
|
|
|
|
int flag);
|
|
|
|
|
|
|
|
int Xorriso_set_gid(struct XorrisO *xorriso, char *in_path, gid_t gid,
|
|
|
|
int flag);
|
|
|
|
|
2007-11-08 14:43:53 +00:00
|
|
|
/* @parm flag bit0= atime, bit1= ctime, bit2= mtime, bit8=no auto ctime */
|
|
|
|
int Xorriso_set_time(struct XorrisO *xorriso, char *in_path, time_t t,
|
|
|
|
int flag);
|
2007-11-07 19:18:31 +00:00
|
|
|
|
2007-10-14 12:20:56 +00:00
|
|
|
#endif /* Xorrisoburn_includeD */
|
|
|
|
|