## preludedb-plugin-format preludedb-plugin-format |

## Synopsis

    typedef             preludedb_plugin_format_t;
    int                 (*preludedb_plugin_format_get_values_func_t)
                                                            (preludedb_sql_t *sql,
                                                             preludedb_path_selection_t *selection,
                                                             idmef_criteria_t *criteria,
                                                             int distinct,
                                                             int limit,
                                                             int offset,
                                                             void **res);
    int                 (*preludedb_plugin_format_get_alert_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             idmef_criteria_t *criteria,
                                                             int limit,
                                                             int offset,
                                                             preludedb_result_idents_order_t order,
                                                             void **res);
    int                 (*preludedb_plugin_format_delete_alert_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident);
    int                 preludedb_plugin_format_new         (preludedb_plugin_format_t **ret);
    int                 (*preludedb_plugin_format_get_heartbeat_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             idmef_criteria_t *criteria,
                                                             int limit,
                                                             int offset,
                                                             preludedb_result_idents_order_t order,
                                                             void **res);
    size_t              (*preludedb_plugin_format_get_message_ident_count_func_t)
                                                            (void *res);
    int                 (*preludedb_plugin_format_get_alert_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident,
                                                             idmef_message_t **message);
    int                 (*preludedb_plugin_format_get_next_values_func_t)
                                                            (void *res,
                                                             preludedb_path_selection_t *selection,
                                                             idmef_value_t ***values);
    int                 (*preludedb_plugin_format_get_heartbeat_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident,
                                                             idmef_message_t **message);
    int                 (*preludedb_plugin_format_get_next_message_ident_func_t)
                                                            (void *res,
                                                             uint64_t *ident);
    void                (*preludedb_plugin_format_destroy_values_resource_func_t)
                                                            (void *res);
    int                 (*preludedb_plugin_format_insert_message_func_t)
                                                            (preludedb_sql_t *sql,
                                                             idmef_message_t *message);
    int                 (*preludedb_plugin_format_check_schema_version_func_t)
                                                            (const char *version);
    void                (*preludedb_plugin_format_destroy_message_idents_resource_func_t)
                                                            (void *res);
    int                 (*preludedb_plugin_format_delete_heartbeat_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident);
    ssize_t             (*preludedb_plugin_format_delete_alert_from_list_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t *idents,
                                                             size_t size);
    ssize_t             (*preludedb_plugin_format_delete_alert_from_result_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             preludedb_result_idents_t *results);
    ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_list_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t *idents,
                                                             size_t size);
    ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             preludedb_result_idents_t *results);
    void                preludedb_plugin_format_set_delete_alert_from_list_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_alert_from_list_func_t func);
    void                preludedb_plugin_format_set_delete_alert_from_result_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_alert_from_result_idents_func_t func);
    void                preludedb_plugin_format_set_delete_heartbeat_from_list_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_heartbeat_from_list_func_t func);
    void                preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func);
    void                preludedb_plugin_format_set_check_schema_version_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_check_schema_version_func_t func);
    void                preludedb_plugin_format_set_get_alert_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_alert_idents_func_t func);
    void                preludedb_plugin_format_set_get_heartbeat_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_heartbeat_idents_func_t func);
    void                preludedb_plugin_format_set_get_message_ident_count_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_message_ident_count_func_t func);
    void                preludedb_plugin_format_set_get_next_message_ident_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_next_message_ident_func_t func);
    void                preludedb_plugin_format_set_destroy_message_idents_resource_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_destroy_message_idents_resource_func_t func);
    void                preludedb_plugin_format_set_get_alert_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_alert_func_t func);
    void                preludedb_plugin_format_set_get_heartbeat_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_heartbeat_func_t func);
    void                preludedb_plugin_format_set_delete_alert_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_alert_func_t func);
    void                preludedb_plugin_format_set_delete_heartbeat_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_heartbeat_func_t func);
    void                preludedb_plugin_format_set_insert_message_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_insert_message_func_t func);
    void                preludedb_plugin_format_set_get_values_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_values_func_t func);
    void                preludedb_plugin_format_set_get_next_values_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_next_values_func_t func);
    void                preludedb_plugin_format_set_destroy_values_resource_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_destroy_values_resource_func_t func);

## Description

## Details

### preludedb_plugin_format_t

    typedef struct preludedb_plugin_format preludedb_plugin_format_t;

### preludedb_plugin_format_get_values_func_t ()

    int                 (*preludedb_plugin_format_get_values_func_t)
                                                            (preludedb_sql_t *sql,
                                                             preludedb_path_selection_t *selection,
                                                             idmef_criteria_t *criteria,
                                                             int distinct,
                                                             int limit,
                                                             int offset,
                                                             void **res);

`sql` : |
`selection` : |
`criteria` : |
`distinct` : |
`limit` : |
`offset` : |
`res` : |
Returns : |

### preludedb_plugin_format_get_alert_idents_func_t ()

    int                 (*preludedb_plugin_format_get_alert_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             idmef_criteria_t *criteria,
                                                             int limit,
                                                             int offset,
                                                             preludedb_result_idents_order_t order,
                                                             void **res);

`sql` : |
`criteria` : |
`limit` : |
`offset` : |
`order` : |
`res` : |
Returns : |

### preludedb_plugin_format_delete_alert_func_t ()

    int                 (*preludedb_plugin_format_delete_alert_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident);

`sql` : |
`ident` : |
Returns : |

### preludedb_plugin_format_new ()

    int                 preludedb_plugin_format_new         (preludedb_plugin_format_t **ret);

`ret` : |
Returns : |

### preludedb_plugin_format_get_heartbeat_idents_func_t ()

    int                 (*preludedb_plugin_format_get_heartbeat_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             idmef_criteria_t *criteria,
                                                             int limit,
                                                             int offset,
                                                             preludedb_result_idents_order_t order,
                                                             void **res);

`sql` : |
`criteria` : |
`limit` : |
`offset` : |
`order` : |
`res` : |
Returns : |

### preludedb_plugin_format_get_message_ident_count_func_t ()

    size_t              (*preludedb_plugin_format_get_message_ident_count_func_t)
                                                            (void *res);

`res` : |
Returns : |

### preludedb_plugin_format_get_alert_func_t ()

    int                 (*preludedb_plugin_format_get_alert_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident,
                                                             idmef_message_t **message);

`sql` : |
`ident` : |
`message` : |
Returns : |

### preludedb_plugin_format_get_next_values_func_t ()

    int                 (*preludedb_plugin_format_get_next_values_func_t)
                                                            (void *res,
                                                             preludedb_path_selection_t *selection,
                                                             idmef_value_t ***values);

`res` : |
`selection` : |
`values` : |
Returns : |

### preludedb_plugin_format_get_heartbeat_func_t ()

    int                 (*preludedb_plugin_format_get_heartbeat_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident,
                                                             idmef_message_t **message);

`sql` : |
`ident` : |
`message` : |
Returns : |

### preludedb_plugin_format_get_next_message_ident_func_t ()

    int                 (*preludedb_plugin_format_get_next_message_ident_func_t)
                                                            (void *res,
                                                             uint64_t *ident);

`res` : |
`ident` : |
Returns : |

### preludedb_plugin_format_destroy_values_resource_func_t ()

    void                (*preludedb_plugin_format_destroy_values_resource_func_t)
                                                            (void *res);

`res` : |

### preludedb_plugin_format_insert_message_func_t ()

    int                 (*preludedb_plugin_format_insert_message_func_t)
                                                            (preludedb_sql_t *sql,
                                                             idmef_message_t *message);

`sql` : |
`message` : |
Returns : |

### preludedb_plugin_format_check_schema_version_func_t ()

    int                 (*preludedb_plugin_format_check_schema_version_func_t)
                                                            (const char *version);

`version` : |
Returns : |

### preludedb_plugin_format_destroy_message_idents_resource_func_t ()

    void                (*preludedb_plugin_format_destroy_message_idents_resource_func_t)
                                                            (void *res);

`res` : |

### preludedb_plugin_format_delete_heartbeat_func_t ()

    int                 (*preludedb_plugin_format_delete_heartbeat_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t ident);

`sql` : |
`ident` : |
Returns : |

### preludedb_plugin_format_delete_alert_from_list_func_t ()

    ssize_t             (*preludedb_plugin_format_delete_alert_from_list_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t *idents,
                                                             size_t size);

`sql` : |
`idents` : |
`size` : |
Returns : |

### preludedb_plugin_format_delete_alert_from_result_idents_func_t ()

    ssize_t             (*preludedb_plugin_format_delete_alert_from_result_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             preludedb_result_idents_t *results);

`sql` : |
`results` : |
Returns : |

### preludedb_plugin_format_delete_heartbeat_from_list_func_t ()

    ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_list_func_t)
                                                            (preludedb_sql_t *sql,
                                                             uint64_t *idents,
                                                             size_t size);

`sql` : |
`idents` : |
`size` : |
Returns : |

### preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t ()

    ssize_t             (*preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t)
                                                            (preludedb_sql_t *sql,
                                                             preludedb_result_idents_t *results);

`sql` : |
`results` : |
Returns : |

### preludedb_plugin_format_set_delete_alert_from_list_func ()

    void                preludedb_plugin_format_set_delete_alert_from_list_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_alert_from_list_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_delete_alert_from_result_idents_func ()

    void                preludedb_plugin_format_set_delete_alert_from_result_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_alert_from_result_idents_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_delete_heartbeat_from_list_func ()

    void                preludedb_plugin_format_set_delete_heartbeat_from_list_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_heartbeat_from_list_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func ()

    void                preludedb_plugin_format_set_delete_heartbeat_from_result_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_heartbeat_from_result_idents_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_check_schema_version_func ()

    void                preludedb_plugin_format_set_check_schema_version_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_check_schema_version_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_alert_idents_func ()

    void                preludedb_plugin_format_set_get_alert_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_alert_idents_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_heartbeat_idents_func ()

    void                preludedb_plugin_format_set_get_heartbeat_idents_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_heartbeat_idents_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_message_ident_count_func ()

    void                preludedb_plugin_format_set_get_message_ident_count_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_message_ident_count_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_next_message_ident_func ()

    void                preludedb_plugin_format_set_get_next_message_ident_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_next_message_ident_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_destroy_message_idents_resource_func ()

    void                preludedb_plugin_format_set_destroy_message_idents_resource_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_destroy_message_idents_resource_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_alert_func ()

    void                preludedb_plugin_format_set_get_alert_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_alert_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_heartbeat_func ()

    void                preludedb_plugin_format_set_get_heartbeat_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_heartbeat_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_delete_alert_func ()

    void                preludedb_plugin_format_set_delete_alert_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_alert_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_delete_heartbeat_func ()

    void                preludedb_plugin_format_set_delete_heartbeat_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_delete_heartbeat_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_insert_message_func ()

    void                preludedb_plugin_format_set_insert_message_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_insert_message_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_values_func ()

    void                preludedb_plugin_format_set_get_values_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_values_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_get_next_values_func ()

    void                preludedb_plugin_format_set_get_next_values_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_get_next_values_func_t func);

`plugin` : |
`func` : |

### preludedb_plugin_format_set_destroy_values_resource_func ()

    void                preludedb_plugin_format_set_destroy_values_resource_func
                                                            (preludedb_plugin_format_t *plugin,
                                                             preludedb_plugin_format_destroy_values_resource_func_t func);

`plugin` : |
`func` : |