o ` @sfddlmZmZmZddlmZmZedddZedZ ddZ d d Z d d Z d dZ ddZdS)) DBusAddress new_signalnew_method_call) MatchRule message_busz/org/freedesktop/portal/desktopzorg.freedesktop.portal.Desktop) object_pathbus_nameorg.freedesktop.portal.RequestcCsRtddd}|ttdsJ|ttdrJ|ttddr'JdS)Nsignalr )type interfaceResponseBooz"org.freedesktop.portal.FileChooser)rmatchesrportal_req_ifacerportalwith_interfacerulerA/usr/lib/python3/dist-packages/jeepney/tests/test_bus_messages.pytest_match_rule_simple s rcCs8tddttds JtddttdrJdS)Nz/org/freedesktop/portal)path_namespacer z/org/freedesktop/por)rrrrrrrrtest_match_rule_path_namespaces   rcCsbtdd}|dd|ttddddsJ|ttddd dr%J|ttdr/JdS) N method_callr rfoors)r signaturebody)foobarradd_arg_conditionrrrrrrrtest_match_rule_arg%s    r$cCstdd}|jdddd|ttddd d sJ|ttddd d s'J|ttddd d s4J|ttddd d rAJ|ttdddd rNJ|ttdddd r[JdS)Nrrr/aa/bb/pathkindrr)r%r)z /aa/bb/cc)z/aa/)z/aa)z/aa/bbu) r"rrrrtest_match_rule_arg_path5s(      r+cCs~tdd}|jdddd|ttdddsJ|ttddd s%J|ttddd r1J|ttdd d r=JdS) NNameOwnerChanged)memberrcom.example.backend1 namespacer'r)r.)zcom.example.backend1.foo.bar)zcom.example.backend12r)))rr#rrrrrrrtest_match_rule_arg_namespaceWs    r1N)jeepneyrrrjeepney.bus_messagesrrrrrrrr$r+r1rrrrs   "