Open SCAP Library

oscap_acquire.h
1 /*
2 * Copyright 2012--2014 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library 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 GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21 #ifndef OSCAP_ACQUIRE_H_
22 #define OSCAP_ACQUIRE_H_
23
24 #include "util.h"
25 #include <stdbool.h>
26
27 OSCAP_HIDDEN_START;
28
37 char *oscap_acquire_temp_dir(void);
38
43 void oscap_acquire_cleanup_dir(char **dir_path);
44
54 int oscap_acquire_temp_file(const char *dir, const char *template, char **filename);
55
61 bool oscap_acquire_url_is_supported(const char *url);
62
68 char *oscap_acquire_url_to_filename(const char *url);
69
76 char *
77 oscap_acquire_url_download(const char *url, size_t* memory_size);
78
85 char *oscap_acquire_guess_realpath(const char *filepath);
86
93 int oscap_acquire_mkdir_p(const char* path);
94
101 int oscap_acquire_ensure_parent_dir(const char *filepath);
102
111 size_t
112 write_to_memory_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
113
114 // FIXME: SCE engine uses this particular function
115 OSCAP_HIDDEN_END;
116
123 char *oscap_acquire_pipe_to_string(int fd);
124
125 OSCAP_HIDDEN_START;
126
127 OSCAP_HIDDEN_END;
128
129 #endif