mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 06:50:35 +01:00
devices/factory: allow announcing a NULL component
We'll use this to let the devices know they can retry autoactivation because some component became available without actually having any data that would be useful for that device. Adjust the comment.
This commit is contained in:
parent
aedeb3cbf4
commit
805d3240f9
3 changed files with 13 additions and 10 deletions
|
|
@ -55,7 +55,6 @@ nm_device_factory_emit_component_added (NMDeviceFactory *factory, GObject *compo
|
|||
gboolean consumed = FALSE;
|
||||
|
||||
g_return_val_if_fail (NM_IS_DEVICE_FACTORY (factory), FALSE);
|
||||
g_return_val_if_fail (G_IS_OBJECT (component), FALSE);
|
||||
|
||||
g_signal_emit (factory, signals[COMPONENT_ADDED], 0, component, &consumed);
|
||||
return consumed;
|
||||
|
|
|
|||
|
|
@ -140,11 +140,15 @@ typedef struct {
|
|||
* @factory: the #NMDeviceFactory
|
||||
* @component: a new component which existing devices may wish to claim
|
||||
*
|
||||
* The factory emits this signal when it finds a new component. For example,
|
||||
* the WWAN factory may indicate that a new modem is available, which an
|
||||
* existing Bluetooth device may wish to claim. If no device claims the
|
||||
* component, the plugin is allowed to create a new #NMDevice instance for
|
||||
* that component and emit the "device-added" signal.
|
||||
* The factory emits this signal when an appearance of some component
|
||||
* native to it could be interesting to some of the already existing devices.
|
||||
* The devices then indicate if they took interest in claiming the component.
|
||||
*
|
||||
* For example, the WWAN factory may indicate that a new modem is available,
|
||||
* which an existing Bluetooth device may wish to claim. It emits a signal
|
||||
* passing the modem instance around to see if any device claims it.
|
||||
* If no device claims the component, the plugin is allowed to create a new
|
||||
* #NMDevice instance for that component and emit the "device-added" signal.
|
||||
*
|
||||
* Returns: %TRUE if the component was claimed by a device, %FALSE if not
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -375,10 +375,10 @@ typedef struct {
|
|||
* @self: the #NMDevice
|
||||
* @component: the component (device, modem, etc) which was added
|
||||
*
|
||||
* Notifies @self that a new component was added to the Manager. This
|
||||
* may include any kind of %GObject subclass, and the device is expected
|
||||
* to match only specific components they care about, like %NMModem objects
|
||||
* or %NMDevice objects.
|
||||
* Notifies @self that a new component that a device might be interested
|
||||
* in was detected by some device factory. It may include an object of
|
||||
* %GObject subclass to help the devices decide whether it claims that
|
||||
* particular object itself and the emitting factory should not.
|
||||
*
|
||||
* Returns: %TRUE if the component was claimed exclusively and no further
|
||||
* devices should be notified of the new component. %FALSE to indicate
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue