~ubuntu-branches/ubuntu/karmic/brasero/karmic

1.1.9 by Pedro Fragoso
Import upstream version 0.7.91
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
/*
3
 * brasero
4
 * Copyright (C) Philippe Rouquier 2007-2008 <bonfire-app@wanadoo.fr>
5
 * 
1.1.11 by Pedro Fragoso
Import upstream version 0.8.1
6
 *  Brasero is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
1.1.9 by Pedro Fragoso
Import upstream version 0.7.91
10
 * 
11
 * brasero is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 * See the GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with brasero.  If not, write to:
18
 * 	The Free Software Foundation, Inc.,
19
 * 	51 Franklin Street, Fifth Floor
20
 * 	Boston, MA  02110-1301, USA.
21
 */
22
23
#ifndef _BRASERO_FILE_MONITOR_H_
24
#define _BRASERO_FILE_MONITOR_H_
25
26
#include <glib-object.h>
27
28
G_BEGIN_DECLS
29
30
typedef enum {
31
	BRASERO_FILE_MONITOR_FILE,
32
	BRASERO_FILE_MONITOR_FOLDER
33
} BraseroFileMonitorType;
34
35
typedef	gboolean	(*BraseroMonitorFindFunc)	(gpointer data, gpointer callback_data);
36
37
#define BRASERO_TYPE_FILE_MONITOR             (brasero_file_monitor_get_type ())
38
#define BRASERO_FILE_MONITOR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_FILE_MONITOR, BraseroFileMonitor))
39
#define BRASERO_FILE_MONITOR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_FILE_MONITOR, BraseroFileMonitorClass))
40
#define BRASERO_IS_FILE_MONITOR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_FILE_MONITOR))
41
#define BRASERO_IS_FILE_MONITOR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_FILE_MONITOR))
42
#define BRASERO_FILE_MONITOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_FILE_MONITOR, BraseroFileMonitorClass))
43
44
typedef struct _BraseroFileMonitorClass BraseroFileMonitorClass;
45
typedef struct _BraseroFileMonitor BraseroFileMonitor;
46
47
struct _BraseroFileMonitorClass
48
{
49
	GObjectClass parent_class;
50
51
	/* Virtual functions */
52
53
	/* if name is NULL then it's happening on the callback_data */
54
	void		(*file_added)		(BraseroFileMonitor *monitor,
55
						 gpointer callback_data,
56
						 const gchar *name);
57
58
	/* NOTE: there is no dest_type here as it must be a FOLDER type */
59
	void		(*file_moved)		(BraseroFileMonitor *self,
60
						 BraseroFileMonitorType src_type,
61
						 gpointer callback_src,
62
						 const gchar *name_src,
63
						 gpointer callback_dest,
64
						 const gchar *name_dest);
65
	void		(*file_renamed)		(BraseroFileMonitor *monitor,
66
						 BraseroFileMonitorType type,
67
						 gpointer callback_data,
68
						 const gchar *old_name,
69
						 const gchar *new_name);
70
	void		(*file_removed)		(BraseroFileMonitor *monitor,
71
						 BraseroFileMonitorType type,
72
						 gpointer callback_data,
73
						 const gchar *name);
74
	void		(*file_modified)	(BraseroFileMonitor *monitor,
75
						 gpointer callback_data,
76
						 const gchar *name);
77
};
78
79
struct _BraseroFileMonitor
80
{
81
	GObject parent_instance;
82
};
83
84
GType brasero_file_monitor_get_type (void) G_GNUC_CONST;
85
86
gboolean
87
brasero_file_monitor_single_file (BraseroFileMonitor *monitor,
88
				  const gchar *uri,
89
				  gpointer callback_data);
90
gboolean
91
brasero_file_monitor_directory_contents (BraseroFileMonitor *monitor,
92
				  	 const gchar *uri,
93
				       	 gpointer callback_data);
94
void
95
brasero_file_monitor_reset (BraseroFileMonitor *monitor);
96
97
void
98
brasero_file_monitor_foreach_cancel (BraseroFileMonitor *self,
99
				     BraseroMonitorFindFunc func,
100
				     gpointer callback_data);
101
102
G_END_DECLS
103
104
#endif /* _BRASERO_FILE_MONITOR_H_ */