ó µ/ Qc@sÑddlZddlZddlmZddlmZddlmZddlmZddlmZddlmZd „Z d „Z d „Z d „Z d „Z d„Zd„ZedkrÍeƒndS(iÿÿÿÿNi(tconfig(tutils(t dbustypes(tparser(tcodegen(tcodegen_docbookcCs(x!|D]}|j|kr|SqWdS(N(tnametNone(targ_listtarg_nameta((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pytfind_arg"s cCs+x$|jD]}|j|kr |Sq WdS(N(tmethodsRR(tifacetmethodtm((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pyt find_method(scCs+x$|jD]}|j|kr |Sq WdS(N(tsignalsRR(R tsignalR((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pyt find_signal.scCs+x$|jD]}|j|kr |Sq WdS(N(t propertiesRR(R tpropR((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pyt find_prop4scCsúd}x'|D]} | j|kr | }Pq q W|dkrOtd|ƒ‚nd} |rt||ƒ} | dkrtd||fƒ‚n|rùt| j|ƒ} | dkrðt| j|ƒ} | dkrðtd|||fƒ‚qðn| } q×| } nÕ|rŽt||ƒ} | dkr<td||fƒ‚n|r…t| j|ƒ} | dkr|td|||fƒ‚n| } q×| } nI|rÑt ||ƒ}|dkrÈtd||fƒ‚n|} n|} | j j dt j ||ƒƒdS(NsNo interface %ssNo method %s on interface %ss&No arg %s on method %s on interface %ssNo signal %s on interface %ss&No arg %s on signal %s on interface %ssNo property %s on interface %si(RRt RuntimeErrorRR tin_argstout_argsRtargsRt annotationstinsertRt Annotation(t iface_listR RRRtargtkeytvaluet iface_objtit target_objt method_objtarg_objt signal_objtprop_obj((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pytapply_annotation:sJ             c CsBx;|D]3\}}}|jdƒ}|dkrâ|d|!}||d}|jdƒ}|dkrÀ||d}|d|!}|jdƒ}|d|!}t||d|d|||ƒq:t||d|dd||ƒq|jdƒ}|dkr:|d|!}||d} t||dd| d||ƒq|jd ƒ}|dkr|d|!} | jd ƒ}| d|!}| |d} |jdƒ}|dkró||d}|jdƒ}|d|!}t||| dd|||ƒq:t||| ddd||ƒq|}t||dddd||ƒqWdS( Ns::iÿÿÿÿiit[it]t:s()t.(tfindR)Rtrfind( Rtannotation_listtwhatR R!tposR RRRtcombinedR((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pytapply_annotationshsB     ""  "     ""c CsPtjdƒ}|jdddddddd ƒ|jdd dd d ddd ƒ|jddddd dddƒ|jddddddƒ|jddddddƒ|jddddddƒ|jddddddddddƒ|jƒ\}}g}xL|D]D}t|ƒ}|jƒ}|jƒtj|ƒ}|j |ƒqW|j dkrzt ||j ƒnx$|D]}|j |j|jƒqW|j} tj|| ƒ} | rÑ| jƒ} n|j} | r?t| ddƒ} t| d dƒ}tj||j|j|j| | |ƒ}|jƒ} ntjd!ƒdS("Ns%prog [options]ts --xml-filestmetavartFILEtactiontappendthelpsD-Bus introspection XML files--interface-prefixtPREFIXtdefaults<String to strip from D-Bus interface names for code and docss --c-namespacet NAMESPACEs)The namespace to use for generated C codes--c-generate-object-managert store_truesCGenerate a GDBusObjectManagerClient subclass when generating C codes--generate-c-codetOUTFILESs Generate C code in OUTFILES.[ch]s--generate-docbooks2Generate Docbook in OUTFILES-org.Project.IFace.xmls --annotatetnargsisWHAT KEY VALUEs*Add annotation (may be used several times)s.htws.ci(toptparset OptionParsert add_optiont parse_argstopentreadtcloseRtparse_dbus_xmltextendtannotateRR4t post_processtinterface_prefixt c_namespacetgenerate_docbookRtDocbookCodeGeneratortgeneratetgenerate_c_codeRt CodeGeneratortc_generate_object_managertsystexit(t arg_parsertoptsRt all_ifacestfnametftxml_datat parsed_ifacesR#tdocbookt docbook_gentrettc_codethtctgen((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pyt codegen_main•sV!         t__main__(RURBR5RRRRRRR RRRR)R4Ret__name__(((s^/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/lib/gdbus-2.0/codegen/codegen_main.pyts       . - 3