Add new error codes for when compilation fails and make compilation error
[platform/upstream/glib.git] / gio / gvolumemonitor.h
1 /* GIO - GLib Input, Output and Streaming Library
2  * 
3  * Copyright (C) 2006-2007 Red Hat, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Author: Alexander Larsson <alexl@redhat.com>
21  */
22
23 #ifndef __G_VOLUME_MONITOR_H__
24 #define __G_VOLUME_MONITOR_H__
25
26 #include <glib-object.h>
27 #include <gio/gvolume.h>
28 #include <gio/gdrive.h>
29
30 G_BEGIN_DECLS
31
32 #define G_TYPE_VOLUME_MONITOR         (g_volume_monitor_get_type ())
33 #define G_VOLUME_MONITOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitor))
34 #define G_VOLUME_MONITOR_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass))
35 #define G_VOLUME_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VOLUME_MONITOR, GVolumeMonitorClass))
36 #define G_IS_VOLUME_MONITOR(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_VOLUME_MONITOR))
37 #define G_IS_VOLUME_MONITOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VOLUME_MONITOR))
38
39 /**
40  * GVolumeMonitor:
41  * @parent: The parent class.
42  *
43  * A Volume Monitor that watches for volume events.
44  **/
45 typedef struct _GVolumeMonitor GVolumeMonitor;
46 typedef struct _GVolumeMonitorClass GVolumeMonitorClass;
47
48 struct _GVolumeMonitor {
49   GObject parent;
50
51   /*< private >*/
52   gpointer priv;
53 };
54
55 struct _GVolumeMonitorClass {
56   GObjectClass parent_class;
57
58   /*< public >*/
59   /* signals */
60   void (* volume_mounted)       (GVolumeMonitor *volume_monitor,
61                                  GVolume        *volume);
62   void (* volume_pre_unmount)   (GVolumeMonitor *volume_monitor,
63                                  GVolume        *volume);
64   void (* volume_unmounted)     (GVolumeMonitor *volume_monitor,
65                                  GVolume        *volume);
66   void (* drive_connected)      (GVolumeMonitor *volume_monitor,
67                                  GDrive         *drive);
68   void (* drive_disconnected)   (GVolumeMonitor *volume_monitor,
69                                  GDrive         *drive);
70
71   /* Vtable */
72
73   GList * (*get_mounted_volumes)  (GVolumeMonitor *volume_monitor);
74   GList * (*get_connected_drives) (GVolumeMonitor *volume_monitor);
75
76   /*< private >*/
77   /* Padding for future expansion */
78   void (*_g_reserved1) (void);
79   void (*_g_reserved2) (void);
80   void (*_g_reserved3) (void);
81   void (*_g_reserved4) (void);
82   void (*_g_reserved5) (void);
83   void (*_g_reserved6) (void);
84   void (*_g_reserved7) (void);
85   void (*_g_reserved8) (void);
86 };
87
88 GType g_volume_monitor_get_type (void) G_GNUC_CONST;
89
90 GVolumeMonitor *g_volume_monitor_get                  (void);
91 GList *         g_volume_monitor_get_mounted_volumes  (GVolumeMonitor *volume_monitor);
92 GList *         g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor);
93
94 G_END_DECLS
95
96 #endif /* __G_VOLUME_MONITOR_H__ */