summaryrefslogtreecommitdiffstats
path: root/lib/gs-remote-icon.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:57:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:57:27 +0000
commit6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18 (patch)
treed423850ae901365e582137bdf2b5cbdffd7ca266 /lib/gs-remote-icon.h
parentInitial commit. (diff)
downloadgnome-software-6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18.tar.xz
gnome-software-6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18.zip
Adding upstream version 43.5.upstream/43.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/gs-remote-icon.h')
-rw-r--r--lib/gs-remote-icon.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/gs-remote-icon.h b/lib/gs-remote-icon.h
new file mode 100644
index 0000000..82e246f
--- /dev/null
+++ b/lib/gs-remote-icon.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ * vi:set noexpandtab tabstop=8 shiftwidth=8:
+ *
+ * Copyright (C) 2021 Endless OS Foundation, Inc
+ *
+ * Author: Philip Withnall <pwithnall@endlessos.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#pragma once
+
+#include <gio/gio.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <libsoup/soup.h>
+
+G_BEGIN_DECLS
+
+#define GS_TYPE_REMOTE_ICON (gs_remote_icon_get_type ())
+
+/* FIXME: This is actually derived from GFileIcon, but the GFileIconClass isn’t
+ * public, so we use GObjectClass instead (which is what GFileIconClass is — it
+ * doesn’t define any vfuncs). See the note in gs-remote-icon.c. */
+G_DECLARE_FINAL_TYPE (GsRemoteIcon, gs_remote_icon, GS, REMOTE_ICON, GObject)
+
+GIcon *gs_remote_icon_new (const gchar *uri);
+
+const gchar *gs_remote_icon_get_uri (GsRemoteIcon *self);
+
+gboolean gs_remote_icon_ensure_cached (GsRemoteIcon *self,
+ SoupSession *soup_session,
+ guint maximum_icon_size,
+ GCancellable *cancellable,
+ GError **error);
+
+G_END_DECLS