| Rhythmbox Development Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
RBRemovableMediaManagerRBRemovableMediaManager — handling of removable media such as audio CDs and DAP devices |
RBRemovableMediaManager; RBRemovableMediaManagerClass; RBRemovableMediaManager* rb_removable_media_manager_new (RBShell *shell); void rb_removable_media_manager_scan (RBRemovableMediaManager *manager);
"scanned" gboolean : Read "shell" RBShell* : Read / Write "source" RBSource* : Read / Write
"create-source-device" : Run Last "create-source-mount" : Run Last "create-source-volume" : Run Last "medium-added" : Run Last
The removable media manager maintains the mapping between GIO GVolume and GMount objects and rhythmbox sources.
typedef struct {
GObjectClass parent_class;
/* signals */
void (*medium_added) (RBRemovableMediaManager *mgr,
RBSource *source);
RBSource * (*create_source_device) (RBRemovableMediaManager *mgr,
GObject *device); /* actually a GUdevDevice */
RBSource * (*create_source_mount) (RBRemovableMediaManager *mgr,
GMount *mount,
MPIDDevice *device_info);
RBSource * (*create_source_volume) (RBRemovableMediaManager *mgr,
GVolume *volume);
} RBRemovableMediaManagerClass;
RBRemovableMediaManager* rb_removable_media_manager_new (RBShell *shell);
Creates the RBRemovableMediaManager instance.
|
the RBShell |
Returns : |
the RBRemovableMediaManager |
void rb_removable_media_manager_scan (RBRemovableMediaManager *manager);
Initiates a new scan of all attached media. Newly activated plugins that use
the create-source-volume or create-source-mount signals should call this if
the 'scanned' property is TRUE. Otherwise, the first scan will catch any
existing volumes or mounts that the plugin is interested in.
|
the RBRemovableMediaManager |
"scanned" property "scanned" gboolean : Read
This is set to TRUE when the removable media manager has scanned all existing volumes and mounts. When a plugin that handles removable media is activated, it should request a new scan if this property is already set to TRUE.
Default value: FALSE
"create-source-device" signalRBSource* user_function (RBRemovableMediaManager *mgr, GObject *device, gpointer user_data) : Run Last
Emitted when a new device is detected to allow plugins to create a corresponding RBSource. The first signal handler that returns a source wins. Plugins should only use this signal if there will be no GVolume or GMount created for the device.
|
the RBRemovableMediaManager |
|
the device (actually a GUdevDevice) |
|
user data set when the signal handler was connected. |
"create-source-mount" signalRBSource* user_function (RBRemovableMediaManager *mgr, GMount *device_info, MPIDDevice *mount, gpointer user_data) : Run Last
Emitted when a new mount is added to allow plugins to create a corresponding RBSource. The first signal handler that returns a source wins. If a source was created for the GVolume for a mount, then this signal will not be emitted.
|
the RBRemovableMediaManager |
|
a MPIDDevice containing information on the device |
|
the GMount |
|
user data set when the signal handler was connected. |
"create-source-volume" signalRBSource* user_function (RBRemovableMediaManager *mgr, GVolume *volume, gpointer user_data) : Run Last
Emitted when a new volume is added to allow plugins to create a corresponding RBSource. The first signal handler that returns a source wins. A plugin should only use this signal if it doesn't require the volume to be mounted. If the volume must be mounted to be useful, use the create-source-mount signal instead.
|
the RBRemovableMediaManager |
|
the GVolume |
|
user data set when the signal handler was connected. |
"medium-added" signalvoid user_function (RBRemovableMediaManager *mgr, GObject *source, gpointer user_data) : Run Last
Emitted when a new source is added for a removable medium.
|
the RBRemovableMediaManager |
|
the newly added RBSource |
|
user data set when the signal handler was connected. |