@@ -354,6 +354,7 @@ class MockNetworkManagerDevice extends MockNetworkManagerObject {
354354 final String physicalPortId;
355355 final bool real;
356356 final int state;
357+ final int stateReason;
357358 final String udi;
358359
359360 final bool hasBluetooth;
@@ -425,6 +426,7 @@ class MockNetworkManagerDevice extends MockNetworkManagerObject {
425426 this .physicalPortId = '' ,
426427 this .real = true ,
427428 this .state = 0 ,
429+ this .stateReason = - 1 ,
428430 this .udi = '' ,
429431 this .hasBluetooth = false ,
430432 this .btCapabilities = 0 ,
@@ -488,6 +490,7 @@ class MockNetworkManagerDevice extends MockNetworkManagerObject {
488490 'PhysicalPortId' : DBusString (physicalPortId),
489491 'Real' : DBusBoolean (real),
490492 'State' : DBusUint32 (state),
493+ 'StateReason' : DBusStruct ([DBusUint32 (state), DBusUint32 (stateReason)]),
491494 'Udi' : DBusString (udi)
492495 }
493496 };
@@ -978,6 +981,7 @@ class MockNetworkManagerServer extends DBusClient {
978981 String physicalPortId = '' ,
979982 bool real = true ,
980983 int state = 0 ,
984+ int stateReason = 0 ,
981985 String udi = '' ,
982986 bool hasBluetooth = false ,
983987 int btCapabilities = 0 ,
@@ -1036,6 +1040,7 @@ class MockNetworkManagerServer extends DBusClient {
10361040 physicalPortId: physicalPortId,
10371041 real: real,
10381042 state: state,
1043+ stateReason: stateReason,
10391044 udi: udi,
10401045 hasBluetooth: hasBluetooth,
10411046 btCapabilities: btCapabilities,
@@ -1619,6 +1624,7 @@ void main() {
16191624 physicalPortId: 'PHYSICAL-PORT-ID' ,
16201625 real: true ,
16211626 state: 100 ,
1627+ stateReason: 0 ,
16221628 udi: 'UDI' );
16231629
16241630 var client = NetworkManagerClient (bus: DBusClient (clientAddress));
@@ -1674,6 +1680,10 @@ void main() {
16741680 expect (device.physicalPortId, equals ('PHYSICAL-PORT-ID' ));
16751681 expect (device.real, isTrue);
16761682 expect (device.state, equals (NetworkManagerDeviceState .activated));
1683+ expect (
1684+ device.stateReason.state, equals (NetworkManagerDeviceState .activated));
1685+ expect (device.stateReason.reason,
1686+ equals (NetworkManagerDeviceStateReason .none));
16771687 expect (device.udi, equals ('UDI' ));
16781688 });
16791689
0 commit comments