Greenbone Security Assistant
gsad_cmd.h
Go to the documentation of this file.
1 /* Copyright (C) 2016-2021 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: AGPL-3.0-or-later
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as
7  * published by the Free Software Foundation, either version 3 of the
8  * 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 Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
24 #ifndef _GSAD_CMD_H
25 #define _GSAD_CMD_H
26 
27 #include "gsad_content_type.h" /* for content_type_t */
28 
29 #include <glib.h>
30 
32 
35 
36 void
38 
39 void
41  gboolean allow_caching);
42 
43 gboolean
45 
46 void
49 
52 
53 void
55  int http_status_code);
56 
57 int
59 
60 void
62  gsize content_length);
63 
64 gsize
66 
67 void
69  gchar *content_disposition);
70 
71 const gchar *
73 
74 void
76  gchar *content_type_string);
77 
78 const gchar *
80 #endif /* not _GSAD_CMD_H */
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:199
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:211
void cmd_response_data_free(cmd_response_data_t *data)
Frees the memory of a cmd_response_data_t struct.
Definition: gsad_cmd.c:80
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:159
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:185
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:121
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:173
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:133
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:147
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:240
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:107
cmd_response_data_t * cmd_response_data_new()
Allocates memory for a cmd_response_data_t sturct and initializes it.
Definition: gsad_cmd.c:64
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:254
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:225
Headers for content type.
content_type
Content types.
Definition: gsad_content_type.h:31
enum content_type content_type_t
Definition: gsad_content_type.h:53
Response information for commands.
Definition: gsad_cmd.c:33
gsize content_length
Content type as string. Default is NULL.
Definition: gsad_cmd.c:38
gboolean allow_caching
Definition: gsad_cmd.c:34
gchar * content_disposition
Content length of the response
Definition: gsad_cmd.c:39
int http_status_code
Whether the response may be cached.
Definition: gsad_cmd.c:35
gchar * content_type_string
Content type. Default is text/html
Definition: gsad_cmd.c:37