diff options
| author | Jeremy Bicha <jeremy.bicha@canonical.com> | 2022-08-18 08:31:29 -0400 |
|---|---|---|
| committer | Jeremy Bicha <jeremy.bicha@canonical.com> | 2022-08-18 08:31:29 -0400 |
| commit | b0887dd4d035acc0d84aa859748d36891548eaaf (patch) | |
| tree | c4dc0dae50954f3c8fb600aa9e7cfaabeb80deb0 /src/core/devices/nm-device.h | |
| parent | 1a62dcfdc0470be37743914da69fe0b0677c6bfb (diff) | |
| parent | 4741f1a52215c7ba466140912084d6906185bef3 (diff) | |
Merge branch 'debian/master' into ubuntu/master
Diffstat (limited to 'src/core/devices/nm-device.h')
| -rw-r--r-- | src/core/devices/nm-device.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/core/devices/nm-device.h b/src/core/devices/nm-device.h index 80def125..382c8660 100644 --- a/src/core/devices/nm-device.h +++ b/src/core/devices/nm-device.h @@ -163,6 +163,7 @@ typedef enum { } NMDeviceCheckDevAvailableFlags; typedef void (*NMDeviceDeactivateCallback)(NMDevice *self, GError *error, gpointer user_data); +typedef void (*NMDeviceAttachPortCallback)(NMDevice *self, GError *error, gpointer user_data); typedef struct _NMDeviceClass { NMDBusObjectClass parent; @@ -346,7 +347,7 @@ typedef struct _NMDeviceClass { NMActStageReturn (*act_stage1_prepare)(NMDevice *self, NMDeviceStateReason *out_failure_reason); NMActStageReturn (*act_stage2_config)(NMDevice *self, NMDeviceStateReason *out_failure_reason); void (*act_stage3_ip_config)(NMDevice *self, int addr_family); - gboolean (*ready_for_ip_config)(NMDevice *self); + gboolean (*ready_for_ip_config)(NMDevice *self, gboolean is_manual); const char *(*get_ip_method_auto)(NMDevice *self, int addr_family); @@ -373,12 +374,18 @@ typedef struct _NMDeviceClass { NMConnection *connection, GError **error); - gboolean (*enslave_slave)(NMDevice *self, - NMDevice *slave, - NMConnection *connection, - gboolean configure); - - void (*release_slave)(NMDevice *self, NMDevice *slave, gboolean configure); + /* Attachs a port asynchronously. Returns TRUE/FALSE on immediate + * success/error; in such cases, the callback is not invoked. If the + * action couldn't be completed immediately, DEFAULT is returned and + * the callback will always be invoked asynchronously. */ + NMTernary (*attach_port)(NMDevice *self, + NMDevice *port, + NMConnection *connection, + gboolean configure, + GCancellable *cancellable, + NMDeviceAttachPortCallback callback, + gpointer user_data); + void (*detach_port)(NMDevice *self, NMDevice *port, gboolean configure); void (*parent_changed_notify)(NMDevice *self, int old_ifindex, |