Back to index

libunity  5.92.0
unity-tool-dbus-util.c
Go to the documentation of this file.
00001 /* unity-tool-dbus-util.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-tool-dbus-util.vala, do not modify */
00003 
00004 
00005 #include <glib.h>
00006 #include <glib-object.h>
00007 #include <stdlib.h>
00008 #include <string.h>
00009 #include <stdio.h>
00010 #include <gio/gio.h>
00011 #include <gobject/gvaluecollector.h>
00012 
00013 
00014 #define UNITY_TESTER_TYPE_DBUS_LENS_UTIL (unity_tester_dbus_lens_util_get_type ())
00015 #define UNITY_TESTER_DBUS_LENS_UTIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TESTER_TYPE_DBUS_LENS_UTIL, UnityTesterDBusLensUtil))
00016 #define UNITY_TESTER_DBUS_LENS_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TESTER_TYPE_DBUS_LENS_UTIL, UnityTesterDBusLensUtilClass))
00017 #define UNITY_TESTER_IS_DBUS_LENS_UTIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TESTER_TYPE_DBUS_LENS_UTIL))
00018 #define UNITY_TESTER_IS_DBUS_LENS_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TESTER_TYPE_DBUS_LENS_UTIL))
00019 #define UNITY_TESTER_DBUS_LENS_UTIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TESTER_TYPE_DBUS_LENS_UTIL, UnityTesterDBusLensUtilClass))
00020 
00021 typedef struct _UnityTesterDBusLensUtil UnityTesterDBusLensUtil;
00022 typedef struct _UnityTesterDBusLensUtilClass UnityTesterDBusLensUtilClass;
00023 typedef struct _UnityTesterDBusLensUtilPrivate UnityTesterDBusLensUtilPrivate;
00024 
00025 #define UNITY_TESTER_DBUS_LENS_UTIL_TYPE_DBUS_OBJECT_ADDRESS (unity_tester_dbus_lens_util_dbus_object_address_get_type ())
00026 typedef struct _UnityTesterDBusLensUtilDBusObjectAddress UnityTesterDBusLensUtilDBusObjectAddress;
00027 #define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
00028 #define _g_free0(var) (var = (g_free (var), NULL))
00029 #define __g_queue_free__unity_tester_dbus_lens_util_dbus_object_address_free0_0(var) ((var == NULL) ? NULL : (var = (_g_queue_free__unity_tester_dbus_lens_util_dbus_object_address_free0_ (var), NULL)))
00030 #define __g_list_free__unity_tester_dbus_lens_util_dbus_object_address_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__unity_tester_dbus_lens_util_dbus_object_address_free0_ (var), NULL)))
00031 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00032 #define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
00033 #define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
00034 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00035 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00036 #define _unity_tester_dbus_lens_util_unref0(var) ((var == NULL) ? NULL : (var = (unity_tester_dbus_lens_util_unref (var), NULL)))
00037 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
00038 #define _unity_tester_dbus_lens_util_dbus_object_address_free0(var) ((var == NULL) ? NULL : (var = (unity_tester_dbus_lens_util_dbus_object_address_free (var), NULL)))
00039 #define _g_markup_parse_context_free0(var) ((var == NULL) ? NULL : (var = (g_markup_parse_context_free (var), NULL)))
00040 typedef struct _unity_tester_dbus_lens_util_findLensesData unity_tester_dbus_lens_util_findLensesData;
00041 typedef struct _UnityTesterParamSpecDBusLensUtil UnityTesterParamSpecDBusLensUtil;
00042 
00043 struct _UnityTesterDBusLensUtil {
00044        GTypeInstance parent_instance;
00045        volatile int ref_count;
00046        UnityTesterDBusLensUtilPrivate * priv;
00047 };
00048 
00049 struct _UnityTesterDBusLensUtilClass {
00050        GTypeClass parent_class;
00051        void (*finalize) (UnityTesterDBusLensUtil *self);
00052 };
00053 
00054 struct _UnityTesterDBusLensUtilDBusObjectAddress {
00055        gchar* dbus_name;
00056        gchar* dbus_path;
00057 };
00058 
00059 struct _UnityTesterDBusLensUtilPrivate {
00060        GRegex* lens_dbusname_regex;
00061        gchar* current_dbus_name;
00062        gchar* current_dbus_path;
00063        GQueue* nodes;
00064        GList* lenses;
00065 };
00066 
00067 struct _unity_tester_dbus_lens_util_findLensesData {
00068        int _state_;
00069        GObject* _source_object_;
00070        GAsyncResult* _res_;
00071        GSimpleAsyncResult* _async_result;
00072        UnityTesterDBusLensUtil* self;
00073        GList* result;
00074        GRegex* _tmp0_;
00075        FILE* _tmp1_;
00076        GList* _tmp2_;
00077        GDBusConnection* _tmp3_;
00078        GDBusConnection* bus;
00079        GVariantType* _tmp4_;
00080        GVariantType* vt;
00081        GList* _tmp5_;
00082        GList* _tmp6_;
00083        GList* srv_collection;
00084        GList* srv_it;
00085        gchar* _tmp7_;
00086        gchar* srv;
00087        GRegex* _tmp8_;
00088        const gchar* _tmp9_;
00089        gboolean _tmp10_;
00090        GVariantType* _tmp11_;
00091        GVariantType* _tmp12_;
00092        GVariantBuilder* _tmp13_;
00093        GVariantBuilder* _tmp14_;
00094        GVariantBuilder* vb;
00095        GVariantBuilder* _tmp15_;
00096        const gchar* _tmp16_;
00097        GVariant* _tmp17_;
00098        GDBusConnection* _tmp18_;
00099        GVariantBuilder* _tmp19_;
00100        GVariant* _tmp20_;
00101        GVariant* _tmp21_;
00102        const GVariantType* _tmp22_;
00103        GVariant* _tmp23_;
00104        GVariant* _tmp24_;
00105        GVariant* v;
00106        GVariant* _tmp25_;
00107        GVariant* _tmp26_;
00108        GVariant* _tmp27_;
00109        GVariant* _tmp28_;
00110        const gchar* _tmp29_;
00111        gchar* _tmp30_;
00112        gchar* _tmp31_;
00113        gchar* owner;
00114        const gchar* _tmp32_;
00115        const gchar* _tmp33_;
00116        gchar* _tmp34_;
00117        gchar* _tmp35_;
00118        UnityTesterDBusLensUtilDBusObjectAddress _tmp36_;
00119        UnityTesterDBusLensUtilDBusObjectAddress obj;
00120        GQueue* _tmp37_;
00121        UnityTesterDBusLensUtilDBusObjectAddress _tmp38_;
00122        UnityTesterDBusLensUtilDBusObjectAddress _tmp39_;
00123        UnityTesterDBusLensUtilDBusObjectAddress* _tmp40_;
00124        GError* e;
00125        GQueue* _tmp41_;
00126        guint _tmp42_;
00127        GQueue* _tmp43_;
00128        gpointer _tmp44_;
00129        UnityTesterDBusLensUtilDBusObjectAddress* _tmp45_;
00130        UnityTesterDBusLensUtilDBusObjectAddress _tmp46_;
00131        UnityTesterDBusLensUtilDBusObjectAddress _tmp47_;
00132        UnityTesterDBusLensUtilDBusObjectAddress node;
00133        UnityTesterDBusLensUtilDBusObjectAddress _tmp48_;
00134        const gchar* _tmp49_;
00135        gchar* _tmp50_;
00136        UnityTesterDBusLensUtilDBusObjectAddress _tmp51_;
00137        const gchar* _tmp52_;
00138        gchar* _tmp53_;
00139        GDBusConnection* _tmp54_;
00140        const gchar* _tmp55_;
00141        const gchar* _tmp56_;
00142        const GVariantType* _tmp57_;
00143        GVariant* _tmp58_;
00144        GVariant* _vala1_v;
00145        GVariant* _tmp59_;
00146        GVariant* _tmp60_;
00147        GVariant* _tmp61_;
00148        GVariant* _tmp62_;
00149        const gchar* _tmp63_;
00150        gchar* _tmp64_;
00151        gchar* _tmp65_;
00152        gchar* xmldata;
00153        GMarkupParseContext* _tmp66_;
00154        GMarkupParseContext* context;
00155        GMarkupParseContext* _tmp67_;
00156        const gchar* _tmp68_;
00157        const gchar* _tmp69_;
00158        gint _tmp70_;
00159        gint _tmp71_;
00160        GError* _vala1_e;
00161        GList* _tmp72_;
00162        GError * _inner_error_;
00163 };
00164 
00165 struct _UnityTesterParamSpecDBusLensUtil {
00166        GParamSpec parent_instance;
00167 };
00168 
00169 
00170 static gpointer unity_tester_dbus_lens_util_parent_class = NULL;
00171 
00172 gpointer unity_tester_dbus_lens_util_ref (gpointer instance);
00173 void unity_tester_dbus_lens_util_unref (gpointer instance);
00174 GParamSpec* unity_tester_param_spec_dbus_lens_util (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
00175 void unity_tester_value_set_dbus_lens_util (GValue* value, gpointer v_object);
00176 void unity_tester_value_take_dbus_lens_util (GValue* value, gpointer v_object);
00177 gpointer unity_tester_value_get_dbus_lens_util (const GValue* value);
00178 GType unity_tester_dbus_lens_util_get_type (void) G_GNUC_CONST;
00179 GType unity_tester_dbus_lens_util_dbus_object_address_get_type (void) G_GNUC_CONST;
00180 UnityTesterDBusLensUtilDBusObjectAddress* unity_tester_dbus_lens_util_dbus_object_address_dup (const UnityTesterDBusLensUtilDBusObjectAddress* self);
00181 void unity_tester_dbus_lens_util_dbus_object_address_free (UnityTesterDBusLensUtilDBusObjectAddress* self);
00182 void unity_tester_dbus_lens_util_dbus_object_address_copy (const UnityTesterDBusLensUtilDBusObjectAddress* self, UnityTesterDBusLensUtilDBusObjectAddress* dest);
00183 void unity_tester_dbus_lens_util_dbus_object_address_destroy (UnityTesterDBusLensUtilDBusObjectAddress* self);
00184 #define UNITY_TESTER_DBUS_LENS_UTIL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TESTER_TYPE_DBUS_LENS_UTIL, UnityTesterDBusLensUtilPrivate))
00185 enum  {
00186        UNITY_TESTER_DBUS_LENS_UTIL_DUMMY_PROPERTY
00187 };
00188 static void _unity_tester_dbus_lens_util_dbus_object_address_free0_ (gpointer var);
00189 static void _g_queue_free__unity_tester_dbus_lens_util_dbus_object_address_free0_ (GQueue* self);
00190 static void _g_list_free__unity_tester_dbus_lens_util_dbus_object_address_free0_ (GList* self);
00191 static void unity_tester_dbus_lens_util_start (UnityTesterDBusLensUtil* self, GMarkupParseContext* context, const gchar* name, gchar** attr_names, int attr_names_length1, gchar** attr_values, int attr_values_length1, GError** error);
00192 static void _unity_tester_dbus_lens_util_start_gmarkup_parser_start_element_func (GMarkupParseContext* context, const gchar* element_name, gchar** attribute_names, gchar** attribute_values, gpointer self, GError** error);
00193 UnityTesterDBusLensUtil* unity_tester_dbus_lens_util_new (void);
00194 UnityTesterDBusLensUtil* unity_tester_dbus_lens_util_construct (GType object_type);
00195 static GList* unity_tester_dbus_lens_util_getServices (UnityTesterDBusLensUtil* self, GError** error);
00196 static void _g_free0_ (gpointer var);
00197 static void _g_list_free__g_free0_ (GList* self);
00198 static gint _______lambda2_ (UnityTesterDBusLensUtilDBusObjectAddress* a, UnityTesterDBusLensUtilDBusObjectAddress* b);
00199 static gint ________lambda2__gcompare_func (gconstpointer a, gconstpointer b);
00200 static void unity_tester_dbus_lens_util_findLenses_data_free (gpointer _data);
00201 void unity_tester_dbus_lens_util_findLenses (UnityTesterDBusLensUtil* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00202 GList* unity_tester_dbus_lens_util_findLenses_finish (UnityTesterDBusLensUtil* self, GAsyncResult* _res_, GError** error);
00203 static gboolean unity_tester_dbus_lens_util_findLenses_co (unity_tester_dbus_lens_util_findLensesData* _data_);
00204 static GVariant* _variant_new2 (const gchar* value);
00205 static gboolean _unity_tester_dbus_lens_util_findLenses_co_gsource_func (gpointer self);
00206 static void unity_tester_dbus_lens_util_finalize (UnityTesterDBusLensUtil* obj);
00207 static gint _vala_array_length (gpointer array);
00208 
00209 static const GMarkupParser UNITY_TESTER_DBUS_LENS_UTIL_parser = {_unity_tester_dbus_lens_util_start_gmarkup_parser_start_element_func, NULL, NULL, NULL, NULL};
00210 
00211 static void _unity_tester_dbus_lens_util_dbus_object_address_free0_ (gpointer var) {
00212        (var == NULL) ? NULL : (var = (unity_tester_dbus_lens_util_dbus_object_address_free (var), NULL));
00213 }
00214 
00215 
00216 static void _g_queue_free__unity_tester_dbus_lens_util_dbus_object_address_free0_ (GQueue* self) {
00217        g_queue_foreach (self, (GFunc) _unity_tester_dbus_lens_util_dbus_object_address_free0_, NULL);
00218        g_queue_free (self);
00219 }
00220 
00221 
00222 static void _g_list_free__unity_tester_dbus_lens_util_dbus_object_address_free0_ (GList* self) {
00223        g_list_foreach (self, (GFunc) _unity_tester_dbus_lens_util_dbus_object_address_free0_, NULL);
00224        g_list_free (self);
00225 }
00226 
00227 
00228 static void _unity_tester_dbus_lens_util_start_gmarkup_parser_start_element_func (GMarkupParseContext* context, const gchar* element_name, gchar** attribute_names, gchar** attribute_values, gpointer self, GError** error) {
00229        unity_tester_dbus_lens_util_start (self, context, element_name, attribute_names, _vala_array_length (attribute_names), attribute_values, _vala_array_length (attribute_values), error);
00230 }
00231 
00232 
00233 UnityTesterDBusLensUtil* unity_tester_dbus_lens_util_construct (GType object_type) {
00234        UnityTesterDBusLensUtil* self = NULL;
00235        GError * _inner_error_ = NULL;
00236        self = (UnityTesterDBusLensUtil*) g_type_create_instance (object_type);
00237        {
00238               GRegex* _tmp0_;
00239               GRegex* _tmp1_;
00240               _tmp0_ = g_regex_new ("^([a-zA-Z-]+(\\.[a-zA-Z-]+)+)\\.T[\\d]+.[a-zA-Z]+$", 0, 0, &_inner_error_);
00241               _tmp1_ = _tmp0_;
00242               if (_inner_error_ != NULL) {
00243                      goto __catch6_g_error;
00244               }
00245               _g_regex_unref0 (self->priv->lens_dbusname_regex);
00246               self->priv->lens_dbusname_regex = _tmp1_;
00247        }
00248        goto __finally6;
00249        __catch6_g_error:
00250        {
00251               GError* e = NULL;
00252               FILE* _tmp2_;
00253               e = _inner_error_;
00254               _inner_error_ = NULL;
00255               _tmp2_ = stderr;
00256               fprintf (_tmp2_, "Error parsing lens_dbusname_regex");
00257               _g_error_free0 (e);
00258        }
00259        __finally6:
00260        if (_inner_error_ != NULL) {
00261               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00262               g_clear_error (&_inner_error_);
00263               return NULL;
00264        }
00265        return self;
00266 }
00267 
00268 
00269 UnityTesterDBusLensUtil* unity_tester_dbus_lens_util_new (void) {
00270        return unity_tester_dbus_lens_util_construct (UNITY_TESTER_TYPE_DBUS_LENS_UTIL);
00271 }
00272 
00273 
00277 static void _g_free0_ (gpointer var) {
00278        var = (g_free (var), NULL);
00279 }
00280 
00281 
00282 static void _g_list_free__g_free0_ (GList* self) {
00283        g_list_foreach (self, (GFunc) _g_free0_, NULL);
00284        g_list_free (self);
00285 }
00286 
00287 
00288 static GList* unity_tester_dbus_lens_util_getServices (UnityTesterDBusLensUtil* self, GError** error) {
00289        GList* result = NULL;
00290        GList* services;
00291        GVariantType* _tmp0_;
00292        GVariantType* vt;
00293        GDBusConnection* _tmp1_ = NULL;
00294        GDBusConnection* bus;
00295        GDBusConnection* _tmp2_;
00296        const GVariantType* _tmp3_;
00297        GVariant* _tmp4_ = NULL;
00298        GVariant* v;
00299        GVariant* _tmp5_;
00300        GVariant* _tmp6_ = NULL;
00301        GVariant* _tmp7_;
00302        size_t _tmp8_;
00303        const gchar** _tmp9_ = NULL;
00304        const gchar** _tmp10_;
00305        gint _tmp10__length1;
00306        const gchar** names;
00307        gint names_length1;
00308        gint _names_size_;
00309        const gchar** _tmp11_;
00310        gint _tmp11__length1;
00311        GError * _inner_error_ = NULL;
00312        g_return_val_if_fail (self != NULL, NULL);
00313        services = NULL;
00314        _tmp0_ = g_variant_type_new ("(as)");
00315        vt = _tmp0_;
00316        _tmp1_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
00317        bus = _tmp1_;
00318        if (_inner_error_ != NULL) {
00319               g_propagate_error (error, _inner_error_);
00320               _g_variant_type_free0 (vt);
00321               __g_list_free__g_free0_0 (services);
00322               return NULL;
00323        }
00324        _tmp2_ = bus;
00325        _tmp3_ = vt;
00326        _tmp4_ = g_dbus_connection_call_sync (_tmp2_, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "ListNames", NULL, _tmp3_, 0, -1, NULL, &_inner_error_);
00327        v = _tmp4_;
00328        if (_inner_error_ != NULL) {
00329               g_propagate_error (error, _inner_error_);
00330               _g_object_unref0 (bus);
00331               _g_variant_type_free0 (vt);
00332               __g_list_free__g_free0_0 (services);
00333               return NULL;
00334        }
00335        _tmp5_ = v;
00336        _tmp6_ = g_variant_get_child_value (_tmp5_, (gsize) 0);
00337        _tmp7_ = _tmp6_;
00338        _tmp9_ = g_variant_get_strv (_tmp7_, &_tmp8_);
00339        _tmp10_ = _tmp9_;
00340        _tmp10__length1 = _tmp8_;
00341        _g_variant_unref0 (_tmp7_);
00342        names = _tmp10_;
00343        names_length1 = _tmp10__length1;
00344        _names_size_ = names_length1;
00345        _tmp11_ = names;
00346        _tmp11__length1 = names_length1;
00347        {
00348               const gchar** s_collection = NULL;
00349               gint s_collection_length1 = 0;
00350               gint _s_collection_size_ = 0;
00351               gint s_it = 0;
00352               s_collection = _tmp11_;
00353               s_collection_length1 = _tmp11__length1;
00354               for (s_it = 0; s_it < _tmp11__length1; s_it = s_it + 1) {
00355                      const gchar* s = NULL;
00356                      s = s_collection[s_it];
00357                      {
00358                             const gchar* _tmp12_;
00359                             gchar* _tmp13_;
00360                             _tmp12_ = s;
00361                             _tmp13_ = g_strdup ((gchar*) _tmp12_);
00362                             services = g_list_append (services, _tmp13_);
00363                      }
00364               }
00365        }
00366        result = services;
00367        names = (g_free (names), NULL);
00368        _g_variant_unref0 (v);
00369        _g_object_unref0 (bus);
00370        _g_variant_type_free0 (vt);
00371        return result;
00372 }
00373 
00374 
00375 static gpointer _unity_tester_dbus_lens_util_dbus_object_address_dup0 (gpointer self) {
00376        return self ? unity_tester_dbus_lens_util_dbus_object_address_dup (self) : NULL;
00377 }
00378 
00379 
00380 static gint _______lambda2_ (UnityTesterDBusLensUtilDBusObjectAddress* a, UnityTesterDBusLensUtilDBusObjectAddress* b) {
00381        gint result = 0;
00382        gint _tmp0_ = 0;
00383        gboolean _tmp1_ = FALSE;
00384        UnityTesterDBusLensUtilDBusObjectAddress* _tmp2_;
00385        const gchar* _tmp3_;
00386        UnityTesterDBusLensUtilDBusObjectAddress* _tmp4_;
00387        const gchar* _tmp5_;
00388        gboolean _tmp10_;
00389        gint _tmp11_;
00390        _tmp2_ = a;
00391        _tmp3_ = (*_tmp2_).dbus_name;
00392        _tmp4_ = b;
00393        _tmp5_ = (*_tmp4_).dbus_name;
00394        if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
00395               UnityTesterDBusLensUtilDBusObjectAddress* _tmp6_;
00396               const gchar* _tmp7_;
00397               UnityTesterDBusLensUtilDBusObjectAddress* _tmp8_;
00398               const gchar* _tmp9_;
00399               _tmp6_ = a;
00400               _tmp7_ = (*_tmp6_).dbus_path;
00401               _tmp8_ = b;
00402               _tmp9_ = (*_tmp8_).dbus_path;
00403               _tmp1_ = g_strcmp0 (_tmp7_, _tmp9_) == 0;
00404        } else {
00405               _tmp1_ = FALSE;
00406        }
00407        _tmp10_ = _tmp1_;
00408        if (_tmp10_) {
00409               _tmp0_ = 0;
00410        } else {
00411               _tmp0_ = 1;
00412        }
00413        _tmp11_ = _tmp0_;
00414        result = _tmp11_;
00415        return result;
00416 }
00417 
00418 
00419 static gint ________lambda2__gcompare_func (gconstpointer a, gconstpointer b) {
00420        gint result;
00421        result = _______lambda2_ (a, b);
00422        return result;
00423 }
00424 
00425 
00426 static void unity_tester_dbus_lens_util_start (UnityTesterDBusLensUtil* self, GMarkupParseContext* context, const gchar* name, gchar** attr_names, int attr_names_length1, gchar** attr_values, int attr_values_length1, GError** error) {
00427        const gchar* _tmp0_;
00428        const gchar* _tmp32_;
00429        g_return_if_fail (self != NULL);
00430        g_return_if_fail (context != NULL);
00431        g_return_if_fail (name != NULL);
00432        _tmp0_ = name;
00433        if (g_strcmp0 (_tmp0_, "node") == 0) {
00434               {
00435                      gint i;
00436                      i = 0;
00437                      {
00438                             gboolean _tmp1_;
00439                             _tmp1_ = TRUE;
00440                             while (TRUE) {
00441                                    gboolean _tmp2_;
00442                                    gint _tmp4_;
00443                                    gchar** _tmp5_;
00444                                    gint _tmp5__length1;
00445                                    gchar** _tmp6_;
00446                                    gint _tmp6__length1;
00447                                    gint _tmp7_;
00448                                    const gchar* _tmp8_;
00449                                    _tmp2_ = _tmp1_;
00450                                    if (!_tmp2_) {
00451                                           gint _tmp3_;
00452                                           _tmp3_ = i;
00453                                           i = _tmp3_ + 1;
00454                                    }
00455                                    _tmp1_ = FALSE;
00456                                    _tmp4_ = i;
00457                                    _tmp5_ = attr_names;
00458                                    _tmp5__length1 = attr_names_length1;
00459                                    if (!(_tmp4_ < _tmp5__length1)) {
00460                                           break;
00461                                    }
00462                                    _tmp6_ = attr_names;
00463                                    _tmp6__length1 = attr_names_length1;
00464                                    _tmp7_ = i;
00465                                    _tmp8_ = _tmp6_[_tmp7_];
00466                                    if (g_strcmp0 (_tmp8_, "name") == 0) {
00467                                           gchar* _tmp9_ = NULL;
00468                                           const gchar* _tmp10_;
00469                                           gboolean _tmp11_ = FALSE;
00470                                           const gchar* _tmp20_;
00471                                           gchar* _tmp21_;
00472                                           gchar* node_path;
00473                                           const gchar* _tmp22_;
00474                                           gchar* _tmp23_;
00475                                           const gchar* _tmp24_;
00476                                           const gchar* _tmp25_;
00477                                           gchar* _tmp26_;
00478                                           UnityTesterDBusLensUtilDBusObjectAddress _tmp27_ = {0};
00479                                           UnityTesterDBusLensUtilDBusObjectAddress obj;
00480                                           GQueue* _tmp28_;
00481                                           UnityTesterDBusLensUtilDBusObjectAddress _tmp29_;
00482                                           UnityTesterDBusLensUtilDBusObjectAddress _tmp30_;
00483                                           UnityTesterDBusLensUtilDBusObjectAddress* _tmp31_;
00484                                           _tmp10_ = self->priv->current_dbus_path;
00485                                           _tmp11_ = g_str_has_suffix (_tmp10_, "/");
00486                                           if (_tmp11_) {
00487                                                  gchar** _tmp12_;
00488                                                  gint _tmp12__length1;
00489                                                  gint _tmp13_;
00490                                                  const gchar* _tmp14_;
00491                                                  gchar* _tmp15_;
00492                                                  _tmp12_ = attr_values;
00493                                                  _tmp12__length1 = attr_values_length1;
00494                                                  _tmp13_ = i;
00495                                                  _tmp14_ = _tmp12_[_tmp13_];
00496                                                  _tmp15_ = g_strdup (_tmp14_);
00497                                                  _g_free0 (_tmp9_);
00498                                                  _tmp9_ = _tmp15_;
00499                                           } else {
00500                                                  gchar** _tmp16_;
00501                                                  gint _tmp16__length1;
00502                                                  gint _tmp17_;
00503                                                  const gchar* _tmp18_;
00504                                                  gchar* _tmp19_;
00505                                                  _tmp16_ = attr_values;
00506                                                  _tmp16__length1 = attr_values_length1;
00507                                                  _tmp17_ = i;
00508                                                  _tmp18_ = _tmp16_[_tmp17_];
00509                                                  _tmp19_ = g_strconcat ("/", _tmp18_, NULL);
00510                                                  _g_free0 (_tmp9_);
00511                                                  _tmp9_ = _tmp19_;
00512                                           }
00513                                           _tmp20_ = _tmp9_;
00514                                           _tmp21_ = g_strdup (_tmp20_);
00515                                           node_path = _tmp21_;
00516                                           _tmp22_ = self->priv->current_dbus_name;
00517                                           _tmp23_ = g_strdup (_tmp22_);
00518                                           _tmp24_ = self->priv->current_dbus_path;
00519                                           _tmp25_ = node_path;
00520                                           _tmp26_ = g_strconcat (_tmp24_, _tmp25_, NULL);
00521                                           memset (&_tmp27_, 0, sizeof (UnityTesterDBusLensUtilDBusObjectAddress));
00522                                           _g_free0 (_tmp27_.dbus_name);
00523                                           _tmp27_.dbus_name = _tmp23_;
00524                                           _g_free0 (_tmp27_.dbus_path);
00525                                           _tmp27_.dbus_path = _tmp26_;
00526                                           obj = _tmp27_;
00527                                           _tmp28_ = self->priv->nodes;
00528                                           _tmp29_ = obj;
00529                                           _tmp30_ = _tmp29_;
00530                                           _tmp31_ = _unity_tester_dbus_lens_util_dbus_object_address_dup0 (&_tmp30_);
00531                                           g_queue_push_tail (_tmp28_, _tmp31_);
00532                                           unity_tester_dbus_lens_util_dbus_object_address_destroy (&obj);
00533                                           _g_free0 (node_path);
00534                                           _g_free0 (_tmp9_);
00535                                    }
00536                             }
00537                      }
00538               }
00539        }
00540        _tmp32_ = name;
00541        if (g_strcmp0 (_tmp32_, "interface") == 0) {
00542               {
00543                      gint i;
00544                      i = 0;
00545                      {
00546                             gboolean _tmp33_;
00547                             _tmp33_ = TRUE;
00548                             while (TRUE) {
00549                                    gboolean _tmp34_;
00550                                    gint _tmp36_;
00551                                    gchar** _tmp37_;
00552                                    gint _tmp37__length1;
00553                                    gboolean _tmp38_ = FALSE;
00554                                    gchar** _tmp39_;
00555                                    gint _tmp39__length1;
00556                                    gint _tmp40_;
00557                                    const gchar* _tmp41_;
00558                                    gboolean _tmp45_;
00559                                    _tmp34_ = _tmp33_;
00560                                    if (!_tmp34_) {
00561                                           gint _tmp35_;
00562                                           _tmp35_ = i;
00563                                           i = _tmp35_ + 1;
00564                                    }
00565                                    _tmp33_ = FALSE;
00566                                    _tmp36_ = i;
00567                                    _tmp37_ = attr_names;
00568                                    _tmp37__length1 = attr_names_length1;
00569                                    if (!(_tmp36_ < _tmp37__length1)) {
00570                                           break;
00571                                    }
00572                                    _tmp39_ = attr_names;
00573                                    _tmp39__length1 = attr_names_length1;
00574                                    _tmp40_ = i;
00575                                    _tmp41_ = _tmp39_[_tmp40_];
00576                                    if (g_strcmp0 (_tmp41_, "name") == 0) {
00577                                           gchar** _tmp42_;
00578                                           gint _tmp42__length1;
00579                                           gint _tmp43_;
00580                                           const gchar* _tmp44_;
00581                                           _tmp42_ = attr_values;
00582                                           _tmp42__length1 = attr_values_length1;
00583                                           _tmp43_ = i;
00584                                           _tmp44_ = _tmp42_[_tmp43_];
00585                                           _tmp38_ = g_strcmp0 (_tmp44_, "com.canonical.Unity.Lens") == 0;
00586                                    } else {
00587                                           _tmp38_ = FALSE;
00588                                    }
00589                                    _tmp45_ = _tmp38_;
00590                                    if (_tmp45_) {
00591                                           const gchar* _tmp46_;
00592                                           gchar* _tmp47_;
00593                                           const gchar* _tmp48_;
00594                                           gchar* _tmp49_;
00595                                           UnityTesterDBusLensUtilDBusObjectAddress _tmp50_ = {0};
00596                                           UnityTesterDBusLensUtilDBusObjectAddress obj;
00597                                           GList* _tmp51_;
00598                                           UnityTesterDBusLensUtilDBusObjectAddress _tmp52_;
00599                                           GList* _tmp53_ = NULL;
00600                                           guint _tmp54_ = 0U;
00601                                           _tmp46_ = self->priv->current_dbus_name;
00602                                           _tmp47_ = g_strdup (_tmp46_);
00603                                           _tmp48_ = self->priv->current_dbus_path;
00604                                           _tmp49_ = g_strdup (_tmp48_);
00605                                           memset (&_tmp50_, 0, sizeof (UnityTesterDBusLensUtilDBusObjectAddress));
00606                                           _g_free0 (_tmp50_.dbus_name);
00607                                           _tmp50_.dbus_name = _tmp47_;
00608                                           _g_free0 (_tmp50_.dbus_path);
00609                                           _tmp50_.dbus_path = _tmp49_;
00610                                           obj = _tmp50_;
00611                                           _tmp51_ = self->priv->lenses;
00612                                           _tmp52_ = obj;
00613                                           _tmp53_ = g_list_find_custom (_tmp51_, &_tmp52_, ________lambda2__gcompare_func);
00614                                           _tmp54_ = g_list_length (_tmp53_);
00615                                           if (_tmp54_ == ((guint) 0)) {
00616                                                  UnityTesterDBusLensUtilDBusObjectAddress _tmp55_;
00617                                                  UnityTesterDBusLensUtilDBusObjectAddress _tmp56_;
00618                                                  UnityTesterDBusLensUtilDBusObjectAddress* _tmp57_;
00619                                                  _tmp55_ = obj;
00620                                                  _tmp56_ = _tmp55_;
00621                                                  _tmp57_ = _unity_tester_dbus_lens_util_dbus_object_address_dup0 (&_tmp56_);
00622                                                  self->priv->lenses = g_list_append (self->priv->lenses, _tmp57_);
00623                                           }
00624                                           unity_tester_dbus_lens_util_dbus_object_address_destroy (&obj);
00625                                    }
00626                             }
00627                      }
00628               }
00629        }
00630 }
00631 
00632 
00633 static void unity_tester_dbus_lens_util_findLenses_data_free (gpointer _data) {
00634        unity_tester_dbus_lens_util_findLensesData* _data_;
00635        _data_ = _data;
00636        _unity_tester_dbus_lens_util_unref0 (_data_->self);
00637        g_slice_free (unity_tester_dbus_lens_util_findLensesData, _data_);
00638 }
00639 
00640 
00641 static gpointer _unity_tester_dbus_lens_util_ref0 (gpointer self) {
00642        return self ? unity_tester_dbus_lens_util_ref (self) : NULL;
00643 }
00644 
00645 
00646 void unity_tester_dbus_lens_util_findLenses (UnityTesterDBusLensUtil* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00647        unity_tester_dbus_lens_util_findLensesData* _data_;
00648        UnityTesterDBusLensUtil* _tmp0_;
00649        _data_ = g_slice_new0 (unity_tester_dbus_lens_util_findLensesData);
00650        _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, unity_tester_dbus_lens_util_findLenses);
00651        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_tester_dbus_lens_util_findLenses_data_free);
00652        _tmp0_ = _unity_tester_dbus_lens_util_ref0 (self);
00653        _data_->self = _tmp0_;
00654        unity_tester_dbus_lens_util_findLenses_co (_data_);
00655 }
00656 
00657 
00658 GList* unity_tester_dbus_lens_util_findLenses_finish (UnityTesterDBusLensUtil* self, GAsyncResult* _res_, GError** error) {
00659        GList* result;
00660        unity_tester_dbus_lens_util_findLensesData* _data_;
00661        if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
00662               return NULL;
00663        }
00664        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00665        result = _data_->result;
00666        _data_->result = NULL;
00667        return result;
00668 }
00669 
00670 
00674 static GVariant* _variant_new2 (const gchar* value) {
00675        return g_variant_ref_sink (g_variant_new_string (value));
00676 }
00677 
00678 
00679 static gboolean _unity_tester_dbus_lens_util_findLenses_co_gsource_func (gpointer self) {
00680        gboolean result;
00681        result = unity_tester_dbus_lens_util_findLenses_co (self);
00682        return result;
00683 }
00684 
00685 
00686 static gboolean unity_tester_dbus_lens_util_findLenses_co (unity_tester_dbus_lens_util_findLensesData* _data_) {
00687        switch (_data_->_state_) {
00688               case 0:
00689               goto _state_0;
00690               case 1:
00691               goto _state_1;
00692               default:
00693               g_assert_not_reached ();
00694        }
00695        _state_0:
00696        _data_->_tmp0_ = _data_->self->priv->lens_dbusname_regex;
00697        if (_data_->_tmp0_ == NULL) {
00698               _data_->_tmp1_ = stderr;
00699               fprintf (_data_->_tmp1_, "Invalid lens_dbusname_regex");
00700               _data_->_tmp2_ = _data_->self->priv->lenses;
00701               _data_->result = _data_->_tmp2_;
00702               if (_data_->_state_ == 0) {
00703                      g_simple_async_result_complete_in_idle (_data_->_async_result);
00704               } else {
00705                      g_simple_async_result_complete (_data_->_async_result);
00706               }
00707               g_object_unref (_data_->_async_result);
00708               return FALSE;
00709        }
00710        _data_->_tmp3_ = NULL;
00711        _data_->_tmp3_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_data_->_inner_error_);
00712        _data_->bus = _data_->_tmp3_;
00713        if (_data_->_inner_error_ != NULL) {
00714               g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
00715               g_error_free (_data_->_inner_error_);
00716               if (_data_->_state_ == 0) {
00717                      g_simple_async_result_complete_in_idle (_data_->_async_result);
00718               } else {
00719                      g_simple_async_result_complete (_data_->_async_result);
00720               }
00721               g_object_unref (_data_->_async_result);
00722               return FALSE;
00723        }
00724        _data_->_tmp4_ = g_variant_type_new ("(s)");
00725        _data_->vt = _data_->_tmp4_;
00726        _data_->_tmp5_ = NULL;
00727        _data_->_tmp5_ = unity_tester_dbus_lens_util_getServices (_data_->self, &_data_->_inner_error_);
00728        _data_->_tmp6_ = _data_->_tmp5_;
00729        if (_data_->_inner_error_ != NULL) {
00730               g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
00731               g_error_free (_data_->_inner_error_);
00732               _g_variant_type_free0 (_data_->vt);
00733               _g_object_unref0 (_data_->bus);
00734               if (_data_->_state_ == 0) {
00735                      g_simple_async_result_complete_in_idle (_data_->_async_result);
00736               } else {
00737                      g_simple_async_result_complete (_data_->_async_result);
00738               }
00739               g_object_unref (_data_->_async_result);
00740               return FALSE;
00741        }
00742        {
00743               _data_->srv_collection = _data_->_tmp6_;
00744               for (_data_->srv_it = _data_->srv_collection; _data_->srv_it != NULL; _data_->srv_it = _data_->srv_it->next) {
00745                      _data_->_tmp7_ = g_strdup ((const gchar*) _data_->srv_it->data);
00746                      _data_->srv = _data_->_tmp7_;
00747                      {
00748                             _data_->_tmp8_ = _data_->self->priv->lens_dbusname_regex;
00749                             _data_->_tmp9_ = _data_->srv;
00750                             _data_->_tmp10_ = FALSE;
00751                             _data_->_tmp10_ = g_regex_match (_data_->_tmp8_, _data_->_tmp9_, 0, NULL);
00752                             if (_data_->_tmp10_) {
00753                                    {
00754                                           _data_->_tmp11_ = g_variant_type_new ("(s)");
00755                                           _data_->_tmp12_ = _data_->_tmp11_;
00756                                           _data_->_tmp13_ = g_variant_builder_new (_data_->_tmp12_);
00757                                           _data_->_tmp14_ = _data_->_tmp13_;
00758                                           _g_variant_type_free0 (_data_->_tmp12_);
00759                                           _data_->vb = _data_->_tmp14_;
00760                                           _data_->_tmp15_ = _data_->vb;
00761                                           _data_->_tmp16_ = _data_->srv;
00762                                           _data_->_tmp17_ = _variant_new2 (_data_->_tmp16_);
00763                                           g_variant_builder_add_value (_data_->_tmp15_, _data_->_tmp17_);
00764                                           _data_->_tmp18_ = _data_->bus;
00765                                           _data_->_tmp19_ = _data_->vb;
00766                                           _data_->_tmp20_ = NULL;
00767                                           _data_->_tmp20_ = g_variant_builder_end (_data_->_tmp19_);
00768                                           g_variant_ref_sink (_data_->_tmp20_);
00769                                           _data_->_tmp21_ = _data_->_tmp20_;
00770                                           _data_->_tmp22_ = _data_->vt;
00771                                           _data_->_tmp23_ = NULL;
00772                                           _data_->_tmp23_ = g_dbus_connection_call_sync (_data_->_tmp18_, "org.freedesktop.DBus", "/", "org.freedesktop.DBus", "GetNameOwner", _data_->_tmp21_, _data_->_tmp22_, 0, 10, NULL, &_data_->_inner_error_);
00773                                           _data_->_tmp24_ = _data_->_tmp23_;
00774                                           _g_variant_unref0 (_data_->_tmp21_);
00775                                           _data_->v = _data_->_tmp24_;
00776                                           if (_data_->_inner_error_ != NULL) {
00777                                                  _g_variant_builder_unref0 (_data_->vb);
00778                                                  goto __catch7_g_error;
00779                                           }
00780                                           _data_->_tmp25_ = _data_->v;
00781                                           if (_data_->_tmp25_ != NULL) {
00782                                                  _data_->_tmp26_ = _data_->v;
00783                                                  _data_->_tmp27_ = NULL;
00784                                                  _data_->_tmp27_ = g_variant_get_child_value (_data_->_tmp26_, (gsize) 0);
00785                                                  _data_->_tmp28_ = _data_->_tmp27_;
00786                                                  _data_->_tmp29_ = NULL;
00787                                                  _data_->_tmp29_ = g_variant_get_string (_data_->_tmp28_, NULL);
00788                                                  _data_->_tmp30_ = g_strdup (_data_->_tmp29_);
00789                                                  _data_->_tmp31_ = _data_->_tmp30_;
00790                                                  _g_variant_unref0 (_data_->_tmp28_);
00791                                                  _data_->owner = _data_->_tmp31_;
00792                                                  _data_->_tmp32_ = _data_->owner;
00793                                                  if (_data_->_tmp32_ != NULL) {
00794                                                         _data_->_tmp33_ = _data_->owner;
00795                                                         _data_->_tmp34_ = g_strdup (_data_->_tmp33_);
00796                                                         _data_->_tmp35_ = g_strdup ("/");
00797                                                         memset (&_data_->_tmp36_, 0, sizeof (UnityTesterDBusLensUtilDBusObjectAddress));
00798                                                         memset (&_data_->_tmp36_, 0, sizeof (UnityTesterDBusLensUtilDBusObjectAddress));
00799                                                         _g_free0 (_data_->_tmp36_.dbus_name);
00800                                                         _data_->_tmp36_.dbus_name = _data_->_tmp34_;
00801                                                         _g_free0 (_data_->_tmp36_.dbus_path);
00802                                                         _data_->_tmp36_.dbus_path = _data_->_tmp35_;
00803                                                         _data_->obj = _data_->_tmp36_;
00804                                                         _data_->_tmp37_ = _data_->self->priv->nodes;
00805                                                         _data_->_tmp38_ = _data_->obj;
00806                                                         _data_->_tmp39_ = _data_->_tmp38_;
00807                                                         _data_->_tmp40_ = _unity_tester_dbus_lens_util_dbus_object_address_dup0 (&_data_->_tmp39_);
00808                                                         g_queue_push_tail (_data_->_tmp37_, _data_->_tmp40_);
00809                                                         unity_tester_dbus_lens_util_dbus_object_address_destroy (&_data_->obj);
00810                                                  }
00811                                                  _g_free0 (_data_->owner);
00812                                           }
00813                                           _g_variant_unref0 (_data_->v);
00814                                           _g_variant_builder_unref0 (_data_->vb);
00815                                    }
00816                                    goto __finally7;
00817                                    __catch7_g_error:
00818                                    {
00819                                           _data_->e = _data_->_inner_error_;
00820                                           _data_->_inner_error_ = NULL;
00821                                           _g_error_free0 (_data_->e);
00822                                    }
00823                                    __finally7:
00824                                    if (_data_->_inner_error_ != NULL) {
00825                                           g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
00826                                           g_error_free (_data_->_inner_error_);
00827                                           _g_free0 (_data_->srv);
00828                                           __g_list_free__g_free0_0 (_data_->srv_collection);
00829                                           _g_variant_type_free0 (_data_->vt);
00830                                           _g_object_unref0 (_data_->bus);
00831                                           if (_data_->_state_ == 0) {
00832                                                  g_simple_async_result_complete_in_idle (_data_->_async_result);
00833                                           } else {
00834                                                  g_simple_async_result_complete (_data_->_async_result);
00835                                           }
00836                                           g_object_unref (_data_->_async_result);
00837                                           return FALSE;
00838                                    }
00839                             }
00840                             _g_free0 (_data_->srv);
00841                      }
00842               }
00843               __g_list_free__g_free0_0 (_data_->srv_collection);
00844        }
00845        while (TRUE) {
00846               _data_->_tmp41_ = _data_->self->priv->nodes;
00847               _data_->_tmp42_ = _data_->_tmp41_->length;
00848               if (!(_data_->_tmp42_ > ((guint) 0))) {
00849                      break;
00850               }
00851               _data_->_tmp43_ = _data_->self->priv->nodes;
00852               _data_->_tmp44_ = NULL;
00853               _data_->_tmp44_ = g_queue_pop_head (_data_->_tmp43_);
00854               _data_->_tmp45_ = (UnityTesterDBusLensUtilDBusObjectAddress*) _data_->_tmp44_;
00855               memset (&_data_->_tmp46_, 0, sizeof (UnityTesterDBusLensUtilDBusObjectAddress));
00856               unity_tester_dbus_lens_util_dbus_object_address_copy (_data_->_tmp45_, &_data_->_tmp46_);
00857               _data_->_tmp47_ = _data_->_tmp46_;
00858               _unity_tester_dbus_lens_util_dbus_object_address_free0 (_data_->_tmp45_);
00859               _data_->node = _data_->_tmp47_;
00860               _data_->_tmp48_ = _data_->node;
00861               _data_->_tmp49_ = _data_->_tmp48_.dbus_name;
00862               _data_->_tmp50_ = g_strdup (_data_->_tmp49_);
00863               _g_free0 (_data_->self->priv->current_dbus_name);
00864               _data_->self->priv->current_dbus_name = _data_->_tmp50_;
00865               _data_->_tmp51_ = _data_->node;
00866               _data_->_tmp52_ = _data_->_tmp51_.dbus_path;
00867               _data_->_tmp53_ = g_strdup (_data_->_tmp52_);
00868               _g_free0 (_data_->self->priv->current_dbus_path);
00869               _data_->self->priv->current_dbus_path = _data_->_tmp53_;
00870               {
00871                      _data_->_tmp54_ = _data_->bus;
00872                      _data_->_tmp55_ = _data_->self->priv->current_dbus_name;
00873                      _data_->_tmp56_ = _data_->self->priv->current_dbus_path;
00874                      _data_->_tmp57_ = _data_->vt;
00875                      _data_->_tmp58_ = NULL;
00876                      _data_->_tmp58_ = g_dbus_connection_call_sync (_data_->_tmp54_, _data_->_tmp55_, _data_->_tmp56_, "org.freedesktop.DBus.Introspectable", "Introspect", NULL, _data_->_tmp57_, 0, 10, NULL, &_data_->_inner_error_);
00877                      _data_->_vala1_v = _data_->_tmp58_;
00878                      if (_data_->_inner_error_ != NULL) {
00879                             goto __catch8_g_error;
00880                      }
00881                      _data_->_tmp59_ = _data_->_vala1_v;
00882                      if (_data_->_tmp59_ != NULL) {
00883                             _data_->_tmp60_ = _data_->_vala1_v;
00884                             _data_->_tmp61_ = NULL;
00885                             _data_->_tmp61_ = g_variant_get_child_value (_data_->_tmp60_, (gsize) 0);
00886                             _data_->_tmp62_ = _data_->_tmp61_;
00887                             _data_->_tmp63_ = NULL;
00888                             _data_->_tmp63_ = g_variant_get_string (_data_->_tmp62_, NULL);
00889                             _data_->_tmp64_ = g_strdup (_data_->_tmp63_);
00890                             _data_->_tmp65_ = _data_->_tmp64_;
00891                             _g_variant_unref0 (_data_->_tmp62_);
00892                             _data_->xmldata = _data_->_tmp65_;
00893                             _data_->_tmp66_ = g_markup_parse_context_new (&UNITY_TESTER_DBUS_LENS_UTIL_parser, G_MARKUP_TREAT_CDATA_AS_TEXT, _data_->self, NULL);
00894                             _data_->context = _data_->_tmp66_;
00895                             _data_->_tmp67_ = _data_->context;
00896                             _data_->_tmp68_ = _data_->xmldata;
00897                             _data_->_tmp69_ = _data_->xmldata;
00898                             _data_->_tmp70_ = strlen (_data_->_tmp69_);
00899                             _data_->_tmp71_ = _data_->_tmp70_;
00900                             g_markup_parse_context_parse (_data_->_tmp67_, _data_->_tmp68_, (gssize) _data_->_tmp71_, &_data_->_inner_error_);
00901                             if (_data_->_inner_error_ != NULL) {
00902                                    _g_markup_parse_context_free0 (_data_->context);
00903                                    _g_free0 (_data_->xmldata);
00904                                    _g_variant_unref0 (_data_->_vala1_v);
00905                                    goto __catch8_g_error;
00906                             }
00907                             _g_markup_parse_context_free0 (_data_->context);
00908                             _g_free0 (_data_->xmldata);
00909                      }
00910                      _g_variant_unref0 (_data_->_vala1_v);
00911               }
00912               goto __finally8;
00913               __catch8_g_error:
00914               {
00915                      _data_->_vala1_e = _data_->_inner_error_;
00916                      _data_->_inner_error_ = NULL;
00917                      _g_error_free0 (_data_->_vala1_e);
00918               }
00919               __finally8:
00920               if (_data_->_inner_error_ != NULL) {
00921                      g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
00922                      g_error_free (_data_->_inner_error_);
00923                      unity_tester_dbus_lens_util_dbus_object_address_destroy (&_data_->node);
00924                      _g_variant_type_free0 (_data_->vt);
00925                      _g_object_unref0 (_data_->bus);
00926                      if (_data_->_state_ == 0) {
00927                             g_simple_async_result_complete_in_idle (_data_->_async_result);
00928                      } else {
00929                             g_simple_async_result_complete (_data_->_async_result);
00930                      }
00931                      g_object_unref (_data_->_async_result);
00932                      return FALSE;
00933               }
00934               g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _unity_tester_dbus_lens_util_findLenses_co_gsource_func, _data_, NULL);
00935               _data_->_state_ = 1;
00936               return FALSE;
00937               _state_1:
00938               ;
00939               unity_tester_dbus_lens_util_dbus_object_address_destroy (&_data_->node);
00940        }
00941        _data_->_tmp72_ = _data_->self->priv->lenses;
00942        _data_->result = _data_->_tmp72_;
00943        _g_variant_type_free0 (_data_->vt);
00944        _g_object_unref0 (_data_->bus);
00945        if (_data_->_state_ == 0) {
00946               g_simple_async_result_complete_in_idle (_data_->_async_result);
00947        } else {
00948               g_simple_async_result_complete (_data_->_async_result);
00949        }
00950        g_object_unref (_data_->_async_result);
00951        return FALSE;
00952        _g_variant_type_free0 (_data_->vt);
00953        _g_object_unref0 (_data_->bus);
00954        if (_data_->_state_ == 0) {
00955               g_simple_async_result_complete_in_idle (_data_->_async_result);
00956        } else {
00957               g_simple_async_result_complete (_data_->_async_result);
00958        }
00959        g_object_unref (_data_->_async_result);
00960        return FALSE;
00961 }
00962 
00963 
00964 void unity_tester_dbus_lens_util_dbus_object_address_copy (const UnityTesterDBusLensUtilDBusObjectAddress* self, UnityTesterDBusLensUtilDBusObjectAddress* dest) {
00965        const gchar* _tmp0_;
00966        gchar* _tmp1_;
00967        const gchar* _tmp2_;
00968        gchar* _tmp3_;
00969        _tmp0_ = (*self).dbus_name;
00970        _tmp1_ = g_strdup (_tmp0_);
00971        _g_free0 ((*dest).dbus_name);
00972        (*dest).dbus_name = _tmp1_;
00973        _tmp2_ = (*self).dbus_path;
00974        _tmp3_ = g_strdup (_tmp2_);
00975        _g_free0 ((*dest).dbus_path);
00976        (*dest).dbus_path = _tmp3_;
00977 }
00978 
00979 
00980 void unity_tester_dbus_lens_util_dbus_object_address_destroy (UnityTesterDBusLensUtilDBusObjectAddress* self) {
00981        _g_free0 ((*self).dbus_name);
00982        _g_free0 ((*self).dbus_path);
00983 }
00984 
00985 
00986 UnityTesterDBusLensUtilDBusObjectAddress* unity_tester_dbus_lens_util_dbus_object_address_dup (const UnityTesterDBusLensUtilDBusObjectAddress* self) {
00987        UnityTesterDBusLensUtilDBusObjectAddress* dup;
00988        dup = g_new0 (UnityTesterDBusLensUtilDBusObjectAddress, 1);
00989        unity_tester_dbus_lens_util_dbus_object_address_copy (self, dup);
00990        return dup;
00991 }
00992 
00993 
00994 void unity_tester_dbus_lens_util_dbus_object_address_free (UnityTesterDBusLensUtilDBusObjectAddress* self) {
00995        unity_tester_dbus_lens_util_dbus_object_address_destroy (self);
00996        g_free (self);
00997 }
00998 
00999 
01000 GType unity_tester_dbus_lens_util_dbus_object_address_get_type (void) {
01001        static volatile gsize unity_tester_dbus_lens_util_dbus_object_address_type_id__volatile = 0;
01002        if (g_once_init_enter (&unity_tester_dbus_lens_util_dbus_object_address_type_id__volatile)) {
01003               GType unity_tester_dbus_lens_util_dbus_object_address_type_id;
01004               unity_tester_dbus_lens_util_dbus_object_address_type_id = g_boxed_type_register_static ("UnityTesterDBusLensUtilDBusObjectAddress", (GBoxedCopyFunc) unity_tester_dbus_lens_util_dbus_object_address_dup, (GBoxedFreeFunc) unity_tester_dbus_lens_util_dbus_object_address_free);
01005               g_once_init_leave (&unity_tester_dbus_lens_util_dbus_object_address_type_id__volatile, unity_tester_dbus_lens_util_dbus_object_address_type_id);
01006        }
01007        return unity_tester_dbus_lens_util_dbus_object_address_type_id__volatile;
01008 }
01009 
01010 
01011 static void unity_tester_value_dbus_lens_util_init (GValue* value) {
01012        value->data[0].v_pointer = NULL;
01013 }
01014 
01015 
01016 static void unity_tester_value_dbus_lens_util_free_value (GValue* value) {
01017        if (value->data[0].v_pointer) {
01018               unity_tester_dbus_lens_util_unref (value->data[0].v_pointer);
01019        }
01020 }
01021 
01022 
01023 static void unity_tester_value_dbus_lens_util_copy_value (const GValue* src_value, GValue* dest_value) {
01024        if (src_value->data[0].v_pointer) {
01025               dest_value->data[0].v_pointer = unity_tester_dbus_lens_util_ref (src_value->data[0].v_pointer);
01026        } else {
01027               dest_value->data[0].v_pointer = NULL;
01028        }
01029 }
01030 
01031 
01032 static gpointer unity_tester_value_dbus_lens_util_peek_pointer (const GValue* value) {
01033        return value->data[0].v_pointer;
01034 }
01035 
01036 
01037 static gchar* unity_tester_value_dbus_lens_util_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
01038        if (collect_values[0].v_pointer) {
01039               UnityTesterDBusLensUtil* object;
01040               object = collect_values[0].v_pointer;
01041               if (object->parent_instance.g_class == NULL) {
01042                      return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
01043               } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
01044                      return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
01045               }
01046               value->data[0].v_pointer = unity_tester_dbus_lens_util_ref (object);
01047        } else {
01048               value->data[0].v_pointer = NULL;
01049        }
01050        return NULL;
01051 }
01052 
01053 
01054 static gchar* unity_tester_value_dbus_lens_util_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
01055        UnityTesterDBusLensUtil** object_p;
01056        object_p = collect_values[0].v_pointer;
01057        if (!object_p) {
01058               return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
01059        }
01060        if (!value->data[0].v_pointer) {
01061               *object_p = NULL;
01062        } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
01063               *object_p = value->data[0].v_pointer;
01064        } else {
01065               *object_p = unity_tester_dbus_lens_util_ref (value->data[0].v_pointer);
01066        }
01067        return NULL;
01068 }
01069 
01070 
01071 GParamSpec* unity_tester_param_spec_dbus_lens_util (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
01072        UnityTesterParamSpecDBusLensUtil* spec;
01073        g_return_val_if_fail (g_type_is_a (object_type, UNITY_TESTER_TYPE_DBUS_LENS_UTIL), NULL);
01074        spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
01075        G_PARAM_SPEC (spec)->value_type = object_type;
01076        return G_PARAM_SPEC (spec);
01077 }
01078 
01079 
01080 gpointer unity_tester_value_get_dbus_lens_util (const GValue* value) {
01081        g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TESTER_TYPE_DBUS_LENS_UTIL), NULL);
01082        return value->data[0].v_pointer;
01083 }
01084 
01085 
01086 void unity_tester_value_set_dbus_lens_util (GValue* value, gpointer v_object) {
01087        UnityTesterDBusLensUtil* old;
01088        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TESTER_TYPE_DBUS_LENS_UTIL));
01089        old = value->data[0].v_pointer;
01090        if (v_object) {
01091               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TESTER_TYPE_DBUS_LENS_UTIL));
01092               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
01093               value->data[0].v_pointer = v_object;
01094               unity_tester_dbus_lens_util_ref (value->data[0].v_pointer);
01095        } else {
01096               value->data[0].v_pointer = NULL;
01097        }
01098        if (old) {
01099               unity_tester_dbus_lens_util_unref (old);
01100        }
01101 }
01102 
01103 
01104 void unity_tester_value_take_dbus_lens_util (GValue* value, gpointer v_object) {
01105        UnityTesterDBusLensUtil* old;
01106        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TESTER_TYPE_DBUS_LENS_UTIL));
01107        old = value->data[0].v_pointer;
01108        if (v_object) {
01109               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TESTER_TYPE_DBUS_LENS_UTIL));
01110               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
01111               value->data[0].v_pointer = v_object;
01112        } else {
01113               value->data[0].v_pointer = NULL;
01114        }
01115        if (old) {
01116               unity_tester_dbus_lens_util_unref (old);
01117        }
01118 }
01119 
01120 
01121 static void unity_tester_dbus_lens_util_class_init (UnityTesterDBusLensUtilClass * klass) {
01122        unity_tester_dbus_lens_util_parent_class = g_type_class_peek_parent (klass);
01123        UNITY_TESTER_DBUS_LENS_UTIL_CLASS (klass)->finalize = unity_tester_dbus_lens_util_finalize;
01124        g_type_class_add_private (klass, sizeof (UnityTesterDBusLensUtilPrivate));
01125 }
01126 
01127 
01128 static void unity_tester_dbus_lens_util_instance_init (UnityTesterDBusLensUtil * self) {
01129        GQueue* _tmp0_;
01130        self->priv = UNITY_TESTER_DBUS_LENS_UTIL_GET_PRIVATE (self);
01131        _tmp0_ = g_queue_new ();
01132        self->priv->nodes = _tmp0_;
01133        self->priv->lenses = NULL;
01134        self->ref_count = 1;
01135 }
01136 
01137 
01138 static void unity_tester_dbus_lens_util_finalize (UnityTesterDBusLensUtil* obj) {
01139        UnityTesterDBusLensUtil * self;
01140        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TESTER_TYPE_DBUS_LENS_UTIL, UnityTesterDBusLensUtil);
01141        _g_regex_unref0 (self->priv->lens_dbusname_regex);
01142        _g_free0 (self->priv->current_dbus_name);
01143        _g_free0 (self->priv->current_dbus_path);
01144        __g_queue_free__unity_tester_dbus_lens_util_dbus_object_address_free0_0 (self->priv->nodes);
01145        __g_list_free__unity_tester_dbus_lens_util_dbus_object_address_free0_0 (self->priv->lenses);
01146 }
01147 
01148 
01149 GType unity_tester_dbus_lens_util_get_type (void) {
01150        static volatile gsize unity_tester_dbus_lens_util_type_id__volatile = 0;
01151        if (g_once_init_enter (&unity_tester_dbus_lens_util_type_id__volatile)) {
01152               static const GTypeValueTable g_define_type_value_table = { unity_tester_value_dbus_lens_util_init, unity_tester_value_dbus_lens_util_free_value, unity_tester_value_dbus_lens_util_copy_value, unity_tester_value_dbus_lens_util_peek_pointer, "p", unity_tester_value_dbus_lens_util_collect_value, "p", unity_tester_value_dbus_lens_util_lcopy_value };
01153               static const GTypeInfo g_define_type_info = { sizeof (UnityTesterDBusLensUtilClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_tester_dbus_lens_util_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityTesterDBusLensUtil), 0, (GInstanceInitFunc) unity_tester_dbus_lens_util_instance_init, &g_define_type_value_table };
01154               static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
01155               GType unity_tester_dbus_lens_util_type_id;
01156               unity_tester_dbus_lens_util_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnityTesterDBusLensUtil", &g_define_type_info, &g_define_type_fundamental_info, 0);
01157               g_once_init_leave (&unity_tester_dbus_lens_util_type_id__volatile, unity_tester_dbus_lens_util_type_id);
01158        }
01159        return unity_tester_dbus_lens_util_type_id__volatile;
01160 }
01161 
01162 
01163 gpointer unity_tester_dbus_lens_util_ref (gpointer instance) {
01164        UnityTesterDBusLensUtil* self;
01165        self = instance;
01166        g_atomic_int_inc (&self->ref_count);
01167        return instance;
01168 }
01169 
01170 
01171 void unity_tester_dbus_lens_util_unref (gpointer instance) {
01172        UnityTesterDBusLensUtil* self;
01173        self = instance;
01174        if (g_atomic_int_dec_and_test (&self->ref_count)) {
01175               UNITY_TESTER_DBUS_LENS_UTIL_GET_CLASS (self)->finalize (self);
01176               g_type_free_instance ((GTypeInstance *) self);
01177        }
01178 }
01179 
01180 
01181 static gint _vala_array_length (gpointer array) {
01182        int length;
01183        length = 0;
01184        if (array) {
01185               while (((gpointer*) array)[length]) {
01186                      length++;
01187               }
01188        }
01189        return length;
01190 }
01191 
01192 
01193