Greenbone Security Assistant  8.0.0
gsad_cmd.h
Go to the documentation of this file.
1 /* Copyright (C) 2016-2018 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
25 #ifndef _GSAD_CMD_H
26 #define _GSAD_CMD_H
27 
28 #include "gsad_content_type.h" /* for content_type_t */
29 
30 #include <glib.h>
31 
33 
36 
37 void
39 
40 void
42  gboolean allow_caching);
43 
44 gboolean
46 
47 void
50 
53 
54 void
56  int http_status_code);
57 
58 int
60 
61 void
63  gsize content_length);
64 
65 gsize
67 
68 void
70  gchar *content_disposition);
71 
72 const gchar *
74 
75 void
77  gchar *content_type_string);
78 
79 const gchar *
81 #endif /* not _GSAD_CMD_H */
gchar * content_type_string
Content type. Default is text/html
Definition: gsad_cmd.c:38
void cmd_response_data_set_content_type(cmd_response_data_t *data, content_type_t content_type)
Set content type of cmd_response_data_t struct.
Definition: gsad_cmd.c:134
void cmd_response_data_set_status_code(cmd_response_data_t *data, int http_status_code)
Set status code of cmd_response_data_t struct.
Definition: gsad_cmd.c:160
cmd_response_data_t * cmd_response_data_new()
Allocates memory for a cmd_response_data_t sturct and initializes it.
Definition: gsad_cmd.c:65
gchar * content_disposition
Content length of the response
Definition: gsad_cmd.c:40
gsize content_length
Content type as string. Default is NULL.
Definition: gsad_cmd.c:39
void cmd_response_data_free(cmd_response_data_t *data)
Frees the memory of a cmd_response_data_t struct.
Definition: gsad_cmd.c:81
Response information for commands.
Definition: gsad_cmd.c:33
gboolean allow_caching
Definition: gsad_cmd.c:35
void cmd_response_data_set_content_length(cmd_response_data_t *data, gsize content_length)
Set response content length of cmd_response_data_t struct.
Definition: gsad_cmd.c:186
const gchar * cmd_response_data_get_content_disposition(cmd_response_data_t *data)
Get content disposition of cmd_response_data_t struct.
Definition: gsad_cmd.c:226
enum content_type content_type_t
const gchar * cmd_response_data_get_content_type_string(cmd_response_data_t *data)
Get a content type string if set.
Definition: gsad_cmd.c:255
gsize cmd_response_data_get_content_length(cmd_response_data_t *data)
Get response content length of cmd_response_data_t struct.
Definition: gsad_cmd.c:200
int cmd_response_data_get_status_code(cmd_response_data_t *data)
Get http status code of cmd_response_data_t struct.
Definition: gsad_cmd.c:174
Headers for content type.
void cmd_response_data_set_content_disposition(cmd_response_data_t *data, gchar *content_disposition)
Set content disposition of cmd_response_data_t struct.
Definition: gsad_cmd.c:212
int http_status_code
Whether the response may be cached.
Definition: gsad_cmd.c:36
content_type_t cmd_response_data_get_content_type(cmd_response_data_t *data)
Get content type of cmd_response_data_t struct.
Definition: gsad_cmd.c:148
void cmd_response_data_set_content_type_string(cmd_response_data_t *data, gchar *content_type_string)
Set a content type as string.
Definition: gsad_cmd.c:241
content_type
Content types.
gboolean cmd_response_data_is_allow_caching(cmd_response_data_t *data)
Get allow_caching flag of cmd_response_data_t struct.
Definition: gsad_cmd.c:122
void cmd_response_data_set_allow_caching(cmd_response_data_t *data, gboolean allow_caching)
Set allow_caching flag of cmd_response_data_t struct.
Definition: gsad_cmd.c:108