~ubuntu-branches/ubuntu/natty/folks/natty

« back to all changes in this revision

Viewing changes to folks/persona.c

  • Committer: Bazaar Package Importer
  • Author(s): Ken VanDine
  • Date: 2011-03-18 16:49:27 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110318164927-ho97ckhsq73glhm4
Tags: 0.4.1-0ubuntu1
* New upstream release
  - Fixed crasher when reconnecting a Telepathy account

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* persona.c generated by valac 0.11.6, the Vala compiler
 
1
/* persona.c generated by valac 0.11.7, the Vala compiler
2
2
 * generated from persona.vala, do not modify */
3
3
 
4
4
/*
155
155
        _tmp0_ = g_regex_escape_string (old, -1);
156
156
        _tmp1_ = _tmp0_;
157
157
        _tmp2_ = g_regex_new (_tmp1_, 0, 0, &_inner_error_);
158
 
        regex = (_tmp3_ = _tmp2_, _g_free0 (_tmp1_), _tmp3_);
 
158
        _tmp3_ = _tmp2_;
 
159
        _g_free0 (_tmp1_);
 
160
        regex = _tmp3_;
159
161
        if (_inner_error_ != NULL) {
160
162
                if (_inner_error_->domain == G_REGEX_ERROR) {
161
163
                        goto __catch12_g_regex_error;
260
262
        _tmp4_ = _folks_persona_escape_uid_component (persona_id);
261
263
        _tmp5_ = _tmp4_;
262
264
        _tmp6_ = g_strdup_printf ("%s:%s:%s", _tmp1_, _tmp3_, _tmp5_);
263
 
        result = (_tmp7_ = _tmp6_, _g_free0 (_tmp5_), _g_free0 (_tmp3_), _g_free0 (_tmp1_), _tmp7_);
 
265
        _tmp7_ = _tmp6_;
 
266
        _g_free0 (_tmp5_);
 
267
        _g_free0 (_tmp3_);
 
268
        _g_free0 (_tmp1_);
 
269
        result = _tmp7_;
264
270
        return result;
265
271
}
266
272
 
288
294
}
289
295
 
290
296
 
 
297
static glong string_strnlen (gchar* str, glong maxlen) {
 
298
        glong result = 0L;
 
299
        gchar* _tmp0_ = NULL;
 
300
        gchar* end;
 
301
        _tmp0_ = memchr (str, 0, (gsize) maxlen);
 
302
        end = _tmp0_;
 
303
        if (end == NULL) {
 
304
                result = maxlen;
 
305
                return result;
 
306
        } else {
 
307
                result = (glong) (end - str);
 
308
                return result;
 
309
        }
 
310
}
 
311
 
 
312
 
291
313
static gchar* string_substring (const gchar* self, glong offset, glong len) {
292
314
        gchar* result = NULL;
293
315
        glong string_length = 0L;
301
323
        }
302
324
        if (_tmp0_) {
303
325
                glong _tmp1_;
304
 
                _tmp1_ = strnlen ((gchar*) self, (gsize) (offset + len));
 
326
                _tmp1_ = string_strnlen ((gchar*) self, offset + len);
305
327
                string_length = _tmp1_;
306
328
        } else {
307
329
                gint _tmp2_;
336
358
        gchar* _tmp8_ = NULL;
337
359
        gchar* _tmp9_;
338
360
        gchar* _tmp10_ = NULL;
339
 
        gchar* _tmp11_;
340
 
        gchar* _tmp12_ = NULL;
341
 
        gchar* _tmp13_;
 
361
        gchar* _tmp11_ = NULL;
 
362
        gchar* _tmp12_;
 
363
        gchar* _tmp13_ = NULL;
342
364
        gchar* _tmp14_ = NULL;
343
 
        gchar* _tmp15_;
344
 
        gchar* _tmp16_ = NULL;
345
 
        gchar* _tmp17_;
346
365
        g_return_if_fail (uid != NULL);
347
366
        _tmp0_ = g_utf8_validate (uid, (gssize) (-1), NULL);
348
367
        g_assert (_tmp0_);
400
419
        _tmp8_ = string_substring (uid, (glong) 0, (glong) backend_name_length);
401
420
        _tmp9_ = _tmp8_;
402
421
        _tmp10_ = _folks_persona_unescape_uid_component (_tmp9_);
403
 
        _tmp11_ = _tmp10_;
404
422
        _g_free0 (_backend_name);
405
 
        _backend_name = _tmp11_;
 
423
        _backend_name = _tmp10_;
406
424
        _g_free0 (_tmp9_);
407
 
        _tmp12_ = string_substring ((const gchar*) ((((gchar*) uid) + backend_name_length) + 1), (glong) 0, (glong) persona_store_id_length);
408
 
        _tmp13_ = _tmp12_;
409
 
        _tmp14_ = _folks_persona_unescape_uid_component (_tmp13_);
410
 
        _tmp15_ = _tmp14_;
 
425
        _tmp11_ = string_substring ((const gchar*) ((((gchar*) uid) + backend_name_length) + 1), (glong) 0, (glong) persona_store_id_length);
 
426
        _tmp12_ = _tmp11_;
 
427
        _tmp13_ = _folks_persona_unescape_uid_component (_tmp12_);
411
428
        _g_free0 (_persona_store_id);
412
 
        _persona_store_id = _tmp15_;
413
 
        _g_free0 (_tmp13_);
414
 
        _tmp16_ = _folks_persona_unescape_uid_component ((const gchar*) (((((gchar*) uid) + backend_name_length) + persona_store_id_length) + 2));
415
 
        _tmp17_ = _tmp16_;
 
429
        _persona_store_id = _tmp13_;
 
430
        _g_free0 (_tmp12_);
 
431
        _tmp14_ = _folks_persona_unescape_uid_component ((const gchar*) (((((gchar*) uid) + backend_name_length) + persona_store_id_length) + 2));
416
432
        _g_free0 (_persona_id);
417
 
        _persona_id = _tmp17_;
 
433
        _persona_id = _tmp14_;
418
434
        if (backend_name) {
419
435
                *backend_name = _backend_name;
420
436
        } else {
450
466
 
451
467
static void folks_persona_set_iid (FolksPersona* self, const gchar* value) {
452
468
        gchar* _tmp0_;
453
 
        gchar* _tmp1_;
454
469
        g_return_if_fail (self != NULL);
455
470
        _tmp0_ = g_strdup (value);
456
 
        _tmp1_ = _tmp0_;
457
471
        _g_free0 (self->priv->_iid);
458
 
        self->priv->_iid = _tmp1_;
 
472
        self->priv->_iid = _tmp0_;
459
473
        g_object_notify ((GObject *) self, "iid");
460
474
}
461
475
 
470
484
 
471
485
static void folks_persona_set_uid (FolksPersona* self, const gchar* value) {
472
486
        gchar* _tmp0_;
473
 
        gchar* _tmp1_;
474
487
        g_return_if_fail (self != NULL);
475
488
        _tmp0_ = g_strdup (value);
476
 
        _tmp1_ = _tmp0_;
477
489
        _g_free0 (self->priv->_uid);
478
 
        self->priv->_uid = _tmp1_;
 
490
        self->priv->_uid = _tmp0_;
479
491
        g_object_notify ((GObject *) self, "uid");
480
492
}
481
493
 
490
502
 
491
503
static void folks_persona_set_display_id (FolksPersona* self, const gchar* value) {
492
504
        gchar* _tmp0_;
493
 
        gchar* _tmp1_;
494
505
        g_return_if_fail (self != NULL);
495
506
        _tmp0_ = g_strdup (value);
496
 
        _tmp1_ = _tmp0_;
497
507
        _g_free0 (self->priv->_display_id);
498
 
        self->priv->_display_id = _tmp1_;
 
508
        self->priv->_display_id = _tmp0_;
499
509
        g_object_notify ((GObject *) self, "display-id");
500
510
}
501
511