ó *ˆÿUc@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((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pytfind_arg s cCs+x$|jD]}|j|kr |Sq WdS(N(tmethodsRR(tifacetmethodtm((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pyt find_method&scCs+x$|jD]}|j|kr |Sq WdS(N(tsignalsRR(R tsignalR((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pyt find_signal,scCs+x$|jD]}|j|kr |Sq WdS(N(t propertiesRR(R tpropR((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pyt find_prop2scCsú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((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pytapply_annotation8sJ             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((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pytapply_annotationsfsB     ""  "     ""c Csgtjdƒ}|jdddddddd ƒ|jdd dd d ddd ƒ|jddddd dddƒ|jddddddƒ|jddddddƒ|jddddddƒ|jddddddddddƒ|jƒ\}}g}xO|D]G}t|dƒ}|jƒ}|jƒtj|ƒ}|j |ƒqW|j dkr}t ||j ƒnx$|D]}|j |j|jƒq„W|j} tj|| ƒ} | rÔ| jƒ} n|j} | rVt| dd ƒ} t| d!d ƒ}tj||j|j|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)trbs.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((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pyt codegen_main“sZ!           t__main__(RVRCR5RRRRRRR RRRR)R4Rft__name__(((sY/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_main.pyts       . - 5