H Vc @sddlZddlZddlZddlZdZejddZejddddd ejd dd dd ejd dd dd ejZ e j re j rej ej dne j rejZn ejZejddZejedZejedZyejZWndGHej dnXejZgeD]Zejdrge^qgZedeDZedeDZgeD]Zeekre^qZ ede DZ!edej"DZ#eidd6dd6dd6dd6Z$e j%rxe#D]Z&d e&e#e&d!e#e&d"d#j'e#e&d$e(e#e&d%e(e)e#e&d&j*gfGHxe#e&d%D]Z+d'e+GHqWd(GHqCWej d)nxe#j"D]\Z,Z-e(e)e-d&j*gZ.e.d)kr5qnd e,e-d!e-d"d#j'e-d$e(e-d%e.fGHxvge-d&j"D]*\Z/Z0e(e0d)kre/e0f^qD]3\Z/Z0d*e$e/GHxe0D]Z+d+e+GHqWqWd(GHqWej d)dS(,iNcCsqd}|dkrmyNdt|d}t|d%}dj|jjd}WdQXWqmqmXn|S(Ntis/proc/s/cmdlinetrt t(tstrtopentjointreadlinetsplit(tpidtcmdlinetprocpathtf((s8/usr/share/doc/dbus-1.10.24/examples/GetAllMatchRules.pyt get_cmdlines (t descriptionsTesting D-Bus match ruless --sessionthelps session bustactiont store_trues--systems system buss--allsprint all match rulesisorg.freedesktop.DBuss/org/freedesktop/DBuss org.freedesktop.DBus.Debug.StatssCGetConnectionMatchRules failed: did you enable the Stats interface?t:ccs$|]}|tj|fVqdS(N(t bus_ifacetGetConnectionUnixProcessID(t.0tname((s8/usr/share/doc/dbus-1.10.24/examples/GetAllMatchRules.pys 3sccs%|]}|tt|fVqdS(N(R tpids(RR((s8/usr/share/doc/dbus-1.10.24/examples/GetAllMatchRules.pys 4sccs$|]}|tj|fVqdS(N(Rt GetNameOwner(Rtwkn((s8/usr/share/doc/dbus-1.10.24/examples/GetAllMatchRules.pys 6sc cs-|]#\}}|tigtjD]\}}||kr%|^q%d6t|d6t|pbdd6|d6tig|D]}d|krz|^qzd6g|D]}d|kr|^qd6g|D]}d |kr|^qd 6g|D]$}d |krd |kr|^qd 6d6fVqdS(RR Rtcmdtruless type='signal't not_signalssender=t no_sendersorg.freedesktop.DBus.Localtlocalsmember='NameOwnerChanged'targ0tNameOwnerChanged_arg0twarningsN(tdicttownerstitemsRtcmds(Rtk_rulestv_rulestktvta((s8/usr/share/doc/dbus-1.10.24/examples/GetAllMatchRules.pys 8s s$Match rule without selecting signalsRs$Match rule without a sender criteriaRs6Match rule on the org.freedesktop.DBus.Local interfaceRs7Match rule on NameOwnerChanged without a arg0* criteriaR s@Connection %s with pid %d '%s' (%s): %d match rules, %d warningsR RRRRR!s %sRis - %s:s - %s(1tsystargparsetdbusttimeR tArgumentParsertparsert add_argumentt parse_argstargstsystemtsessiont print_helptexitt SystemBustbust SessionBust get_objectt remote_objectt InterfaceRt stats_ifacetGetAllMatchRulest match_rulest ListNamestnamesR*t startswitht unique_namesR"RR%twell_known_namesR#R$RR!tallRRtlentsumtvaluestruletconntdatatwarnings_countt warn_codet rule_list(((s8/usr/share/doc/dbus-1.10.24/examples/GetAllMatchRules.pyts|            (%    %&   !.