| 1 |
/* |
| 2 |
* Copyright (C) 2008 Red Hat, Inc. |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General |
| 15 |
* Public License along with this library; if not, write to the |
| 16 |
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
| 17 |
* Boston, MA 02111-1307, USA. |
| 18 |
* |
| 19 |
* Author: David Zeuthen <[email protected]> |
| 20 |
*/ |
| 21 |
|
| 22 |
#if !defined (_POLKIT_BACKEND_COMPILATION) || defined(_POLKIT_BACKEND_INSIDE_POLKIT_BACKEND_H) |
| 23 |
#error "This is a private header file." |
| 24 |
#endif |
| 25 |
|
| 26 |
#ifndef __POLKIT_BACKEND_SESSION_MONITOR_H |
| 27 |
#define __POLKIT_BACKEND_SESSION_MONITOR_H |
| 28 |
|
| 29 |
#include <glib-object.h> |
| 30 |
#include <polkitbackend/polkitbackendtypes.h> |
| 31 |
|
| 32 |
G_BEGIN_DECLS |
| 33 |
|
| 34 |
#define POLKIT_BACKEND_TYPE_SESSION_MONITOR (polkit_backend_session_monitor_get_type ()) |
| 35 |
#define POLKIT_BACKEND_SESSION_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), POLKIT_BACKEND_TYPE_SESSION_MONITOR, PolkitBackendSessionMonitor)) |
| 36 |
#define POLKIT_BACKEND_SESSION_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), POLKIT_BACKEND_TYPE_SESSION_MONITOR, PolkitBackendSessionMonitorClass)) |
| 37 |
#define POLKIT_BACKEND_SESSION_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), POLKIT_BACKEND_TYPE_SESSION_MONITOR,PolkitBackendSessionMonitorClass)) |
| 38 |
#define POLKIT_BACKEND_IS_SESSION_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), POLKIT_BACKEND_TYPE_SESSION_MONITOR)) |
| 39 |
#define POLKIT_BACKEND_IS_SESSION_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), POLKIT_BACKEND_TYPE_SESSION_MONITOR)) |
| 40 |
|
| 41 |
typedef struct _PolkitBackendSessionMonitor PolkitBackendSessionMonitor; |
| 42 |
typedef struct _PolkitBackendSessionMonitorClass PolkitBackendSessionMonitorClass; |
| 43 |
|
| 44 |
GType polkit_backend_session_monitor_get_type (void) G_GNUC_CONST; |
| 45 |
PolkitBackendSessionMonitor *polkit_backend_session_monitor_new (void); |
| 46 |
GList *polkit_backend_session_monitor_get_sessions (PolkitBackendSessionMonitor *monitor); |
| 47 |
|
| 48 |
PolkitIdentity *polkit_backend_session_monitor_get_user_for_subject (PolkitBackendSessionMonitor *monitor, |
| 49 |
PolkitSubject *subject, |
| 50 |
gboolean *result_matches, |
| 51 |
GError **error); |
| 52 |
|
| 53 |
PolkitSubject *polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMonitor *monitor, |
| 54 |
PolkitSubject *subject, |
| 55 |
GError **error); |
| 56 |
|
| 57 |
gboolean polkit_backend_session_monitor_is_session_local (PolkitBackendSessionMonitor *monitor, |
| 58 |
PolkitSubject *session); |
| 59 |
|
| 60 |
gboolean polkit_backend_session_monitor_is_session_active (PolkitBackendSessionMonitor *monitor, |
| 61 |
PolkitSubject *session); |
| 62 |
|
| 63 |
G_END_DECLS |
| 64 |
|
| 65 |
#endif /* __POLKIT_BACKEND_SESSION_MONITOR_H */ |
| 66 |
|