Commit 2d0ef52d authored by David Zeuthen's avatar David Zeuthen

Nuke eggdbus usage

Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent d04cd425
......@@ -120,14 +120,10 @@ if test "x$GCC" = "xyes"; then
changequote([,])dnl
fi
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.21.4 gio-2.0 >= 2.21.4])
PKG_CHECK_MODULES(GLIB, [gio-2.0 >= 2.25.11])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(EGG_DBUS, [eggdbus-1 >= 0.6])
AC_SUBST(EGG_DBUS_CFLAGS)
AC_SUBST(EGG_DBUS_LIBS)
EXPAT_LIB=""
AC_ARG_WITH(expat, [ --with-expat=<dir> Use expat from here],
[
......
......@@ -12,11 +12,9 @@ INCLUDES = \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS \
-D_REENTRANT \
-DEGG_DBUS_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
$(NULL)
BUILT_SOURCES = \
polkit-built-sources.stamp \
polkitenumtypes.c polkitenumtypes.h \
$(NULL)
......@@ -32,37 +30,6 @@ polkitenumtypes.c: $(enum_headers) polkitenumtypes.c.template
cd $(srcdir) && glib-mkenums --template polkitenumtypes.c.template $(enum_headers)) > \
polkitenumtypes.c.tmp && mv polkitenumtypes.c.tmp polkitenumtypes.c
# Build all the PolicyKit D-Bus code here, even the code we
# only in the daemon for agent interaction
#
polkit-built-sources.stamp : Makefile.am $(top_srcdir)/data/org.freedesktop.PolicyKit1.Authority.xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml
eggdbus-binding-tool \
--namespace "_Polkit" \
--dbus-namespace "org.freedesktop.PolicyKit1" \
--introspection-xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.Authority.xml \
--introspection-xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml \
--stamp-file polkit-built-sources.stamp \
$(NULL)
# keep in sync with contents of polkit-built-sources.stamp (Thanks autotools)
#
polkit_built_sources = _polkitactiondescription.c _polkitactiondescription.h _polkitauthenticationagent.c _polkitauthenticationagent.h _polkitauthority.c _polkitauthority.h _polkitauthorizationresult.c _polkitauthorizationresult.h _polkitbindings.c _polkitbindings.h _polkitbindingsmarshal.c _polkitbindingsmarshal.h _polkitbindingstypes.h _polkitcheckauthorizationflags.c _polkitcheckauthorizationflags.h _polkiterror.c _polkiterror.h _polkitidentity.c _polkitidentity.h _polkitimplicitauthorization.c _polkitimplicitauthorization.h _polkitsubject.c _polkitsubject.h _polkittemporaryauthorization.c _polkittemporaryauthorization.h docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml docbook-interface-org.freedesktop.PolicyKit1.Authority.xml _polkitbindingsmarshal.list _polkitauthorityfeatures.h _polkitauthorityfeatures.c
noinst_LTLIBRARIES = libpolkit-private.la
libpolkit_private_la_SOURCES = $(polkit_built_sources)
libpolkit_private_la_CFLAGS = \
-D_POLKIT_COMPILATION \
$(GLIB_CFLAGS) \
$(EGG_DBUS_CFLAGS) \
$(NULL)
libpolkit_private_la_LIBADD = \
$(GLIB_LIBS) \
$(EGG_DBUS_LIBS) \
$(NULL)
lib_LTLIBRARIES=libpolkit-gobject-1.la
libpolkit_gobject_1includedir=$(includedir)/polkit-1/polkit
......@@ -114,13 +81,10 @@ libpolkit_gobject_1_la_SOURCES = \
libpolkit_gobject_1_la_CFLAGS = \
-D_POLKIT_COMPILATION \
$(GLIB_CFLAGS) \
$(EGG_DBUS_CFLAGS) \
$(NULL)
libpolkit_gobject_1_la_LIBADD = \
$(GLIB_LIBS) \
$(EGG_DBUS_LIBS) \
libpolkit-private.la \
$(NULL)
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
......@@ -143,10 +107,8 @@ Polkit-1.0.gir: libpolkit-gobject-1.la $(G_IR_SCANNER) Makefile.am
--pkg=gobject-2.0 \
--pkg=gio-2.0 \
--libtool=$(top_builddir)/libtool \
$(EGG_DBUS_CFLAGS) \
-I$(top_srcdir)/src \
-D_POLKIT_COMPILATION \
-DEGG_DBUS_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
$(srcdir)/polkit.h \
$(srcdir)/polkittypes.h \
$(srcdir)/polkitactiondescription.h \
......
......@@ -26,7 +26,6 @@
#include <string.h>
#include "polkitimplicitauthorization.h"
#include "polkitactiondescription.h"
#include "_polkitactiondescription.h"
#include "polkitprivate.h"
......@@ -46,9 +45,16 @@
struct _PolkitActionDescription
{
GObject parent_instance;
_PolkitActionDescription *real;
gchar *action_id;
gchar *description;
gchar *message;
gchar *vendor_name;
gchar *vendor_url;
gchar *icon_name;
PolkitImplicitAuthorization implicit_any;
PolkitImplicitAuthorization implicit_inactive;
PolkitImplicitAuthorization implicit_active;
GHashTable *annotations;
gchar **annotation_keys;
};
......@@ -62,6 +68,10 @@ G_DEFINE_TYPE (PolkitActionDescription, polkit_action_description, G_TYPE_OBJECT
static void
polkit_action_description_init (PolkitActionDescription *action_description)
{
action_description->annotations = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
g_free);
}
static void
......@@ -71,9 +81,13 @@ polkit_action_description_finalize (GObject *object)
action_description = POLKIT_ACTION_DESCRIPTION (object);
if (action_description->real != NULL)
g_object_unref (action_description->real);
g_free (action_description->action_id);
g_free (action_description->description);
g_free (action_description->message);
g_free (action_description->vendor_name);
g_free (action_description->vendor_url);
g_free (action_description->icon_name);
g_hash_table_unref (action_description->annotations);
g_strfreev (action_description->annotation_keys);
if (G_OBJECT_CLASS (polkit_action_description_parent_class)->finalize != NULL)
......@@ -84,27 +98,9 @@ static void
polkit_action_description_class_init (PolkitActionDescriptionClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = polkit_action_description_finalize;
}
PolkitActionDescription *
polkit_action_description_new_for_real (_PolkitActionDescription *real)
{
PolkitActionDescription *action_description;
action_description = POLKIT_ACTION_DESCRIPTION (g_object_new (POLKIT_TYPE_ACTION_DESCRIPTION, NULL));
action_description->real = g_object_ref (real);
return action_description;
}
_PolkitActionDescription *
polkit_action_description_get_real (PolkitActionDescription *action_description)
{
return g_object_ref (action_description->real);
}
/**
* polkit_action_description_get_action_id:
* @action_description: A #PolkitActionDescription.
......@@ -116,7 +112,7 @@ polkit_action_description_get_real (PolkitActionDescription *action_description)
const gchar *
polkit_action_description_get_action_id (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_action_id (action_description->real);
return action_description->action_id;
}
/**
......@@ -130,7 +126,7 @@ polkit_action_description_get_action_id (PolkitActionDescription *action_descrip
const gchar *
polkit_action_description_get_description (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_description (action_description->real);
return action_description->description;
}
/**
......@@ -144,7 +140,7 @@ polkit_action_description_get_description (PolkitActionDescription *action_descr
const gchar *
polkit_action_description_get_message (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_message (action_description->real);
return action_description->message;
}
/**
......@@ -159,7 +155,7 @@ polkit_action_description_get_message (PolkitActionDescription *action_descripti
const gchar *
polkit_action_description_get_vendor_name (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_vendor_name (action_description->real);
return action_description->vendor_name;
}
/**
......@@ -174,7 +170,7 @@ polkit_action_description_get_vendor_name (PolkitActionDescription *action_descr
const gchar *
polkit_action_description_get_vendor_url (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_vendor_url (action_description->real);
return action_description->vendor_url;
}
/**
......@@ -189,7 +185,7 @@ polkit_action_description_get_vendor_url (PolkitActionDescription *action_descri
PolkitImplicitAuthorization
polkit_action_description_get_implicit_any (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_implicit_any (action_description->real);
return action_description->implicit_any;
}
/**
......@@ -204,7 +200,7 @@ polkit_action_description_get_implicit_any (PolkitActionDescription *action_desc
PolkitImplicitAuthorization
polkit_action_description_get_implicit_inactive (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_implicit_inactive (action_description->real);
return action_description->implicit_inactive;
}
/**
......@@ -219,7 +215,7 @@ polkit_action_description_get_implicit_inactive (PolkitActionDescription *action
PolkitImplicitAuthorization
polkit_action_description_get_implicit_active (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_implicit_active (action_description->real);
return action_description->implicit_active;
}
......@@ -235,7 +231,7 @@ polkit_action_description_get_implicit_active (PolkitActionDescription *action_d
const gchar *
polkit_action_description_get_icon_name (PolkitActionDescription *action_description)
{
return _polkit_action_description_get_icon_name (action_description->real);
return action_description->icon_name;
}
/**
......@@ -252,27 +248,9 @@ const gchar *
polkit_action_description_get_annotation (PolkitActionDescription *action_description,
const gchar *key)
{
EggDBusHashMap *annotations;
annotations = _polkit_action_description_get_annotations (action_description->real);
return egg_dbus_hash_map_lookup (annotations, key);
}
static gboolean
collect_keys (EggDBusHashMap *hash_map,
gpointer key,
gpointer value,
gpointer user_data)
{
GPtrArray *p = user_data;
g_ptr_array_add (p, g_strdup (key));
return FALSE;
return g_hash_table_lookup (action_description->annotations, key);
}
/**
* polkit_action_description_get_annotation_keys:
* @action_description: A #PolkitActionDescription.
......@@ -284,106 +262,109 @@ collect_keys (EggDBusHashMap *hash_map,
const gchar * const *
polkit_action_description_get_annotation_keys (PolkitActionDescription *action_description)
{
EggDBusHashMap *annotations;
GPtrArray *p;
GHashTableIter iter;
const gchar *key;
if (action_description->annotation_keys != NULL)
goto out;
annotations = _polkit_action_description_get_annotations (action_description->real);
p = g_ptr_array_new ();
egg_dbus_hash_map_foreach (annotations, collect_keys, p);
g_hash_table_iter_init (&iter, action_description->annotations);
while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL))
g_ptr_array_add (p, g_strdup (key));
g_ptr_array_add (p, NULL);
action_description->annotation_keys = (gchar **) g_ptr_array_free (p, FALSE);
out:
return (const gchar * const *) action_description->annotation_keys;
}
PolkitActionDescription *
polkit_action_description_new (const gchar *action_id,
const gchar *description,
const gchar *message,
const gchar *vendor_name,
const gchar *vendor_url,
const gchar *icon_name,
PolkitImplicitAuthorization implicit_any,
PolkitImplicitAuthorization implicit_inactive,
PolkitImplicitAuthorization implicit_active,
GHashTable *annotations)
{
PolkitActionDescription *ret;
ret = POLKIT_ACTION_DESCRIPTION (g_object_new (POLKIT_TYPE_ACTION_DESCRIPTION, NULL));
ret->action_id = g_strdup (action_id);
ret->description = g_strdup (description);
ret->message = g_strdup (message);
ret->vendor_name = g_strdup (vendor_name);
ret->vendor_url = g_strdup (vendor_url);
ret->icon_name = g_strdup (icon_name);
ret->implicit_any = implicit_any;
ret->implicit_inactive = implicit_inactive;
ret->implicit_active = implicit_active;
ret->annotations = g_hash_table_ref (annotations);
return ret;
}
PolkitActionDescription *
polkit_action_description_new_for_gvariant (GVariant *value)
{
PolkitActionDescription *action_description;
GVariantIter iter;
const gchar *action_id;
const gchar *description;
const gchar *message;
const gchar *vendor_name;
const gchar *vendor_url;
const gchar *icon_name;
PolkitImplicitAuthorization implicit_any;
PolkitImplicitAuthorization implicit_inactive;
PolkitImplicitAuthorization implicit_active;
GVariant *annotations_dict;
gchar *a_key;
gchar *a_value;
EggDBusHashMap *hm;
action_description = POLKIT_ACTION_DESCRIPTION (g_object_new (POLKIT_TYPE_ACTION_DESCRIPTION, NULL));
g_variant_get (value,
"(&s&s&s&s&s&suuu@a{ss})",
&action_id,
&description,
&message,
&vendor_name,
&vendor_url,
&icon_name,
&implicit_any,
&implicit_inactive,
&implicit_active,
"(ssssssuuu@a{ss})",
&action_description->action_id,
&action_description->description,
&action_description->message,
&action_description->vendor_name,
&action_description->vendor_url,
&action_description->icon_name,
&action_description->implicit_any,
&action_description->implicit_inactive,
&action_description->implicit_active,
&annotations_dict);
hm = egg_dbus_hash_map_new (G_TYPE_STRING, g_free, G_TYPE_STRING, g_free);
g_variant_iter_init (&iter, annotations_dict);
while (g_variant_iter_next (&iter, "{ss}", &a_key, &a_value))
egg_dbus_hash_map_insert (hm, a_key, a_value);
g_hash_table_insert (action_description->annotations, a_key, a_value); /* adopts a_key and a_value */
g_variant_unref (annotations_dict);
action_description->real = _polkit_action_description_new (action_id, description, message, vendor_name, vendor_url, icon_name, implicit_any, implicit_inactive, implicit_active, hm);
g_object_unref (hm);
return action_description;
}
static gboolean
add_annotation (EggDBusHashMap *hash_map,
gpointer key,
gpointer value,
gpointer user_data)
{
GVariantBuilder *builder = user_data;
g_variant_builder_add (builder, "{ss}", key, value);
return FALSE;
}
GVariant *
polkit_action_description_to_gvariant (PolkitActionDescription *action_description)
{
GVariant *value;
GVariantBuilder builder;
GHashTableIter iter;
const gchar *a_key;
const gchar *a_value;
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{ss}"));
egg_dbus_hash_map_foreach (_polkit_action_description_get_annotations (action_description->real),
add_annotation,
&builder);
g_hash_table_iter_init (&iter, action_description->annotations);
while (g_hash_table_iter_next (&iter, (gpointer) &a_key, (gpointer) &a_value))
g_variant_builder_add (&builder, "{ss}", a_key, a_value);
/* TODO: note 'foo ? : ""' is a gcc specific extension (it's a short-hand for 'foo ? foo : ""') */
value = g_variant_new ("(ssssssuuua{ss})",
_polkit_action_description_get_action_id (action_description->real) ? : "",
_polkit_action_description_get_description (action_description->real) ? : "",
_polkit_action_description_get_message (action_description->real) ? : "",
_polkit_action_description_get_vendor_name (action_description->real) ? : "",
_polkit_action_description_get_vendor_url (action_description->real) ? : "",
_polkit_action_description_get_icon_name (action_description->real) ? : "",
_polkit_action_description_get_implicit_any (action_description->real),
_polkit_action_description_get_implicit_inactive (action_description->real),
_polkit_action_description_get_implicit_active (action_description->real),
action_description->action_id ? : "",
action_description->description ? : "",
action_description->message ? : "",
action_description->vendor_name ? : "",
action_description->vendor_url ? : "",
action_description->icon_name ? : "",
action_description->implicit_any,
action_description->implicit_inactive,
action_description->implicit_active,
&builder);
return value;
......
......@@ -45,7 +45,8 @@ struct _PolkitAuthorizationResult
{
GObject parent_instance;
_PolkitAuthorizationResult *real;
gboolean is_authorized;
gboolean is_challenge;
PolkitDetails *details;
};
......@@ -69,7 +70,6 @@ polkit_authorization_result_finalize (GObject *object)
authorization_result = POLKIT_AUTHORIZATION_RESULT (object);
g_object_unref (authorization_result->real);
if (authorization_result->details != NULL)
g_object_unref (authorization_result->details);
......@@ -85,24 +85,6 @@ polkit_authorization_result_class_init (PolkitAuthorizationResultClass *klass)
gobject_class->finalize = polkit_authorization_result_finalize;
}
PolkitAuthorizationResult *
polkit_authorization_result_new_for_real (_PolkitAuthorizationResult *real)
{
PolkitAuthorizationResult *authorization_result;
authorization_result = POLKIT_AUTHORIZATION_RESULT (g_object_new (POLKIT_TYPE_AUTHORIZATION_RESULT, NULL));
authorization_result->real = g_object_ref (real);
return authorization_result;
}
_PolkitAuthorizationResult *
polkit_authorization_result_get_real (PolkitAuthorizationResult *authorization_result)
{
return g_object_ref (authorization_result->real);
}
/* ---------------------------------------------------------------------------------------------------- */
/**
......@@ -123,33 +105,11 @@ polkit_authorization_result_new (gboolean is_authorized,
PolkitDetails *details)
{
PolkitAuthorizationResult *authorization_result;
_PolkitAuthorizationResult *real;
EggDBusHashMap *real_details;
real_details = egg_dbus_hash_map_new (G_TYPE_STRING, g_free, G_TYPE_STRING, g_free);
if (details != NULL)
{
GHashTable *hash;
GHashTableIter iter;
gpointer key, value;
hash = polkit_details_get_hash (details);
if (hash != NULL)
{
g_hash_table_iter_init (&iter, hash);
while (g_hash_table_iter_next (&iter, &key, &value))
{
egg_dbus_hash_map_insert (real_details, g_strdup (key), g_strdup (value));
}
}
}
real = _polkit_authorization_result_new (is_authorized, is_challenge, real_details);
g_object_unref (real_details);
authorization_result = polkit_authorization_result_new_for_real (real);
g_object_unref (real);
authorization_result = POLKIT_AUTHORIZATION_RESULT (g_object_new (POLKIT_TYPE_AUTHORIZATION_RESULT, NULL));
authorization_result->is_authorized = is_authorized;
authorization_result->is_challenge = is_challenge;
authorization_result->details = g_object_ref (details);
return authorization_result;
}
......@@ -168,7 +128,7 @@ polkit_authorization_result_new (gboolean is_authorized,
gboolean
polkit_authorization_result_get_is_authorized (PolkitAuthorizationResult *result)
{
return _polkit_authorization_result_get_is_authorized (result->real);
return result->is_authorized;
}
/**
......@@ -182,7 +142,7 @@ polkit_authorization_result_get_is_authorized (PolkitAuthorizationResult *result
gboolean
polkit_authorization_result_get_is_challenge (PolkitAuthorizationResult *result)
{
return _polkit_authorization_result_get_is_challenge (result->real);
return result->is_challenge;
}
/**
......@@ -197,16 +157,6 @@ polkit_authorization_result_get_is_challenge (PolkitAuthorizationResult *result)
PolkitDetails *
polkit_authorization_result_get_details (PolkitAuthorizationResult *result)
{
EggDBusHashMap *real_details;
if (result->details != NULL)
goto out;
real_details = _polkit_authorization_result_get_details (result->real);
if (real_details != NULL)
result->details = result->details = polkit_details_new_for_hash (real_details->data);
out:
return result->details;
}
......
......@@ -102,7 +102,7 @@ polkit_details_new (void)
}
/* private */
PolkitDetails *
static PolkitDetails *
polkit_details_new_for_hash (GHashTable *hash)
{
PolkitDetails *details;
......@@ -114,13 +114,6 @@ polkit_details_new_for_hash (GHashTable *hash)
return details;
}
/* private */
GHashTable *
polkit_details_get_hash (PolkitDetails *details)
{
return details->hash;
}
/**
* polkit_details_lookup:
* @details: A #PolkitDetails.
......
......@@ -185,80 +185,6 @@ polkit_identity_from_string (const gchar *str,
return identity;
}
PolkitIdentity *
polkit_identity_new_for_real (_PolkitIdentity *real)
{
PolkitIdentity *s;
const gchar *kind;
EggDBusHashMap *details;
EggDBusVariant *variant;
s = NULL;
kind = _polkit_identity_get_identity_kind (real);
details = _polkit_identity_get_identity_details (real);
if (strcmp (kind, "unix-user") == 0)
{
variant = egg_dbus_hash_map_lookup (details, "uid");
if (variant != NULL)
s = polkit_unix_user_new (egg_dbus_variant_get_uint (variant));
}
else if (strcmp (kind, "unix-group") == 0)
{
variant = egg_dbus_hash_map_lookup (details, "gid");
if (variant != NULL)
s = polkit_unix_group_new (egg_dbus_variant_get_uint (variant));
}
else
{
g_warning ("Unknown identity kind %s:", kind);
}
return s;
}
_PolkitIdentity *
polkit_identity_get_real (PolkitIdentity *identity)
{
_PolkitIdentity *real;
const gchar *kind;
EggDBusHashMap *details;
real = NULL;
kind = NULL;
details = egg_dbus_hash_map_new (G_TYPE_STRING, NULL, EGG_DBUS_TYPE_VARIANT, (GDestroyNotify) g_object_unref);
if (POLKIT_IS_UNIX_USER (identity))
{
kind = "unix-user";
egg_dbus_hash_map_insert (details,
"uid",
egg_dbus_variant_new_for_uint (polkit_unix_user_get_uid (POLKIT_UNIX_USER (identity))));
}
else if (POLKIT_IS_UNIX_GROUP (identity))
{
kind = "unix-group";
egg_dbus_hash_map_insert (details,
"gid",
egg_dbus_variant_new_for_uint (polkit_unix_group_get_gid (POLKIT_UNIX_GROUP (identity))));
}
else
{
g_warning ("Unknown class %s implementing PolkitIdentity", g_type_name (G_TYPE_FROM_INSTANCE (identity)));
}
if (kind != NULL)
{
real = _polkit_identity_new (kind, details);
}
if (details != NULL)
g_object_unref (details);
return real;
}
GVariant *
polkit_identity_to_gvariant (PolkitIdentity *identity)
{
......
......@@ -27,17 +27,7 @@
#include "polkitsubject.h"
#include "polkitauthorizationresult.h"
#include "polkittemporaryauthorization.h"
#include "_polkitbindings.h"
/* notes:
*
* - the _new_for_real() functions will ref the passed arg (you will still own the ref)
* - the _get_real() functions will return a ref (you will own the ref)
*
*/
PolkitActionDescription *polkit_action_description_new_for_real (_PolkitActionDescription *real);
_PolkitActionDescription *polkit_action_description_get_real (PolkitActionDescription *action_description);
PolkitActionDescription *polkit_action_description_new_for_gvariant (GVariant *value);
GVariant *polkit_action_description_to_gvariant (PolkitActionDescription *action_description);
......@@ -47,25 +37,25 @@ GVariant *polkit_identity_to_gvariant (PolkitIdentity *identity);
PolkitSubject *polkit_subject_new_for_gvariant (GVariant *variant, GError **error);
PolkitIdentity *polkit_identity_new_for_gvariant (GVariant *variant, GError **error);
PolkitSubject *polkit_subject_new_for_real (_PolkitSubject *real);
_PolkitSubject *polkit_subject_get_real (PolkitSubject *subject);
PolkitIdentity *polkit_identity_new_for_real (_PolkitIdentity *real);
_PolkitIdentity *polkit_identity_get_real (PolkitIdentity *identity);
PolkitAuthorizationResult *polkit_authorization_result_new_for_real (_PolkitAuthorizationResult *real);
_PolkitAuthorizationResult *polkit_authorization_result_get_real (PolkitAuthorizationResult *authorization_result);
PolkitAuthorizationResult *polkit_authorization_result_new_for_gvariant (GVariant *value);
GVariant *polkit_authorization_result_to_gvariant (PolkitAuthorizationResult *authorization_result);
_PolkitTemporaryAuthorization *polkit_temporary_authorization_get_real (PolkitTemporaryAuthorization *authorization);
PolkitTemporaryAuthorization *polkit_temporary_authorization_new_for_real (_PolkitTemporaryAuthorization *real);
PolkitTemporaryAuthorization *polkit_temporary_authorization_new_for_gvariant (GVariant *value);
GVariant *polkit_temporary_authorization_to_gvariant (PolkitTemporaryAuthorization *authorization);
PolkitDetails *polkit_details_new_for_hash (GHashTable *hash);
GHashTable *polkit_details_get_hash (PolkitDetails *details);
GVariant *polkit_details_to_gvariant (PolkitDetails *details);
PolkitDetails *polkit_details_new_for_gvariant (GVariant *value);
PolkitActionDescription *
polkit_action_description_new (const gchar *action_id,
const gchar *description,
const gchar *message,
const gchar *vendor_name,
const gchar *vendor_url,
const gchar *icon_name,
PolkitImplicitAuthorization implicit_any,
PolkitImplicitAuthorization implicit_inactive,
PolkitImplicitAuthorization implicit_active,
GHashTable *annotations);
#endif /* __POLKIT_PRIVATE_H */
......@@ -260,107 +260,6 @@ polkit_subject_from_string (const gchar *str,
return subject;
}
PolkitSubject *
polkit_subject_new_for_real (_PolkitSubject *real)
{
PolkitSubject *s;
const gchar *kind;
EggDBusHashMap *details;
EggDBusVariant *variant;
EggDBusVariant *variant2;
s = NULL;