| Rhythmbox Development Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
Synopsis
struct RBMediaPlayerSource; struct RBMediaPlayerSourceClass; void rb_media_player_source_show_properties (RBMediaPlayerSource *source); MPIDDevice; enum MPIDError; enum MPIDSource; MPIDDevice * mpid_device_new (const char *path); void mpid_enable_debug (gboolean debug);
Description
MPID provides access to device information, such as device and vendor names, supported formats, and audio folder locations, for USB mass storage media player devices. It queries the operating system (udev or HAL) and reads override files from the device filesystem and provides a simple set of properties.
Details
struct RBMediaPlayerSourceClass
struct RBMediaPlayerSourceClass {
RBBrowserSourceClass parent_class;
/* class members */
void (*impl_get_entries) (RBMediaPlayerSource *source, const char *category, GHashTable *map);
guint64 (*impl_get_capacity) (RBMediaPlayerSource *source);
guint64 (*impl_get_free_space) (RBMediaPlayerSource *source);
void (*impl_delete_entries) (RBMediaPlayerSource *source,
GList *entries,
RBMediaPlayerSourceDeleteCallback callback,
gpointer data,
GDestroyNotify destroy_data);
void (*impl_add_playlist) (RBMediaPlayerSource *source, gchar *name, GList *entries);
void (*impl_remove_playlists) (RBMediaPlayerSource *source);
void (*impl_show_properties) (RBMediaPlayerSource *source, GtkWidget *info_box, GtkWidget *notebook);
};
rb_media_player_source_show_properties ()
void rb_media_player_source_show_properties
(RBMediaPlayerSource *source);
MPIDDevice
typedef struct _MPIDDevice MPIDDevice;
An MPIDDevice stores a set of information for a particular attached device, identified by either a mount point (e.g. /media/device) or a device node (e.g. /dev/sdb).
enum MPIDError
typedef enum {
MPID_ERROR_NONE,
MPID_ERROR_NO_DEVICE_PATH, /* unable to find the device path */
MPID_ERROR_MECHANISM_FAILED, /* mechanism (udev, hal) not available */
MPID_ERROR_NOT_MEDIA_PLAYER, /* device is not a media player */
MPID_ERROR_DEVICE_INFO_MISSING /* the device info file is missing */
} MPIDError;
| Indicates no error has occurred | |
| Unable to find the device path | |
| The device detection mechanism (e.g. udev or HAL) failed | |
| The device is not a media player | |
| The device detection mechanism identified the device but was unable to locate its device information |
enum MPIDSource
typedef enum {
MPID_SOURCE_NONE,
MPID_SOURCE_SYSTEM,
MPID_SOURCE_OVERRIDE
} MPIDSource;
mpid_device_new ()
MPIDDevice * mpid_device_new (const char *path);
Creates a new MPIDDevice and reads device information for the specified device node path or mount point path.
|
the input path (either device node path or mount point) |
Returns : |
new MPIDDevice instance |
