Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
audctrl.c
Go to the documentation of this file.
1 /*
2  * audctrl.c
3  * Copyright 2007-2011 Ben Tucker, William Pitcock, Yoshiki Yazawa,
4  * Matti Hämäläinen, and John Lindgren
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright notice,
10  * this list of conditions, and the following disclaimer.
11  *
12  * 2. Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions, and the following disclaimer in the documentation
14  * provided with the distribution.
15  *
16  * This software is provided "as is" and without any warranty, express or
17  * implied. In no event shall the authors be liable for any damages arising from
18  * the use of this software.
19  */
20 
21 #include <stdlib.h>
22 #include <glib.h>
23 #include <string.h>
24 #include <dbus/dbus-glib.h>
25 
26 #include "audacious/dbus.h"
28 #include "audctrl.h"
29 
30 static GError *error = NULL; //it must be hidden from outside, otherwise symbol conflict likely to happen.
31 
41 EXPORT void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num, gboolean enqueue) {
42  GList *glist = NULL;
43  gchar **data = list;
44 
45  g_return_if_fail(list != NULL);
46  g_return_if_fail(num > 0);
47 
48  if (!enqueue)
50 
51  // construct a GList
52  while(data) {
53  glist = g_list_append(glist, (gpointer)data);
54  data++;
55  }
56 
57  org_atheme_audacious_playlist_add(proxy, (gpointer)glist, &error);
58 
59  g_list_free(glist);
60  glist = NULL;
61 
62  if (!enqueue)
63  audacious_remote_play(proxy);
64 }
65 
72 EXPORT gchar *audacious_remote_get_version(DBusGProxy *proxy) {
73  char *string = NULL;
74  org_atheme_audacious_version(proxy, &string, &error);
75  g_clear_error(&error);
76 
77  return (string ? string : NULL);
78 }
79 
86 EXPORT void audacious_remote_playlist_add (DBusGProxy * proxy, GList * list)
87 {
88  const gchar * filenames[g_list_length (list) + 1];
89  int count;
90 
91  for (count = 0; list != NULL; count ++, list = list->next)
92  filenames[count] = list->data;
93 
94  filenames[count] = NULL;
95 
96  org_atheme_audacious_add_list (proxy, filenames, & error);
97  g_clear_error (& error);
98 }
99 
106 EXPORT void audacious_remote_playlist_open_list (DBusGProxy * proxy, GList * list)
107 {
108  const gchar * filenames[g_list_length (list) + 1];
109  int count;
110 
111  for (count = 0; list != NULL; count ++, list = list->next)
112  filenames[count] = list->data;
113 
114  filenames[count] = NULL;
115 
116  org_atheme_audacious_open_list (proxy, filenames, & error);
117  g_clear_error (& error);
118 }
119 
127 EXPORT void audacious_remote_playlist_open_list_to_temp (DBusGProxy * proxy, GList *
128  list)
129 {
130  const gchar * filenames[g_list_length (list) + 1];
131  int count;
132 
133  for (count = 0; list != NULL; count ++, list = list->next)
134  filenames[count] = list->data;
135 
136  filenames[count] = NULL;
137 
138  org_atheme_audacious_open_list_to_temp (proxy, filenames, & error);
139  g_clear_error (& error);
140 }
141 
148 EXPORT void audacious_remote_playlist_delete(DBusGProxy *proxy, guint pos) {
149  org_atheme_audacious_delete(proxy, pos, &error);
150  g_clear_error(&error);
151 }
152 
158 EXPORT void audacious_remote_play(DBusGProxy *proxy) {
160  g_clear_error(&error);
161 }
162 
168 EXPORT void audacious_remote_pause(DBusGProxy *proxy) {
170  g_clear_error(&error);
171 }
172 
178 EXPORT void audacious_remote_stop(DBusGProxy *proxy) {
180  g_clear_error(&error);
181 }
182 
189 EXPORT gboolean audacious_remote_is_playing(DBusGProxy *proxy) {
190  gboolean is_playing = FALSE;
191  org_atheme_audacious_playing(proxy, &is_playing, &error);
192  g_clear_error(&error);
193  return is_playing;
194 }
195 
204 EXPORT gboolean audacious_remote_is_paused(DBusGProxy *proxy) {
205  gboolean is_paused = FALSE;
206  org_atheme_audacious_paused(proxy, &is_paused, &error);
207  g_clear_error(&error);
208  return is_paused;
209 }
210 
219 EXPORT gint audacious_remote_get_playlist_pos(DBusGProxy *proxy) {
220  guint pos = 0;
221  org_atheme_audacious_position(proxy, &pos, &error);
222  g_clear_error(&error);
223  return pos;
224 }
225 
233 EXPORT void audacious_remote_set_playlist_pos(DBusGProxy *proxy, guint pos) {
234  org_atheme_audacious_jump (proxy, pos, &error);
235  g_clear_error(&error);
236 }
237 
246 EXPORT gint audacious_remote_get_playlist_length(DBusGProxy *proxy) {
247  gint len = 0;
248  org_atheme_audacious_length(proxy, &len, &error);
249  g_clear_error(&error);
250  return len;
251 }
252 
259 EXPORT void audacious_remote_playlist_clear(DBusGProxy *proxy) {
261  g_clear_error(&error);
262 }
263 
272 EXPORT gint audacious_remote_get_output_time(DBusGProxy *proxy) {
273  guint time = 0;
274  org_atheme_audacious_time(proxy, &time, &error);
275  g_clear_error(&error);
276  return time;
277 }
278 
286 EXPORT void audacious_remote_jump_to_time(DBusGProxy *proxy, guint pos) {
287  org_atheme_audacious_seek (proxy, pos, &error);
288  g_clear_error(&error);
289 }
290 
298 EXPORT void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) {
299  org_atheme_audacious_volume(proxy, vl, vr, &error);
300  g_clear_error(&error);
301 }
302 
309 EXPORT gint audacious_remote_get_main_volume(DBusGProxy *proxy) {
310  gint vl = 0, vr = 0;
311 
312  audacious_remote_get_volume(proxy, &vl, &vr);
313 
314  return (vl > vr) ? vl : vr;
315 }
316 
323 EXPORT gint audacious_remote_get_balance(DBusGProxy *proxy) {
324  gint balance = 50;
325  org_atheme_audacious_balance(proxy, &balance, &error);
326  g_clear_error(&error);
327  return balance;
328 }
329 
337 EXPORT void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) {
338  org_atheme_audacious_set_volume(proxy, vl, vr, &error);
339  g_clear_error(&error);
340 }
341 
342 
349 EXPORT void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v) {
350  gint b = 50, vl = 0, vr = 0;
351 
352  b = audacious_remote_get_balance(proxy);
353 
354  if (b < 0) {
355  vl = v;
356  vr = (v * (100 - abs(b))) / 100;
357  } else if (b > 0) {
358  vl = (v * (100 - b)) / 100;
359  vr = v;
360  } else
361  vl = vr = v;
362  audacious_remote_set_volume(proxy, vl, vr);
363 }
364 
371 EXPORT void audacious_remote_set_balance(DBusGProxy *proxy, gint b) {
372  gint v = 0, vl = 0, vr = 0;
373 
374  if (b < -100)
375  b = -100;
376  if (b > 100)
377  b = 100;
378 
380 
381  if (b < 0) {
382  vl = v;
383  vr = (v * (100 - abs(b))) / 100;
384  } else if (b > 0) {
385  vl = (v * (100 - b)) / 100;
386  vr = v;
387  } else
388  vl = vr = v;
389  audacious_remote_set_volume(proxy, vl, vr);
390 }
391 
399 EXPORT gchar *audacious_remote_get_playlist_file(DBusGProxy *proxy, guint pos) {
400  gchar *out = NULL;
401  org_atheme_audacious_song_filename(proxy, pos, &out, &error);
402  g_clear_error(&error);
403  return out;
404 }
405 
413 EXPORT gchar *audacious_remote_get_playlist_title(DBusGProxy *proxy, guint pos) {
414  gchar *out = NULL;
415  org_atheme_audacious_song_title(proxy, pos, &out, &error);
416  g_clear_error(&error);
417  return out;
418 }
419 
427 EXPORT gint audacious_remote_get_playlist_time(DBusGProxy *proxy, guint pos) {
428  gint out = 0;
429  org_atheme_audacious_song_frames(proxy, pos, &out, &error);
430  g_clear_error(&error);
431  return out;
432 }
433 
442 EXPORT void audacious_remote_get_info(DBusGProxy *proxy, gint *rate, gint *freq,
443  gint *nch) {
444  org_atheme_audacious_info(proxy, rate, freq, nch, &error);
445  g_clear_error(&error);
446 }
447 
454 EXPORT void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show) {
456  g_clear_error(&error);
457 }
458 
465 EXPORT gboolean audacious_remote_is_main_win(DBusGProxy *proxy) {
466  gboolean visible = TRUE;
467  org_atheme_audacious_main_win_visible(proxy, &visible, &error);
468  g_clear_error(&error);
469  return visible;
470 }
471 
477 EXPORT void audacious_remote_show_prefs_box(DBusGProxy *proxy) {
479 }
480 
487 EXPORT void audacious_remote_toggle_prefs_box(DBusGProxy *proxy, gboolean show) {
489  g_clear_error(&error);
490 }
491 
497 EXPORT void audacious_remote_show_about_box(DBusGProxy *proxy) {
499 }
500 
507 EXPORT void audacious_remote_toggle_about_box(DBusGProxy *proxy, gboolean show) {
509  g_clear_error(&error);
510 }
511 
518 EXPORT void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop) {
519  org_atheme_audacious_toggle_aot(proxy, ontop, &error);
520  g_clear_error(&error);
521 }
522 
528 EXPORT void audacious_remote_eject(DBusGProxy *proxy) {
530  g_clear_error(&error);
531 }
532 
539 EXPORT void audacious_remote_playlist_prev(DBusGProxy *proxy) {
541  g_clear_error(&error);
542 }
543 
549 EXPORT void audacious_remote_playlist_next(DBusGProxy *proxy) {
551  g_clear_error(&error);
552 }
553 
560 EXPORT void audacious_remote_playlist_add_url_string(DBusGProxy *proxy,
561  gchar *string) {
562  org_atheme_audacious_add_url(proxy, string, &error);
563  g_clear_error(&error);
564 }
565 
572 EXPORT gboolean audacious_remote_is_running(DBusGProxy *proxy) {
573  char *string = NULL;
574  org_atheme_audacious_version(proxy, &string, &error);
575  g_clear_error(&error);
576  if(string) {
577  g_free(string);
578  return TRUE;
579  }
580  else
581  return FALSE;
582 }
583 
589 EXPORT void audacious_remote_toggle_repeat(DBusGProxy *proxy) {
591  g_clear_error(&error);
592 }
593 
599 EXPORT void audacious_remote_toggle_shuffle(DBusGProxy *proxy) {
601  g_clear_error(&error);
602 }
603 
604 EXPORT void audacious_remote_toggle_stop_after (DBusGProxy * proxy)
605 {
607  g_clear_error (& error);
608 }
609 
616 EXPORT gboolean audacious_remote_is_repeat(DBusGProxy *proxy) {
617  gboolean is_repeat;
618  org_atheme_audacious_repeat(proxy, &is_repeat, &error);
619  g_clear_error(&error);
620  return is_repeat;
621 }
622 
629 EXPORT gboolean audacious_remote_is_shuffle(DBusGProxy *proxy) {
630  gboolean is_shuffle;
631  org_atheme_audacious_shuffle(proxy, &is_shuffle, &error);
632  g_clear_error(&error);
633  return is_shuffle;
634 }
635 
636 EXPORT gboolean audacious_remote_is_stop_after (DBusGProxy * proxy)
637 {
638  gboolean is_stop_after;
639  org_atheme_audacious_stop_after (proxy, & is_stop_after, & error);
640  g_clear_error (& error);
641  return is_stop_after;
642 }
643 
651 EXPORT void audacious_remote_get_eq(DBusGProxy *proxy, gdouble *preamp, GArray **bands) {
652  org_atheme_audacious_get_eq(proxy, preamp, bands, &error);
653  g_clear_error(&error);
654 }
655 
662 EXPORT gdouble audacious_remote_get_eq_preamp(DBusGProxy *proxy) {
663  gdouble preamp = 0.0;
664 
665  org_atheme_audacious_get_eq_preamp(proxy, &preamp, &error);
666  g_clear_error(&error);
667 
668  return preamp;
669 }
670 
678 EXPORT gdouble audacious_remote_get_eq_band(DBusGProxy *proxy, gint band) {
679  gdouble value = 0.0;
680 
681  org_atheme_audacious_get_eq_band(proxy, band, &value, &error);
682  g_clear_error(&error);
683 
684  return value;
685 }
686 
694 EXPORT void audacious_remote_set_eq(DBusGProxy *proxy, gdouble preamp, GArray *bands) {
695  org_atheme_audacious_set_eq(proxy, preamp, bands, &error);
696  g_clear_error(&error);
697 }
698 
705 EXPORT void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gdouble preamp) {
706  org_atheme_audacious_set_eq_preamp(proxy, preamp, &error);
707  g_clear_error(&error);
708 }
709 
717 EXPORT void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band, gdouble value) {
718  org_atheme_audacious_set_eq_band(proxy, band, value, &error);
719  g_clear_error(&error);
720 }
721 
727 EXPORT void audacious_remote_quit(DBusGProxy *proxy) {
729  g_clear_error(&error);
730 }
731 
737 EXPORT void audacious_remote_play_pause(DBusGProxy *proxy) {
739 }
740 
748 EXPORT void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy,
749  gchar *string, guint pos) {
751  g_clear_error(&error);
752 }
753 
760 EXPORT void audacious_remote_playqueue_add(DBusGProxy *proxy, guint pos) {
762  g_clear_error(&error);
763 }
764 
771 EXPORT void audacious_remote_playqueue_remove(DBusGProxy *proxy, guint pos) {
773  g_clear_error(&error);
774 }
775 
784 EXPORT gint audacious_remote_get_playqueue_length(DBusGProxy *proxy) {
785  gint len = 0;
786  org_atheme_audacious_length(proxy, &len, &error);
787  g_clear_error(&error);
788  return len;
789 }
790 
796 EXPORT void audacious_remote_toggle_advance(DBusGProxy *proxy) {
798  g_clear_error(&error);
799 }
800 
809 EXPORT gboolean audacious_remote_is_advance(DBusGProxy *proxy) {
810  gboolean is_advance = FALSE;
811  org_atheme_audacious_auto_advance(proxy, &is_advance, &error);
812  g_clear_error(&error);
813  return is_advance;
814 }
815 
821 EXPORT void audacious_remote_show_jtf_box(DBusGProxy *proxy) {
823 }
824 
831 EXPORT void audacious_remote_toggle_jtf_box(DBusGProxy *proxy, gboolean show) {
833  g_clear_error(&error);
834 }
835 
842 EXPORT void audacious_remote_toggle_filebrowser(DBusGProxy *proxy, gboolean show) {
844  g_clear_error(&error);
845 }
846 
853 EXPORT void audacious_remote_playqueue_clear(DBusGProxy *proxy) {
855  g_clear_error(&error);
856 }
857 
865 EXPORT gboolean audacious_remote_playqueue_is_queued(DBusGProxy *proxy, guint pos) {
866  gboolean is_queued;
867  org_atheme_audacious_playqueue_is_queued (proxy, pos, &is_queued, &error);
868  g_clear_error(&error);
869  return is_queued;
870 }
871 
879 EXPORT gint audacious_remote_get_playqueue_queue_position(DBusGProxy *proxy, guint pos) {
880  guint qpos = 0;
881  org_atheme_audacious_queue_get_queue_pos (proxy, pos, &qpos, &error);
882  g_clear_error(&error);
883  return qpos;
884 }
885 
894 EXPORT gint audacious_remote_get_playqueue_list_position(DBusGProxy *proxy, guint qpos) {
895  guint pos = 0;
896  org_atheme_audacious_queue_get_list_pos (proxy, qpos, &pos, &error);
897  g_clear_error(&error);
898  return pos;
899 }
900 
907 EXPORT void audacious_remote_playlist_enqueue_to_temp(DBusGProxy *proxy,
908  gchar *string) {
910  g_clear_error(&error);
911 }
912 
921 EXPORT gchar *audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field,
922  guint pos) {
923  GValue value = {0};
924  gchar *s = NULL;
925 
926  org_atheme_audacious_song_tuple(proxy, pos, field, &value, &error);
927 
928  g_clear_error(&error);
929 
930  if (G_IS_VALUE(&value) == FALSE)
931  return NULL;
932 
933  /* I think the original "purpose" of using g_strescape() here
934  * has probably been to escape only \n, \t, \r, etc. but the function
935  * actually escapes all non-ASCII characters. Which is bad, since we
936  * are using UTF-8. -- ccr
937  */
938  if (G_VALUE_HOLDS_STRING(&value))
939  //s = g_strescape(g_value_get_string(&value), NULL);
940  s = g_strdup(g_value_get_string(&value));
941  else if (g_value_type_transformable(G_VALUE_TYPE(&value), G_TYPE_STRING))
942  {
943  GValue tmp_value = { 0, };
944 
945  g_value_init(&tmp_value, G_TYPE_STRING);
946  g_value_transform(&value, &tmp_value);
947 
948  //s = g_strescape(g_value_get_string(&tmp_value), NULL);
949  s = g_strdup(g_value_get_string(&tmp_value));
950 
951  g_value_unset(&tmp_value);
952  }
953  else
954  s = g_strdup("<unknown type>");
955 
956  g_value_unset(&value);
957  return s;
958 }
959 
966 EXPORT void audacious_remote_eq_activate(DBusGProxy *proxy, gboolean active) {
968  g_clear_error(&error);
969 }
970 
977 EXPORT gchar **audacious_remote_get_tuple_fields(DBusGProxy *proxy) {
978  gchar **res = NULL;
980  g_clear_error(&error);
981  return res;
982 }
983 
987 EXPORT gchar *audacious_remote_playlist_get_active_name(DBusGProxy *proxy) {
988  char *string = NULL;
990  g_clear_error(&error);
991 
992  return (string ? string : NULL);
993 }
static gboolean org_atheme_audacious_add_list(DBusGProxy *proxy, const char **IN_filenames, GError **error)
EXPORT void audacious_remote_eq_activate(DBusGProxy *proxy, gboolean active)
Toggles the equalizer.
Definition: audctrl.c:966
static gboolean org_atheme_audacious_playlist_ins_url_string(DBusGProxy *proxy, const char *IN_url, const gint IN_pos, GError **error)
EXPORT void audacious_remote_stop(DBusGProxy *proxy)
Tells audacious to stop.
Definition: audctrl.c:178
EXPORT void audacious_remote_playlist_next(DBusGProxy *proxy)
Tells audacious to move forward in the playlist.
Definition: audctrl.c:549
static gboolean org_atheme_audacious_get_eq_band(DBusGProxy *proxy, const gint IN_band, gdouble *OUT_value, GError **error)
EXPORT gboolean audacious_remote_is_advance(DBusGProxy *proxy)
audacious_remote_is_advance:
Definition: audctrl.c:809
EXPORT void audacious_remote_show_about_box(DBusGProxy *proxy)
Tells audacious to show the about box.
Definition: audctrl.c:497
static gboolean org_atheme_audacious_pause(DBusGProxy *proxy, GError **error)
static gboolean org_atheme_audacious_set_eq_band(DBusGProxy *proxy, const gint IN_band, const gdouble IN_value, GError **error)
EXPORT void audacious_remote_playlist_delete(DBusGProxy *proxy, guint pos)
Deletes a playlist entry from current playlist in given position.
Definition: audctrl.c:148
EXPORT void audacious_remote_playlist_open_list(DBusGProxy *proxy, GList *list)
Sends a list of URIs for Audacious to open.
Definition: audctrl.c:106
EXPORT gchar * audacious_remote_get_playlist_file(DBusGProxy *proxy, guint pos)
Queries Audacious about a playlist entry&#39;s file.
Definition: audctrl.c:399
static gboolean org_atheme_audacious_toggle_auto_advance(DBusGProxy *proxy, GError **error)
static gboolean org_atheme_audacious_playing(DBusGProxy *proxy, gboolean *OUT_is_playing, GError **error)
static gboolean org_atheme_audacious_queue_get_queue_pos(DBusGProxy *proxy, const guint IN_pos, guint *OUT_qpos, GError **error)
static gboolean org_atheme_audacious_seek(DBusGProxy *proxy, const guint IN_pos, GError **error)
static gboolean org_atheme_audacious_playlist_enqueue_to_temp(DBusGProxy *proxy, const char *IN_url, GError **error)
EXPORT void audacious_remote_playlist_open_list_to_temp(DBusGProxy *proxy, GList *list)
Sends a list of URIs for Audacious to open in a temporary playlist.
Definition: audctrl.c:127
static gboolean org_atheme_audacious_show_jtf_box(DBusGProxy *proxy, const gboolean IN_show, GError **error)
EXPORT void audacious_remote_playlist_add(DBusGProxy *proxy, GList *list)
Sends a list of URIs to Audacious to add to the playlist.
Definition: audctrl.c:86
EXPORT void audacious_remote_show_prefs_box(DBusGProxy *proxy)
Tells audacious to show the preferences pane.
Definition: audctrl.c:477
static gboolean org_atheme_audacious_toggle_stop_after(DBusGProxy *proxy, GError **error)
EXPORT gchar * audacious_remote_get_playlist_title(DBusGProxy *proxy, guint pos)
Queries Audacious about a playlist entry&#39;s title.
Definition: audctrl.c:413
static gboolean org_atheme_audacious_delete(DBusGProxy *proxy, const guint IN_pos, GError **error)
static gboolean org_atheme_audacious_paused(DBusGProxy *proxy, gboolean *OUT_is_paused, GError **error)
static gboolean org_atheme_audacious_set_eq_preamp(DBusGProxy *proxy, const gdouble IN_preamp, GError **error)
EXPORT gboolean audacious_remote_is_running(DBusGProxy *proxy)
Check if an Audacious instance is running.
Definition: audctrl.c:572
static gboolean org_atheme_audacious_open_list_to_temp(DBusGProxy *proxy, const char **IN_filenames, GError **error)
EXPORT void audacious_remote_set_eq(DBusGProxy *proxy, gdouble preamp, GArray *bands)
Tells audacious to set the equalizer up using the provided values.
Definition: audctrl.c:694
static gboolean org_atheme_audacious_advance(DBusGProxy *proxy, GError **error)
bool_t enqueue
Definition: main.c:59
static gboolean org_atheme_audacious_stop_after(DBusGProxy *proxy, gboolean *OUT_is_stopping, GError **error)
EXPORT void audacious_remote_playlist_enqueue_to_temp(DBusGProxy *proxy, gchar *string)
Tells audacious to add an URI to a temporary playlist.
Definition: audctrl.c:907
EXPORT void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band, gdouble value)
Tells audacious to set an equalizer band&#39;s setting.
Definition: audctrl.c:717
EXPORT gint audacious_remote_get_playlist_pos(DBusGProxy *proxy)
audacious_remote_get_playlist_pos:
Definition: audctrl.c:219
static gboolean org_atheme_audacious_playqueue_add(DBusGProxy *proxy, const gint IN_pos, GError **error)
EXPORT void audacious_remote_playlist_clear(DBusGProxy *proxy)
audacious_remote_playlist_clear:
Definition: audctrl.c:259
static gboolean org_atheme_audacious_play_pause(DBusGProxy *proxy, GError **error)
EXPORT void audacious_remote_playqueue_remove(DBusGProxy *proxy, guint pos)
Tells audacious to remove a playlist entry from the playqueue.
Definition: audctrl.c:771
static gboolean org_atheme_audacious_toggle_aot(DBusGProxy *proxy, const gboolean IN_ontop, GError **error)
static gboolean org_atheme_audacious_version(DBusGProxy *proxy, char **OUT_version, GError **error)
static float b[EQ_BANDS][2]
Definition: equalizer.c:56
EXPORT void audacious_remote_quit(DBusGProxy *proxy)
Requests audacious to quit.
Definition: audctrl.c:727
static gboolean org_atheme_audacious_playlist_add(DBusGProxy *proxy, const char *IN_list, GError **error)
EXPORT gint audacious_remote_get_balance(DBusGProxy *proxy)
Queries audacious about the current balance.
Definition: audctrl.c:323
EXPORT void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num, gboolean enqueue)
Sends a list of URIs to Audacious, either replacing current playlist or enqueuing them...
Definition: audctrl.c:41
EXPORT gint audacious_remote_get_playlist_length(DBusGProxy *proxy)
audacious_remote_get_playlist_length:
Definition: audctrl.c:246
EXPORT gchar * audacious_remote_playlist_get_active_name(DBusGProxy *proxy)
Returns the active playlist name.
Definition: audctrl.c:987
EXPORT gint audacious_remote_get_playqueue_queue_position(DBusGProxy *proxy, guint pos)
Queries audacious about what the playqueue position is for a playlist entry.
Definition: audctrl.c:879
EXPORT gboolean audacious_remote_is_paused(DBusGProxy *proxy)
audacious_remote_is_paused:
Definition: audctrl.c:204
EXPORT void audacious_remote_set_balance(DBusGProxy *proxy, gint b)
Sets the balance in Audacious.
Definition: audctrl.c:371
static gboolean org_atheme_audacious_show_filebrowser(DBusGProxy *proxy, const gboolean IN_show, GError **error)
static gboolean org_atheme_audacious_playqueue_is_queued(DBusGProxy *proxy, const gint IN_pos, gboolean *OUT_is_queued, GError **error)
EXPORT gchar * audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field, guint pos)
Queries Audacious about a playlist entry&#39;s tuple information.
Definition: audctrl.c:921
#define FALSE
Definition: core.h:37
static gboolean org_atheme_audacious_main_win_visible(DBusGProxy *proxy, gboolean *OUT_is_main_win, GError **error)
EXPORT void audacious_remote_playlist_add_url_string(DBusGProxy *proxy, gchar *string)
Tells audacious to add an URI to the playlist.
Definition: audctrl.c:560
EXPORT gint audacious_remote_get_playlist_time(DBusGProxy *proxy, guint pos)
Queries Audacious about a playlist entry&#39;s length.
Definition: audctrl.c:427
EXPORT void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show)
Toggles the main window&#39;s visibility.
Definition: audctrl.c:454
static gboolean org_atheme_audacious_get_tuple_fields(DBusGProxy *proxy, char ***OUT_fields, GError **error)
EXPORT void audacious_remote_get_volume(DBusGProxy *proxy, gint *vl, gint *vr)
Queries audacious for the current volume settings.
Definition: audctrl.c:298
EXPORT gboolean audacious_remote_is_playing(DBusGProxy *proxy)
Queries audacious about whether it is playing or not.
Definition: audctrl.c:189
static gboolean org_atheme_audacious_show_prefs_box(DBusGProxy *proxy, const gboolean IN_show, GError **error)
EXPORT void audacious_remote_eject(DBusGProxy *proxy)
Tells audacious to display the open files pane.
Definition: audctrl.c:528
#define NULL
Definition: core.h:29
static gboolean org_atheme_audacious_jump(DBusGProxy *proxy, const guint IN_pos, GError **error)
EXPORT gint audacious_remote_get_output_time(DBusGProxy *proxy)
audacious_remote_get_output_time:
Definition: audctrl.c:272
EXPORT gboolean audacious_remote_is_repeat(DBusGProxy *proxy)
Queries audacious about whether or not the repeat feature is active.
Definition: audctrl.c:616
static gboolean org_atheme_audacious_set_eq(DBusGProxy *proxy, const gdouble IN_preamp, const GArray *IN_bands, GError **error)
EXPORT void audacious_remote_toggle_stop_after(DBusGProxy *proxy)
Definition: audctrl.c:604
EXPORT void audacious_remote_set_playlist_pos(DBusGProxy *proxy, guint pos)
audacious_remote_set_playlist_pos:
Definition: audctrl.c:233
EXPORT void audacious_remote_toggle_repeat(DBusGProxy *proxy)
Tells audacious to toggle the repeat feature.
Definition: audctrl.c:589
static GError * error
Definition: audctrl.c:30
static gboolean org_atheme_audacious_get_active_playlist_name(DBusGProxy *proxy, char **OUT_plname, GError **error)
EXPORT void audacious_remote_play(DBusGProxy *proxy)
Requests audacious to begin playback.
Definition: audctrl.c:158
static bool_t active
Definition: equalizer.c:53
EXPORT void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop)
Tells audacious to set the always-on-top feature.
Definition: audctrl.c:518
static gboolean org_atheme_audacious_position(DBusGProxy *proxy, guint *OUT_pos, GError **error)
#define TRUE
Definition: core.h:39
EXPORT gint audacious_remote_get_playqueue_length(DBusGProxy *proxy)
Queries audacious about the playqueue&#39;s length.
Definition: audctrl.c:784
static gboolean org_atheme_audacious_queue_get_list_pos(DBusGProxy *proxy, const guint IN_qpos, guint *OUT_pos, GError **error)
static gboolean org_atheme_audacious_length(DBusGProxy *proxy, gint *OUT_length, GError **error)
EXPORT void audacious_remote_pause(DBusGProxy *proxy)
Tells audacious to pause.
Definition: audctrl.c:168
static gboolean org_atheme_audacious_auto_advance(DBusGProxy *proxy, gboolean *OUT_is_advance, GError **error)
EXPORT gint audacious_remote_get_playqueue_list_position(DBusGProxy *proxy, guint qpos)
Queries audacious what is the playlist position for given a playqueue entry index.
Definition: audctrl.c:894
static gboolean org_atheme_audacious_toggle_shuffle(DBusGProxy *proxy, GError **error)
EXPORT gboolean audacious_remote_is_stop_after(DBusGProxy *proxy)
Definition: audctrl.c:636
static gboolean org_atheme_audacious_equalizer_activate(DBusGProxy *proxy, const gboolean IN_active, GError **error)
EXPORT gdouble audacious_remote_get_eq_preamp(DBusGProxy *proxy)
Queries audacious about the equalizer preamp&#39;s setting.
Definition: audctrl.c:662
static gboolean org_atheme_audacious_volume(DBusGProxy *proxy, gint *OUT_vl, gint *OUT_vr, GError **error)
EXPORT void audacious_remote_playlist_prev(DBusGProxy *proxy)
audacious_remote_playlist_prev:
Definition: audctrl.c:539
EXPORT gchar ** audacious_remote_get_tuple_fields(DBusGProxy *proxy)
Returns a array of strings with available tuple field names.
Definition: audctrl.c:977
static gboolean org_atheme_audacious_play(DBusGProxy *proxy, GError **error)
static gboolean org_atheme_audacious_playqueue_remove(DBusGProxy *proxy, const gint IN_pos, GError **error)
static gboolean org_atheme_audacious_stop(DBusGProxy *proxy, GError **error)
static gboolean org_atheme_audacious_song_filename(DBusGProxy *proxy, const guint IN_pos, char **OUT_filename, GError **error)
static gboolean org_atheme_audacious_song_tuple(DBusGProxy *proxy, const guint IN_pos, const char *IN_tuple, GValue *OUT_value, GError **error)
static gboolean org_atheme_audacious_quit(DBusGProxy *proxy, GError **error)
EXPORT void audacious_remote_get_eq(DBusGProxy *proxy, gdouble *preamp, GArray **bands)
Queries audacious about the equalizer settings.
Definition: audctrl.c:651
static gboolean org_atheme_audacious_clear(DBusGProxy *proxy, GError **error)
static int rate
Definition: equalizer.c:54
EXPORT gdouble audacious_remote_get_eq_band(DBusGProxy *proxy, gint band)
Queries audacious about an equalizer band&#39;s value.
Definition: audctrl.c:678
static gboolean org_atheme_audacious_eject(DBusGProxy *proxy, GError **error)
EXPORT gboolean audacious_remote_is_main_win(DBusGProxy *proxy)
Queries Audacious about the main window&#39;s visibility.
Definition: audctrl.c:465
static gboolean org_atheme_audacious_balance(DBusGProxy *proxy, gint *OUT_balance, GError **error)
static gboolean org_atheme_audacious_playqueue_clear(DBusGProxy *proxy, GError **error)
static gboolean org_atheme_audacious_toggle_repeat(DBusGProxy *proxy, GError **error)
EXPORT void audacious_remote_toggle_about_box(DBusGProxy *proxy, gboolean show)
Tells audacious to show/hide the about box.
Definition: audctrl.c:507
EXPORT gboolean audacious_remote_playqueue_is_queued(DBusGProxy *proxy, guint pos)
Queries audacious about whether or not a playlist entry is in the playqueue.
Definition: audctrl.c:865
EXPORT gint audacious_remote_get_main_volume(DBusGProxy *proxy)
Queries audacious about the current volume.
Definition: audctrl.c:309
EXPORT void audacious_remote_playqueue_clear(DBusGProxy *proxy)
audacious_remote_playqueue_clear:
Definition: audctrl.c:853
static gboolean org_atheme_audacious_show_main_win(DBusGProxy *proxy, const gboolean IN_show, GError **error)
static gboolean org_atheme_audacious_shuffle(DBusGProxy *proxy, gboolean *OUT_is_shuffle, GError **error)
EXPORT gboolean audacious_remote_is_shuffle(DBusGProxy *proxy)
Queries audacious about whether or not the shuffle feature is active.
Definition: audctrl.c:629
static gboolean org_atheme_audacious_song_title(DBusGProxy *proxy, const guint IN_pos, char **OUT_title, GError **error)
static gboolean org_atheme_audacious_get_eq(DBusGProxy *proxy, gdouble *OUT_preamp, GArray **OUT_bands, GError **error)
EXPORT void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gdouble preamp)
Tells audacious to set the equalizer&#39;s preamp setting.
Definition: audctrl.c:705
EXPORT void audacious_remote_toggle_prefs_box(DBusGProxy *proxy, gboolean show)
Tells audacious to show/hide the preferences pane.
Definition: audctrl.c:487
static gboolean org_atheme_audacious_info(DBusGProxy *proxy, gint *OUT_rate, gint *OUT_freq, gint *OUT_nch, GError **error)
EXPORT void audacious_remote_toggle_advance(DBusGProxy *proxy)
Tells audacious to toggle the no-playlist-advance feature.
Definition: audctrl.c:796
static gboolean org_atheme_audacious_show_about_box(DBusGProxy *proxy, const gboolean IN_show, GError **error)
static gboolean org_atheme_audacious_set_volume(DBusGProxy *proxy, const gint IN_vl, const gint IN_vr, GError **error)
EXPORT void audacious_remote_toggle_shuffle(DBusGProxy *proxy)
Tells audacious to toggle the shuffle feature.
Definition: audctrl.c:599
EXPORT void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v)
Sets the volume in Audacious.
Definition: audctrl.c:349
static gboolean org_atheme_audacious_open_list(DBusGProxy *proxy, const char **IN_filenames, GError **error)
char ** filenames
Definition: main.c:56
EXPORT void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr)
Sets the volume for the left and right channels in Audacious.
Definition: audctrl.c:337
struct @17::@18::@20 s
static gboolean org_atheme_audacious_reverse(DBusGProxy *proxy, GError **error)
EXPORT void audacious_remote_jump_to_time(DBusGProxy *proxy, guint pos)
audacious_remote_jump_to_time:
Definition: audctrl.c:286
EXPORT void audacious_remote_toggle_filebrowser(DBusGProxy *proxy, gboolean show)
Tells audacious to show the filebrowser dialog.
Definition: audctrl.c:842
EXPORT void audacious_remote_playqueue_add(DBusGProxy *proxy, guint pos)
Tells audacious to add a playlist entry to the playqueue.
Definition: audctrl.c:760
EXPORT gchar * audacious_remote_get_version(DBusGProxy *proxy)
Queries Audacious for its version identifier.
Definition: audctrl.c:72
static gboolean org_atheme_audacious_repeat(DBusGProxy *proxy, gboolean *OUT_is_repeat, GError **error)
EXPORT void audacious_remote_toggle_jtf_box(DBusGProxy *proxy, gboolean show)
Tells audacious to show/hide the Jump-to-File pane.
Definition: audctrl.c:831
static gboolean org_atheme_audacious_add_url(DBusGProxy *proxy, const char *IN_url, GError **error)
EXPORT void audacious_remote_play_pause(DBusGProxy *proxy)
Tells audacious to toggle between play and pause.
Definition: audctrl.c:737
EXPORT void audacious_remote_get_info(DBusGProxy *proxy, gint *rate, gint *freq, gint *nch)
Queries Audacious about the current audio format.
Definition: audctrl.c:442
static gboolean org_atheme_audacious_time(DBusGProxy *proxy, guint *OUT_time, GError **error)
EXPORT void audacious_remote_show_jtf_box(DBusGProxy *proxy)
Tells audacious to show the Jump-to-File pane.
Definition: audctrl.c:821
static gboolean org_atheme_audacious_get_eq_preamp(DBusGProxy *proxy, gdouble *OUT_preamp, GError **error)
static gboolean org_atheme_audacious_song_frames(DBusGProxy *proxy, const guint IN_pos, gint *OUT_length, GError **error)
EXPORT void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy, gchar *string, guint pos)
Tells audacious to add an URI to the playlist at a specific position.
Definition: audctrl.c:748