Commit 2434044d authored by David Zeuthen's avatar David Zeuthen

Move local authority management to a separate library

parent e88e67fa
......@@ -409,8 +409,10 @@ data/polkit-1
data/polkit-gobject-1.pc
data/polkit-backend-1.pc
data/polkit-agent-1.pc
data/polkit-local-1.pc
src/Makefile
src/polkit/Makefile
src/polkitlocal/Makefile
src/polkitbackend/Makefile
src/polkitagent/Makefile
src/polkitd/Makefile
......
......@@ -22,13 +22,13 @@ pam_DATA = polkit-1
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = polkit-gobject-1.pc polkit-backend-1.pc polkit-agent-1.pc
pkgconfig_DATA = polkit-gobject-1.pc polkit-backend-1.pc polkit-agent-1.pc polkit-local-1.pc
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
org.freedesktop.PolicyKit1.Authority.xml \
org.freedesktop.PolicyKit1.AuthorityManager.xml \
org.freedesktop.PolicyKit1.LocalAuthority.xml \
org.freedesktop.PolicyKit1.AuthenticationAgent.xml \
$(service_in_files) \
$(dbusconf_in_files) \
......@@ -36,6 +36,7 @@ EXTRA_DIST = \
polkit-gobject-1.pc.in \
polkit-backend-1.pc.in \
polkit-agent-1.pc.in \
polkit-local-1.pc.in \
$(NULL)
......
......@@ -2,12 +2,12 @@
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.PolicyKit1.AuthorityManager">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Manage an Authority"/>
<interface name="org.freedesktop.PolicyKit1.LocalAuthority">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Manage the local Authority"/>
<annotation name="org.gtk.EggDBus.DocString" value="This D-Bus interface <emphasis>may</emphasis> be implemented by the <literal>/org/freedesktop/PoliycKit1/Authority</literal> object on the well-known name <literal>org.freedesktop.PolicyKit1</literal> on the system message bus."/>
<!-- Authorization struct -->
<annotation name="org.gtk.EggDBus.DeclareStruct" value="Authorization">
<annotation name="org.gtk.EggDBus.DeclareStruct" value="LocalAuthorization">
<annotation name="org.gtk.EggDBus.DocString.Summary" value="Authorizations"/>
<annotation name="org.gtk.EggDBus.DocString" value="This struct describes an authorization belonging to an #Identity."/>
......@@ -51,8 +51,8 @@
<annotation name="org.gtk.EggDBus.DocString" value="The #Identity to add @authorization to."/>
</arg>
<arg name="authorization" direction="in" type="(s(sa{sv})b)">
<annotation name="org.gtk.EggDBus.Type" value="Authorization"/>
<annotation name="org.gtk.EggDBus.DocString" value="The #Authorization to add to @identity."/>
<annotation name="org.gtk.EggDBus.Type" value="LocalAuthorization"/>
<annotation name="org.gtk.EggDBus.DocString" value="The #LocalAuthorization to add to @identity."/>
</arg>
</method>
......@@ -64,8 +64,8 @@
<annotation name="org.gtk.EggDBus.DocString" value="The #Identity to remove @authorization from."/>
</arg>
<arg name="authorization" direction="in" type="(s(sa{sv})b)">
<annotation name="org.gtk.EggDBus.Type" value="Authorization"/>
<annotation name="org.gtk.EggDBus.DocString" value="The #Authorization to remove from @identity."/>
<annotation name="org.gtk.EggDBus.Type" value="LocalAuthorization"/>
<annotation name="org.gtk.EggDBus.DocString" value="The #LocalAuthorization to remove from @identity."/>
</arg>
</method>
......@@ -78,8 +78,8 @@
<annotation name="org.gtk.EggDBus.DocString" value="An #Identity to enumerate authorizations for."/>
</arg>
<arg name="authorizations" direction="out" type="a(s(sa{sv})b)">
<annotation name="org.gtk.EggDBus.Type" value="Array<Authorization>"/>
<annotation name="org.gtk.EggDBus.DocString" value="An array of #Authorization structs for @identity."/>
<annotation name="org.gtk.EggDBus.Type" value="Array<LocalAuthorization>"/>
<annotation name="org.gtk.EggDBus.DocString" value="An array of #LocalAuthorization structs for @identity."/>
</arg>
</method>
......
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: polkit-local-1
Description: PolicyKit Local Authority API
Version: @VERSION@
Libs: -L${libdir} -lpolkit-local-1
Cflags: -I${includedir}/polkit-1
Requires: polkit-gobject-1
......@@ -35,6 +35,8 @@ INCLUDES = \
-I$(top_builddir)/src/polkitbackend \
-I$(top_srcdir)/src/polkitagent \
-I$(top_builddir)/src/polkitagent \
-I$(top_srcdir)/src/polkitlocal \
-I$(top_builddir)/src/polkitlocal \
$(NULL)
GTKDOC_LIBS = \
......@@ -44,6 +46,7 @@ GTKDOC_LIBS = \
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
$(top_builddir)/src/polkitbackend/libpolkit-backend-1.la \
$(top_builddir)/src/polkitagent/libpolkit-agent-1.la \
$(top_builddir)/src/polkitlocal/libpolkit-local-1.la \
$(NULL)
# Extra options to supply to gtkdoc-mkdb
......@@ -58,7 +61,7 @@ content_files = \
../extensiondir.xml \
../version.xml \
../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml \
../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthorityManager.xml \
../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.LocalAuthority.xml \
../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml \
../man/PolicyKit-1.xml \
../man/pkcheck.xml \
......
......@@ -62,19 +62,17 @@
<part id="ref-dbus-api">
<title>D-Bus API Reference</title>
<xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.Authority.xml"/>
<xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthorityManager.xml"/>
<xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.LocalAuthority.xml"/>
<xi:include href="../../src/polkit/docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml"/>
</part>
<part id="ref-api">
<title>Core API Reference</title>
<title>Client API Reference</title>
<xi:include href="xml/polkitauthority.xml"/>
<xi:include href="xml/polkitauthorizationresult.xml"/>
<xi:include href="xml/polkitdetails.xml"/>
<xi:include href="xml/polkiterror.xml"/>
<xi:include href="xml/polkitactiondescription.xml"/>
<xi:include href="xml/polkitauthoritymanager.xml"/>
<xi:include href="xml/polkitauthorization.xml"/>
<chapter id="subjects">
<title>Subjects</title>
<xi:include href="xml/polkitsubject.xml"/>
......@@ -90,6 +88,12 @@
</chapter>
</part>
<part id="ref-local-api">
<title>Local Authority Client API Reference</title>
<xi:include href="xml/polkitlocalauthority.xml"/>
<xi:include href="xml/polkitlocalauthorization.xml"/>
</part>
<part id="ref-backend-api">
<title>Backend API Reference</title>
<xi:include href="xml/polkitbackendauthority.xml"/>
......
......@@ -48,33 +48,33 @@ POLKIT_AUTHORITY_GET_CLASS
</SECTION>
<SECTION>
<FILE>polkitauthoritymanager</FILE>
PolkitAuthorityManager
polkit_authority_manager_get
polkit_authority_manager_enumerate_users_sync
polkit_authority_manager_enumerate_groups_sync
polkit_authority_manager_enumerate_authorizations_sync
polkit_authority_manager_add_authorization_sync
polkit_authority_manager_remove_authorization_sync
polkit_authority_manager_enumerate_users
polkit_authority_manager_enumerate_users_finish
polkit_authority_manager_enumerate_groups
polkit_authority_manager_enumerate_groups_finish
polkit_authority_manager_enumerate_authorizations
polkit_authority_manager_enumerate_authorizations_finish
polkit_authority_manager_add_authorization
polkit_authority_manager_add_authorization_finish
polkit_authority_manager_remove_authorization
polkit_authority_manager_remove_authorization_finish
<FILE>polkitlocalauthority</FILE>
PolkitLocalAuthority
polkit_local_authority_get
polkit_local_authority_enumerate_users_sync
polkit_local_authority_enumerate_groups_sync
polkit_local_authority_enumerate_authorizations_sync
polkit_local_authority_add_authorization_sync
polkit_local_authority_remove_authorization_sync
polkit_local_authority_enumerate_users
polkit_local_authority_enumerate_users_finish
polkit_local_authority_enumerate_groups
polkit_local_authority_enumerate_groups_finish
polkit_local_authority_enumerate_authorizations
polkit_local_authority_enumerate_authorizations_finish
polkit_local_authority_add_authorization
polkit_local_authority_add_authorization_finish
polkit_local_authority_remove_authorization
polkit_local_authority_remove_authorization_finish
<SUBSECTION Standard>
PolkitAuthorityManagerClass
POLKIT_AUTHORITY_MANAGER
POLKIT_IS_AUTHORITY_MANAGER
POLKIT_TYPE_AUTHORITY_MANAGER
polkit_authority_manager_get_type
POLKIT_AUTHORITY_MANAGER_CLASS
POLKIT_IS_AUTHORITY_MANAGER_CLASS
POLKIT_AUTHORITY_MANAGER_GET_CLASS
POLKIT_LOCAL_AUTHORITY
POLKIT_IS_LOCAL_AUTHORITY
POLKIT_TYPE_LOCAL_AUTHORITY
polkit_local_authority_get_type
POLKIT_LOCAL_AUTHORITY_CLASS
POLKIT_IS_LOCAL_AUTHORITY_CLASS
POLKIT_LOCAL_AUTHORITY_GET_CLASS
</SECTION>
<SECTION>
......@@ -131,21 +131,21 @@ POLKIT_UNIX_GROUP_GET_CLASS
</SECTION>
<SECTION>
<FILE>polkitauthorization</FILE>
PolkitAuthorization
polkit_authorization_new
polkit_authorization_get_action_id
polkit_authorization_get_subject
polkit_authorization_get_is_negative
<FILE>polkitlocalauthorization</FILE>
PolkitLocalAuthorization
polkit_local_authorization_new
polkit_local_authorization_get_action_id
polkit_local_authorization_get_subject
polkit_local_authorization_get_is_negative
<SUBSECTION Standard>
PolkitAuthorizationClass
POLKIT_AUTHORIZATION
POLKIT_IS_AUTHORIZATION
POLKIT_TYPE_AUTHORIZATION
polkit_authorization_get_type
POLKIT_AUTHORIZATION_CLASS
POLKIT_IS_AUTHORIZATION_CLASS
POLKIT_AUTHORIZATION_GET_CLASS
PolkitLocalAuthorizationClass
POLKIT_LOCAL_AUTHORIZATION
POLKIT_IS_LOCAL_AUTHORIZATION
POLKIT_TYPE_LOCAL_AUTHORIZATION
polkit_local_authorization_get_type
POLKIT_LOCAL_AUTHORIZATION_CLASS
POLKIT_IS_LOCAL_AUTHORIZATION_CLASS
POLKIT_LOCAL_AUTHORIZATION_GET_CLASS
</SECTION>
<SECTION>
......
polkit_authority_get_type
polkit_authority_manager_get_type
polkit_authorization_get_type
polkit_action_description_get_type
polkit_details_get_type
polkit_check_authorization_flags_get_type
polkit_implicit_authorization_get_type
polkit_identity_get_type
polkit_unix_user_get_type
polkit_unix_group_get_type
polkit_subject_get_type
polkit_unix_process_get_type
polkit_unix_session_get_type
......@@ -19,6 +13,9 @@ polkit_system_bus_name_get_type
polkit_error_get_type
polkit_authorization_result_get_type
polkit_local_authority_get_type
polkit_local_authorization_get_type
polkit_backend_authority_get_type
polkit_backend_action_lookup_get_type
polkit_backend_local_authority_get_type
......
SUBDIRS = polkit polkitbackend polkitagent polkitd nullbackend programs examples
SUBDIRS = polkit polkitlocal polkitbackend polkitagent polkitd nullbackend programs examples
clean-local :
rm -f *~
......@@ -27,6 +27,7 @@ libnullbackend_la_SOURCES = \
libnullbackend_la_CFLAGS = \
-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DPOLKIT_LOCAL_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DG_LOG_DOMAIN=\"PolkitNullBackend\" \
$(GLIB_CFLAGS) \
$(NULL)
......
......@@ -22,19 +22,19 @@ BUILT_SOURCES = \
# 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.AuthorityManager.xml
polkit-built-sources.stamp : Makefile.am $(top_srcdir)/data/org.freedesktop.PolicyKit1.Authority.xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.LocalAuthority.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.AuthorityManager.xml \
--introspection-xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.LocalAuthority.xml \
--introspection-xml $(top_srcdir)/data/org.freedesktop.PolicyKit1.AuthenticationAgent.xml \
--stamp-file polkit-built-sources.stamp \
--stamp-file polkit-built-sources.stamp \
$(NULL)
# keep in sync with contents of polkit-built-sources.stamp (Thanks autotools)
#
polkit_built_sources = _polkitbindingsmarshal.c _polkitbindingsmarshal.h _polkitbindingsmarshal.list _polkitbindings.c _polkitbindings.h _polkitbindingstypes.h _polkitauthenticationagent.c _polkitauthenticationagent.h docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml _polkitauthoritymanager.c _polkitauthoritymanager.h docbook-interface-org.freedesktop.PolicyKit1.AuthorityManager.xml _polkitauthority.c _polkitauthority.h docbook-interface-org.freedesktop.PolicyKit1.Authority.xml _polkiterror.c _polkiterror.h _polkitimplicitauthorization.c _polkitimplicitauthorization.h _polkitauthorizationresult.c _polkitauthorizationresult.h _polkitcheckauthorizationflags.c _polkitcheckauthorizationflags.h _polkitauthorization.c _polkitauthorization.h _polkitactiondescription.c _polkitactiondescription.h _polkitidentity.c _polkitidentity.h _polkitsubject.c _polkitsubject.h
polkit_built_sources = _polkitbindingsmarshal.c _polkitbindingsmarshal.h _polkitbindingsmarshal.list _polkitbindings.c _polkitbindings.h _polkitbindingstypes.h _polkitauthenticationagent.c _polkitauthenticationagent.h docbook-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.xml _polkitlocalauthority.c _polkitlocalauthority.h docbook-interface-org.freedesktop.PolicyKit1.LocalAuthority.xml _polkitauthority.c _polkitauthority.h docbook-interface-org.freedesktop.PolicyKit1.Authority.xml _polkiterror.c _polkiterror.h _polkitimplicitauthorization.c _polkitimplicitauthorization.h _polkitauthorizationresult.c _polkitauthorizationresult.h _polkitcheckauthorizationflags.c _polkitcheckauthorizationflags.h _polkitlocalauthorization.c _polkitlocalauthorization.h _polkitactiondescription.c _polkitactiondescription.h _polkitidentity.c _polkitidentity.h _polkitsubject.c _polkitsubject.h
lib_LTLIBRARIES=libpolkit-gobject-1.la
......@@ -47,7 +47,6 @@ libpolkit_gobject_1include_HEADERS = \
polkitactiondescription.h \
polkitdetails.h \
polkitauthority.h \
polkitauthoritymanager.h \
polkiterror.h \
polkitsubject.h \
polkitunixprocess.h \
......@@ -58,7 +57,6 @@ libpolkit_gobject_1include_HEADERS = \
polkitunixgroup.h \
polkitauthorizationresult.h \
polkitcheckauthorizationflags.h \
polkitauthorization.h \
polkitimplicitauthorization.h \
$(NULL)
......@@ -69,7 +67,6 @@ libpolkit_gobject_1_la_SOURCES = \
polkitactiondescription.c polkitactiondescription.h \
polkitdetails.c polkitdetails.h \
polkitauthority.c polkitauthority.h \
polkitauthoritymanager.c polkitauthoritymanager.h \
polkiterror.c polkiterror.h \
polkitsubject.c polkitsubject.h \
polkitunixprocess.c polkitunixprocess.h \
......@@ -80,7 +77,6 @@ libpolkit_gobject_1_la_SOURCES = \
polkitunixgroup.c polkitunixgroup.h \
polkitauthorizationresult.c polkitauthorizationresult.h \
polkitcheckauthorizationflags.c polkitcheckauthorizationflags.h \
polkitauthorization.c polkitauthorization.h \
polkitimplicitauthorization.c polkitimplicitauthorization.h \
$(NULL)
......
......@@ -37,8 +37,6 @@
#include <polkit/polkitauthorizationresult.h>
#include <polkit/polkitcheckauthorizationflags.h>
#include <polkit/polkitauthority.h>
#include <polkit/polkitauthoritymanager.h>
#include <polkit/polkitauthorization.h>
#include <polkit/polkitdetails.h>
#undef _POLKIT_INSIDE_POLKIT_H
......
......@@ -44,9 +44,6 @@ _PolkitSubject *polkit_subject_get_real (PolkitSubject *subject);
PolkitIdentity *polkit_identity_new_for_real (_PolkitIdentity *real);
_PolkitIdentity *polkit_identity_get_real (PolkitIdentity *identity);
PolkitAuthorization *polkit_authorization_new_for_real (_PolkitAuthorization *real);
_PolkitAuthorization *polkit_authorization_get_real (PolkitAuthorization *authorization);
PolkitAuthorizationResult *polkit_authorization_result_new_for_real (_PolkitAuthorizationResult *real);
_PolkitAuthorizationResult *polkit_authorization_result_get_real (PolkitAuthorizationResult *authorization_result);
......
......@@ -27,9 +27,6 @@
struct _PolkitAuthority;
typedef struct _PolkitAuthority PolkitAuthority;
struct _PolkitAuthorityManager;
typedef struct _PolkitAuthorityManager PolkitAuthorityManager;
struct _PolkitActionDescription;
typedef struct _PolkitActionDescription PolkitActionDescription;
......@@ -52,9 +49,6 @@ typedef struct _PolkitUnixUser PolkitUnixUser;
struct _PolkitUnixGroup;
typedef struct _PolkitUnixGroup PolkitUnixGroup;
struct _PolkitAuthorization;
typedef struct _PolkitAuthorization PolkitAuthorization;
struct _PolkitAuthorizationResult;
typedef struct _PolkitAuthorizationResult PolkitAuthorizationResult;
......
......@@ -5,6 +5,8 @@ INCLUDES = \
-I$(top_srcdir)/src \
-I$(top_builddir)/src/polkit \
-I$(top_srcdir)/src/polkit \
-I$(top_builddir)/src/polkitlocal \
-I$(top_srcdir)/src/polkitlocal \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
......@@ -15,6 +17,7 @@ INCLUDES = \
-D_POSIX_PTHREAD_SEMANTICS \
-D_REENTRANT \
-DEGG_DBUS_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DPOLKIT_LOCAL_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
$(NULL)
BUILT_SOURCES = \
......@@ -48,18 +51,18 @@ libpolkit_backend_1include_HEADERS = \
polkitbackendactionlookup.h \
$(NULL)
libpolkit_backend_1_la_SOURCES = \
$(ck_built_sources) \
$(BUILT_SOURCES) \
polkitbackend.h \
polkitbackendtypes.h \
polkitbackendprivate.h \
polkitbackendauthority.h polkitbackendauthority.c \
polkitbackendlocalauthority.h polkitbackendlocalauthority.c \
polkitbackendactionpool.h polkitbackendactionpool.c \
polkitbackendsessionmonitor.h polkitbackendsessionmonitor.c \
polkitbackendconfigsource.h polkitbackendconfigsource.c \
polkitbackendactionlookup.h polkitbackendactionlookup.c \
libpolkit_backend_1_la_SOURCES = \
$(ck_built_sources) \
$(BUILT_SOURCES) \
polkitbackend.h \
polkitbackendtypes.h \
polkitbackendprivate.h \
polkitbackendauthority.h polkitbackendauthority.c \
polkitbackendlocalauthority.h polkitbackendlocalauthority.c \
polkitbackendactionpool.h polkitbackendactionpool.c \
polkitbackendsessionmonitor.h polkitbackendsessionmonitor.c \
polkitbackendconfigsource.h polkitbackendconfigsource.c \
polkitbackendactionlookup.h polkitbackendactionlookup.c \
$(NULL)
libpolkit_backend_1_la_CFLAGS = \
......@@ -73,6 +76,7 @@ libpolkit_backend_1_la_LIBADD = \
$(GLIB_LIBS) \
$(EGG_DBUS_LIBS) \
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
$(top_builddir)/src/polkitlocal/libpolkit-local-1.la \
$(EXPAT_LIBS) \
$(NULL)
......
This diff is collapsed.
......@@ -27,6 +27,8 @@
#define __POLKIT_BACKEND_AUTHORITY_H
#include <glib-object.h>
#include <polkitlocal/polkitlocal.h>
#include "polkitbackendtypes.h"
G_BEGIN_DECLS
......@@ -165,17 +167,17 @@ struct _PolkitBackendAuthorityClass
PolkitIdentity *identity,
GError **error);
gboolean (*add_authorization) (PolkitBackendAuthority *authority,
PolkitSubject *caller,
PolkitIdentity *identity,
PolkitAuthorization *authorization,
GError **error);
gboolean (*add_authorization) (PolkitBackendAuthority *authority,
PolkitSubject *caller,
PolkitIdentity *identity,
PolkitLocalAuthorization *authorization,
GError **error);
gboolean (*remove_authorization) (PolkitBackendAuthority *authority,
PolkitSubject *caller,
PolkitIdentity *identity,
PolkitAuthorization *authorization,
GError **error);
gboolean (*remove_authorization) (PolkitBackendAuthority *authority,
PolkitSubject *caller,
PolkitIdentity *identity,
PolkitLocalAuthorization *authorization,
GError **error);
/* TODO: need something more efficient such that we don't watch all name changes */
void (*system_bus_name_owner_changed) (PolkitBackendAuthority *authority,
......@@ -239,13 +241,13 @@ GList *polkit_backend_authority_enumerate_authorizations (PolkitBackendAuthor
gboolean polkit_backend_authority_add_authorization (PolkitBackendAuthority *authority,
PolkitSubject *caller,
PolkitIdentity *identity,
PolkitAuthorization *authorization,
PolkitLocalAuthorization *authorization,
GError **error);
gboolean polkit_backend_authority_remove_authorization (PolkitBackendAuthority *authority,
PolkitSubject *caller,
PolkitIdentity *identity,
PolkitAuthorization *authorization,
PolkitLocalAuthorization *authorization,
GError **error);
gboolean polkit_backend_authority_register_authentication_agent (PolkitBackendAuthority *authority,
......
......@@ -213,7 +213,7 @@ polkit_backend_config_source_class_init (PolkitBackendConfigSourceClass *klass)
gobject_class->get_property = polkit_backend_config_source_get_property;
gobject_class->set_property = polkit_backend_config_source_set_property;
gobject_class->finalize = polkit_backend_config_source_constructed;
gobject_class->constructed = polkit_backend_config_source_constructed;
gobject_class->finalize = polkit_backend_config_source_finalize;
g_type_class_add_private (klass, sizeof (PolkitBackendConfigSourcePrivate));
......
......@@ -27,9 +27,6 @@
struct _PolkitBackendAuthority;
typedef struct _PolkitBackendAuthority PolkitBackendAuthority;
struct _PolkitBackendLocalAuthority;
typedef struct _PolkitBackendLocalAuthority PolkitBackendLocalAuthority;
struct _PolkitBackendSessionMonitor;
typedef struct _PolkitBackendSessionMonitor PolkitBackendSessionMonitor;
......@@ -39,5 +36,8 @@ typedef struct _PolkitBackendConfigSource PolkitBackendConfigSource;
struct _PolkitBackendActionLookup;
typedef struct _PolkitBackendActionLookup PolkitBackendActionLookup; /* Dummy typedef */
struct _PolkitBackendLocalAuthority;
typedef struct _PolkitBackendLocalAuthority PolkitBackendLocalAuthority;
#endif /* __POLKIT_BACKEND_TYPES_H */
......@@ -22,6 +22,7 @@ polkitd_1_SOURCES = \
polkitd_1_CFLAGS = \
-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DPOLKIT_LOCAL_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DG_LOG_DOMAIN=\"polkitd-1\" \
$(GLIB_CFLAGS) \
$(NULL)
......
NULL =
INCLUDES = \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
-I$(top_builddir)/src/polkit \
-I$(top_srcdir)/src/polkit \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS \
-D_REENTRANT \
-DEGG_DBUS_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
$(NULL)
lib_LTLIBRARIES=libpolkit-local-1.la
libpolkit_local_1includedir=$(includedir)/polkit-1/polkitlocal
libpolkit_local_1include_HEADERS = \
polkitlocal.h \
polkitlocaltypes.h \
polkitlocalauthority.h \
polkitlocalauthorization.h \
$(NULL)
libpolkit_local_1_la_SOURCES = \
polkitlocal.h \
polkitlocaltypes.h \
polkitlocalprivate.h \
polkitlocalauthority.c polkitlocalauthority.h \
polkitlocalauthorization.c polkitlocalauthorization.h \
$(NULL)
libpolkit_local_1_la_CFLAGS = \
-D_POLKIT_COMPILATION \
-D_POLKIT_LOCAL_COMPILATION \
$(GLIB_CFLAGS) \
$(EGG_DBUS_CFLAGS) \
$(NULL)
libpolkit_local_1_la_LIBADD = \
$(GLIB_LIBS) \
$(EGG_DBUS_LIBS) \
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
$(EXPAT_LIBS) \
$(NULL)
clean-local :
rm -f *~
/*
* Copyright (C) 2008 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
#ifndef __POLKIT_LOCAL_H
#define __POLKIT_LOCAL_H
#if !defined (POLKIT_LOCAL_I_KNOW_API_IS_SUBJECT_TO_CHANGE) && !defined (_POLKIT_LOCAL_COMPILATION)
#error "libpolkitlocal is unstable API and subject to change. You must define POLKIT_LOCAL_I_KNOW_API_IS_SUBJECT_TO_CHANGE to acknowledge this."
#endif
#define _POLKIT_LOCAL_INSIDE_POLKIT_LOCAL_H 1
#include <polkitlocal/polkitlocaltypes.h>
#include <polkitlocal/polkitlocalauthority.h>
#include <polkitlocal/polkitlocalauthorization.h>
#undef _POLKIT_LOCAL_INSIDE_POLKIT_LOCAL_H
#endif /* __POLKIT_LOCAL_H */
......@@ -23,127 +23,128 @@
# include "config.h"
#endif
#include "polkitauthorization.h"
#include "polkitlocalauthorization.h"
#include "polkitprivate.h"
#include "polkitlocalprivate.h"
/**
* SECTION:polkitauthorization
* @title: PolkitAuthorization
* @short_description: Authorization
* SECTION:polkitlocalauthorization
* @title: PolkitLocalAuthorization
* @short_description: Local Authorization
* @stability: Unstable
*
* This class represents an explicit authorization.