1 /***************************************************************************
2 * CVSID: $Id: hal-storage-mount.c,v 1.7 2006/06/21 00:44:03 david Exp $
4 * hal-storage-mount.c : Mount wrapper
6 * Copyright (C) 2006 David Zeuthen, <david@fubar.dk>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 **************************************************************************/
24 #ifndef HAL_STORAGE_SHARED_H
25 #define HAL_STORAGE_SHARED_H
28 #include <libhal-storage.h>
30 #include <libpolkit.h>
34 #include <bsm/adt_event.h>
35 #include "../utils/adt_data.h"
41 gboolean
mtab_open (gpointer
*handle
);
42 char *mtab_next (gpointer handle
, char **mount_point
);
43 void mtab_close (gpointer handle
);
45 gboolean
fstab_open (gpointer
*handle
);
46 char *fstab_next (gpointer handle
, char **mount_point
);
47 void fstab_close (gpointer handle
);
49 gboolean
lock_hal_mtab (void);
50 void unlock_hal_mtab (void);
52 void unknown_error (const char *detail
);
54 void handle_unmount (LibHalContext
*hal_ctx
,
56 LibPolKitContext
*pol_ctx
,
59 LibHalVolume
*volume
, LibHalDrive
*drive
, const char *device
,
60 const char *invoked_by_uid
, const char *invoked_by_syscon_name
,
61 gboolean option_lazy
, gboolean option_force
,
62 DBusConnection
*system_bus
);
64 void handle_eject (LibHalContext
*hal_ctx
,
66 LibPolKitContext
*pol_ctx
,
69 LibHalDrive
*drive
, const char *device
,
70 const char *invoked_by_uid
, const char *invoked_by_syscon_name
,
71 gboolean closetray
, DBusConnection
*system_bus
);
74 char *auth_from_privilege(const char *privilege
);
75 void audit_volume(const adt_export_data_t
*imported_state
, au_event_t event_id
, int result
,
76 const char *auth_used
, const char *mount_point
, const char *device
, const char *options
);
79 #endif /* HAL_STORAGE_SHARED_H */