
    ҒgT                     H   S SK r S SKrS SKrS SKrS r\R
                  " SS9r\R                  SSSS9  \R                  S	S
SS9  \R                  SSSS9  \R                  5       r	\	R                  (       a3  \	R                  (       a"  \R                  5         \ R                  " S5        \	R                  (       a  \R                  " 5       rO\R                   " 5       r\R#                  SS5      r\R&                  " \S5      r\R&                  " \S5      r \R-                  5       r\R3                  5       r\ V s/ s H  o R7                  S5      (       d  M  U PM     sn r\" S \ 5       5      r\" S \ 5       5      r\ V s/ s H  o \;  d  M
  U PM     sn r \" S \  5       5      r!\" S \RE                  5        5       5      r#\" SSSSS.5      r$\	RJ                  (       a  \# H  r&\" S\&\#\&   S   \#\&   S   SRO                  \#\&   S    5      \(" \#\&   S!   5      \(" \)" \#\&   S"   RU                  5       / 5      5      4-  5        \#\&   S!    H  r+\" S#\+-  5        M     \" S$5        M     \ R                  " S 5        \#RE                  5        H  u  r,r-\(" \)" \-S"   RU                  5       / 5      5      r.\.S :X  a  M.  \" S\,\-S   \-S   SRO                  \-S    5      \(" \-S!   5      \.4-  5        \-S"   RE                  5        VVs/ s H  u  p\(" U5      S :  d  M  X4PM     snn H(  u  r/r0\" S%\$\/   -  5        \0 H  r+\" S&\+-  5        M     M*     \" S$5        M     \ R                  " S 5        g!   \" S5        \ R                  " S5         GNi= fs  sn f s  sn f s  snnf )'    Nc                     SnU S:  aW   S[        U 5      -   S-   n[        US5       nSR                  UR                  5       R	                  S5      5      nS S S 5        U$ U$ ! , (       d  f       U$ = f!    U$ = f)N r   z/proc/z/cmdliner  )stropenjoinreadlinesplit)pidcmdlineprocpathfs       +share/doc/dbus/examples/GetAllMatchRules.pyget_cmdliner      s    '1WCH$z1h#!((1::<--d34  
..	  
.
	.s(   A4 /A"A4 "
A1,A4 1A4 4A9zTesting D-Bus match rules)descriptionz	--sessionzsession bus
store_true)helpactionz--systemz
system busz--allzprint all match rules   zorg.freedesktop.DBusz/org/freedesktop/DBusz org.freedesktop.DBus.Debug.StatszCGetConnectionMatchRules failed: did you enable the Stats interface?:c              #   N   #    U  H  o[         R                  U5      4v   M     g 7fN)	bus_ifaceGetConnectionUnixProcessID.0names     r   	<genexpr>r    3   s     X<4977=><   #%c              #   H   #    U  H  o[        [        U   5      4v   M     g 7fr   )r   pidsr   s     r   r    r    4   s     E;tDz*+s    "c              #   N   #    U  H  o[         R                  U5      4v   M     g 7fr   )r   GetNameOwner)r   wkns     r   r    r    6   s      M<LSI**3/0<Lr!   c              #     #    U  H  u  pU[        [        R                  5        VVs/ s H  u  p4XA:X  d  M  UPM     snn[        U   [        U   =(       d    S U[        U Vs/ s H  nSU;  d  M  UPM     snU Vs/ s H  nSU;  d  M  UPM     snU Vs/ s H  nSU;   d  M  UPM     snU Vs/ s H  nSU;   d  M  SU;  d  M  UPM     snS.5      S.5      4v   M     gs  snnf s  snf s  snf s  snf s  snf 7f)	r   ztype='signal'zsender=zorg.freedesktop.DBus.Localzmember='NameOwnerChanged'arg0
not_signal	no_senderlocalNameOwnerChanged_arg0)r&   r   cmdruleswarningsN)dictownersitemsr#   cmds)r   k_rulesv_ruleskvas         r   r    r    8   s      < (;#7 &,llnEndanEG}G}*  ,3 PGqa7OG P+2I7aiq6H7I'.Tw!2NRS2SAwT7>+ww!B]abBbAgmuvgvAw+w	"   (; F
 !QIT+wsb   %C=C#C#&C="
C)0C)6C=<
C.
C.C=
C3$C3*C=0
C8>C8C81C=z$Match rule without selecting signalsz$Match rule without a sender criteriaz6Match rule on the org.freedesktop.DBus.Local interfacez7Match rule on NameOwnerChanged without a arg0* criteriar)   z@Connection %s with pid %d '%s' (%s): %d match rules, %d warningsr   r.   r   r&   r/   r0   z	%sr   z   - %s:z         - %s)1sysargparsedbustimer   ArgumentParserparseradd_argument
parse_argsargssystemsession
print_helpexit	SystemBusbus
SessionBus
get_objectremote_object	Interfacer   stats_ifaceGetAllMatchRulesmatch_rulesprint	ListNamesnames
startswithunique_namesr1   r#   r4   well_known_namesr2   r3   r/   r0   allr   r
   lensumvaluesruleconndatawarnings_count	warn_code	rule_list)r9   r^   r_   s   000r   <module>r`      s      	 
	 	 -H	I   KmL  I   J\,  G   G"9,  O;;4<<((1+ ;;##568NN=*@A	nn],NO,,.+
 	!8Eq\\#%6E8X<XXEEE %@1,)>Q@ 	M<LM	M < (3'8'8':< 	< A@N&_	  88d	
L5;u%uT{5'9XXeDk%()3uT{7/C+DU4[,335r:;== > dG$FdO %	"I  ((1+ IDs4
+224b9:.qJed5k388DK+@tG}~/	/ 0 "&j!1!7!7!95!9 #7)!$Y!!3 4y3!95i	 
*+
,-Ot$% 5 )# & GMN((1+ 9 Ab5s0   M2 <NN	NNNN2N