Greenbone Vulnerability Manager  22.4.0~dev1
Data Structures | Functions | Variables
gmp_report_formats.c File Reference

GVM GMP layer: Report Formats. More...

#include "gmp_report_formats.h"
#include "gmp_base.h"
#include "gmp_get.h"
#include "manage_report_formats.h"
#include "utils.h"
#include <stdlib.h>
#include <string.h>
#include <strings.h>

Data Structures

struct  create_report_format_t
 The create_report_format command. More...
 

Functions

static void create_report_format_reset ()
 Reset command data.
 
void create_report_format_start (gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values)
 Start a command. More...
 
void create_report_format_element_start (gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
 Start element. More...
 
static char * child_or_null (entity_t entity, const gchar *name)
 Return text of child if child exists, else NULL. More...
 
void params_options_free (array_t *params_options)
 Free a "params_options". More...
 
void parse_report_format_entity (entity_t report_format, const char **report_format_id, char **name, char **content_type, char **extension, char **summary, char **description, char **signature, array_t **files, array_t **params, array_t **params_options)
 Get creation data from a report_format entity. More...
 
void create_report_format_run (gmp_parser_t *gmp_parser, GError **error)
 Execute command. More...
 
int create_report_format_element_end (gmp_parser_t *gmp_parser, GError **error, const gchar *name)
 End element. More...
 
void create_report_format_element_text (const gchar *text, gsize text_len)
 Add text to element. More...
 

Variables

static create_report_format_t create_report_format_data
 Parser callback data. More...
 

Detailed Description

GVM GMP layer: Report Formats.

GMP report formats.

Function Documentation

◆ child_or_null()

static char* child_or_null ( entity_t  entity,
const gchar *  name 
)
static

Return text of child if child exists, else NULL.

Parameters
[in]entityEntity.
[in]nameName of child.
Returns
Text of child if there is such a child, else NULL.

◆ create_report_format_element_end()

int create_report_format_element_end ( gmp_parser_t gmp_parser,
GError **  error,
const gchar *  name 
)

End element.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.
[in]nameElement name.
Returns
0 success, 1 command finished.

◆ create_report_format_element_start()

void create_report_format_element_start ( gmp_parser_t gmp_parser,
const gchar *  name,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start element.

Parameters
[in]gmp_parserGMP parser.
[in]nameElement name.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ create_report_format_element_text()

void create_report_format_element_text ( const gchar *  text,
gsize  text_len 
)

Add text to element.

Parameters
[in]textText.
[in]text_lenText length.

◆ create_report_format_run()

void create_report_format_run ( gmp_parser_t gmp_parser,
GError **  error 
)

Execute command.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.

◆ create_report_format_start()

void create_report_format_start ( gmp_parser_t gmp_parser,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start a command.

Parameters
[in]gmp_parserGMP parser.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ params_options_free()

void params_options_free ( array_t *  params_options)

Free a "params_options".

Parameters
[in]params_optionsParam options.

◆ parse_report_format_entity()

void parse_report_format_entity ( entity_t  report_format,
const char **  report_format_id,
char **  name,
char **  content_type,
char **  extension,
char **  summary,
char **  description,
char **  signature,
array_t **  files,
array_t **  params,
array_t **  params_options 
)

Get creation data from a report_format entity.

Parameters
[in]report_formatReport format entity.
[out]report_format_idAddress for report format ID if required, else NULL.
[out]nameAddress for name.
[out]content_typeAddress for content type.
[out]extensionAddress for extension.
[out]summaryAddress for summary.
[out]descriptionAddress for description.
[out]signatureAddress for signature.
[out]filesAddress for files.
[out]paramsAddress for params.
[out]params_optionsAddress for param options.

Variable Documentation

◆ create_report_format_data

create_report_format_t create_report_format_data
static

Parser callback data.

This is initially 0 because it's a global variable.