Version: @VERSION@
Requires: glib-2.0
Libs: -L${libdir} -lpolkit
-Cflags: -I${includedir}/libpolkit
+Cflags: -I${includedir}/PolicyKit
lib_LTLIBRARIES=libpolkit.la
-libpolkitincludedir=$(includedir)/libpolkit
-
-libpolkitinclude_HEADERS = \
- libpolkit.h
-
-libpolkit_la_SOURCES = \
- libpolkit.c libpolkit.h
+libpolkitincludedir=$(includedir)/PolicyKit/libpolkit
+
+libpolkitinclude_HEADERS = \
+ libpolkit.h \
+ libpolkit-context.h \
+ libpolkit-privilege.h \
+ libpolkit-resource.h \
+ libpolkit-seat.h \
+ libpolkit-session.h \
+ libpolkit-caller.h
+
+libpolkit_la_SOURCES = \
+ libpolkit.h libpolkit.c \
+ libpolkit-context.h libpolkit-context.c \
+ libpolkit-privilege.h libpolkit-privilege.c \
+ libpolkit-resource.h libpolkit-resource.c \
+ libpolkit-seat.h libpolkit-seat.c \
+ libpolkit-session.h libpolkit-session.c \
+ libpolkit-caller.h libpolkit-caller.c
libpolkit_la_LIBADD = @GLIB_LIBS@
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-caller.c : callers
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <glib.h>
+#include "libpolkit-caller.h"
+
+struct PolKitCaller_s
+{
+};
+
+PolKitCaller *
+libpolkit_caller_new (void)
+{
+ return NULL;
+}
+
+PolKitCaller *
+libpolkit_caller_ref (PolKitCaller *caller)
+{
+ return caller;
+}
+
+void
+libpolkit_caller_set_dbus_name (PolKitCaller *caller, const char *dbus_name)
+{
+}
+
+void
+libpolkit_caller_set_uid (PolKitCaller *caller, uid_t uid)
+{
+}
+
+void
+libpolkit_caller_set_pid (PolKitCaller *caller, pid_t pid)
+{
+}
+
+void
+libpolkit_caller_set_selinux_context (PolKitCaller *caller, const char *selinux_context)
+{
+}
+
+void
+libpolkit_caller_set_ck_session (PolKitCaller *caller, PolKitSession *session)
+{
+}
+
+gboolean
+libpolkit_caller_get_dbus_name (PolKitCaller *caller, char **out_dbus_name)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_caller_get_uid (PolKitCaller *caller, uid_t *out_uid)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_caller_get_pid (PolKitCaller *caller, uid_t *out_pid)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_caller_get_selinux_context (PolKitCaller *caller, char *out_selinux_context)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_caller_get_ck_session (PolKitCaller *caller, PolKitSession **out_session)
+{
+ return FALSE;
+}
+
+void
+libpolkit_caller_unref (PolKitCaller *caller)
+{
+}
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-caller.h : callers
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#ifndef LIBPOLKIT_CALLER_H
+#define LIBPOLKIT_CALLER_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <glib.h>
+
+#include <libpolkit/libpolkit-session.h>
+
+struct PolKitCaller_s;
+typedef struct PolKitCaller_s PolKitCaller;
+
+PolKitCaller *libpolkit_caller_new (void);
+PolKitCaller *libpolkit_caller_ref (PolKitCaller *caller);
+void libpolkit_caller_set_dbus_name (PolKitCaller *caller, const char *dbus_name);
+void libpolkit_caller_set_uid (PolKitCaller *caller, uid_t uid);
+void libpolkit_caller_set_pid (PolKitCaller *caller, pid_t pid);
+void libpolkit_caller_set_selinux_context (PolKitCaller *caller, const char *selinux_context);
+void libpolkit_caller_set_ck_session (PolKitCaller *caller, PolKitSession *session);
+gboolean libpolkit_caller_get_dbus_name (PolKitCaller *caller, char **out_dbus_name);
+gboolean libpolkit_caller_get_uid (PolKitCaller *caller, uid_t *out_uid);
+gboolean libpolkit_caller_get_pid (PolKitCaller *caller, uid_t *out_pid);
+gboolean libpolkit_caller_get_selinux_context (PolKitCaller *caller, char *out_selinux_context);
+gboolean libpolkit_caller_get_ck_session (PolKitCaller *caller, PolKitSession **out_session);
+void libpolkit_caller_unref (PolKitCaller *caller);
+
+#endif /* LIBPOLKIT_H */
+
+
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-context.c : context for PolicyKit
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <glib.h>
+#include "libpolkit-context.h"
+
+struct PolKitContext_s
+{
+};
+
+PolKitContext *
+libpolkit_context_new (void)
+{
+ return FALSE;
+}
+
+PolKitContext *
+libpolkit_context_ref (PolKitContext *pk_context)
+{
+ return pk_context;
+}
+
+void
+libpolkit_context_set_config_changed (PolKitContext *pk_context,
+ PolKitContextConfigChangedCB cb,
+ gpointer user_data)
+{
+}
+
+void
+libpolkit_context_unref (PolKitContext *pk_context)
+{
+}
+
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-context.h : PolicyKit context
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#ifndef LIBPOLKIT_CONTEXT_H
+#define LIBPOLKIT_CONTEXT_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <glib.h>
+
+struct PolKitContext_s;
+
+typedef struct PolKitContext_s PolKitContext;
+
+/**
+ * PolKitContextConfigChangedCB:
+ * @pk_context: PolicyKit context
+ * @user_data: user data
+ *
+ * Called when configuration changes. Mechanisms should listen on this
+ * signal and e.g. reconfigure all permissions / acl's they have set
+ * in response to policy decisions made from information provided by
+ * PolicyKit.
+ */
+typedef void (*PolKitContextConfigChangedCB) (PolKitContext *pk_context,
+ gpointer user_data);
+
+PolKitContext *libpolkit_context_new (void);
+PolKitContext *libpolkit_context_ref (PolKitContext *pk_context);
+void libpolkit_context_set_config_changed (PolKitContext *pk_context,
+ PolKitContextConfigChangedCB cb,
+ gpointer user_data);
+void libpolkit_context_unref (PolKitContext *pk_context);
+
+
+#endif /* LIBPOLKIT_CONTEXT_H */
+
+
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-privilege.c : privilege
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <glib.h>
+#include "libpolkit-privilege.h"
+
+struct PolKitPrivilege_s
+{
+};
+
+PolKitPrivilege *
+libpolkit_privilege_new (void)
+{
+ return NULL;
+}
+
+PolKitPrivilege *
+libpolkit_privilege_ref (PolKitPrivilege *privilege)
+{
+ return privilege;
+}
+
+void
+libpolkit_privilege_set_privilege_id (PolKitPrivilege *privilege, const char *privilege_id)
+{
+}
+
+gboolean
+libpolkit_privilege_get_privilege_id (PolKitPrivilege *privilege, char **out_privilege_id)
+{
+ return FALSE;
+}
+
+void
+libpolkit_privilege_unref (PolKitPrivilege *privilege)
+{
+}
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-privilege.h : privileges
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#ifndef LIBPOLKIT_PRIVILEGE_H
+#define LIBPOLKIT_PRIVILEGE_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <glib.h>
+
+struct PolKitPrivilege_s;
+typedef struct PolKitPrivilege_s PolKitPrivilege;
+
+PolKitPrivilege *libpolkit_privilege_new (void);
+PolKitPrivilege *libpolkit_privilege_ref (PolKitPrivilege *privilege);
+void libpolkit_privilege_set_privilege_id (PolKitPrivilege *privilege, const char *privilege_id);
+gboolean libpolkit_privilege_get_privilege_id (PolKitPrivilege *privilege, char **out_privilege_id);
+void libpolkit_privilege_unref (PolKitPrivilege *privilege);
+
+#endif /* LIBPOLKIT_PRIVILEGE_H */
+
+
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-resource.c : resources
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <glib.h>
+#include "libpolkit-resource.h"
+
+struct PolKitResource_s
+{
+};
+
+PolKitResource *
+libpolkit_resource_new (void)
+{
+ return NULL;
+}
+
+PolKitResource *
+libpolkit_resource_ref (PolKitResource *resource)
+{
+ return resource;
+}
+
+void
+libpolkit_resource_set_resource_type (PolKitResource *resource, const char *resource_type)
+{
+}
+
+void
+libpolkit_resource_set_resource_id (PolKitResource *resource, const char *resource_id)
+{
+}
+
+gboolean
+libpolkit_resource_get_resource_type (PolKitResource *resource, char **out_resource_type)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_resource_get_resource_id (PolKitResource *resource, char **out_resource_id)
+{
+ return FALSE;
+}
+
+void
+libpolkit_resource_unref (PolKitResource *resource)
+{
+}
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-resource.h : resources
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#ifndef LIBPOLKIT_RESOURCE_H
+#define LIBPOLKIT_RESOURCE_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <glib.h>
+
+struct PolKitResource_s;
+typedef struct PolKitResource_s PolKitResource;
+
+PolKitResource *libpolkit_resource_new (void);
+PolKitResource *libpolkit_resource_ref (PolKitResource *resource);
+void libpolkit_resource_set_resource_type (PolKitResource *resource, const char *resource_type);
+void libpolkit_resource_set_resource_id (PolKitResource *resource, const char *resource_id);
+gboolean libpolkit_resource_get_resource_type (PolKitResource *resource, char **out_resource_type);
+gboolean libpolkit_resource_get_resource_id (PolKitResource *resource, char **out_resource_id);
+void libpolkit_resource_unref (PolKitResource *resource);
+
+#endif /* LIBPOLKIT_RESOURCE_H */
+
+
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-seat.c : seat
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <glib.h>
+#include "libpolkit-seat.h"
+
+struct PolKitSeat_s
+{
+};
+
+PolKitSeat *
+libpolkit_seat_new (void)
+{
+ return NULL;
+}
+
+PolKitSeat *
+libpolkit_seat_ref (PolKitSeat *seat)
+{
+ return seat;
+}
+
+void
+libpolkit_seat_set_ck_objref (PolKitSeat *seat, const char *ck_objref)
+{
+}
+
+gboolean
+libpolkit_seat_get_ck_objref (PolKitSeat *seat, char **out_ck_objref)
+{
+ return FALSE;
+}
+
+void
+libpolkit_seat_unref (PolKitSeat *seat)
+{
+}
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-seat.h : seats
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#ifndef LIBPOLKIT_SEAT_H
+#define LIBPOLKIT_SEAT_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <glib.h>
+
+struct PolKitSeat_s;
+typedef struct PolKitSeat_s PolKitSeat;
+
+PolKitSeat *libpolkit_seat_new (void);
+PolKitSeat *libpolkit_seat_ref (PolKitSeat *seat);
+void libpolkit_seat_set_ck_objref (PolKitSeat *seat, const char *ck_objref);
+gboolean libpolkit_seat_get_ck_objref (PolKitSeat *seat, char **out_ck_objref);
+void libpolkit_seat_unref (PolKitSeat *seat);
+
+#endif /* LIBPOLKIT_SEAT_H */
+
+
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-session.c : sessions
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ **************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <glib.h>
+#include "libpolkit-session.h"
+
+struct PolKitSession_s
+{
+};
+
+PolKitSession *
+libpolkit_session_new (void)
+{
+ return NULL;
+}
+
+PolKitSession *
+libpolkit_session_ref (PolKitSession *session)
+{
+ return NULL;
+}
+
+void
+libpolkit_session_set_uid (PolKitSession *session, uid_t uid)
+{
+}
+
+void
+libpolkit_session_set_ck_objref (PolKitSession *session, const char *ck_objref)
+{
+}
+
+void
+libpolkit_session_set_ck_is_active (PolKitSession *session, gboolean is_active)
+{
+}
+
+void
+libpolkit_session_set_ck_is_local (PolKitSession *session, gboolean is_local)
+{
+}
+
+void
+libpolkit_session_set_ck_remote_host (PolKitSession *session, const char *remote_host)
+{
+}
+
+void
+libpolkit_session_set_ck_seat (PolKitSession *session, PolKitSeat *seat)
+{
+}
+
+gboolean
+libpolkit_session_get_uid (PolKitSession *session, uid_t *out_uid)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_session_get_ck_objref (PolKitSession *session, char **out_ck_objref)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_session_get_ck_is_active (PolKitSession *session, gboolean *out_is_active)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_session_get_ck_is_local (PolKitSession *session, gboolean *out_is_local)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_session_get_ck_remote_host (PolKitSession *session, char *out_remote_host)
+{
+ return FALSE;
+}
+
+gboolean
+libpolkit_session_get_ck_seat (PolKitSession *session, PolKitSeat **out_seat)
+{
+ return FALSE;
+}
+
+
+void
+libpolkit_session_unref (PolKitSession *session)
+{
+}
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * libpolkit-session.h : sessions
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#ifndef LIBPOLKIT_SESSION_H
+#define LIBPOLKIT_SESSION_H
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <glib.h>
+
+#include <libpolkit/libpolkit-seat.h>
+
+struct PolKitSession_s;
+typedef struct PolKitSession_s PolKitSession;
+
+PolKitSession *libpolkit_session_new (void);
+PolKitSession *libpolkit_session_ref (PolKitSession *session);
+void libpolkit_session_set_uid (PolKitSession *session, uid_t uid);
+void libpolkit_session_set_ck_objref (PolKitSession *session, const char *ck_objref);
+void libpolkit_session_set_ck_is_active (PolKitSession *session, gboolean is_active);
+void libpolkit_session_set_ck_is_local (PolKitSession *session, gboolean is_local);
+void libpolkit_session_set_ck_remote_host (PolKitSession *session, const char *remote_host);
+void libpolkit_session_set_ck_seat (PolKitSession *session, PolKitSeat *seat);
+gboolean libpolkit_session_get_uid (PolKitSession *session, uid_t *out_uid);
+gboolean libpolkit_session_get_ck_objref (PolKitSession *session, char **out_ck_objref);
+gboolean libpolkit_session_get_ck_is_active (PolKitSession *session, gboolean *out_is_active);
+gboolean libpolkit_session_get_ck_is_local (PolKitSession *session, gboolean *out_is_local);
+gboolean libpolkit_session_get_ck_remote_host (PolKitSession *session, char *out_remote_host);
+gboolean libpolkit_session_get_ck_seat (PolKitSession *session, PolKitSeat **out_seat);
+void libpolkit_session_unref (PolKitSession *session);
+
+#endif /* LIBPOLKIT_SESSION_H */
+
+
#include <glib.h>
#include "libpolkit.h"
-struct PolKitContext_s
-{
-};
-
-PolKitContext *
-libpolkit_context_new (void)
-{
- return FALSE;
-}
-
-PolKitContext *
-libpolkit_context_ref (PolKitContext *pk_context)
-{
- return pk_context;
-}
-
-void
-libpolkit_context_set_config_changed (PolKitContext *pk_context,
- PolKitContextConfigChangedCB cb,
- gpointer user_data)
-{
-}
-
-void
-libpolkit_context_unref (PolKitContext *pk_context)
-{
-}
-
-/******************************************************************************************************/
-
-struct PolKitPrivilege_s
-{
-};
-
-PolKitPrivilege *
-libpolkit_privilege_new (void)
-{
- return NULL;
-}
-
-PolKitPrivilege *
-libpolkit_privilege_ref (PolKitPrivilege *privilege)
-{
- return privilege;
-}
-
-void
-libpolkit_privilege_set_privilege_id (PolKitPrivilege *privilege, const char *privilege_id)
-{
-}
-
-gboolean
-libpolkit_privilege_get_privilege_id (PolKitPrivilege *privilege, char **out_privilege_id)
-{
- return FALSE;
-}
-
-void
-libpolkit_privilege_unref (PolKitPrivilege *privilege)
-{
-}
-
-/******************************************************************************************************/
-
-struct PolKitResource_s
-{
-};
-
-PolKitResource *
-libpolkit_resource_new (void)
-{
- return NULL;
-}
-
-PolKitResource *
-libpolkit_resource_ref (PolKitResource *resource)
-{
- return resource;
-}
-
-void
-libpolkit_resource_set_resource_type (PolKitResource *resource, const char *resource_type)
-{
-}
-
-void
-libpolkit_resource_set_resource_id (PolKitResource *resource, const char *resource_id)
-{
-}
-
-gboolean
-libpolkit_resource_get_resource_type (PolKitResource *resource, char **out_resource_type)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_resource_get_resource_id (PolKitResource *resource, char **out_resource_id)
-{
- return FALSE;
-}
-
-void
-libpolkit_resource_unref (PolKitResource *resource)
-{
-}
-
-/******************************************************************************************************/
-
-struct PolKitSeat_s
-{
-};
-
-PolKitSeat *
-libpolkit_seat_new (void)
-{
- return NULL;
-}
-
-PolKitSeat *
-libpolkit_seat_ref (PolKitSeat *seat)
-{
- return seat;
-}
-
-void
-libpolkit_seat_set_ck_objref (PolKitSeat *seat, const char *ck_objref)
-{
-}
-
-gboolean
-libpolkit_seat_get_ck_objref (PolKitSeat *seat, char **out_ck_objref)
-{
- return FALSE;
-}
-
-void
-libpolkit_seat_unref (PolKitSeat *seat)
-{
-}
-
-/******************************************************************************************************/
-
-struct PolKitSession_s
-{
-};
-
-PolKitSession *
-libpolkit_session_new (void)
-{
- return NULL;
-}
-
-PolKitSession *
-libpolkit_session_ref (PolKitSession *session)
-{
- return NULL;
-}
-
-void
-libpolkit_session_set_uid (PolKitSession *session, uid_t uid)
-{
-}
-
-void
-libpolkit_session_set_ck_objref (PolKitSession *session, const char *ck_objref)
-{
-}
-
-void
-libpolkit_session_set_ck_is_active (PolKitSession *session, gboolean is_active)
-{
-}
-
-void
-libpolkit_session_set_ck_is_local (PolKitSession *session, gboolean is_local)
-{
-}
-
-void
-libpolkit_session_set_ck_remote_host (PolKitSession *session, const char *remote_host)
-{
-}
-
-void
-libpolkit_session_set_ck_seat (PolKitSession *session, PolKitSeat *seat)
-{
-}
-
-gboolean
-libpolkit_session_get_uid (PolKitSession *session, uid_t *out_uid)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_session_get_ck_objref (PolKitSession *session, char **out_ck_objref)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_session_get_ck_is_active (PolKitSession *session, gboolean *out_is_active)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_session_get_ck_is_local (PolKitSession *session, gboolean *out_is_local)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_session_get_ck_remote_host (PolKitSession *session, char *out_remote_host)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_session_get_ck_seat (PolKitSession *session, PolKitSeat **out_seat)
-{
- return FALSE;
-}
-
-
-void
-libpolkit_session_unref (PolKitSession *session)
-{
-}
-
-/******************************************************************************************************/
-
-struct PolKitCaller_s
-{
-};
-
-PolKitCaller *
-libpolkit_caller_new (void)
-{
- return NULL;
-}
-
-PolKitCaller *
-libpolkit_caller_ref (PolKitCaller *caller)
-{
- return caller;
-}
-
-void
-libpolkit_caller_set_dbus_name (PolKitCaller *caller, const char *dbus_name)
-{
-}
-
-void
-libpolkit_caller_set_uid (PolKitCaller *caller, uid_t uid)
-{
-}
-
-void
-libpolkit_caller_set_pid (PolKitCaller *caller, pid_t pid)
-{
-}
-
-void
-libpolkit_caller_set_selinux_context (PolKitCaller *caller, const char *selinux_context)
-{
-}
-
-void
-libpolkit_caller_set_ck_session (PolKitCaller *caller, PolKitSession *session)
-{
-}
-
-gboolean
-libpolkit_caller_get_dbus_name (PolKitCaller *caller, char **out_dbus_name)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_caller_get_uid (PolKitCaller *caller, uid_t *out_uid)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_caller_get_pid (PolKitCaller *caller, uid_t *out_pid)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_caller_get_selinux_context (PolKitCaller *caller, char *out_selinux_context)
-{
- return FALSE;
-}
-
-gboolean
-libpolkit_caller_get_ck_session (PolKitCaller *caller, PolKitSession **out_session)
-{
- return FALSE;
-}
-
-void
-libpolkit_caller_unref (PolKitCaller *caller)
-{
-}
-
-/******************************************************************************************************/
-
-
/**
* libpolkit_get_seat_resource_association:
* @pk_context: the PolicyKit context
#include <sys/types.h>
#include <glib.h>
-struct PolKitContext_s;
-typedef struct PolKitContext_s PolKitContext;
-
-/**
- * PolKitContextConfigChangedCB:
- * @pk_context: PolicyKit context
- * @resources_associated_with_seat: A NULL terminated array of resources associated with the seat
- * @user_data: user data
- *
- * Called when configuration changes. Mechanisms should listen on this
- * signal and e.g. reconfigure all permissions / acl's they have set
- * in response to policy decisions made from information provided by
- * PolicyKit.
- */
-typedef void (*PolKitContextConfigChangedCB) (PolKitContext *pk_context,
- gpointer user_data);
-
-PolKitContext *libpolkit_context_new (void);
-PolKitContext *libpolkit_context_ref (PolKitContext *pk_context);
-void libpolkit_context_set_config_changed (PolKitContext *pk_context,
- PolKitContextConfigChangedCB cb,
- gpointer user_data);
-void libpolkit_context_unref (PolKitContext *pk_context);
-
-
-struct PolKitPrivilege_s;
-typedef struct PolKitPrivilege_s PolKitPrivilege;
-
-PolKitPrivilege *libpolkit_privilege_new (void);
-PolKitPrivilege *libpolkit_privilege_ref (PolKitPrivilege *privilege);
-void libpolkit_privilege_set_privilege_id (PolKitPrivilege *privilege, const char *privilege_id);
-gboolean libpolkit_privilege_get_privilege_id (PolKitPrivilege *privilege, char **out_privilege_id);
-void libpolkit_privilege_unref (PolKitPrivilege *privilege);
-
-struct PolKitResource_s;
-typedef struct PolKitResource_s PolKitResource;
-
-PolKitResource *libpolkit_resource_new (void);
-PolKitResource *libpolkit_resource_ref (PolKitResource *resource);
-void libpolkit_resource_set_resource_type (PolKitResource *resource, const char *resource_type);
-void libpolkit_resource_set_resource_id (PolKitResource *resource, const char *resource_id);
-gboolean libpolkit_resource_get_resource_type (PolKitResource *resource, char **out_resource_type);
-gboolean libpolkit_resource_get_resource_id (PolKitResource *resource, char **out_resource_id);
-void libpolkit_resource_unref (PolKitResource *resource);
-
-
-struct PolKitSeat_s;
-typedef struct PolKitSeat_s PolKitSeat;
-
-PolKitSeat *libpolkit_seat_new (void);
-PolKitSeat *libpolkit_seat_ref (PolKitSeat *seat);
-void libpolkit_seat_set_ck_objref (PolKitSeat *seat, const char *ck_objref);
-gboolean libpolkit_seat_get_ck_objref (PolKitSeat *seat, char **out_ck_objref);
-void libpolkit_seat_unref (PolKitSeat *seat);
-
-
-struct PolKitSession_s;
-typedef struct PolKitSession_s PolKitSession;
-
-PolKitSession *libpolkit_session_new (void);
-PolKitSession *libpolkit_session_ref (PolKitSession *session);
-void libpolkit_session_set_uid (PolKitSession *session, uid_t uid);
-void libpolkit_session_set_ck_objref (PolKitSession *session, const char *ck_objref);
-void libpolkit_session_set_ck_is_active (PolKitSession *session, gboolean is_active);
-void libpolkit_session_set_ck_is_local (PolKitSession *session, gboolean is_local);
-void libpolkit_session_set_ck_remote_host (PolKitSession *session, const char *remote_host);
-void libpolkit_session_set_ck_seat (PolKitSession *session, PolKitSeat *seat);
-gboolean libpolkit_session_get_uid (PolKitSession *session, uid_t *out_uid);
-gboolean libpolkit_session_get_ck_objref (PolKitSession *session, char **out_ck_objref);
-gboolean libpolkit_session_get_ck_is_active (PolKitSession *session, gboolean *out_is_active);
-gboolean libpolkit_session_get_ck_is_local (PolKitSession *session, gboolean *out_is_local);
-gboolean libpolkit_session_get_ck_remote_host (PolKitSession *session, char *out_remote_host);
-gboolean libpolkit_session_get_ck_seat (PolKitSession *session, PolKitSeat **out_seat);
-void libpolkit_session_unref (PolKitSession *session);
-
-
-struct PolKitCaller_s;
-typedef struct PolKitCaller_s PolKitCaller;
-
-PolKitCaller *libpolkit_caller_new (void);
-PolKitCaller *libpolkit_caller_ref (PolKitCaller *caller);
-void libpolkit_caller_set_dbus_name (PolKitCaller *caller, const char *dbus_name);
-void libpolkit_caller_set_uid (PolKitCaller *caller, uid_t uid);
-void libpolkit_caller_set_pid (PolKitCaller *caller, pid_t pid);
-void libpolkit_caller_set_selinux_context (PolKitCaller *caller, const char *selinux_context);
-void libpolkit_caller_set_ck_session (PolKitCaller *caller, PolKitSession *session);
-gboolean libpolkit_caller_get_dbus_name (PolKitCaller *caller, char **out_dbus_name);
-gboolean libpolkit_caller_get_uid (PolKitCaller *caller, uid_t *out_uid);
-gboolean libpolkit_caller_get_pid (PolKitCaller *caller, uid_t *out_pid);
-gboolean libpolkit_caller_get_selinux_context (PolKitCaller *caller, char *out_selinux_context);
-gboolean libpolkit_caller_get_ck_session (PolKitCaller *caller, PolKitSession **out_session);
-void libpolkit_caller_unref (PolKitCaller *caller);
+#include <libpolkit/libpolkit-context.h>
+#include <libpolkit/libpolkit-privilege.h>
+#include <libpolkit/libpolkit-resource.h>
+#include <libpolkit/libpolkit-seat.h>
+#include <libpolkit/libpolkit-session.h>
+#include <libpolkit/libpolkit-caller.h>
/**
* PolKitSeatVisitorCB: