xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

builder.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 Vreixo Formoso
3  * Copyright (c) 2014 Thomas Schmitt
4  *
5  * This file is part of the libisofs project; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License version 2
7  * or later as published by the Free Software Foundation.
8  * See COPYING file for details.
9  */
10 
11 #ifndef LIBISO_BUILDER_H_
12 #define LIBISO_BUILDER_H_
13 
14 /*
15  * Definitions for IsoNode builders.
16  */
17 
18 /*
19  * Some functions here will be moved to libisofs.h when we expose
20  * Builder.
21  */
22 
23 #include "libisofs.h"
24 #include "fsource.h"
25 
26 typedef struct Iso_Node_Builder IsoNodeBuilder;
27 
29 {
30 
31  /**
32  * Create a new IsoFile from an IsoFileSource. Name, permissions
33  * and other attributes are taken from src, but a regular file will
34  * always be created, even if src is another kind of file.
35  *
36  * In that case, if the implementation can't do the conversion, it
37  * should fail properly.
38  *
39  * Note that the src is never unref, so you need to free it.
40  *
41  * @return
42  * 1 on success, < 0 on error
43  */
44  int (*create_file)(IsoNodeBuilder *builder, IsoImage *image,
45  IsoFileSource *src, IsoFile **file);
46 
47  /**
48  * Create a new IsoNode from a IsoFileSource. The type of the node to be
49  * created is determined from the type of the file source. Name,
50  * permissions and other attributes are taken from source file.
51  * But name may be overridden by parameter name if it is not NULL.
52  *
53  * Note that the src is never unref, so you need to free it.
54  *
55  * @return
56  * 1 on success, < 0 on error
57  */
58  int (*create_node)(IsoNodeBuilder *builder, IsoImage *image,
59  IsoFileSource *src, char *name, IsoNode **node);
60 
61  /**
62  * Free implementation specific data. Should never be called by user.
63  * Use iso_node_builder_unref() instead.
64  */
65  void (*free)(IsoNodeBuilder *builder);
66 
67  int refcount;
70 };
71 
74 
75 /**
76  * Create a new basic builder ...
77  *
78  * @return
79  * 1 success, < 0 error
80  */
82 
83 #endif /*LIBISO_BUILDER_H_*/
void iso_node_builder_ref(IsoNodeBuilder *builder)
Definition: builder.c:33
int iso_node_basic_builder_new(IsoNodeBuilder **builder)
Definition: builder.c:286
void iso_node_builder_unref(IsoNodeBuilder *builder)
Definition: builder.c:38
Definition: node.h:149
void(* free)(IsoNodeBuilder *builder)
Definition: builder.h:65
int(* create_node)(IsoNodeBuilder *builder, IsoImage *image, IsoFileSource *src, char *name, IsoNode **node)
Definition: builder.h:58
void * create_node_data
Definition: builder.h:69
void * create_file_data
Definition: builder.h:68
int(* create_file)(IsoNodeBuilder *builder, IsoImage *image, IsoFileSource *src, IsoFile **file)
Definition: builder.h:44
Definition: node.h:100