2011-02-21 17:17:34 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 20011 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* Author: David Zeuthen <davidz@redhat.com>
|
|
|
|
*/
|
|
|
|
|
2018-03-22 13:50:20 +00:00
|
|
|
#pragma once
|
2011-02-21 17:17:34 +00:00
|
|
|
|
2018-03-22 13:50:20 +00:00
|
|
|
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
|
|
|
|
#include <polkitagent/polkitagent.h>
|
2011-02-21 17:17:34 +00:00
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2022-05-17 13:36:43 +00:00
|
|
|
#ifndef HAVE_POLKIT_AUTOCLEANUP
|
2018-03-22 13:50:20 +00:00
|
|
|
/* 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)
|
2022-05-17 13:36:43 +00:00
|
|
|
#endif
|
2011-02-21 17:17:34 +00:00
|
|
|
|
2018-03-22 13:50:20 +00:00
|
|
|
#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);
|
2011-02-21 17:17:34 +00:00
|
|
|
|
2011-02-22 21:54:08 +00:00
|
|
|
void shell_polkit_authentication_agent_complete (ShellPolkitAuthenticationAgent *agent,
|
|
|
|
gboolean dismissed);
|
2012-09-03 01:23:50 +00:00
|
|
|
void shell_polkit_authentication_agent_register (ShellPolkitAuthenticationAgent *agent,
|
|
|
|
GError **error_out);
|
|
|
|
void shell_polkit_authentication_agent_unregister (ShellPolkitAuthenticationAgent *agent);
|
2011-02-21 17:17:34 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|