blob: 95479c83a754bf15e81bd407a96dcc6bda5c522e (
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
|
/***************************************************************************
*
* hotplug.h : definitions for HAL-internal hotplug events
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*
**************************************************************************/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef HOTPLUG_H
#define HOTPLUG_H
#include <glib.h>
#include "../device.h"
#include "../util.h"
#include "devinfo.h"
typedef enum {
HOTPLUG_ACTION_ADD,
HOTPLUG_ACTION_REMOVE,
} HotplugActionType;
typedef enum {
HOTPLUG_EVENT_DEVFS = 0,
} HotplugEventType;
/** Data structure representing a hotplug event; also used for
* coldplugging.
*/
typedef struct
{
HotplugActionType action; /**< Whether the event is add or remove */
HotplugEventType type; /**< Type of hotplug event */
HalDevice *d;
union {
struct {
char devfs_path[HAL_PATH_MAX];
DevinfoDevHandler *handler;
} devfs;
} un;
} HotplugEvent;
void hotplug_event_enqueue (HotplugEvent *event, int front);
void hotplug_event_process_queue (void);
void hotplug_event_end (void *end_token);
void hotplug_queue_now_empty (void);
#endif /* HOTPLUG_H */
|