118c2aff7Sartem /*************************************************************************** 218c2aff7Sartem * CVSID: $Id$ 318c2aff7Sartem * 418c2aff7Sartem * osspec.h : OS Specific interface 518c2aff7Sartem * 618c2aff7Sartem * Copyright (C) 2003 David Zeuthen, <david@fubar.dk> 718c2aff7Sartem * 818c2aff7Sartem * Licensed under the Academic Free License version 2.1 918c2aff7Sartem * 1018c2aff7Sartem * This program is free software; you can redistribute it and/or modify 1118c2aff7Sartem * it under the terms of the GNU General Public License as published by 1218c2aff7Sartem * the Free Software Foundation; either version 2 of the License, or 1318c2aff7Sartem * (at your option) any later version. 1418c2aff7Sartem * 1518c2aff7Sartem * This program is distributed in the hope that it will be useful, 1618c2aff7Sartem * but WITHOUT ANY WARRANTY; without even the implied warranty of 1718c2aff7Sartem * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1818c2aff7Sartem * GNU General Public License for more details. 1918c2aff7Sartem * 2018c2aff7Sartem * You should have received a copy of the GNU General Public License 2118c2aff7Sartem * along with this program; if not, write to the Free Software 2218c2aff7Sartem * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 2318c2aff7Sartem * 2418c2aff7Sartem **************************************************************************/ 2518c2aff7Sartem 2618c2aff7Sartem #ifndef OSSPEC_H 2718c2aff7Sartem #define OSSPEC_H 2818c2aff7Sartem 2918c2aff7Sartem #include <stdarg.h> 3018c2aff7Sartem #include <stdint.h> 3118c2aff7Sartem #include <dbus/dbus.h> 3218c2aff7Sartem 3318c2aff7Sartem #include "device.h" 3418c2aff7Sartem 3518c2aff7Sartem /** Initialize the kernel specific parts of the daemon */ 3618c2aff7Sartem void osspec_init (void); 3718c2aff7Sartem 3818c2aff7Sartem /** Probe all devices present in the system and build the device list */ 3918c2aff7Sartem void osspec_probe (void); 4018c2aff7Sartem 4118c2aff7Sartem /* Called by kernel specific parts when probing is done */ 4218c2aff7Sartem void osspec_probe_done (void); 4318c2aff7Sartem 4418c2aff7Sartem gboolean osspec_device_rescan (HalDevice *d); 4518c2aff7Sartem 4618c2aff7Sartem gboolean osspec_device_reprobe (HalDevice *d); 4718c2aff7Sartem 4818c2aff7Sartem /* Called to refresh mount state for a device object of capability volume */ 4918c2aff7Sartem void osspec_refresh_mount_state_for_block_device (HalDevice *d); 5018c2aff7Sartem 51*55fea89dSDan Cross /** Called when the org.freedesktop.Hal service receives a messaged that the generic daemon 5218c2aff7Sartem * doesn't handle. Can be used for intercepting messages from kernel or core OS components. 5318c2aff7Sartem * 5418c2aff7Sartem * @param connection D-BUS connection 5518c2aff7Sartem * @param message Message 5618c2aff7Sartem * @param user_data User data 5718c2aff7Sartem * @return What to do with the message 5818c2aff7Sartem */ 5918c2aff7Sartem DBusHandlerResult osspec_filter_function (DBusConnection *connection, DBusMessage *message, void *user_data); 6018c2aff7Sartem 6118c2aff7Sartem #endif /* OSSPEC_H */ 62