Top | ![]() |
![]() |
![]() |
![]() |
void | ide_device_provider_emit_device_added () |
void | ide_device_provider_emit_device_removed () |
void | ide_device_provider_load_async () |
gboolean | ide_device_provider_load_finish () |
GPtrArray * | ide_device_provider_get_devices () |
void ide_device_provider_emit_device_added (IdeDeviceProvider *self
,IdeDevice *device
);
Emits the “device-added” signal.
This should only be called by subclasses of IdeDeviceProvider when a new device has been discovered.
Since: 3.28
void ide_device_provider_emit_device_removed (IdeDeviceProvider *self
,IdeDevice *device
);
Emits the “device-removed” signal.
This should only be called by subclasses of IdeDeviceProvider when a previously added device has been removed.
Since: 3.28
void ide_device_provider_load_async (IdeDeviceProvider *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Requests that the IdeDeviceProvider asynchronously load any known devices.
This should only be called once on an IdeDeviceProvider. It is an error to call this function more than once for a single IdeDeviceProvider.
IdeDeviceProvider implementations are expected to emit the “device-added” signal for each device they've discovered. That should be done for known devices before returning from the asynchronous operation so that the device manager does not need to wait for additional devices to enter the "settled" state.
self |
||
cancellable |
a GCancellable or |
[nullable] |
callback |
a GAsyncReadyCallback to execute upon completion. |
[nullable] |
user_data |
closure data for |
Since: 3.28
gboolean ide_device_provider_load_finish (IdeDeviceProvider *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to load known devices via
ide_device_provider_load_async()
.
Since: 3.28
GPtrArray *
ide_device_provider_get_devices (IdeDeviceProvider *self
);
Gets a new GPtrArray containing a list of IdeDevice instances that were registered by the IdeDeviceProvider
Since: 3.28
struct IdeDeviceProviderClass { IdeObjectClass parent_class; void (*device_added) (IdeDeviceProvider *self, IdeDevice *device); void (*device_removed) (IdeDeviceProvider *self, IdeDevice *device); void (*load_async) (IdeDeviceProvider *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*load_finish) (IdeDeviceProvider *self, GAsyncResult *result, GError **error); };
“device-added”
signalvoid user_function (IdeDeviceProvider *self, IdeDevice *device, gpointer user_data)
The "device-added" signal is emitted when a provider has discovered a device has become available.
Subclasses of IdeDeviceManager must chain-up if they override the IdeDeviceProviderClass.device_added vfunc.
Flags: Run Last
Since: 3.28
“device-removed”
signalvoid user_function (IdeDeviceProvider *self, IdeDevice *device, gpointer user_data)
The "device-removed" signal is emitted when a provider has discovered a device is no longer available.
Subclasses of IdeDeviceManager must chain-up if they override the IdeDeviceProviderClass.device_removed vfunc.
Flags: Run Last
Since: 3.28