## XbBuilderFixup

XbBuilderFixup

## Functions

gboolean | (*XbBuilderFixupFunc) ()
XbBuilderFixup * | xb_builder_fixup_new ()
gint | xb_builder_fixup_get_max_depth ()
void | xb_builder_fixup_set_max_depth ()

## Types and Values

#define | XB_TYPE_BUILDER_FIXUP
struct | XbBuilderFixupClass
| XbBuilderFixup

## Description

## Functions

### XbBuilderFixupFunc ()

    gboolean
    (*XbBuilderFixupFunc) (XbBuilderFixup *self,
                           XbBuilderNode *bn,
                           gpointer user_data,
                           GError **error);

### xb_builder_fixup_new ()

    XbBuilderFixup *
    xb_builder_fixup_new (const gchar *id,
                          XbBuilderFixupFunc func,
                          gpointer user_data,
                          GDestroyNotify user_data_free);

Creates a function that will get run on every XbBuilderNode compile creates.

#### Parameters

id | a text ID value, e.g. `AppStreamUpgrade` |
func | a callback |
user_data | user pointer to pass to `func` , or `NULL` |
user_data_free | a function which gets called to free `user_data` , or `NULL` |

#### Returns

a new XbBuilderFixup

Since: 0.1.3

### xb_builder_fixup_get_max_depth ()

    gint
    xb_builder_fixup_get_max_depth (XbBuilderFixup *self);

Gets the maximum depth used for this fixup, if each node is being visited.

#### Parameters

self | a XbBuilderFixup |

#### Returns

integer, or -1 if unset

Since: 0.1.3

### xb_builder_fixup_set_max_depth ()

    void
    xb_builder_fixup_set_max_depth (XbBuilderFixup *self,
                                    gint max_depth);

Sets the maximum depth used for this fixup. Use a `max_depth` of 0 to only visit the root node.

Setting a maximum depth may increase performance considerably if using fixup functions on large and deeply nested XML files.

#### Parameters

self | a XbBuilderFixup |
max_depth | integer, -1 for "all" |

Since: 0.1.3

## Types and Values

### XB_TYPE_BUILDER_FIXUP

    #define             XB_TYPE_BUILDER_FIXUP

### struct XbBuilderFixupClass

    struct XbBuilderFixupClass {
    	GObjectClass parent_class;
    };

### XbBuilderFixup

    typedef struct _XbBuilderFixup XbBuilderFixup;