#pragma once
#include "ostree-repo.h"
+
+#ifdef HAVE_LIBSOUP
#include "ostree-fetcher.h"
+#endif
G_BEGIN_DECLS
char **out_value,
GError **error);
+#ifdef HAVE_LIBSOUP
OstreeFetcher *
_ostree_repo_remote_new_fetcher (OstreeRepo *self,
const char *remote_name,
GError **error);
+#endif
OstreeGpgVerifyResult *
_ostree_repo_gpg_verify_with_metadata (OstreeRepo *self,
#include "ostree-repo-file-enumerator.h"
#include "ostree-gpg-verifier.h"
#include "ostree-repo-static-delta-private.h"
+
+#ifdef HAVE_LIBSOUP
#include "ostree-metalink.h"
+#endif
#include <locale.h>
#include <glib/gstdio.h>
return ret;
}
+#ifdef HAVE_LIBSOUP
OstreeFetcher *
_ostree_repo_remote_new_fetcher (OstreeRepo *self,
const char *remote_name,
return fetcher;
}
+#endif
static void
ostree_repo_finalize (GObject *object)
return ret;
}
+#ifdef HAVE_LIBSOUP
static gboolean
_ostree_preload_metadata_file (OstreeRepo *self,
OstreeFetcher *fetcher,
soup_uri_free (base_uri);
return ret;
}
+#endif
/**
* ostree_repo_remote_fetch_summary:
GCancellable *cancellable,
GError **error)
{
+#ifdef HAVE_LIBSOUP
g_autofree char *metalink_url_string = NULL;
g_autoptr(GBytes) summary = NULL;
g_autoptr(GBytes) signatures = NULL;
out:
return ret;
+#else
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ "This version of ostree was built without libsoup, and cannot fetch over HTTP");
+ return FALSE;
+#endif
}
static gboolean