Back to index

libunity  5.92.0
test-mpris-backend-server.c
Go to the documentation of this file.
00001 /* test-mpris-backend-server.c generated by valac 0.17.2, the Vala compiler
00002  * generated from test-mpris-backend-server.vala, do not modify */
00003 
00004 
00005 #include <glib.h>
00006 #include <glib-object.h>
00007 #include <unity-internal.h>
00008 #include <gio/gio.h>
00009 #include <libdbusmenu-glib/client.h>
00010 #include <libdbusmenu-glib/dbusmenu-glib.h>
00011 #include <libdbusmenu-glib/enum-types.h>
00012 #include <libdbusmenu-glib/menuitem-proxy.h>
00013 #include <libdbusmenu-glib/menuitem.h>
00014 #include <libdbusmenu-glib/server.h>
00015 #include <libdbusmenu-glib/types.h>
00016 #include <stdlib.h>
00017 #include <string.h>
00018 #include <config.h>
00019 
00020 
00021 #define TYPE_MPRIS_SERVER (mpris_server_get_type ())
00022 #define MPRIS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_SERVER, MprisServer))
00023 #define MPRIS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS_SERVER, MprisServerClass))
00024 #define IS_MPRIS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_SERVER))
00025 #define IS_MPRIS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS_SERVER))
00026 #define MPRIS_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS_SERVER, MprisServerClass))
00027 
00028 typedef struct _MprisServer MprisServer;
00029 typedef struct _MprisServerClass MprisServerClass;
00030 typedef struct _MprisServerPrivate MprisServerPrivate;
00031 
00032 #define TYPE_TYPICAL_PLAYER (typical_player_get_type ())
00033 #define TYPICAL_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TYPICAL_PLAYER, TypicalPlayer))
00034 #define TYPICAL_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TYPICAL_PLAYER, TypicalPlayerClass))
00035 #define IS_TYPICAL_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TYPICAL_PLAYER))
00036 #define IS_TYPICAL_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TYPICAL_PLAYER))
00037 #define TYPICAL_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TYPICAL_PLAYER, TypicalPlayerClass))
00038 
00039 typedef struct _TypicalPlayer TypicalPlayer;
00040 typedef struct _TypicalPlayerClass TypicalPlayerClass;
00041 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
00042 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00043 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00044 typedef struct _TypicalPlayerPrivate TypicalPlayerPrivate;
00045 
00046 struct _MprisServer {
00047        GObject parent_instance;
00048        MprisServerPrivate * priv;
00049 };
00050 
00051 struct _MprisServerClass {
00052        GObjectClass parent_class;
00053 };
00054 
00055 struct _MprisServerPrivate {
00056        GMainLoop* _mainloop;
00057        TypicalPlayer* _player;
00058 };
00059 
00060 struct _TypicalPlayer {
00061        GObject parent_instance;
00062        TypicalPlayerPrivate * priv;
00063 };
00064 
00065 struct _TypicalPlayerClass {
00066        GObjectClass parent_class;
00067 };
00068 
00069 struct _TypicalPlayerPrivate {
00070        UnityMusicPlayer* _menu_player;
00071 };
00072 
00073 
00074 static gpointer mpris_server_parent_class = NULL;
00075 static gpointer typical_player_parent_class = NULL;
00076 
00077 GType mpris_server_get_type (void) G_GNUC_CONST;
00078 GType typical_player_get_type (void) G_GNUC_CONST;
00079 #define MPRIS_SERVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MPRIS_SERVER, MprisServerPrivate))
00080 enum  {
00081        MPRIS_SERVER_DUMMY_PROPERTY,
00082        MPRIS_SERVER_MAINLOOP,
00083        MPRIS_SERVER_PLAYER
00084 };
00085 MprisServer* mpris_server_new (GMainLoop* loop, TypicalPlayer* p);
00086 MprisServer* mpris_server_construct (GType object_type, GMainLoop* loop, TypicalPlayer* p);
00087 gboolean mpris_server_escape (MprisServer* self);
00088 GMainLoop* mpris_server_get_mainloop (MprisServer* self);
00089 gboolean mpris_server_set_up_typical_consumer (MprisServer* self);
00090 TypicalPlayer* mpris_server_get_player (MprisServer* self);
00091 UnityMusicPlayer* typical_player_get_menu_player (TypicalPlayer* self);
00092 static gboolean _mpris_server_escape_gsource_func (gpointer self);
00093 gboolean mpris_server_change_playlist_name (MprisServer* self);
00094 gint mpris_server_main (gchar** args, int args_length1);
00095 TypicalPlayer* typical_player_new (void);
00096 TypicalPlayer* typical_player_construct (GType object_type);
00097 static void mpris_server_set_mainloop (MprisServer* self, GMainLoop* value);
00098 static void mpris_server_set_player (MprisServer* self, TypicalPlayer* value);
00099 static GObject * mpris_server_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00100 static gboolean _mpris_server_set_up_typical_consumer_gsource_func (gpointer self);
00101 static void mpris_server_finalize (GObject* obj);
00102 static void _vala_mpris_server_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00103 static void _vala_mpris_server_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00104 #define TYPICAL_PLAYER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TYPICAL_PLAYER, TypicalPlayerPrivate))
00105 enum  {
00106        TYPICAL_PLAYER_DUMMY_PROPERTY,
00107        TYPICAL_PLAYER_MENU_PLAYER
00108 };
00109 static gboolean typical_player_add_playlist (TypicalPlayer* self);
00110 static void typical_player_on_raise (TypicalPlayer* self);
00111 static void typical_player_on_play_pause (TypicalPlayer* self);
00112 static void typical_player_on_previous (TypicalPlayer* self);
00113 static void typical_player_on_next (TypicalPlayer* self);
00114 static void typical_player_on_activate_playlist (TypicalPlayer* self, const char* playlist_id);
00115 static void typical_player_set_menu_player (TypicalPlayer* self, UnityMusicPlayer* value);
00116 static GObject * typical_player_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00117 static void _typical_player_on_raise_unity_music_player_raise (UnityMusicPlayer* _sender, gpointer self);
00118 static void _typical_player_on_play_pause_unity_music_player_play_pause (UnityMusicPlayer* _sender, gpointer self);
00119 static void _typical_player_on_previous_unity_music_player_previous (UnityMusicPlayer* _sender, gpointer self);
00120 static void _typical_player_on_next_unity_music_player_next (UnityMusicPlayer* _sender, gpointer self);
00121 static void _typical_player_on_activate_playlist_unity_music_player_activate_playlist (UnityMusicPlayer* _sender, const char* playlist_id, gpointer self);
00122 static void typical_player_finalize (GObject* obj);
00123 static void _vala_typical_player_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00124 static void _vala_typical_player_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00125 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00126 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00127 
00128 
00129 MprisServer* mpris_server_construct (GType object_type, GMainLoop* loop, TypicalPlayer* p) {
00130        MprisServer * self = NULL;
00131        GMainLoop* _tmp0_;
00132        TypicalPlayer* _tmp1_;
00133        g_return_val_if_fail (loop != NULL, NULL);
00134        g_return_val_if_fail (p != NULL, NULL);
00135        _tmp0_ = loop;
00136        _tmp1_ = p;
00137        self = (MprisServer*) g_object_new (object_type, "mainloop", _tmp0_, "player", _tmp1_, NULL);
00138        return self;
00139 }
00140 
00141 
00142 MprisServer* mpris_server_new (GMainLoop* loop, TypicalPlayer* p) {
00143        return mpris_server_construct (TYPE_MPRIS_SERVER, loop, p);
00144 }
00145 
00146 
00147 gboolean mpris_server_escape (MprisServer* self) {
00148        gboolean result = FALSE;
00149        GMainLoop* _tmp0_;
00150        g_return_val_if_fail (self != NULL, FALSE);
00151        _tmp0_ = self->priv->_mainloop;
00152        g_main_loop_quit (_tmp0_);
00153        result = FALSE;
00154        return result;
00155 }
00156 
00157 
00158 static gboolean _mpris_server_escape_gsource_func (gpointer self) {
00159        gboolean result;
00160        result = mpris_server_escape (self);
00161        return result;
00162 }
00163 
00164 
00165 gboolean mpris_server_set_up_typical_consumer (MprisServer* self) {
00166        gboolean result = FALSE;
00167        UnityTrackMetadata* _tmp0_;
00168        UnityTrackMetadata* metadata;
00169        UnityTrackMetadata* _tmp1_;
00170        UnityTrackMetadata* _tmp2_;
00171        UnityTrackMetadata* _tmp3_;
00172        UnityTrackMetadata* _tmp4_;
00173        GFile* _tmp5_ = NULL;
00174        GFile* _tmp6_;
00175        TypicalPlayer* _tmp7_;
00176        UnityMusicPlayer* _tmp8_;
00177        UnityMusicPlayer* _tmp9_;
00178        UnityTrackMetadata* _tmp10_;
00179        TypicalPlayer* _tmp11_;
00180        UnityMusicPlayer* _tmp12_;
00181        UnityMusicPlayer* _tmp13_;
00182        UnityPlaylist* _tmp14_;
00183        UnityPlaylist* pl;
00184        UnityPlaylist* _tmp15_;
00185        TypicalPlayer* _tmp20_;
00186        UnityMusicPlayer* _tmp21_;
00187        UnityMusicPlayer* _tmp22_;
00188        UnityPlaylist* _tmp23_;
00189        TypicalPlayer* _tmp24_;
00190        UnityMusicPlayer* _tmp25_;
00191        UnityMusicPlayer* _tmp26_;
00192        UnityPlaylist* _tmp27_;
00193        UnityPlaylist* _tmp28_;
00194        UnityPlaylist* pl2;
00195        UnityPlaylist* _tmp29_;
00196        DbusmenuMenuitem* _tmp34_;
00197        DbusmenuMenuitem* root;
00198        DbusmenuMenuitem* _tmp35_;
00199        DbusmenuMenuitem* child_1;
00200        DbusmenuMenuitem* _tmp36_;
00201        DbusmenuMenuitem* _tmp37_;
00202        DbusmenuMenuitem* _tmp38_;
00203        DbusmenuMenuitem* _tmp39_;
00204        DbusmenuMenuitem* child_2;
00205        DbusmenuMenuitem* _tmp40_;
00206        DbusmenuMenuitem* _tmp41_;
00207        DbusmenuMenuitem* _tmp42_;
00208        DbusmenuMenuitem* _tmp43_;
00209        DbusmenuMenuitem* child_3;
00210        DbusmenuMenuitem* _tmp44_;
00211        DbusmenuMenuitem* _tmp45_;
00212        DbusmenuMenuitem* _tmp46_;
00213        TypicalPlayer* _tmp47_;
00214        UnityMusicPlayer* _tmp48_;
00215        UnityMusicPlayer* _tmp49_;
00216        DbusmenuMenuitem* _tmp50_;
00217        DbusmenuMenuitem* _tmp51_;
00218        DbusmenuMenuitem* player_root;
00219        DbusmenuMenuitem* _tmp52_;
00220        DbusmenuMenuitem* player_child_1;
00221        DbusmenuMenuitem* _tmp53_;
00222        DbusmenuMenuitem* _tmp54_;
00223        DbusmenuMenuitem* _tmp55_;
00224        TypicalPlayer* _tmp56_;
00225        UnityMusicPlayer* _tmp57_;
00226        UnityMusicPlayer* _tmp58_;
00227        DbusmenuMenuitem* _tmp59_;
00228        TypicalPlayer* _tmp60_;
00229        UnityMusicPlayer* _tmp61_;
00230        UnityMusicPlayer* _tmp62_;
00231        UnityPlaylist* _tmp63_;
00232        GError * _inner_error_ = NULL;
00233        g_return_val_if_fail (self != NULL, FALSE);
00234        _tmp0_ = unity_track_metadata_new ();
00235        metadata = _tmp0_;
00236        _tmp1_ = metadata;
00237        unity_track_metadata_set_artist (_tmp1_, "Autechre");
00238        _tmp2_ = metadata;
00239        unity_track_metadata_set_album (_tmp2_, "LP5");
00240        _tmp3_ = metadata;
00241        unity_track_metadata_set_title (_tmp3_, "Rae");
00242        _tmp4_ = metadata;
00243        _tmp5_ = g_file_new_for_uri ("file:///home/user/download/ae_lp5.jpg");
00244        _tmp6_ = _tmp5_;
00245        unity_track_metadata_set_art_location (_tmp4_, _tmp6_);
00246        _g_object_unref0 (_tmp6_);
00247        _tmp7_ = self->priv->_player;
00248        _tmp8_ = typical_player_get_menu_player (_tmp7_);
00249        _tmp9_ = _tmp8_;
00250        _tmp10_ = metadata;
00251        unity_music_player_set_current_track (_tmp9_, _tmp10_);
00252        _tmp11_ = self->priv->_player;
00253        _tmp12_ = typical_player_get_menu_player (_tmp11_);
00254        _tmp13_ = _tmp12_;
00255        unity_music_player_set_is_blacklisted (_tmp13_, FALSE);
00256        _tmp14_ = unity_playlist_new ("/fake/pl/id");
00257        pl = _tmp14_;
00258        _tmp15_ = pl;
00259        unity_playlist_set_name (_tmp15_, "yellow swans like");
00260        {
00261               GIcon* _tmp16_ = NULL;
00262               GIcon* _tmp17_;
00263               UnityPlaylist* _tmp18_;
00264               GIcon* _tmp19_;
00265               _tmp16_ = g_icon_new_for_string ("audio-volume-high", &_inner_error_);
00266               _tmp17_ = _tmp16_;
00267               if (_inner_error_ != NULL) {
00268                      goto __catch0_g_error;
00269               }
00270               _tmp18_ = pl;
00271               _tmp19_ = _tmp17_;
00272               unity_playlist_set_icon (_tmp18_, _tmp19_);
00273               _g_object_unref0 (_tmp19_);
00274        }
00275        goto __finally0;
00276        __catch0_g_error:
00277        {
00278               GError* e = NULL;
00279               e = _inner_error_;
00280               _inner_error_ = NULL;
00281               g_warning ("test-mpris-backend-server.vala:39: Unable to load Icon from name provi" \
00282 "ded - unable to complete test");
00283               result = FALSE;
00284               _g_error_free0 (e);
00285               _g_object_unref0 (pl);
00286               _g_object_unref0 (metadata);
00287               return result;
00288        }
00289        __finally0:
00290        if (_inner_error_ != NULL) {
00291               _g_object_unref0 (pl);
00292               _g_object_unref0 (metadata);
00293               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);
00294               g_clear_error (&_inner_error_);
00295               return FALSE;
00296        }
00297        _tmp20_ = self->priv->_player;
00298        _tmp21_ = typical_player_get_menu_player (_tmp20_);
00299        _tmp22_ = _tmp21_;
00300        _tmp23_ = pl;
00301        unity_music_player_set_current_playlist (_tmp22_, _tmp23_);
00302        _tmp24_ = self->priv->_player;
00303        _tmp25_ = typical_player_get_menu_player (_tmp24_);
00304        _tmp26_ = _tmp25_;
00305        _tmp27_ = pl;
00306        unity_music_player_add_playlist (_tmp26_, _tmp27_);
00307        _tmp28_ = unity_playlist_new ("/fake/pl2/id");
00308        pl2 = _tmp28_;
00309        _tmp29_ = pl2;
00310        unity_playlist_set_name (_tmp29_, "another playlist");
00311        {
00312               GIcon* _tmp30_ = NULL;
00313               GIcon* _tmp31_;
00314               UnityPlaylist* _tmp32_;
00315               GIcon* _tmp33_;
00316               _tmp30_ = g_icon_new_for_string ("audio-volume-high", &_inner_error_);
00317               _tmp31_ = _tmp30_;
00318               if (_inner_error_ != NULL) {
00319                      goto __catch1_g_error;
00320               }
00321               _tmp32_ = pl2;
00322               _tmp33_ = _tmp31_;
00323               unity_playlist_set_icon (_tmp32_, _tmp33_);
00324               _g_object_unref0 (_tmp33_);
00325        }
00326        goto __finally1;
00327        __catch1_g_error:
00328        {
00329               GError* e = NULL;
00330               e = _inner_error_;
00331               _inner_error_ = NULL;
00332               g_warning ("test-mpris-backend-server.vala:52: Unable to load Icon from name provi" \
00333 "ded - unable to complete test");
00334               result = FALSE;
00335               _g_error_free0 (e);
00336               _g_object_unref0 (pl2);
00337               _g_object_unref0 (pl);
00338               _g_object_unref0 (metadata);
00339               return result;
00340        }
00341        __finally1:
00342        if (_inner_error_ != NULL) {
00343               _g_object_unref0 (pl2);
00344               _g_object_unref0 (pl);
00345               _g_object_unref0 (metadata);
00346               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);
00347               g_clear_error (&_inner_error_);
00348               return FALSE;
00349        }
00350        _tmp34_ = dbusmenu_menuitem_new ();
00351        root = _tmp34_;
00352        _tmp35_ = dbusmenu_menuitem_new ();
00353        child_1 = _tmp35_;
00354        _tmp36_ = child_1;
00355        dbusmenu_menuitem_property_set (_tmp36_, DBUSMENU_MENUITEM_PROP_LABEL, "Buy this");
00356        _tmp37_ = root;
00357        _tmp38_ = child_1;
00358        dbusmenu_menuitem_child_append (_tmp37_, _tmp38_);
00359        _tmp39_ = dbusmenu_menuitem_new ();
00360        child_2 = _tmp39_;
00361        _tmp40_ = child_2;
00362        dbusmenu_menuitem_property_set (_tmp40_, DBUSMENU_MENUITEM_PROP_LABEL, "Love this");
00363        _tmp41_ = root;
00364        _tmp42_ = child_2;
00365        dbusmenu_menuitem_child_append (_tmp41_, _tmp42_);
00366        _tmp43_ = dbusmenu_menuitem_new ();
00367        child_3 = _tmp43_;
00368        _tmp44_ = child_3;
00369        dbusmenu_menuitem_property_set (_tmp44_, DBUSMENU_MENUITEM_PROP_LABEL, "Share this");
00370        _tmp45_ = root;
00371        _tmp46_ = child_3;
00372        dbusmenu_menuitem_child_append (_tmp45_, _tmp46_);
00373        _tmp47_ = self->priv->_player;
00374        _tmp48_ = typical_player_get_menu_player (_tmp47_);
00375        _tmp49_ = _tmp48_;
00376        _tmp50_ = root;
00377        unity_music_player_set_track_menu (_tmp49_, _tmp50_);
00378        _tmp51_ = dbusmenu_menuitem_new ();
00379        player_root = _tmp51_;
00380        _tmp52_ = dbusmenu_menuitem_new ();
00381        player_child_1 = _tmp52_;
00382        _tmp53_ = player_child_1;
00383        dbusmenu_menuitem_property_set (_tmp53_, DBUSMENU_MENUITEM_PROP_LABEL, "EQ");
00384        _tmp54_ = player_root;
00385        _tmp55_ = player_child_1;
00386        dbusmenu_menuitem_child_append (_tmp54_, _tmp55_);
00387        _tmp56_ = self->priv->_player;
00388        _tmp57_ = typical_player_get_menu_player (_tmp56_);
00389        _tmp58_ = _tmp57_;
00390        _tmp59_ = player_root;
00391        unity_music_player_set_player_menu (_tmp58_, _tmp59_);
00392        _tmp60_ = self->priv->_player;
00393        _tmp61_ = typical_player_get_menu_player (_tmp60_);
00394        _tmp62_ = _tmp61_;
00395        _tmp63_ = pl2;
00396        unity_music_player_add_playlist (_tmp62_, _tmp63_);
00397        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 15, _mpris_server_escape_gsource_func, g_object_ref (self), g_object_unref);
00398        result = FALSE;
00399        _g_object_unref0 (player_child_1);
00400        _g_object_unref0 (player_root);
00401        _g_object_unref0 (child_3);
00402        _g_object_unref0 (child_2);
00403        _g_object_unref0 (child_1);
00404        _g_object_unref0 (root);
00405        _g_object_unref0 (pl2);
00406        _g_object_unref0 (pl);
00407        _g_object_unref0 (metadata);
00408        return result;
00409 }
00410 
00411 
00412 gboolean mpris_server_change_playlist_name (MprisServer* self) {
00413        gboolean result = FALSE;
00414        TypicalPlayer* _tmp0_;
00415        UnityMusicPlayer* _tmp1_;
00416        UnityMusicPlayer* _tmp2_;
00417        gint _tmp3_ = 0;
00418        UnityPlaylist** _tmp4_ = NULL;
00419        UnityPlaylist** pls;
00420        gint pls_length1;
00421        gint _pls_size_;
00422        TypicalPlayer* _tmp5_;
00423        UnityMusicPlayer* _tmp6_;
00424        UnityMusicPlayer* _tmp7_;
00425        UnityPlaylist* _tmp8_;
00426        const gchar* _tmp9_;
00427        const gchar* _tmp10_;
00428        g_return_val_if_fail (self != NULL, FALSE);
00429        _tmp0_ = self->priv->_player;
00430        _tmp1_ = typical_player_get_menu_player (_tmp0_);
00431        _tmp2_ = _tmp1_;
00432        _tmp4_ = unity_music_player_get_playlists (_tmp2_, &_tmp3_);
00433        pls = _tmp4_;
00434        pls_length1 = _tmp3_;
00435        _pls_size_ = pls_length1;
00436        _tmp5_ = self->priv->_player;
00437        _tmp6_ = typical_player_get_menu_player (_tmp5_);
00438        _tmp7_ = _tmp6_;
00439        _tmp8_ = pls[1];
00440        _tmp9_ = unity_playlist_get_id (_tmp8_);
00441        _tmp10_ = _tmp9_;
00442        unity_music_player_edit_playlist_name (_tmp7_, _tmp10_, "new name");
00443        result = FALSE;
00444        pls = (_vala_array_free (pls, pls_length1, (GDestroyNotify) g_object_unref), NULL);
00445        return result;
00446 }
00447 
00448 
00449 gint mpris_server_main (gchar** args, int args_length1) {
00450        gint result = 0;
00451        GMainContext* _tmp0_ = NULL;
00452        GMainLoop* _tmp1_;
00453        GMainLoop* mainloop;
00454        TypicalPlayer* player = NULL;
00455        TypicalPlayer* _tmp2_;
00456        GMainLoop* _tmp3_;
00457        TypicalPlayer* _tmp4_;
00458        MprisServer* _tmp5_;
00459        MprisServer* server;
00460        GMainLoop* _tmp11_;
00461        g_setenv ("XDG_DATA_HOME", TESTDIR "/data", TRUE);
00462        _tmp0_ = g_main_context_default ();
00463        _tmp1_ = g_main_loop_new (_tmp0_, FALSE);
00464        mainloop = _tmp1_;
00465        _tmp2_ = typical_player_new ();
00466        _g_object_unref0 (player);
00467        player = _tmp2_;
00468        _tmp3_ = mainloop;
00469        _tmp4_ = player;
00470        _tmp5_ = mpris_server_new (_tmp3_, _tmp4_);
00471        server = _tmp5_;
00472        while (TRUE) {
00473               GMainLoop* _tmp6_;
00474               GMainContext* _tmp7_ = NULL;
00475               gboolean _tmp8_ = FALSE;
00476               GMainLoop* _tmp9_;
00477               GMainContext* _tmp10_ = NULL;
00478               _tmp6_ = mainloop;
00479               _tmp7_ = g_main_loop_get_context (_tmp6_);
00480               _tmp8_ = g_main_context_pending (_tmp7_);
00481               if (!(_tmp8_ == TRUE)) {
00482                      break;
00483               }
00484               _tmp9_ = mainloop;
00485               _tmp10_ = g_main_loop_get_context (_tmp9_);
00486               g_main_context_iteration (_tmp10_, TRUE);
00487        }
00488        _tmp11_ = mainloop;
00489        g_main_loop_run (_tmp11_);
00490        result = 0;
00491        _g_object_unref0 (server);
00492        _g_object_unref0 (player);
00493        _g_main_loop_unref0 (mainloop);
00494        return result;
00495 }
00496 
00497 
00498 int main (int argc, char ** argv) {
00499        g_type_init ();
00500        return mpris_server_main (argv, argc);
00501 }
00502 
00503 
00504 GMainLoop* mpris_server_get_mainloop (MprisServer* self) {
00505        GMainLoop* result;
00506        GMainLoop* _tmp0_;
00507        g_return_val_if_fail (self != NULL, NULL);
00508        _tmp0_ = self->priv->_mainloop;
00509        result = _tmp0_;
00510        return result;
00511 }
00512 
00513 
00514 static gpointer _g_main_loop_ref0 (gpointer self) {
00515        return self ? g_main_loop_ref (self) : NULL;
00516 }
00517 
00518 
00519 static void mpris_server_set_mainloop (MprisServer* self, GMainLoop* value) {
00520        GMainLoop* _tmp0_;
00521        GMainLoop* _tmp1_;
00522        g_return_if_fail (self != NULL);
00523        _tmp0_ = value;
00524        _tmp1_ = _g_main_loop_ref0 (_tmp0_);
00525        _g_main_loop_unref0 (self->priv->_mainloop);
00526        self->priv->_mainloop = _tmp1_;
00527        g_object_notify ((GObject *) self, "mainloop");
00528 }
00529 
00530 
00531 TypicalPlayer* mpris_server_get_player (MprisServer* self) {
00532        TypicalPlayer* result;
00533        TypicalPlayer* _tmp0_;
00534        g_return_val_if_fail (self != NULL, NULL);
00535        _tmp0_ = self->priv->_player;
00536        result = _tmp0_;
00537        return result;
00538 }
00539 
00540 
00541 static gpointer _g_object_ref0 (gpointer self) {
00542        return self ? g_object_ref (self) : NULL;
00543 }
00544 
00545 
00546 static void mpris_server_set_player (MprisServer* self, TypicalPlayer* value) {
00547        TypicalPlayer* _tmp0_;
00548        TypicalPlayer* _tmp1_;
00549        g_return_if_fail (self != NULL);
00550        _tmp0_ = value;
00551        _tmp1_ = _g_object_ref0 (_tmp0_);
00552        _g_object_unref0 (self->priv->_player);
00553        self->priv->_player = _tmp1_;
00554        g_object_notify ((GObject *) self, "player");
00555 }
00556 
00557 
00558 static gboolean _mpris_server_set_up_typical_consumer_gsource_func (gpointer self) {
00559        gboolean result;
00560        result = mpris_server_set_up_typical_consumer (self);
00561        return result;
00562 }
00563 
00564 
00565 static GObject * mpris_server_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
00566        GObject * obj;
00567        GObjectClass * parent_class;
00568        MprisServer * self;
00569        parent_class = G_OBJECT_CLASS (mpris_server_parent_class);
00570        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
00571        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS_SERVER, MprisServer);
00572        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, _mpris_server_set_up_typical_consumer_gsource_func, g_object_ref (self), g_object_unref);
00573        return obj;
00574 }
00575 
00576 
00577 static void mpris_server_class_init (MprisServerClass * klass) {
00578        mpris_server_parent_class = g_type_class_peek_parent (klass);
00579        g_type_class_add_private (klass, sizeof (MprisServerPrivate));
00580        G_OBJECT_CLASS (klass)->get_property = _vala_mpris_server_get_property;
00581        G_OBJECT_CLASS (klass)->set_property = _vala_mpris_server_set_property;
00582        G_OBJECT_CLASS (klass)->constructor = mpris_server_constructor;
00583        G_OBJECT_CLASS (klass)->finalize = mpris_server_finalize;
00584        g_object_class_install_property (G_OBJECT_CLASS (klass), MPRIS_SERVER_MAINLOOP, g_param_spec_pointer ("mainloop", "mainloop", "mainloop", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
00585        g_object_class_install_property (G_OBJECT_CLASS (klass), MPRIS_SERVER_PLAYER, g_param_spec_object ("player", "player", "player", TYPE_TYPICAL_PLAYER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
00586 }
00587 
00588 
00589 static void mpris_server_instance_init (MprisServer * self) {
00590        self->priv = MPRIS_SERVER_GET_PRIVATE (self);
00591 }
00592 
00593 
00594 static void mpris_server_finalize (GObject* obj) {
00595        MprisServer * self;
00596        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS_SERVER, MprisServer);
00597        _g_main_loop_unref0 (self->priv->_mainloop);
00598        _g_object_unref0 (self->priv->_player);
00599        G_OBJECT_CLASS (mpris_server_parent_class)->finalize (obj);
00600 }
00601 
00602 
00603 GType mpris_server_get_type (void) {
00604        static volatile gsize mpris_server_type_id__volatile = 0;
00605        if (g_once_init_enter (&mpris_server_type_id__volatile)) {
00606               static const GTypeInfo g_define_type_info = { sizeof (MprisServerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) mpris_server_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MprisServer), 0, (GInstanceInitFunc) mpris_server_instance_init, NULL };
00607               GType mpris_server_type_id;
00608               mpris_server_type_id = g_type_register_static (G_TYPE_OBJECT, "MprisServer", &g_define_type_info, 0);
00609               g_once_init_leave (&mpris_server_type_id__volatile, mpris_server_type_id);
00610        }
00611        return mpris_server_type_id__volatile;
00612 }
00613 
00614 
00615 static void _vala_mpris_server_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00616        MprisServer * self;
00617        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MPRIS_SERVER, MprisServer);
00618        switch (property_id) {
00619               case MPRIS_SERVER_MAINLOOP:
00620               g_value_set_pointer (value, mpris_server_get_mainloop (self));
00621               break;
00622               case MPRIS_SERVER_PLAYER:
00623               g_value_set_object (value, mpris_server_get_player (self));
00624               break;
00625               default:
00626               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00627               break;
00628        }
00629 }
00630 
00631 
00632 static void _vala_mpris_server_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
00633        MprisServer * self;
00634        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MPRIS_SERVER, MprisServer);
00635        switch (property_id) {
00636               case MPRIS_SERVER_MAINLOOP:
00637               mpris_server_set_mainloop (self, g_value_get_pointer (value));
00638               break;
00639               case MPRIS_SERVER_PLAYER:
00640               mpris_server_set_player (self, g_value_get_object (value));
00641               break;
00642               default:
00643               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00644               break;
00645        }
00646 }
00647 
00648 
00649 TypicalPlayer* typical_player_construct (GType object_type) {
00650        TypicalPlayer * self = NULL;
00651        self = (TypicalPlayer*) g_object_new (object_type, NULL);
00652        return self;
00653 }
00654 
00655 
00656 TypicalPlayer* typical_player_new (void) {
00657        return typical_player_construct (TYPE_TYPICAL_PLAYER);
00658 }
00659 
00660 
00661 static gboolean typical_player_add_playlist (TypicalPlayer* self) {
00662        gboolean result = FALSE;
00663        UnityPlaylist* _tmp0_;
00664        UnityPlaylist* pl2;
00665        UnityPlaylist* _tmp1_;
00666        GError * _inner_error_ = NULL;
00667        g_return_val_if_fail (self != NULL, FALSE);
00668        _tmp0_ = unity_playlist_new ("/fake/pl2/id");
00669        pl2 = _tmp0_;
00670        _tmp1_ = pl2;
00671        unity_playlist_set_name (_tmp1_, "another playlist");
00672        {
00673               GIcon* _tmp2_ = NULL;
00674               GIcon* _tmp3_;
00675               UnityPlaylist* _tmp4_;
00676               GIcon* _tmp5_;
00677               _tmp2_ = g_icon_new_for_string ("audio-volume-high", &_inner_error_);
00678               _tmp3_ = _tmp2_;
00679               if (_inner_error_ != NULL) {
00680                      goto __catch2_g_error;
00681               }
00682               _tmp4_ = pl2;
00683               _tmp5_ = _tmp3_;
00684               unity_playlist_set_icon (_tmp4_, _tmp5_);
00685               _g_object_unref0 (_tmp5_);
00686        }
00687        goto __finally2;
00688        __catch2_g_error:
00689        {
00690               GError* e = NULL;
00691               e = _inner_error_;
00692               _inner_error_ = NULL;
00693               g_warning ("test-mpris-backend-server.vala:140: Unable to load Icon from name prov" \
00694 "ided - unable to complete test");
00695               result = FALSE;
00696               _g_error_free0 (e);
00697               _g_object_unref0 (pl2);
00698               return result;
00699        }
00700        __finally2:
00701        if (_inner_error_ != NULL) {
00702               _g_object_unref0 (pl2);
00703               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);
00704               g_clear_error (&_inner_error_);
00705               return FALSE;
00706        }
00707        result = FALSE;
00708        _g_object_unref0 (pl2);
00709        return result;
00710 }
00711 
00712 
00713 static void typical_player_on_raise (TypicalPlayer* self) {
00714        g_return_if_fail (self != NULL);
00715 }
00716 
00717 
00718 static void typical_player_on_play_pause (TypicalPlayer* self) {
00719        UnityPlaybackState _tmp0_ = 0;
00720        UnityMusicPlayer* _tmp1_;
00721        UnityPlaybackState _tmp2_;
00722        UnityPlaybackState _tmp3_;
00723        UnityMusicPlayer* _tmp4_;
00724        UnityPlaybackState _tmp5_;
00725        g_return_if_fail (self != NULL);
00726        _tmp1_ = self->priv->_menu_player;
00727        _tmp2_ = unity_music_player_get_playback_state (_tmp1_);
00728        _tmp3_ = _tmp2_;
00729        if (_tmp3_ == UNITY_PLAYBACK_STATE_PLAYING) {
00730               _tmp0_ = UNITY_PLAYBACK_STATE_PAUSED;
00731        } else {
00732               _tmp0_ = UNITY_PLAYBACK_STATE_PLAYING;
00733        }
00734        _tmp4_ = self->priv->_menu_player;
00735        _tmp5_ = _tmp0_;
00736        unity_music_player_set_playback_state (_tmp4_, _tmp5_);
00737 }
00738 
00739 
00740 static void typical_player_on_previous (TypicalPlayer* self) {
00741        g_return_if_fail (self != NULL);
00742 }
00743 
00744 
00745 static void typical_player_on_next (TypicalPlayer* self) {
00746        g_return_if_fail (self != NULL);
00747 }
00748 
00749 
00750 static void typical_player_on_activate_playlist (TypicalPlayer* self, const char* playlist_id) {
00751        UnityMusicPlayer* _tmp0_;
00752        gint _tmp1_ = 0;
00753        UnityPlaylist** _tmp2_ = NULL;
00754        g_return_if_fail (self != NULL);
00755        g_return_if_fail (playlist_id != NULL);
00756        _tmp0_ = self->priv->_menu_player;
00757        _tmp2_ = unity_music_player_get_playlists (_tmp0_, &_tmp1_);
00758        {
00759               UnityPlaylist** pl_collection = NULL;
00760               gint pl_collection_length1 = 0;
00761               gint _pl_collection_size_ = 0;
00762               gint pl_it = 0;
00763               pl_collection = _tmp2_;
00764               pl_collection_length1 = _tmp1_;
00765               for (pl_it = 0; pl_it < _tmp1_; pl_it = pl_it + 1) {
00766                      UnityPlaylist* _tmp3_;
00767                      UnityPlaylist* pl = NULL;
00768                      _tmp3_ = _g_object_ref0 (pl_collection[pl_it]);
00769                      pl = _tmp3_;
00770                      {
00771                             UnityPlaylist* _tmp4_;
00772                             const gchar* _tmp5_;
00773                             const gchar* _tmp6_;
00774                             const char* _tmp7_;
00775                             _tmp4_ = pl;
00776                             _tmp5_ = unity_playlist_get_id (_tmp4_);
00777                             _tmp6_ = _tmp5_;
00778                             _tmp7_ = playlist_id;
00779                             if (g_strcmp0 (_tmp6_, (const gchar*) _tmp7_) == 0) {
00780                                    UnityMusicPlayer* _tmp8_;
00781                                    UnityPlaylist* _tmp9_;
00782                                    _tmp8_ = self->priv->_menu_player;
00783                                    _tmp9_ = pl;
00784                                    unity_music_player_set_current_playlist (_tmp8_, _tmp9_);
00785                                    _g_object_unref0 (pl);
00786                                    pl_collection = (_vala_array_free (pl_collection, pl_collection_length1, (GDestroyNotify) g_object_unref), NULL);
00787                                    return;
00788                             }
00789                             _g_object_unref0 (pl);
00790                      }
00791               }
00792               pl_collection = (_vala_array_free (pl_collection, pl_collection_length1, (GDestroyNotify) g_object_unref), NULL);
00793        }
00794 }
00795 
00796 
00797 UnityMusicPlayer* typical_player_get_menu_player (TypicalPlayer* self) {
00798        UnityMusicPlayer* result;
00799        UnityMusicPlayer* _tmp0_;
00800        g_return_val_if_fail (self != NULL, NULL);
00801        _tmp0_ = self->priv->_menu_player;
00802        result = _tmp0_;
00803        return result;
00804 }
00805 
00806 
00807 static void typical_player_set_menu_player (TypicalPlayer* self, UnityMusicPlayer* value) {
00808        UnityMusicPlayer* _tmp0_;
00809        UnityMusicPlayer* _tmp1_;
00810        g_return_if_fail (self != NULL);
00811        _tmp0_ = value;
00812        _tmp1_ = _g_object_ref0 (_tmp0_);
00813        _g_object_unref0 (self->priv->_menu_player);
00814        self->priv->_menu_player = _tmp1_;
00815        g_object_notify ((GObject *) self, "menu-player");
00816 }
00817 
00818 
00819 static void _typical_player_on_raise_unity_music_player_raise (UnityMusicPlayer* _sender, gpointer self) {
00820        typical_player_on_raise (self);
00821 }
00822 
00823 
00824 static void _typical_player_on_play_pause_unity_music_player_play_pause (UnityMusicPlayer* _sender, gpointer self) {
00825        typical_player_on_play_pause (self);
00826 }
00827 
00828 
00829 static void _typical_player_on_previous_unity_music_player_previous (UnityMusicPlayer* _sender, gpointer self) {
00830        typical_player_on_previous (self);
00831 }
00832 
00833 
00834 static void _typical_player_on_next_unity_music_player_next (UnityMusicPlayer* _sender, gpointer self) {
00835        typical_player_on_next (self);
00836 }
00837 
00838 
00839 static void _typical_player_on_activate_playlist_unity_music_player_activate_playlist (UnityMusicPlayer* _sender, const char* playlist_id, gpointer self) {
00840        typical_player_on_activate_playlist (self, playlist_id);
00841 }
00842 
00843 
00844 static GObject * typical_player_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
00845        GObject * obj;
00846        GObjectClass * parent_class;
00847        TypicalPlayer * self;
00848        UnityMusicPlayer* _tmp0_;
00849        UnityMusicPlayer* _tmp1_;
00850        UnityMusicPlayer* _tmp2_;
00851        UnityMusicPlayer* _tmp3_;
00852        UnityMusicPlayer* _tmp4_;
00853        UnityMusicPlayer* _tmp5_;
00854        UnityMusicPlayer* _tmp6_;
00855        UnityMusicPlayer* _tmp7_;
00856        parent_class = G_OBJECT_CLASS (typical_player_parent_class);
00857        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
00858        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TYPICAL_PLAYER, TypicalPlayer);
00859        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00860        _tmp1_ = _tmp0_;
00861        typical_player_set_menu_player (self, _tmp1_);
00862        _g_object_unref0 (_tmp1_);
00863        _tmp2_ = self->priv->_menu_player;
00864        unity_music_player_export (_tmp2_);
00865        _tmp3_ = self->priv->_menu_player;
00866        g_signal_connect_object (_tmp3_, "raise", (GCallback) _typical_player_on_raise_unity_music_player_raise, self, 0);
00867        _tmp4_ = self->priv->_menu_player;
00868        g_signal_connect_object (_tmp4_, "play-pause", (GCallback) _typical_player_on_play_pause_unity_music_player_play_pause, self, 0);
00869        _tmp5_ = self->priv->_menu_player;
00870        g_signal_connect_object (_tmp5_, "previous", (GCallback) _typical_player_on_previous_unity_music_player_previous, self, 0);
00871        _tmp6_ = self->priv->_menu_player;
00872        g_signal_connect_object (_tmp6_, "next", (GCallback) _typical_player_on_next_unity_music_player_next, self, 0);
00873        _tmp7_ = self->priv->_menu_player;
00874        g_signal_connect_object (_tmp7_, "activate-playlist", (GCallback) _typical_player_on_activate_playlist_unity_music_player_activate_playlist, self, 0);
00875        return obj;
00876 }
00877 
00878 
00879 static void typical_player_class_init (TypicalPlayerClass * klass) {
00880        typical_player_parent_class = g_type_class_peek_parent (klass);
00881        g_type_class_add_private (klass, sizeof (TypicalPlayerPrivate));
00882        G_OBJECT_CLASS (klass)->get_property = _vala_typical_player_get_property;
00883        G_OBJECT_CLASS (klass)->set_property = _vala_typical_player_set_property;
00884        G_OBJECT_CLASS (klass)->constructor = typical_player_constructor;
00885        G_OBJECT_CLASS (klass)->finalize = typical_player_finalize;
00886        g_object_class_install_property (G_OBJECT_CLASS (klass), TYPICAL_PLAYER_MENU_PLAYER, g_param_spec_object ("menu-player", "menu-player", "menu-player", UNITY_TYPE_MUSIC_PLAYER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
00887 }
00888 
00889 
00890 static void typical_player_instance_init (TypicalPlayer * self) {
00891        self->priv = TYPICAL_PLAYER_GET_PRIVATE (self);
00892 }
00893 
00894 
00895 static void typical_player_finalize (GObject* obj) {
00896        TypicalPlayer * self;
00897        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TYPICAL_PLAYER, TypicalPlayer);
00898        _g_object_unref0 (self->priv->_menu_player);
00899        G_OBJECT_CLASS (typical_player_parent_class)->finalize (obj);
00900 }
00901 
00902 
00903 GType typical_player_get_type (void) {
00904        static volatile gsize typical_player_type_id__volatile = 0;
00905        if (g_once_init_enter (&typical_player_type_id__volatile)) {
00906               static const GTypeInfo g_define_type_info = { sizeof (TypicalPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) typical_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TypicalPlayer), 0, (GInstanceInitFunc) typical_player_instance_init, NULL };
00907               GType typical_player_type_id;
00908               typical_player_type_id = g_type_register_static (G_TYPE_OBJECT, "TypicalPlayer", &g_define_type_info, 0);
00909               g_once_init_leave (&typical_player_type_id__volatile, typical_player_type_id);
00910        }
00911        return typical_player_type_id__volatile;
00912 }
00913 
00914 
00915 static void _vala_typical_player_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
00916        TypicalPlayer * self;
00917        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TYPICAL_PLAYER, TypicalPlayer);
00918        switch (property_id) {
00919               case TYPICAL_PLAYER_MENU_PLAYER:
00920               g_value_set_object (value, typical_player_get_menu_player (self));
00921               break;
00922               default:
00923               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00924               break;
00925        }
00926 }
00927 
00928 
00929 static void _vala_typical_player_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
00930        TypicalPlayer * self;
00931        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TYPICAL_PLAYER, TypicalPlayer);
00932        switch (property_id) {
00933               case TYPICAL_PLAYER_MENU_PLAYER:
00934               typical_player_set_menu_player (self, g_value_get_object (value));
00935               break;
00936               default:
00937               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
00938               break;
00939        }
00940 }
00941 
00942 
00943 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
00944        if ((array != NULL) && (destroy_func != NULL)) {
00945               int i;
00946               for (i = 0; i < array_length; i = i + 1) {
00947                      if (((gpointer*) array)[i] != NULL) {
00948                             destroy_func (((gpointer*) array)[i]);
00949                      }
00950               }
00951        }
00952 }
00953 
00954 
00955 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
00956        _vala_array_destroy (array, array_length, destroy_func);
00957        g_free (array);
00958 }
00959 
00960 
00961