libisofs  1.5.4
About: libisofs is a library to create an ISO 9660 filesystem, supports extensions like RockRidge or Joliet, makes bootable ISO 9660, and records file attributes which are of interest for data backups.
  Fossies Dox: libisofs-1.5.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

builder.h File Reference
#include "libisofs.h"
#include "fsource.h"
Include dependency graph for builder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Iso_Node_Builder
 

Typedefs

typedef struct Iso_Node_Builder IsoNodeBuilder
 

Functions

void iso_node_builder_ref (IsoNodeBuilder *builder)
 
void iso_node_builder_unref (IsoNodeBuilder *builder)
 
int iso_node_basic_builder_new (IsoNodeBuilder **builder)
 Create a new basic builder ... More...
 

Typedef Documentation

◆ IsoNodeBuilder

Definition at line 1 of file builder.h.

Function Documentation

◆ iso_node_basic_builder_new()

int iso_node_basic_builder_new ( IsoNodeBuilder **  builder)

Create a new basic builder ...

Returns
1 success, < 0 error

Definition at line 286 of file builder.c.

287 {
288  IsoNodeBuilder *b;
289 
290  if (builder == NULL) {
291  return ISO_NULL_POINTER;
292  }
293 
294  b = malloc(sizeof(IsoNodeBuilder));
295  if (b == NULL) {
296  return ISO_OUT_OF_MEM;
297  }
298 
299  b->refcount = 1;
300  b->create_file_data = NULL;
301  b->create_node_data = NULL;
304  b->free = default_free;
305 
306  *builder = b;
307  return ISO_SUCCESS;
308 }
static int default_create_file(IsoNodeBuilder *builder, IsoImage *image, IsoFileSource *src, IsoFile **file)
Definition: builder.c:48
static int default_create_node(IsoNodeBuilder *builder, IsoImage *image, IsoFileSource *src, char *in_name, IsoNode **node)
Definition: builder.c:106
static void default_free(IsoNodeBuilder *builder)
Definition: builder.c:278
#define ISO_SUCCESS
successfully execution
Definition: libisofs.h:8719
#define ISO_OUT_OF_MEM
Memory allocation error (FATAL,HIGH, -6)
Definition: libisofs.h:8745
#define ISO_NULL_POINTER
NULL pointer as value for an arg.
Definition: libisofs.h:8742
void(* free)(IsoNodeBuilder *builder)
Free implementation specific data.
Definition: builder.h:65
int(* create_node)(IsoNodeBuilder *builder, IsoImage *image, IsoFileSource *src, char *name, IsoNode **node)
Create a new IsoNode from a IsoFileSource.
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)
Create a new IsoFile from an IsoFileSource.
Definition: builder.h:44

References Iso_Node_Builder::create_file, Iso_Node_Builder::create_file_data, Iso_Node_Builder::create_node, Iso_Node_Builder::create_node_data, default_create_file(), default_create_node(), default_free(), Iso_Node_Builder::free, ISO_NULL_POINTER, ISO_OUT_OF_MEM, ISO_SUCCESS, and Iso_Node_Builder::refcount.

Referenced by iso_image_new().

◆ iso_node_builder_ref()

void iso_node_builder_ref ( IsoNodeBuilder builder)

Definition at line 33 of file builder.c.

34 {
35  ++builder->refcount;
36 }

References Iso_Node_Builder::refcount.

◆ iso_node_builder_unref()

void iso_node_builder_unref ( IsoNodeBuilder builder)

Definition at line 38 of file builder.c.

39 {
40  if (--builder->refcount == 0) {
41  /* free private data */
42  builder->free(builder);
43  free(builder);
44  }
45 }

References Iso_Node_Builder::free, and Iso_Node_Builder::refcount.

Referenced by iso_image_import(), iso_image_new(), and iso_image_unref().