summaryrefslogtreecommitdiff
path: root/hald/osspec.h
blob: 26290eb8f28b30ddf334a505185b68a94258db12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/***************************************************************************
 * CVSID: $Id$
 *
 * osspec.h : OS Specific interface
 *
 * Copyright (C) 2003 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 OSSPEC_H
#define OSSPEC_H

#include <stdarg.h>
#include <stdint.h>
#include <dbus/dbus.h>

#include "device.h"
#include "hal-file-monitor.h"

/** Initialize the kernel specific parts of the daemon, as root */
void osspec_privileged_init (void);

/** Initialize the kernel specific parts of the daemon */
void osspec_init (void);

/** Probe all devices present in the system and build the device list */
void osspec_probe (void);

/* Called by kernel specific parts when probing is done */
void osspec_probe_done (void);

gboolean osspec_device_rescan (HalDevice *d);

gboolean osspec_device_reprobe (HalDevice *d);

/* Called to refresh mount state for a device object of capability volume */
void osspec_refresh_mount_state_for_block_device (HalDevice *d);

/** Called when the org.freedesktop.Hal service receives a messaged that the generic daemon 
 *  doesn't handle. Can be used for intercepting messages from kernel or core OS components.
 *
 *  @param  connection          D-BUS connection
 *  @param  message             Message
 *  @param  user_data           User data
 *  @return                     What to do with the message
 */
DBusHandlerResult osspec_filter_function (DBusConnection *connection, DBusMessage *message, void *user_data);

HalFileMonitor *osspec_get_file_monitor (void);

#endif /* OSSPEC_H */