File: network.h

package info (click to toggle)
rauc 1.15-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,336 kB
  • sloc: ansic: 36,989; python: 3,354; sh: 1,391; xml: 53; makefile: 41
file content (25 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <glib.h>

#if ENABLE_NETWORK
/**
 * Network initialization routine.
 *
 * Sets up libcurl.
 *
 * @param error return location for a GError, or NULL
 *
 * @return TRUE if succeeded, FALSE if failed
 */
gboolean network_init(GError **error)
G_GNUC_WARN_UNUSED_RESULT;
#else
static inline gboolean network_init(GError **error)
{
	return TRUE;
}
#endif

gboolean download_file(const gchar *target, const gchar *url, goffset limit, GError **error)
G_GNUC_WARN_UNUSED_RESULT;