2006-12-14 Francisco Javier F. Serrador <serrador@openshine.com>
[rhythmbox.git] / shell / rb-removable-media-manager.h
blobf4c8453871ed763a69f47ab5c5f3fadd51615bae
1 /*
2 * arch-tag: Header for Rhythmbox removable media management object
4 * Copyright (C) 2005 James Livingston <jrl@ids.org.au>
6 * This program 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.
11 * This program 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. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef __RB_REMOVABLE_MEDIA_MANAGER_H
23 #define __RB_REMOVABLE_MEDIA_MANAGER_H
25 #include <libgnomevfs/gnome-vfs.h>
27 #include "rb-source.h"
28 #include "rhythmdb.h"
29 #include "rb-shell.h"
30 #include "rb-sourcelist.h"
32 G_BEGIN_DECLS
34 #define RB_TYPE_REMOVABLE_MEDIA_MANAGER (rb_removable_media_manager_get_type ())
35 #define RB_REMOVABLE_MEDIA_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_REMOVABLE_MEDIA_MANAGER, RBRemovableMediaManager))
36 #define RB_REMOVABLE_MEDIA_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_REMOVABLE_MEDIA_MANAGER, RBRemovableMediaManagerClass))
37 #define RB_IS_REMOVABLE_MEDIA_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_REMOVABLE_MEDIA_MANAGER))
38 #define RB_IS_REMOVABLE_MEDIA_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_REMOVABLE_MEDIA_MANAGER))
39 #define RB_REMOVABLE_MEDIA_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_REMOVABLE_MEDIA_MANAGER, RBRemovableMediaManagerClass))
41 typedef void (*RBTranferCompleteCallback) (RhythmDBEntry *entry,
42 const char *dest,
43 gpointer userdata);
45 typedef struct
47 GObject parent;
48 } RBRemovableMediaManager;
50 typedef struct
52 GObjectClass parent_class;
54 /* signals */
55 void (*medium_added) (RBRemovableMediaManager *mgr,
56 RBSource *source);
57 void (*transfer_progress) (RBRemovableMediaManager *mgr,
58 gint done,
59 gint total,
60 double fraction);
61 RBSource * (*create_source) (RBRemovableMediaManager *mgr,
62 GnomeVFSVolume *volume);
63 } RBRemovableMediaManagerClass;
65 RBRemovableMediaManager* rb_removable_media_manager_new (RBShell *shell, RBSourceList *sourcelist);
66 GType rb_removable_media_manager_get_type (void);
68 void rb_removable_media_manager_scan (RBRemovableMediaManager *manager);
70 #ifdef ENABLE_TRACK_TRANSFER
71 void rb_removable_media_manager_queue_transfer (RBRemovableMediaManager *mgr,
72 RhythmDBEntry *entry,
73 const char *dest,
74 const char *mime_type,
75 RBTranferCompleteCallback callback,
76 gpointer userdata);
77 #endif
79 G_END_DECLS
81 #endif /* __RB_REMOVABLE_MEDIA_MANAGER_H */