summaryrefslogtreecommitdiffstats
path: root/src/shell-polkit-authentication-agent.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:54:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:54:43 +0000
commite4283f6d48b98e764b988b43bbc86b9d52e6ec94 (patch)
treec8f7f7a6c2f5faa2942d27cefc6fd46cca492656 /src/shell-polkit-authentication-agent.h
parentInitial commit. (diff)
downloadgnome-shell-54cc9b72c7f1eca5c7acbdf783df9cfc8e4c2680.tar.xz
gnome-shell-54cc9b72c7f1eca5c7acbdf783df9cfc8e4c2680.zip
Adding upstream version 43.9.upstream/43.9upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/shell-polkit-authentication-agent.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/shell-polkit-authentication-agent.h b/src/shell-polkit-authentication-agent.h
new file mode 100644
index 0000000..4f14749
--- /dev/null
+++ b/src/shell-polkit-authentication-agent.h
@@ -0,0 +1,35 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+/*
+ * Copyright (C) 20011 Red Hat, Inc.
+ *
+ * Author: David Zeuthen <davidz@redhat.com>
+ */
+
+#pragma once
+
+#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
+#include <polkitagent/polkitagent.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#ifndef HAVE_POLKIT_AUTOCLEANUP
+/* Polkit doesn't have g_autoptr support, thus we have to manually set the autoptr function here */
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAgentListener, g_object_unref)
+#endif
+
+#define SHELL_TYPE_POLKIT_AUTHENTICATION_AGENT (shell_polkit_authentication_agent_get_type())
+
+G_DECLARE_FINAL_TYPE (ShellPolkitAuthenticationAgent, shell_polkit_authentication_agent, SHELL, POLKIT_AUTHENTICATION_AGENT, PolkitAgentListener)
+
+ShellPolkitAuthenticationAgent *shell_polkit_authentication_agent_new (void);
+
+void shell_polkit_authentication_agent_complete (ShellPolkitAuthenticationAgent *agent,
+ gboolean dismissed);
+void shell_polkit_authentication_agent_register (ShellPolkitAuthenticationAgent *agent,
+ GError **error_out);
+void shell_polkit_authentication_agent_unregister (ShellPolkitAuthenticationAgent *agent);
+
+G_END_DECLS
+