1 /*
2  *  Copyright (C) 2006 Peter Grundström  <pete@openfestis.org>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  The Rhythmbox authors hereby grant permission for non-GPL compatible
10  *  GStreamer plugins to be used and distributed together with GStreamer
11  *  and Rhythmbox. This permission is above and beyond the permissions granted
12  *  by the GPL license by which Rhythmbox is covered. If you modify this code
13  *  you may extend this exception to your version of the code, but you are not
14  *  obligated to do so. If you do not wish to do so, delete this exception
15  *  statement from your version.
16  *
17  *  This program is distributed in the hope that it will be useful,
18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  *  GNU General Public License for more details.
21  *
22  *  You should have received a copy of the GNU General Public License
23  *  along with this program; if not, write to the Free Software
24  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
25  *
26  */
27 
28 #ifndef __RB_MTP_SOURCE_H
29 #define __RB_MTP_SOURCE_H
30 
31 #include "rb-shell.h"
32 #include "rb-media-player-source.h"
33 #include "rhythmdb.h"
34 #include <libmtp.h>
35 
36 G_BEGIN_DECLS
37 
38 #define RB_TYPE_MTP_SOURCE         (rb_mtp_source_get_type ())
39 #define RB_MTP_SOURCE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_MTP_SOURCE, RBMtpSource))
40 #define RB_MTP_SOURCE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_MTP_SOURCE, RBMtpSourceClass))
41 #define RB_IS_MTP_SOURCE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_MTP_SOURCE))
42 #define RB_IS_MTP_SOURCE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_MTP_SOURCE))
43 #define RB_MTP_SOURCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_MTP_SOURCE, RBMtpSourceClass))
44 
45 typedef struct
46 {
47 	RBMediaPlayerSource parent;
48 } RBMtpSource;
49 
50 typedef struct
51 {
52 	RBMediaPlayerSourceClass parent;
53 } RBMtpSourceClass;
54 
55 RBSource *		rb_mtp_source_new		(RBShell *shell,
56 							 GObject *plugin,
57 #if defined(HAVE_GUDEV)
58 							 GUdevDevice *udev_device,
59 #else
60 							 const char *udi,
61 #endif
62 							 LIBMTP_raw_device_t *device);
63 
64 GType			rb_mtp_source_get_type		(void);
65 void			_rb_mtp_source_register_type	(GTypeModule *module);
66 
67 G_END_DECLS
68 
69 #endif /* __RB_MTP_SOURCE_H */
70