2424from sdbus import (DbusInterfaceCommonAsync , dbus_method_async ,
2525 dbus_property_async , dbus_signal_async )
2626
27+ from .types import NetworkManagerConnectionProperties
28+
2729
2830class NetworkManagerAccessPointInterfaceAsync (
2931 DbusInterfaceCommonAsync ,
@@ -464,7 +466,7 @@ class NetworkManagerSecretAgentInterfaceAsync(
464466 )
465467 async def get_secrets (
466468 self ,
467- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
469+ connection : NetworkManagerConnectionProperties ,
468470 connection_path : str ,
469471 setting_name : str ,
470472 hints : List [str ],
@@ -485,7 +487,7 @@ async def cancel_get_secrets(
485487 @dbus_method_async ('a{sa{sv}}o' )
486488 async def save_secrets (
487489 self ,
488- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
490+ connection : NetworkManagerConnectionProperties ,
489491 connection_path : str ,
490492 ) -> None :
491493 """Save given secrets"""
@@ -494,7 +496,7 @@ async def save_secrets(
494496 @dbus_method_async ('a{sa{sv}}o' )
495497 async def delete_secrets (
496498 self ,
497- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
499+ connection : NetworkManagerConnectionProperties ,
498500 connection_path : str ,
499501 ) -> None :
500502 """Delete secrets"""
@@ -509,7 +511,7 @@ class NetworkManagerSettingsConnectionInterfaceAsync(
509511 @dbus_method_async ('a{sa{sv}}' )
510512 async def update (
511513 self ,
512- properties : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
514+ properties : NetworkManagerConnectionProperties ,
513515 ) -> None :
514516 """Update connection settings.
515517
@@ -520,7 +522,7 @@ async def update(
520522 @dbus_method_async ('a{sa{sv}}' )
521523 async def update_unsaved (
522524 self ,
523- properties : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
525+ properties : NetworkManagerConnectionProperties ,
524526 ) -> None :
525527 """Update connection settings but do not save to disk"""
526528 raise NotImplementedError
@@ -537,7 +539,7 @@ async def delete(
537539 )
538540 async def get_settings (
539541 self ,
540- ) -> Dict [ str , Dict [ str , Tuple [ str , Any ]]] :
542+ ) -> NetworkManagerConnectionProperties :
541543 """Get connection settings"""
542544 raise NotImplementedError
543545
@@ -572,7 +574,7 @@ async def save(
572574 )
573575 async def update2 (
574576 self ,
575- settings : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
577+ settings : NetworkManagerConnectionProperties ,
576578 flags : int ,
577579 args : Dict [str , Tuple [str , Any ]],
578580 ) -> Dict [str , Tuple [str , Any ]]:
@@ -639,7 +641,7 @@ async def get_connection_by_uuid(
639641 )
640642 async def add_connection (
641643 self ,
642- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
644+ connection : NetworkManagerConnectionProperties ,
643645 ) -> str :
644646 """Add connection and save to disk"""
645647 raise NotImplementedError
@@ -650,7 +652,7 @@ async def add_connection(
650652 )
651653 async def add_connection_unsaved (
652654 self ,
653- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
655+ connection : NetworkManagerConnectionProperties ,
654656 ) -> str :
655657 """Add connection and do not save"""
656658 raise NotImplementedError
@@ -661,7 +663,7 @@ async def add_connection_unsaved(
661663 )
662664 async def add_connection2 (
663665 self ,
664- settings : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
666+ settings : NetworkManagerConnectionProperties ,
665667 flags : int ,
666668 args : Dict [str , Tuple [str , Any ]],
667669 ) -> Tuple [str , Dict [str , Tuple [str , Any ]]]:
@@ -736,7 +738,7 @@ class NetworkManagerVPNPluginInterfaceAsync(
736738 @dbus_method_async ('a{sa{sv}}' )
737739 async def connect (
738740 self ,
739- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
741+ connection : NetworkManagerConnectionProperties ,
740742 ) -> None :
741743 """Connect to described connection
742744
@@ -747,7 +749,7 @@ async def connect(
747749 @dbus_method_async ('a{sa{sv}}a{sv}' )
748750 async def connect_interactive (
749751 self ,
750- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
752+ connection : NetworkManagerConnectionProperties ,
751753 details : Dict [str , Tuple [str , Any ]],
752754 ) -> None :
753755 """Connect to described connection
@@ -763,7 +765,7 @@ async def connect_interactive(
763765 )
764766 async def need_secrets (
765767 self ,
766- settings : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
768+ settings : NetworkManagerConnectionProperties ,
767769 ) -> str :
768770 """Asks plugin if connection will require secrets
769771
@@ -813,9 +815,12 @@ async def set_failure(
813815 @dbus_method_async ('a{sa{sv}}' )
814816 async def new_secrets (
815817 self ,
816- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
818+ connection : NetworkManagerConnectionProperties ,
817819 ) -> None :
818- """Called in response to secrets_required signal"""
820+ """Called in response to secrets_required signal
821+
822+ param: Describes the connection including the new secrets.
823+ """
819824 raise NotImplementedError
820825
821826 @dbus_property_async ('u' )
@@ -999,7 +1004,7 @@ async def activate_connection(
9991004 )
10001005 async def add_and_activate_connection (
10011006 self ,
1002- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
1007+ connection : NetworkManagerConnectionProperties ,
10031008 device : str ,
10041009 specific_object : str ,
10051010 ) -> Tuple [str , str ]:
@@ -1012,7 +1017,7 @@ async def add_and_activate_connection(
10121017 )
10131018 async def add_and_activate_connection2 (
10141019 self ,
1015- connection : Dict [ str , Dict [ str , Tuple [ str , Any ]]] ,
1020+ connection : NetworkManagerConnectionProperties ,
10161021 device : str ,
10171022 specific_object : str ,
10181023 options : Dict [str , Tuple [str , Any ]],
0 commit comments