~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to src/plugins/zeitgeist-dp/totem-zeitgeist-dp-plugin.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-26 00:07:51 UTC
  • mfrom: (1.6.1) (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130526000751-kv8ap3x1di4qq8j2
Tags: 3.8.2-0ubuntu1
* Sync with Debian. Remaining changes: 
* debian/control.in:
  - Drop build-depends on libepc-ui-dev and libgrilo-0.2-dev (in universe)
  - Drop libxtst-dev build-depends so that the (redundant) fake key presses
    for inhibiting the screensaver are disabled (LP: #1007438)
  - Build-depend on libzeitgeist-dev
  - Suggest rather than recommend gstreamer components in universe
  - Add totem-plugins-extra
  - Add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - Refer to Firefox in totem-mozilla description instead of Iceweasel
  - Don't have totem-mozilla recommend any particular browser
  - Drop obsolete python library dependencies since iplayer is no longer
    included
* debian/totem-common.install, debian/source_totem.py:
  - Install Ubuntu apport debugging hook
* debian/totem-plugins-extra.install:
  - Universe plugins split out of totem-plugins (currently only gromit)
* debian/totem-plugins.install:    
  - Skip the plugins split to -extra and add the zeitgeist plugin
* debian/rules:
  - Build with --fail-missing, to ensure we install everything. 
    + Ignore libtotem.{,l}a since we delibrately don't install these.
  - Re-enable hardening, make sure both PIE and BINDNOW are used
    by setting hardening=+all. (LP: #1039604)
* debian/patches/91_quicklist_entries.patch:
  - Add static quicklist
* debian/patches/92_gst-plugins-good.patch:
  - Build without unnecessary gstreamer1.0-bad dependency
* debian/patches/93_grilo_optional.patch:
  - Allow building without grilo while grilo MIR is still pending
* debian/patches/correct_desktop_mimetypes.patch:
  - Don't list the mimetypes after the unity lists
* debian/patches/revert_shell_menu.patch: 
  - revert the use of a shell menu until indicator-appmenu can handle
    the mixed shell/traditional menus itself
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* totem-zeitgeist-dp-plugin.c generated by valac 0.14.1, the Vala compiler
 
1
/* totem-zeitgeist-dp-plugin.c generated by valac 0.20.1.9-e6ff5, the Vala compiler
2
2
 * generated from totem-zeitgeist-dp-plugin.vala, do not modify */
3
3
 
4
4
 
10
10
#include <libpeas/peas.h>
11
11
#include <zeitgeist.h>
12
12
#include <gio/gio.h>
13
 
#include <bacon-video-widget.h>
 
13
#include "bacon-video-widget.h"
14
14
 
15
15
 
16
16
#define TYPE_MEDIA_INFO (media_info_get_type ())
71
71
        GSimpleAsyncResult* _async_result;
72
72
        ZeitgeistDpPlugin* self;
73
73
        gchar* current_mrl;
 
74
        TotemObject* totem;
74
75
        GObject* _tmp0_;
75
76
        GObject* _tmp1_;
76
 
        TotemObject* totem;
 
77
        gchar* mrl;
77
78
        const gchar* _tmp2_;
78
79
        gchar* _tmp3_;
79
 
        gchar* mrl;
 
80
        GFile* f;
80
81
        const gchar* _tmp4_;
81
82
        GFile* _tmp5_;
82
 
        GFile* f;
 
83
        GFileInfo* fi;
83
84
        GFile* _tmp6_;
84
85
        GFileInfo* _tmp7_;
85
 
        GFileInfo* fi;
86
86
        gboolean _tmp8_;
87
87
        MediaInfo _tmp9_;
88
88
        const gchar* _tmp10_;
116
116
};
117
117
static void zeitgeist_dp_plugin_real_activate (PeasActivatable* base);
118
118
GObject* peas_activatable_get_object (PeasActivatable* self);
119
 
static void zeitgeist_dp_plugin_file_opened (ZeitgeistDpPlugin* self, const gchar* mrl, TotemObject* totem);
 
119
static void zeitgeist_dp_plugin_file_has_played (ZeitgeistDpPlugin* self, const gchar* mrl, TotemObject* totem);
120
120
static void _vala_array_add1 (gulong** array, int* length, int* size, gulong value);
121
121
static void zeitgeist_dp_plugin_file_closed (ZeitgeistDpPlugin* self, TotemObject* totem);
122
122
static void _vala_array_add2 (gulong** array, int* length, int* size, gulong value);
270
270
 
271
271
static void zeitgeist_dp_plugin_real_activate (PeasActivatable* base) {
272
272
        ZeitgeistDpPlugin * self;
 
273
        TotemObject* totem = NULL;
273
274
        GObject* _tmp0_ = NULL;
274
275
        GObject* _tmp1_;
275
 
        TotemObject* totem;
276
276
        ZeitgeistLog* _tmp2_;
277
277
        ZeitgeistDataSourceRegistry* _tmp3_;
278
 
        MediaInfo _tmp4_ = {0};
279
 
        gulong* _tmp5_;
280
 
        gint _tmp5__length1;
281
 
        gulong _tmp6_ = 0UL;
282
 
        gulong* _tmp7_;
283
 
        gint _tmp7__length1;
284
 
        gulong _tmp8_ = 0UL;
285
 
        gulong* _tmp9_;
286
 
        gint _tmp9__length1;
287
 
        gulong _tmp10_ = 0UL;
288
 
        gulong* _tmp11_;
289
 
        gint _tmp11__length1;
290
 
        gulong _tmp12_ = 0UL;
291
 
        GPtrArray* _tmp13_;
292
 
        GPtrArray* templates;
293
 
        ZeitgeistEvent* _tmp14_;
294
 
        ZeitgeistEvent* _tmp15_;
295
 
        ZeitgeistEvent* event;
296
 
        GPtrArray* _tmp16_;
297
 
        GPtrArray* _tmp17_;
 
278
        gulong* _tmp4_;
 
279
        gint _tmp4__length1;
 
280
        gulong _tmp5_ = 0UL;
 
281
        gulong* _tmp6_;
 
282
        gint _tmp6__length1;
 
283
        gulong _tmp7_ = 0UL;
 
284
        gulong* _tmp8_;
 
285
        gint _tmp8__length1;
 
286
        gulong _tmp9_ = 0UL;
 
287
        gulong* _tmp10_;
 
288
        gint _tmp10__length1;
 
289
        gulong _tmp11_ = 0UL;
 
290
        GPtrArray* templates = NULL;
 
291
        GPtrArray* _tmp12_;
 
292
        ZeitgeistEvent* event = NULL;
 
293
        ZeitgeistEvent* _tmp13_;
 
294
        GPtrArray* _tmp14_;
 
295
        ZeitgeistDataSource* ds = NULL;
 
296
        GPtrArray* _tmp15_;
 
297
        ZeitgeistDataSource* _tmp16_;
 
298
        ZeitgeistDataSourceRegistry* _tmp17_;
298
299
        ZeitgeistDataSource* _tmp18_;
299
 
        ZeitgeistDataSource* _tmp19_;
300
 
        ZeitgeistDataSource* ds;
301
 
        ZeitgeistDataSourceRegistry* _tmp20_;
302
 
        ZeitgeistDataSource* _tmp21_;
303
300
        self = (ZeitgeistDpPlugin*) base;
304
301
        g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL);
305
302
        _tmp1_ = _tmp0_;
306
 
        totem = TOTEM_OBJECT (_tmp1_);
 
303
        totem = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject);
307
304
        _tmp2_ = zeitgeist_log_new ();
308
305
        _g_object_unref0 (self->priv->zg_log);
309
306
        self->priv->zg_log = _tmp2_;
310
307
        _tmp3_ = zeitgeist_data_source_registry_new ();
311
308
        _g_object_unref0 (self->priv->zg_registry);
312
309
        self->priv->zg_registry = _tmp3_;
313
 
        memset (&_tmp4_, 0, sizeof (MediaInfo));
314
310
        media_info_destroy (&self->priv->current_media);
315
 
        self->priv->current_media = _tmp4_;
316
 
        _tmp5_ = self->priv->signals;
317
 
        _tmp5__length1 = self->priv->signals_length1;
318
 
        _tmp6_ = g_signal_connect_swapped (totem, "file-opened", (GCallback) zeitgeist_dp_plugin_file_opened, self);
319
 
        _vala_array_add1 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp6_);
320
 
        _tmp7_ = self->priv->signals;
321
 
        _tmp7__length1 = self->priv->signals_length1;
322
 
        _tmp8_ = g_signal_connect_swapped (totem, "file-closed", (GCallback) zeitgeist_dp_plugin_file_closed, self);
323
 
        _vala_array_add2 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp8_);
324
 
        _tmp9_ = self->priv->signals;
325
 
        _tmp9__length1 = self->priv->signals_length1;
326
 
        _tmp10_ = g_signal_connect_swapped (totem, "metadata-updated", (GCallback) zeitgeist_dp_plugin_metadata_changed, self);
327
 
        _vala_array_add3 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp10_);
328
 
        _tmp11_ = self->priv->signals;
329
 
        _tmp11__length1 = self->priv->signals_length1;
330
 
        _tmp12_ = g_signal_connect_swapped (totem, "notify::playing", (GCallback) zeitgeist_dp_plugin_playing_changed, self);
331
 
        _vala_array_add4 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp12_);
332
 
        _tmp13_ = g_ptr_array_new ();
333
 
        templates = _tmp13_;
334
 
        _tmp14_ = zeitgeist_event_new_full ("", ZEITGEIST_ZG_USER_ACTIVITY, "application://totem.desktop", NULL, NULL);
335
 
        _tmp15_ = g_object_ref_sink (_tmp14_);
336
 
        event = _tmp15_;
337
 
        _tmp16_ = templates;
338
 
        g_ptr_array_add (_tmp16_, event);
339
 
        _tmp17_ = templates;
 
311
        memset (&self->priv->current_media, 0, sizeof (MediaInfo));
 
312
        _tmp4_ = self->priv->signals;
 
313
        _tmp4__length1 = self->priv->signals_length1;
 
314
        _tmp5_ = g_signal_connect_swapped (totem, "file-has-played", (GCallback) zeitgeist_dp_plugin_file_has_played, self);
 
315
        _vala_array_add1 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp5_);
 
316
        _tmp6_ = self->priv->signals;
 
317
        _tmp6__length1 = self->priv->signals_length1;
 
318
        _tmp7_ = g_signal_connect_swapped (totem, "file-closed", (GCallback) zeitgeist_dp_plugin_file_closed, self);
 
319
        _vala_array_add2 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp7_);
 
320
        _tmp8_ = self->priv->signals;
 
321
        _tmp8__length1 = self->priv->signals_length1;
 
322
        _tmp9_ = g_signal_connect_swapped (totem, "metadata-updated", (GCallback) zeitgeist_dp_plugin_metadata_changed, self);
 
323
        _vala_array_add3 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp9_);
 
324
        _tmp10_ = self->priv->signals;
 
325
        _tmp10__length1 = self->priv->signals_length1;
 
326
        _tmp11_ = g_signal_connect_swapped (totem, "notify::playing", (GCallback) zeitgeist_dp_plugin_playing_changed, self);
 
327
        _vala_array_add4 (&self->priv->signals, &self->priv->signals_length1, &self->priv->_signals_size_, _tmp11_);
 
328
        _tmp12_ = g_ptr_array_new ();
 
329
        templates = _tmp12_;
 
330
        _tmp13_ = zeitgeist_event_new_full ("", ZEITGEIST_ZG_USER_ACTIVITY, "application://totem.desktop", NULL, NULL);
 
331
        g_object_ref_sink (_tmp13_);
 
332
        event = _tmp13_;
 
333
        _tmp14_ = templates;
 
334
        g_ptr_array_add (_tmp14_, event);
 
335
        _tmp15_ = templates;
340
336
        templates = NULL;
341
 
        _tmp18_ = zeitgeist_data_source_new_full ("org.gnome.Totem,dataprovider", "Totem dataprovider", "Logs access/leave events for media files played with Totem", _tmp17_);
342
 
        _tmp19_ = g_object_ref_sink (_tmp18_);
343
 
        ds = _tmp19_;
344
 
        _tmp20_ = self->priv->zg_registry;
345
 
        _tmp21_ = _g_object_ref0 (ds);
346
 
        zeitgeist_data_source_registry_register_data_source (_tmp20_, _tmp21_, NULL, NULL, NULL);
 
337
        _tmp16_ = zeitgeist_data_source_new_full ("org.gnome.Totem,dataprovider", "Totem dataprovider", "Logs access/leave events for media files played with Totem", _tmp15_);
 
338
        g_object_ref_sink (_tmp16_);
 
339
        ds = _tmp16_;
 
340
        _tmp17_ = self->priv->zg_registry;
 
341
        _tmp18_ = _g_object_ref0 (ds);
 
342
        zeitgeist_data_source_registry_register_data_source (_tmp17_, _tmp18_, NULL, NULL, NULL);
347
343
        _g_object_unref0 (ds);
348
344
        _g_object_unref0 (event);
349
345
        _g_ptr_array_free0 (templates);
353
349
 
354
350
static void zeitgeist_dp_plugin_real_deactivate (PeasActivatable* base) {
355
351
        ZeitgeistDpPlugin * self;
 
352
        TotemObject* totem = NULL;
356
353
        GObject* _tmp0_ = NULL;
357
354
        GObject* _tmp1_;
358
 
        TotemObject* totem;
359
355
        TotemObject* _tmp2_;
360
356
        gulong* _tmp3_;
361
357
        gint _tmp3__length1;
364
360
        self = (ZeitgeistDpPlugin*) base;
365
361
        g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL);
366
362
        _tmp1_ = _tmp0_;
367
 
        totem = TOTEM_OBJECT (_tmp1_);
 
363
        totem = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject);
368
364
        _tmp2_ = totem;
369
365
        zeitgeist_dp_plugin_file_closed (self, _tmp2_);
370
366
        _tmp3_ = self->priv->signals;
447
443
}
448
444
 
449
445
 
450
 
static void zeitgeist_dp_plugin_file_opened (ZeitgeistDpPlugin* self, const gchar* mrl, TotemObject* totem) {
 
446
static void zeitgeist_dp_plugin_file_has_played (ZeitgeistDpPlugin* self, const gchar* mrl, TotemObject* totem) {
451
447
        MediaInfo _tmp0_;
452
448
        const gchar* _tmp1_;
453
 
        MediaInfo _tmp3_ = {0};
454
 
        const gchar* _tmp4_;
455
 
        gchar* _tmp5_;
 
449
        const gchar* _tmp3_;
 
450
        gchar* _tmp4_;
456
451
        GTimeVal cur_time = {0};
457
 
        GTimeVal _tmp6_;
458
 
        gint64 _tmp7_ = 0LL;
459
 
        guint _tmp8_;
 
452
        GTimeVal _tmp5_;
 
453
        gint64 _tmp6_ = 0LL;
 
454
        guint _tmp7_;
460
455
        g_return_if_fail (self != NULL);
461
456
        g_return_if_fail (mrl != NULL);
462
457
        g_return_if_fail (totem != NULL);
467
462
                _tmp2_ = totem;
468
463
                zeitgeist_dp_plugin_file_closed (self, _tmp2_);
469
464
        }
470
 
        memset (&_tmp3_, 0, sizeof (MediaInfo));
471
465
        media_info_destroy (&self->priv->current_media);
472
 
        self->priv->current_media = _tmp3_;
473
 
        _tmp4_ = mrl;
474
 
        _tmp5_ = g_strdup (_tmp4_);
 
466
        memset (&self->priv->current_media, 0, sizeof (MediaInfo));
 
467
        _tmp3_ = mrl;
 
468
        _tmp4_ = g_strdup (_tmp3_);
475
469
        _g_free0 (self->priv->current_media.mrl);
476
 
        self->priv->current_media.mrl = _tmp5_;
 
470
        self->priv->current_media.mrl = _tmp4_;
477
471
        g_get_current_time (&cur_time);
478
 
        _tmp6_ = cur_time;
479
 
        _tmp7_ = zeitgeist_timestamp_from_timeval (&_tmp6_);
480
 
        self->priv->current_media.timestamp = _tmp7_;
481
 
        _tmp8_ = self->priv->media_info_timeout;
482
 
        if (_tmp8_ == ((guint) 0)) {
483
 
                guint _tmp9_ = 0U;
484
 
                _tmp9_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, _zeitgeist_dp_plugin_wait_for_media_info_gsource_func, g_object_ref (self), g_object_unref);
485
 
                self->priv->media_info_timeout = _tmp9_;
 
472
        _tmp5_ = cur_time;
 
473
        _tmp6_ = zeitgeist_timestamp_from_timeval (&_tmp5_);
 
474
        self->priv->current_media.timestamp = _tmp6_;
 
475
        _tmp7_ = self->priv->media_info_timeout;
 
476
        if (_tmp7_ == ((guint) 0)) {
 
477
                guint _tmp8_ = 0U;
 
478
                _tmp8_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, _zeitgeist_dp_plugin_wait_for_media_info_gsource_func, g_object_ref (self), g_object_unref);
 
479
                self->priv->media_info_timeout = _tmp8_;
486
480
                zeitgeist_dp_plugin_restart_watcher (self, (guint) 15000);
487
481
        }
488
482
}
568
562
 
569
563
static gboolean zeitgeist_dp_plugin_timeout_cb (ZeitgeistDpPlugin* self) {
570
564
        gboolean result = FALSE;
 
565
        TotemObject* totem = NULL;
571
566
        GObject* _tmp0_ = NULL;
572
567
        GObject* _tmp1_;
573
 
        TotemObject* totem;
574
568
        guint _tmp2_;
575
569
        g_return_val_if_fail (self != NULL, FALSE);
576
570
        g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL);
577
571
        _tmp1_ = _tmp0_;
578
 
        totem = TOTEM_OBJECT (_tmp1_);
 
572
        totem = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject);
579
573
        _tmp2_ = self->priv->media_info_timeout;
580
574
        if (_tmp2_ != ((guint) 0)) {
581
575
                guint _tmp3_;
619
613
        _data_->self = _tmp0_;
620
614
        _tmp1_ = current_mrl;
621
615
        _tmp2_ = g_strdup (_tmp1_);
 
616
        _g_free0 (_data_->current_mrl);
622
617
        _data_->current_mrl = _tmp2_;
623
618
        zeitgeist_dp_plugin_query_media_mimetype_co (_data_);
624
619
}
652
647
        _data_->_tmp0_ = NULL;
653
648
        g_object_get ((PeasActivatable*) _data_->self, "object", &_data_->_tmp0_, NULL);
654
649
        _data_->_tmp1_ = _data_->_tmp0_;
655
 
        _data_->totem = TOTEM_OBJECT (_data_->_tmp1_);
 
650
        _data_->totem = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, totem_object_get_type (), TotemObject);
656
651
        _data_->_tmp2_ = _data_->current_mrl;
657
652
        _data_->_tmp3_ = g_strdup (_data_->_tmp2_);
658
653
        _data_->mrl = _data_->_tmp3_;
738
733
 
739
734
static gboolean zeitgeist_dp_plugin_wait_for_media_info (ZeitgeistDpPlugin* self) {
740
735
        gboolean result = FALSE;
 
736
        TotemObject* totem = NULL;
741
737
        GObject* _tmp0_ = NULL;
742
738
        GObject* _tmp1_;
743
 
        TotemObject* totem;
744
739
        gboolean _tmp2_ = FALSE;
745
740
        MediaInfo _tmp3_;
746
741
        const gchar* _tmp4_;
748
743
        g_return_val_if_fail (self != NULL, FALSE);
749
744
        g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL);
750
745
        _tmp1_ = _tmp0_;
751
 
        totem = TOTEM_OBJECT (_tmp1_);
 
746
        totem = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject);
752
747
        _tmp3_ = self->priv->current_media;
753
748
        _tmp4_ = _tmp3_.title;
754
749
        if (_tmp4_ != NULL) {
763
758
        _tmp7_ = _tmp2_;
764
759
        if (_tmp7_) {
765
760
                GValue val = {0};
 
761
                BaconVideoWidget* video = NULL;
766
762
                TotemObject* _tmp8_;
767
763
                GtkWidget* _tmp9_ = NULL;
768
 
                BaconVideoWidget* video;
769
764
                BaconVideoWidget* _tmp10_;
770
 
                GValue _tmp11_ = {0};
771
 
                const gchar* _tmp12_ = NULL;
772
 
                gboolean _tmp13_ = FALSE;
773
 
                const gchar* _tmp14_;
774
 
                gchar* _tmp15_;
775
 
                MediaInfo _tmp16_;
776
 
                const gchar* _tmp17_;
777
 
                guint _tmp18_;
 
765
                BaconVideoWidget* _tmp11_;
 
766
                GValue _tmp12_ = {0};
 
767
                const gchar* _tmp13_ = NULL;
 
768
                gboolean _tmp14_ = FALSE;
 
769
                const gchar* _tmp15_;
 
770
                gchar* _tmp16_;
 
771
                MediaInfo _tmp17_;
 
772
                const gchar* _tmp18_;
 
773
                guint _tmp19_;
778
774
                _tmp8_ = totem;
779
 
                _tmp9_ = totem_get_video_widget (_tmp8_);
780
 
                video = BACON_IS_VIDEO_WIDGET (_tmp9_) ? ((BaconVideoWidget*) _tmp9_) : NULL;
781
 
                _tmp10_ = video;
782
 
                bacon_video_widget_get_metadata (_tmp10_, BVW_INFO_HAS_VIDEO, &_tmp11_);
 
775
                _tmp9_ = totem_object_get_video_widget (_tmp8_);
 
776
                _tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, BACON_TYPE_VIDEO_WIDGET) ? ((BaconVideoWidget*) _tmp9_) : NULL;
 
777
                if (_tmp10_ == NULL) {
 
778
                        _g_object_unref0 (_tmp9_);
 
779
                }
 
780
                video = _tmp10_;
 
781
                _tmp11_ = video;
 
782
                bacon_video_widget_get_metadata (_tmp11_, BVW_INFO_HAS_VIDEO, &_tmp12_);
783
783
                G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
784
 
                val = _tmp11_;
785
 
                _tmp13_ = g_value_get_boolean (&val);
786
 
                if (_tmp13_) {
787
 
                        _tmp12_ = ZEITGEIST_NFO_VIDEO;
 
784
                val = _tmp12_;
 
785
                _tmp14_ = g_value_get_boolean (&val);
 
786
                if (_tmp14_) {
 
787
                        _tmp13_ = ZEITGEIST_NFO_VIDEO;
788
788
                } else {
789
 
                        _tmp12_ = ZEITGEIST_NFO_AUDIO;
 
789
                        _tmp13_ = ZEITGEIST_NFO_AUDIO;
790
790
                }
791
 
                _tmp14_ = _tmp12_;
792
 
                _tmp15_ = g_strdup (_tmp14_);
 
791
                _tmp15_ = _tmp13_;
 
792
                _tmp16_ = g_strdup (_tmp15_);
793
793
                _g_free0 (self->priv->current_media.interpretation);
794
 
                self->priv->current_media.interpretation = _tmp15_;
795
 
                _tmp16_ = self->priv->current_media;
796
 
                _tmp17_ = _tmp16_.mrl;
797
 
                zeitgeist_dp_plugin_query_media_mimetype (self, _tmp17_, NULL, NULL);
798
 
                _tmp18_ = self->priv->timeout_id;
799
 
                if (_tmp18_ != ((guint) 0)) {
800
 
                        guint _tmp19_;
801
 
                        _tmp19_ = self->priv->timeout_id;
802
 
                        g_source_remove (_tmp19_);
 
794
                self->priv->current_media.interpretation = _tmp16_;
 
795
                _tmp17_ = self->priv->current_media;
 
796
                _tmp18_ = _tmp17_.mrl;
 
797
                zeitgeist_dp_plugin_query_media_mimetype (self, _tmp18_, NULL, NULL);
 
798
                _tmp19_ = self->priv->timeout_id;
 
799
                if (_tmp19_ != ((guint) 0)) {
 
800
                        guint _tmp20_;
 
801
                        _tmp20_ = self->priv->timeout_id;
 
802
                        g_source_remove (_tmp20_);
803
803
                }
804
804
                self->priv->timeout_id = (guint) 0;
805
805
                self->priv->media_info_timeout = (guint) 0;
816
816
 
817
817
 
818
818
static void zeitgeist_dp_plugin_playing_changed (ZeitgeistDpPlugin* self) {
 
819
        TotemObject* totem = NULL;
819
820
        GObject* _tmp0_ = NULL;
820
821
        GObject* _tmp1_;
821
 
        TotemObject* totem;
822
822
        gboolean _tmp2_ = FALSE;
823
823
        guint _tmp3_;
824
824
        gboolean _tmp6_;
829
829
        g_return_if_fail (self != NULL);
830
830
        g_object_get ((PeasActivatable*) self, "object", &_tmp0_, NULL);
831
831
        _tmp1_ = _tmp0_;
832
 
        totem = TOTEM_OBJECT (_tmp1_);
 
832
        totem = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, totem_object_get_type (), TotemObject);
833
833
        _tmp3_ = self->priv->media_info_timeout;
834
834
        if (_tmp3_ == ((guint) 0)) {
835
835
                MediaInfo _tmp4_;
886
886
        if (_tmp5_) {
887
887
                const gchar* _tmp6_ = NULL;
888
888
                gboolean _tmp7_;
 
889
                gchar* event_interpretation = NULL;
889
890
                const gchar* _tmp8_;
890
891
                gchar* _tmp9_;
891
 
                gchar* event_interpretation;
 
892
                gchar* origin = NULL;
892
893
                MediaInfo _tmp10_;
893
894
                const gchar* _tmp11_;
894
895
                gchar* _tmp12_ = NULL;
895
 
                gchar* origin;
 
896
                ZeitgeistSubject* subject = NULL;
896
897
                MediaInfo _tmp13_;
897
898
                const gchar* _tmp14_;
898
899
                MediaInfo _tmp15_;
906
907
                MediaInfo _tmp23_;
907
908
                const gchar* _tmp24_;
908
909
                ZeitgeistSubject* _tmp25_;
909
 
                ZeitgeistSubject* _tmp26_;
910
 
                ZeitgeistSubject* subject;
911
 
                const gchar* _tmp27_;
912
 
                ZeitgeistSubject* _tmp28_;
 
910
                ZeitgeistEvent* event = NULL;
 
911
                const gchar* _tmp26_;
 
912
                ZeitgeistSubject* _tmp27_;
 
913
                ZeitgeistEvent* _tmp28_;
913
914
                ZeitgeistEvent* _tmp29_;
914
 
                ZeitgeistEvent* _tmp30_;
915
 
                ZeitgeistEvent* event;
916
 
                ZeitgeistEvent* _tmp31_;
917
 
                MediaInfo _tmp32_;
918
 
                gint64 _tmp33_;
919
 
                ZeitgeistLog* _tmp34_;
920
 
                ZeitgeistEvent* _tmp35_;
 
915
                MediaInfo _tmp30_;
 
916
                gint64 _tmp31_;
 
917
                ZeitgeistLog* _tmp32_;
 
918
                ZeitgeistEvent* _tmp33_;
921
919
                _tmp7_ = leave_event;
922
920
                if (_tmp7_) {
923
921
                        _tmp6_ = ZEITGEIST_ZG_LEAVE_EVENT;
944
942
                _tmp23_ = self->priv->current_media;
945
943
                _tmp24_ = _tmp23_.title;
946
944
                _tmp25_ = zeitgeist_subject_new_full (_tmp14_, _tmp16_, _tmp19_, _tmp21_, _tmp22_, _tmp24_, "");
947
 
                _tmp26_ = g_object_ref_sink (_tmp25_);
948
 
                subject = _tmp26_;
949
 
                _tmp27_ = event_interpretation;
950
 
                _tmp28_ = subject;
951
 
                _tmp29_ = zeitgeist_event_new_full (_tmp27_, ZEITGEIST_ZG_USER_ACTIVITY, "application://totem.desktop", _tmp28_, NULL, NULL);
952
 
                _tmp30_ = g_object_ref_sink (_tmp29_);
953
 
                event = _tmp30_;
954
 
                _tmp31_ = event;
955
 
                _tmp32_ = self->priv->current_media;
956
 
                _tmp33_ = _tmp32_.timestamp;
957
 
                zeitgeist_event_set_timestamp (_tmp31_, _tmp33_);
958
 
                _tmp34_ = self->priv->zg_log;
959
 
                _tmp35_ = event;
960
 
                zeitgeist_log_insert_events_no_reply (_tmp34_, _tmp35_, NULL, NULL);
 
945
                g_object_ref_sink (_tmp25_);
 
946
                subject = _tmp25_;
 
947
                _tmp26_ = event_interpretation;
 
948
                _tmp27_ = subject;
 
949
                _tmp28_ = zeitgeist_event_new_full (_tmp26_, ZEITGEIST_ZG_USER_ACTIVITY, "application://totem.desktop", _tmp27_, NULL, NULL);
 
950
                g_object_ref_sink (_tmp28_);
 
951
                event = _tmp28_;
 
952
                _tmp29_ = event;
 
953
                _tmp30_ = self->priv->current_media;
 
954
                _tmp31_ = _tmp30_.timestamp;
 
955
                zeitgeist_event_set_timestamp (_tmp29_, _tmp31_);
 
956
                _tmp32_ = self->priv->zg_log;
 
957
                _tmp33_ = event;
 
958
                zeitgeist_log_insert_events_no_reply (_tmp32_, _tmp33_, NULL, NULL);
961
959
                _g_object_unref0 (event);
962
960
                _g_object_unref0 (subject);
963
961
                _g_free0 (origin);
1010
1008
        G_OBJECT_CLASS (klass)->get_property = _vala_zeitgeist_dp_plugin_get_property;
1011
1009
        G_OBJECT_CLASS (klass)->set_property = _vala_zeitgeist_dp_plugin_set_property;
1012
1010
        G_OBJECT_CLASS (klass)->finalize = zeitgeist_dp_plugin_finalize;
1013
 
        g_object_class_override_property (G_OBJECT_CLASS (klass), ZEITGEIST_DP_PLUGIN_OBJECT, "object");
 
1011
        g_object_class_install_property (G_OBJECT_CLASS (klass), ZEITGEIST_DP_PLUGIN_OBJECT, g_param_spec_object ("object", "object", "object", G_TYPE_OBJECT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
1014
1012
}
1015
1013
 
1016
1014
 
1029
1027
 
1030
1028
static void zeitgeist_dp_plugin_finalize (GObject* obj) {
1031
1029
        ZeitgeistDpPlugin * self;
1032
 
        self = ZEITGEIST_DP_PLUGIN (obj);
 
1030
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ZEITGEIST_DP_PLUGIN, ZeitgeistDpPlugin);
1033
1031
        media_info_destroy (&self->priv->current_media);
1034
1032
        self->priv->signals = (g_free (self->priv->signals), NULL);
1035
1033
        _g_object_unref0 (self->priv->zg_log);
1055
1053
 
1056
1054
static void _vala_zeitgeist_dp_plugin_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
1057
1055
        ZeitgeistDpPlugin * self;
1058
 
        self = ZEITGEIST_DP_PLUGIN (object);
 
1056
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ZEITGEIST_DP_PLUGIN, ZeitgeistDpPlugin);
1059
1057
        switch (property_id) {
1060
1058
                case ZEITGEIST_DP_PLUGIN_OBJECT:
1061
1059
                g_value_take_object (value, zeitgeist_dp_plugin_real_get_object ((PeasActivatable*) self));
1069
1067
 
1070
1068
static void _vala_zeitgeist_dp_plugin_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
1071
1069
        ZeitgeistDpPlugin * self;
1072
 
        self = ZEITGEIST_DP_PLUGIN (object);
 
1070
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ZEITGEIST_DP_PLUGIN, ZeitgeistDpPlugin);
1073
1071
        switch (property_id) {
1074
1072
                case ZEITGEIST_DP_PLUGIN_OBJECT:
1075
1073
                zeitgeist_dp_plugin_real_set_object ((PeasActivatable*) self, g_value_get_object (value));
1082
1080
 
1083
1081
 
1084
1082
void peas_register_types (GTypeModule* module) {
 
1083
        PeasObjectModule* objmodule = NULL;
1085
1084
        GTypeModule* _tmp0_;
1086
1085
        PeasObjectModule* _tmp1_;
1087
 
        PeasObjectModule* objmodule;
1088
1086
        g_return_if_fail (module != NULL);
1089
1087
        zeitgeist_dp_plugin_register_type (module);
1090
1088
        _tmp0_ = module;
1091
 
        _tmp1_ = _g_object_ref0 (PEAS_IS_OBJECT_MODULE (_tmp0_) ? ((PeasObjectModule*) _tmp0_) : NULL);
 
1089
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, peas_object_module_get_type ()) ? ((PeasObjectModule*) _tmp0_) : NULL);
1092
1090
        objmodule = _tmp1_;
1093
1091
        peas_object_module_register_extension_type (objmodule, peas_activatable_get_type (), TYPE_ZEITGEIST_DP_PLUGIN);
1094
1092
        _g_object_unref0 (objmodule);