12912Sartem /*************************************************************************** 22912Sartem * CVSID: $Id: hal-storage-mount.c,v 1.7 2006/06/21 00:44:03 david Exp $ 32912Sartem * 42912Sartem * hal-storage-mount.c : Mount wrapper 52912Sartem * 62912Sartem * Copyright (C) 2006 David Zeuthen, <david@fubar.dk> 72912Sartem * 82912Sartem * This program is free software; you can redistribute it and/or modify 92912Sartem * it under the terms of the GNU General Public License as published by 102912Sartem * the Free Software Foundation; either version 2 of the License, or 112912Sartem * (at your option) any later version. 122912Sartem * 132912Sartem * This program is distributed in the hope that it will be useful, 142912Sartem * but WITHOUT ANY WARRANTY; without even the implied warranty of 152912Sartem * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 162912Sartem * GNU General Public License for more details. 172912Sartem * 182912Sartem * You should have received a copy of the GNU General Public License 192912Sartem * along with this program; if not, write to the Free Software 202912Sartem * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 212912Sartem * 222912Sartem **************************************************************************/ 232912Sartem 242912Sartem #ifndef HAL_STORAGE_SHARED_H 252912Sartem #define HAL_STORAGE_SHARED_H 262912Sartem 272912Sartem #include <libhal.h> 282912Sartem #include <libhal-storage.h> 292912Sartem #ifdef HAVE_POLKIT 302912Sartem #include <libpolkit.h> 312912Sartem #endif 322912Sartem #ifdef sun 332912Sartem #include <bsm/adt.h> 342912Sartem #include <bsm/adt_event.h> 35*6654Snp146283 #include "../utils/adt_data.h" 362912Sartem #endif 372912Sartem 382912Sartem /*#define DEBUG*/ 392912Sartem #define DEBUG 402912Sartem 412912Sartem gboolean mtab_open (gpointer *handle); 422912Sartem char *mtab_next (gpointer handle, char **mount_point); 432912Sartem void mtab_close (gpointer handle); 442912Sartem 452912Sartem gboolean fstab_open (gpointer *handle); 462912Sartem char *fstab_next (gpointer handle, char **mount_point); 472912Sartem void fstab_close (gpointer handle); 482912Sartem 492912Sartem gboolean lock_hal_mtab (void); 502912Sartem void unlock_hal_mtab (void); 512912Sartem 522912Sartem void unknown_error (const char *detail); 532912Sartem 542912Sartem void handle_unmount (LibHalContext *hal_ctx, 552912Sartem #ifdef HAVE_POLKIT 562912Sartem LibPolKitContext *pol_ctx, 572912Sartem #endif 582912Sartem const char *udi, 592912Sartem LibHalVolume *volume, LibHalDrive *drive, const char *device, 602912Sartem const char *invoked_by_uid, const char *invoked_by_syscon_name, 612912Sartem gboolean option_lazy, gboolean option_force, 622912Sartem DBusConnection *system_bus); 632912Sartem 642912Sartem void handle_eject (LibHalContext *hal_ctx, 652912Sartem #ifdef HAVE_POLKIT 662912Sartem LibPolKitContext *pol_ctx, 672912Sartem #endif 682912Sartem const char *udi, 692912Sartem LibHalDrive *drive, const char *device, 702912Sartem const char *invoked_by_uid, const char *invoked_by_syscon_name, 712912Sartem gboolean closetray, DBusConnection *system_bus); 722912Sartem 732912Sartem #ifdef sun 742912Sartem char *auth_from_privilege(const char *privilege); 752912Sartem void audit_volume(const adt_export_data_t *imported_state, au_event_t event_id, int result, 762912Sartem const char *auth_used, const char *mount_point, const char *device, const char *options); 772912Sartem #endif /* sun */ 782912Sartem 792912Sartem #endif /* HAL_STORAGE_SHARED_H */ 802912Sartem 81