1 /* 2 * Copyright (C) 2011 Jonathan Matthew <jonathan@d14n.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_DEVICE_SOURCE_H 29 #define RB_DEVICE_SOURCE_H 30 31 #include <glib-object.h> 32 33 #include "rb-source.h" 34 35 G_BEGIN_DECLS 36 37 #define RB_TYPE_DEVICE_SOURCE (rb_device_source_get_type ()) 38 #define RB_DEVICE_SOURCE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_DEVICE_SOURCE, RBDeviceSource)) 39 #define RB_IS_DEVICE_SOURCE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_DEVICE_SOURCE)) 40 #define RB_DEVICE_SOURCE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), RB_TYPE_DEVICE_SOURCE, RBDeviceSourceInterface)) 41 42 typedef struct _RBDeviceSource RBDeviceSource; 43 typedef struct _RBDeviceSourceInterface RBDeviceSourceInterface; 44 45 struct _RBDeviceSourceInterface 46 { 47 GTypeInterface g_iface; 48 49 gboolean (*can_eject) (RBDeviceSource *source); 50 void (*eject) (RBDeviceSource *source); 51 }; 52 53 GType rb_device_source_get_type (void); 54 55 gboolean rb_device_source_can_eject (RBDeviceSource *source); 56 void rb_device_source_eject (RBDeviceSource *source); 57 58 guint rb_device_source_want_uri (RBSource *source, const char *uri); 59 gboolean rb_device_source_uri_is_source (RBSource *source, const char *uri); 60 61 void rb_device_source_set_display_details (RBDeviceSource *source); 62 63 void rb_device_source_default_eject (RBDeviceSource *source); 64 65 G_END_DECLS 66 67 #endif /* RB_DEVICE_SOURCE_H */ 68