1
/* mpris2-interfaces.c generated by valac 0.12.1, the Vala compiler
1
/* mpris2-interfaces.c generated by valac 0.14.2, the Vala compiler
2
2
* generated from mpris2-interfaces.vala, do not modify */
58
58
#define TYPE_ACTIVE_PLAYLIST_CONTAINER (active_playlist_container_get_type ())
59
59
typedef struct _ActivePlaylistContainer ActivePlaylistContainer;
60
#define _playlist_details_free0(var) ((var == NULL) ? NULL : (var = (playlist_details_free (var), NULL)))
61
62
#define TYPE_MPRIS_PLAYLISTS (mpris_playlists_get_type ())
62
63
#define MPRIS_PLAYLISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_PLAYLISTS, MprisPlaylists))
115
116
struct _ActivePlaylistContainer {
117
PlaylistDetails details;
118
PlaylistDetails* details;
120
121
struct _MprisPlaylistsIface {
121
122
GTypeInterface parent_iface;
122
123
void (*ActivatePlaylist) (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
123
124
void (*ActivatePlaylist_finish) (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
124
void (*GetPlaylists) (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
125
void (*GetPlaylists) (MprisPlaylists* self, gint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
125
126
PlaylistDetails* (*GetPlaylists_finish) (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error);
126
127
gchar** (*get_Orderings) (MprisPlaylists* self, int* result_length1);
127
128
void (*set_Orderings) (MprisPlaylists* self, gchar** value, int value_length1);
256
257
GType mpris_playlists_get_type (void) G_GNUC_CONST;
257
258
void mpris_playlists_ActivatePlaylist (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
258
259
void mpris_playlists_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
259
void mpris_playlists_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
260
void mpris_playlists_GetPlaylists (MprisPlaylists* self, gint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
260
261
PlaylistDetails* mpris_playlists_GetPlaylists_finish (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error);
261
262
gchar** mpris_playlists_get_Orderings (MprisPlaylists* self, int* result_length1);
262
263
void mpris_playlists_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1);
269
270
static void _dbus_handle_mpris_playlists_playlist_changed (MprisPlaylists* self, GVariant* parameters);
270
271
static void mpris_playlists_proxy_ActivatePlaylist_async (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
271
272
static void mpris_playlists_proxy_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
272
static void mpris_playlists_proxy_GetPlaylists_async (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
273
static void mpris_playlists_proxy_GetPlaylists_async (MprisPlaylists* self, gint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
273
274
static PlaylistDetails* mpris_playlists_proxy_GetPlaylists_finish (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error);
274
275
static gchar** mpris_playlists_dbus_proxy_get_Orderings (MprisPlaylists* self, int* result_length1);
275
276
static void mpris_playlists_dbus_proxy_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1);
341
342
static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_ActivatePlaylist_in[] = {&_mpris_playlists_dbus_arg_info_ActivatePlaylist_playlist_id, NULL};
342
343
static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_ActivatePlaylist_out[] = {NULL};
343
344
static const GDBusMethodInfo _mpris_playlists_dbus_method_info_ActivatePlaylist = {-1, "ActivatePlaylist", (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_ActivatePlaylist_in), (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_ActivatePlaylist_out)};
344
static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_index = {-1, "index", "u"};
345
static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_index = {-1, "index", "i"};
345
346
static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_max_count = {-1, "max_count", "u"};
346
347
static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_order = {-1, "order", "s"};
347
348
static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_reverse_order = {-1, "reverse_order", "b"};
384
385
gboolean mpris_root_get_HasTracklist (MprisRoot* self) {
386
g_return_val_if_fail (self != NULL, FALSE);
385
387
return MPRIS_ROOT_GET_INTERFACE (self)->get_HasTracklist (self);
389
391
void mpris_root_set_HasTracklist (MprisRoot* self, gboolean value) {
392
g_return_if_fail (self != NULL);
390
393
MPRIS_ROOT_GET_INTERFACE (self)->set_HasTracklist (self, value);
394
397
gboolean mpris_root_get_CanQuit (MprisRoot* self) {
398
g_return_val_if_fail (self != NULL, FALSE);
395
399
return MPRIS_ROOT_GET_INTERFACE (self)->get_CanQuit (self);
399
403
void mpris_root_set_CanQuit (MprisRoot* self, gboolean value) {
404
g_return_if_fail (self != NULL);
400
405
MPRIS_ROOT_GET_INTERFACE (self)->set_CanQuit (self, value);
404
409
gboolean mpris_root_get_CanRaise (MprisRoot* self) {
410
g_return_val_if_fail (self != NULL, FALSE);
405
411
return MPRIS_ROOT_GET_INTERFACE (self)->get_CanRaise (self);
409
415
void mpris_root_set_CanRaise (MprisRoot* self, gboolean value) {
416
g_return_if_fail (self != NULL);
410
417
MPRIS_ROOT_GET_INTERFACE (self)->set_CanRaise (self, value);
414
421
gchar* mpris_root_get_Identity (MprisRoot* self) {
422
g_return_val_if_fail (self != NULL, NULL);
415
423
return MPRIS_ROOT_GET_INTERFACE (self)->get_Identity (self);
419
427
void mpris_root_set_Identity (MprisRoot* self, const gchar* value) {
428
g_return_if_fail (self != NULL);
420
429
MPRIS_ROOT_GET_INTERFACE (self)->set_Identity (self, value);
424
433
gchar* mpris_root_get_DesktopEntry (MprisRoot* self) {
434
g_return_val_if_fail (self != NULL, NULL);
425
435
return MPRIS_ROOT_GET_INTERFACE (self)->get_DesktopEntry (self);
429
439
void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value) {
440
g_return_if_fail (self != NULL);
430
441
MPRIS_ROOT_GET_INTERFACE (self)->set_DesktopEntry (self, value);
1040
1051
GHashTable* mpris_player_get_Metadata (MprisPlayer* self) {
1052
g_return_val_if_fail (self != NULL, NULL);
1041
1053
return MPRIS_PLAYER_GET_INTERFACE (self)->get_Metadata (self);
1045
1057
void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value) {
1058
g_return_if_fail (self != NULL);
1046
1059
MPRIS_PLAYER_GET_INTERFACE (self)->set_Metadata (self, value);
1050
1063
gint32 mpris_player_get_Position (MprisPlayer* self) {
1064
g_return_val_if_fail (self != NULL, 0);
1051
1065
return MPRIS_PLAYER_GET_INTERFACE (self)->get_Position (self);
1055
1069
void mpris_player_set_Position (MprisPlayer* self, gint32 value) {
1070
g_return_if_fail (self != NULL);
1056
1071
MPRIS_PLAYER_GET_INTERFACE (self)->set_Position (self, value);
1060
1075
gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self) {
1076
g_return_val_if_fail (self != NULL, NULL);
1061
1077
return MPRIS_PLAYER_GET_INTERFACE (self)->get_PlaybackStatus (self);
1065
1081
void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
1082
g_return_if_fail (self != NULL);
1066
1083
MPRIS_PLAYER_GET_INTERFACE (self)->set_PlaybackStatus (self, value);
1071
1088
typedef void (*GMarshalFunc_VOID__INT64) (gpointer data1, gint64 arg_1, gpointer data2);
1072
1089
register GMarshalFunc_VOID__INT64 callback;
1073
1090
register GCClosure * cc;
1074
register gpointer data1, data2;
1091
register gpointer data1;
1092
register gpointer data2;
1075
1093
cc = (GCClosure *) closure;
1076
1094
g_return_if_fail (n_param_values == 2);
1077
1095
if (G_CCLOSURE_SWAP_DATA (closure)) {
1583
1601
g_variant_builder_add (&_tmp10_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
1585
1603
_reply = g_variant_builder_end (&_tmp10_);
1586
_g_hash_table_unref0 ( result);
1604
_g_hash_table_unref0 (result);
1707
1725
static void _mpris_player_unregister_object (gpointer user_data) {
1708
1726
gpointer* data;
1709
1727
data = user_data;
1728
g_signal_handlers_disconnect_by_func (data[0], _dbus_mpris_player_seeked, data);
1710
1729
g_object_unref (data[0]);
1711
1730
g_object_unref (data[1]);
1712
1731
g_free (data[2]);
1717
1736
void playlist_details_copy (const PlaylistDetails* self, PlaylistDetails* dest) {
1718
dest->path = g_strdup (self->path);
1719
dest->name = g_strdup (self->name);
1720
dest->icon_path = g_strdup (self->icon_path);
1739
const gchar* _tmp2_;
1741
const gchar* _tmp4_;
1743
_tmp0_ = (*self).path;
1744
_tmp1_ = g_strdup (_tmp0_);
1745
_g_free0 ((*dest).path);
1746
(*dest).path = _tmp1_;
1747
_tmp2_ = (*self).name;
1748
_tmp3_ = g_strdup (_tmp2_);
1749
_g_free0 ((*dest).name);
1750
(*dest).name = _tmp3_;
1751
_tmp4_ = (*self).icon_path;
1752
_tmp5_ = g_strdup (_tmp4_);
1753
_g_free0 ((*dest).icon_path);
1754
(*dest).icon_path = _tmp5_;
1790
static gpointer _playlist_details_dup0 (gpointer self) {
1791
return self ? playlist_details_dup (self) : NULL;
1756
1795
void active_playlist_container_copy (const ActivePlaylistContainer* self, ActivePlaylistContainer* dest) {
1757
PlaylistDetails _tmp0_ = {0};
1758
dest->valid = self->valid;
1759
playlist_details_copy (&self->details, &_tmp0_);
1760
dest->details = _tmp0_;
1797
PlaylistDetails* _tmp1_;
1798
PlaylistDetails* _tmp2_;
1799
_tmp0_ = (*self).valid;
1800
(*dest).valid = _tmp0_;
1801
_tmp1_ = (*self).details;
1802
_tmp2_ = _playlist_details_dup0 (_tmp1_);
1803
_playlist_details_free0 ((*dest).details);
1804
(*dest).details = _tmp2_;
1764
1808
void active_playlist_container_destroy (ActivePlaylistContainer* self) {
1765
playlist_details_destroy (&(*self).details);
1809
_playlist_details_free0 ((*self).details);
1804
void mpris_playlists_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1848
void mpris_playlists_GetPlaylists (MprisPlaylists* self, gint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1805
1849
MPRIS_PLAYLISTS_GET_INTERFACE (self)->GetPlaylists (self, index, max_count, order, reverse_order, _callback_, _user_data_);
1814
1858
gchar** mpris_playlists_get_Orderings (MprisPlaylists* self, int* result_length1) {
1859
g_return_val_if_fail (self != NULL, NULL);
1815
1860
return MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_Orderings (self, result_length1);
1819
1864
void mpris_playlists_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1) {
1865
g_return_if_fail (self != NULL);
1820
1866
MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_Orderings (self, value, value_length1);
1824
1870
guint32 mpris_playlists_get_PlaylistCount (MprisPlaylists* self) {
1871
g_return_val_if_fail (self != NULL, 0U);
1825
1872
return MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_PlaylistCount (self);
1829
1876
void mpris_playlists_set_PlaylistCount (MprisPlaylists* self, guint32 value) {
1877
g_return_if_fail (self != NULL);
1830
1878
MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_PlaylistCount (self, value);
1834
1882
void mpris_playlists_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result) {
1883
g_return_if_fail (self != NULL);
1835
1884
MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_ActivePlaylist (self, result);
1839
1888
void mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value) {
1889
g_return_if_fail (self != NULL);
1840
1890
MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_ActivePlaylist (self, value);
1845
1895
typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, gpointer arg_1, gpointer data2);
1846
1896
register GMarshalFunc_VOID__BOXED callback;
1847
1897
register GCClosure * cc;
1848
register gpointer data1, data2;
1898
register gpointer data1;
1899
register gpointer data2;
1849
1900
cc = (GCClosure *) closure;
1850
1901
g_return_if_fail (n_param_values == 2);
1851
1902
if (G_CCLOSURE_SWAP_DATA (closure)) {
1962
static void mpris_playlists_proxy_GetPlaylists_async (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_) {
2013
static void mpris_playlists_proxy_GetPlaylists_async (MprisPlaylists* self, gint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_) {
1963
2014
GDBusMessage *_message;
1964
2015
GVariant *_arguments;
1965
2016
GVariantBuilder _arguments_builder;
1967
2018
_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Playlists", "GetPlaylists");
1968
2019
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
1969
g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (index));
2020
g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (index));
1970
2021
g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (max_count));
1971
2022
g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (order));
1972
2023
g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (reverse_order));
2202
2253
_tmp47_ = g_variant_iter_next_value (&_tmp44_);
2203
2254
_tmp43_.icon_path = g_variant_dup_string (_tmp47_, NULL);
2204
2255
g_variant_unref (_tmp47_);
2205
_tmp39_.details = _tmp43_;
2256
_tmp39_.details = g_memdup (&_tmp43_, sizeof (PlaylistDetails));
2206
2257
g_variant_unref (_tmp42_);
2207
2258
*result = _tmp39_;
2208
2259
g_variant_unref (_inner_reply);
2223
2274
g_variant_builder_init (&_tmp48_, G_VARIANT_TYPE_TUPLE);
2224
2275
g_variant_builder_add_value (&_tmp48_, g_variant_new_boolean ((*value).valid));
2225
2276
g_variant_builder_init (&_tmp49_, G_VARIANT_TYPE_TUPLE);
2226
g_variant_builder_add_value (&_tmp49_, g_variant_new_object_path ((*value).details.path));
2227
g_variant_builder_add_value (&_tmp49_, g_variant_new_string ((*value).details.name));
2228
g_variant_builder_add_value (&_tmp49_, g_variant_new_string ((*value).details.icon_path));
2277
g_variant_builder_add_value (&_tmp49_, g_variant_new_object_path ((*(*value).details).path));
2278
g_variant_builder_add_value (&_tmp49_, g_variant_new_string ((*(*value).details).name));
2279
g_variant_builder_add_value (&_tmp49_, g_variant_new_string ((*(*value).details).icon_path));
2229
2280
g_variant_builder_add_value (&_tmp48_, g_variant_builder_end (&_tmp49_));
2230
2281
g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp48_));
2231
2282
g_variant_builder_close (&_arguments_builder);
2299
2350
GVariant* _tmp54_;
2300
2351
g_variant_iter_init (&_arguments_iter, parameters);
2301
2352
_tmp51_ = g_variant_iter_next_value (&_arguments_iter);
2302
index = g_variant_get_uint32 (_tmp51_);
2353
index = g_variant_get_int32 (_tmp51_);
2303
2354
g_variant_unref (_tmp51_);
2304
2355
_tmp52_ = g_variant_iter_next_value (&_arguments_iter);
2305
2356
max_count = g_variant_get_uint32 (_tmp52_);
2359
2410
g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp56_));
2360
result = (_vala_PlaylistDetails_array_free ( result, result_length1), NULL);
2411
result = (_vala_PlaylistDetails_array_free (result, result_length1), NULL);
2361
2412
_reply = g_variant_builder_end (&_reply_builder);
2362
2413
g_dbus_message_set_body (_reply_message, _reply);
2363
2414
g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
2398
2449
_reply = g_variant_builder_end (&_tmp60_);
2399
result = (_vala_array_free ( result, result_length1, (GDestroyNotify) g_free), NULL);
2450
result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
2419
2470
g_variant_builder_init (&_tmp62_, G_VARIANT_TYPE_TUPLE);
2420
2471
g_variant_builder_add_value (&_tmp62_, g_variant_new_boolean (result.valid));
2421
2472
g_variant_builder_init (&_tmp63_, G_VARIANT_TYPE_TUPLE);
2422
g_variant_builder_add_value (&_tmp63_, g_variant_new_object_path (result.details.path));
2423
g_variant_builder_add_value (&_tmp63_, g_variant_new_string (result.details.name));
2424
g_variant_builder_add_value (&_tmp63_, g_variant_new_string (result.details.icon_path));
2473
g_variant_builder_add_value (&_tmp63_, g_variant_new_object_path ((*result.details).path));
2474
g_variant_builder_add_value (&_tmp63_, g_variant_new_string ((*result.details).name));
2475
g_variant_builder_add_value (&_tmp63_, g_variant_new_string ((*result.details).icon_path));
2425
2476
g_variant_builder_add_value (&_tmp62_, g_variant_builder_end (&_tmp63_));
2426
2477
_reply = g_variant_builder_end (&_tmp62_);
2427
active_playlist_container_destroy (& result);
2478
active_playlist_container_destroy (&result);
2508
2559
_tmp75_ = g_variant_iter_next_value (&_tmp72_);
2509
2560
_tmp71_.icon_path = g_variant_dup_string (_tmp75_, NULL);
2510
2561
g_variant_unref (_tmp75_);
2511
_tmp67_.details = _tmp71_;
2562
_tmp67_.details = g_memdup (&_tmp71_, sizeof (PlaylistDetails));
2512
2563
g_variant_unref (_tmp70_);
2513
2564
value = _tmp67_;
2514
2565
mpris_playlists_set_ActivePlaylist (self, &value);
2573
2624
static void _mpris_playlists_unregister_object (gpointer user_data) {
2574
2625
gpointer* data;
2575
2626
data = user_data;
2627
g_signal_handlers_disconnect_by_func (data[0], _dbus_mpris_playlists_playlist_changed, data);
2576
2628
g_object_unref (data[0]);
2577
2629
g_object_unref (data[1]);
2578
2630
g_free (data[2]);