Control Socket API ("beepctrl")

Control Socket API ("beepctrl") — Remote access to an Audacious server.

Synopsis




gint                xmms_connect_to_session             (gint session);
void                xmms_remote_playlist                (gint session,
                                                         gchar **list,
                                                         gint num,
                                                         gboolean enqueue);
gint                xmms_remote_get_version             (gint session);
void                xmms_remote_playlist_add            (gint session,
                                                         GList *list);
void                xmms_remote_playlist_delete         (gint session,
                                                         gint pos);
void                xmms_remote_play                    (gint session);
void                xmms_remote_pause                   (gint session);
void                xmms_remote_stop                    (gint session);
gboolean            xmms_remote_is_playing              (gint session);
gboolean            xmms_remote_is_paused               (gint session);
gint                xmms_remote_get_playlist_pos        (gint session);
void                xmms_remote_set_playlist_pos        (gint session,
                                                         gint pos);
gint                xmms_remote_get_playlist_length     (gint session);
void                xmms_remote_playlist_clear          (gint session);
gint                xmms_remote_get_output_time         (gint session);
void                xmms_remote_jump_to_time            (gint session,
                                                         gint pos);
void                xmms_remote_get_volume              (gint session,
                                                         gint *vl,
                                                         gint *vr);
gint                xmms_remote_get_main_volume         (gint session);
gint                xmms_remote_get_balance             (gint session);
void                xmms_remote_set_volume              (gint session,
                                                         gint vl,
                                                         gint vr);
void                xmms_remote_set_main_volume         (gint session,
                                                         gint v);
void                xmms_remote_set_balance             (gint session,
                                                         gint b);
gchar*              xmms_remote_get_skin                (gint session);
void                xmms_remote_set_skin                (gint session,
                                                         gchar *skinfile);
gchar*              xmms_remote_get_playlist_file       (gint session,
                                                         gint pos);
gchar*              xmms_remote_get_playlist_title      (gint session,
                                                         gint pos);
gint                xmms_remote_get_playlist_time       (gint session,
                                                         gint pos);
void                xmms_remote_get_info                (gint session,
                                                         gint *rate,
                                                         gint *freq,
                                                         gint *nch);
void                xmms_remote_main_win_toggle         (gint session,
                                                         gboolean show);
void                xmms_remote_pl_win_toggle           (gint session,
                                                         gboolean show);
void                xmms_remote_eq_win_toggle           (gint session,
                                                         gboolean show);
gboolean            xmms_remote_is_main_win             (gint session);
gboolean            xmms_remote_is_pl_win               (gint session);
gboolean            xmms_remote_is_eq_win               (gint session);
void                xmms_remote_show_prefs_box          (gint session);
void                xmms_remote_toggle_aot              (gint session,
                                                         gboolean ontop);
void                xmms_remote_eject                   (gint session);
void                xmms_remote_playlist_prev           (gint session);
void                xmms_remote_playlist_next           (gint session);
void                xmms_remote_playlist_add_url_string (gint session,
                                                         gchar *string);
gboolean            xmms_remote_is_running              (gint session);
void                xmms_remote_toggle_repeat           (gint session);
void                xmms_remote_toggle_shuffle          (gint session);
gboolean            xmms_remote_is_repeat               (gint session);
gboolean            xmms_remote_is_shuffle              (gint session);
void                xmms_remote_get_eq                  (gint session,
                                                         gfloat *preamp,
                                                         gfloat **bands);
gfloat              xmms_remote_get_eq_preamp           (gint session);
gfloat              xmms_remote_get_eq_band             (gint session,
                                                         gint band);
void                xmms_remote_set_eq                  (gint session,
                                                         gfloat preamp,
                                                         gfloat *bands);
void                xmms_remote_set_eq_preamp           (gint session,
                                                         gfloat preamp);
void                xmms_remote_set_eq_band             (gint session,
                                                         gint band,
                                                         gfloat value);
void                xmms_remote_quit                    (gint session);
void                xmms_remote_play_pause              (gint session);
void                xmms_remote_playlist_ins_url_string (gint session,
                                                         gchar *string,
                                                         gint pos);
void                xmms_remote_playqueue_add           (gint session,
                                                         gint pos);
void                xmms_remote_playqueue_remove        (gint session,
                                                         gint pos);
gint                xmms_remote_get_playqueue_length    (gint session);
void                xmms_remote_toggle_advance          (gint session);
gboolean            xmms_remote_is_advance              (gint session);
void                xmms_remote_activate                (gint session);
void                xmms_remote_show_jtf_box            (gint session);
void                xmms_remote_playqueue_clear         (gint session);
gboolean            xmms_remote_playqueue_is_queued     (gint session,
                                                         gint pos);
gint                xmms_remote_get_playqueue_position  (gint session,
                                                         gint pos);
gint                xmms_remote_get_playqueue_queue_position
                                                        (gint session,
                                                         gint pos);
void                audacious_set_session_uri           (gchar *uri);
gchar*              audacious_get_session_uri           (gint session);
void                audacious_set_session_type          (gint type);
void                xmms_remote_play_files              (gint session,
                                                         GList *list);
#define             xmms_remote_add_files               (session,list)

Description

The control socket is used to remotely control audacious.

Details

xmms_connect_to_session ()

gint                xmms_connect_to_session             (gint session);

Connects to an audacious server.

session : Legacy XMMS-style session identifier.
Returns : an FD on success, otherwise -1.

xmms_remote_playlist ()

void                xmms_remote_playlist                (gint session,
                                                         gchar **list,
                                                         gint num,
                                                         gboolean enqueue);

Sends a playlist to audacious.

session : Legacy XMMS-style session identifier.
list : A list of URIs to play.
num : Number of URIs to play.
enqueue : Whether or not the new playlist should be added on, or replace the current playlist.

xmms_remote_get_version ()

gint                xmms_remote_get_version             (gint session);

Queries audacious for it's protocol version.

session : Legacy XMMS-style session identifier.
Returns : The protocol version used by Audacious.

xmms_remote_playlist_add ()

void                xmms_remote_playlist_add            (gint session,
                                                         GList *list);

Sends a list of URIs to Audacious to add to the playlist.

session : Legacy XMMS-style session identifier.
list : A GList of URIs to add to the playlist.

xmms_remote_playlist_delete ()

void                xmms_remote_playlist_delete         (gint session,
                                                         gint pos);

Deletes a playlist entry.

session : Legacy XMMS-style session identifier.
pos : The playlist position to delete.

xmms_remote_play ()

void                xmms_remote_play                    (gint session);

Tells audacious to begin playback.

session : Legacy XMMS-style session identifier.

xmms_remote_pause ()

void                xmms_remote_pause                   (gint session);

Tells audacious to pause.

session : Legacy XMMS-style session identifier.

xmms_remote_stop ()

void                xmms_remote_stop                    (gint session);

Tells audacious to stop.

session : Legacy XMMS-style session identifier.

xmms_remote_is_playing ()

gboolean            xmms_remote_is_playing              (gint session);

Queries audacious about whether it is playing or not.

session : Legacy XMMS-style session identifier.
Returns : TRUE if playing, FALSE otherwise.

xmms_remote_is_paused ()

gboolean            xmms_remote_is_paused               (gint session);

Queries audacious about whether it is paused or not.

session : Legacy XMMS-style session identifier.
Returns : TRUE if playing, FALSE otherwise.

xmms_remote_get_playlist_pos ()

gint                xmms_remote_get_playlist_pos        (gint session);

Queries audacious about the current playlist position.

session : Legacy XMMS-style session identifier.
Returns : The current playlist position.

xmms_remote_set_playlist_pos ()

void                xmms_remote_set_playlist_pos        (gint session,
                                                         gint pos);

Tells audacious to jump to a different playlist position.

session : Legacy XMMS-style session identifier.
pos : Playlist position to jump to.

xmms_remote_get_playlist_length ()

gint                xmms_remote_get_playlist_length     (gint session);

Queries audacious about the current playlist length.

session : Legacy XMMS-style session identifier.
Returns : The amount of entries in the playlist.

xmms_remote_playlist_clear ()

void                xmms_remote_playlist_clear          (gint session);

Clears the playlist.

session : Legacy XMMS-style session identifier.

xmms_remote_get_output_time ()

gint                xmms_remote_get_output_time         (gint session);

Queries audacious about the current output position.

session : Legacy XMMS-style session identifier.
Returns : The current output position.

xmms_remote_jump_to_time ()

void                xmms_remote_jump_to_time            (gint session,
                                                         gint pos);

Tells audacious to seek to a new time position.

session : Legacy XMMS-style session identifier.
pos : The time (in milliseconds) to jump to.

xmms_remote_get_volume ()

void                xmms_remote_get_volume              (gint session,
                                                         gint *vl,
                                                         gint *vr);

Queries audacious about the current volume.

session : Legacy XMMS-style session identifier.
vl : Pointer to integer containing the left channel's volume.
vr : Pointer to integer containing the right channel's volume.

xmms_remote_get_main_volume ()

gint                xmms_remote_get_main_volume         (gint session);

Queries audacious about the current volume.

session : Legacy XMMS-style session identifier.
Returns : The current volume.

xmms_remote_get_balance ()

gint                xmms_remote_get_balance             (gint session);

Queries audacious about the current balance.

session : Legacy XMMS-style session identifier.
Returns : The current balance.

xmms_remote_set_volume ()

void                xmms_remote_set_volume              (gint session,
                                                         gint vl,
                                                         gint vr);

Sets the volume for the left and right channels in Audacious.

session : Legacy XMMS-style session identifier.
vl : The volume for the left channel.
vr : The volume for the right channel.

xmms_remote_set_main_volume ()

void                xmms_remote_set_main_volume         (gint session,
                                                         gint v);

Sets the volume in Audacious.

session : Legacy XMMS-style session identifier.
v : The volume to set.

xmms_remote_set_balance ()

void                xmms_remote_set_balance             (gint session,
                                                         gint b);

Sets the balance in Audacious.

session : Legacy XMMS-style session identifier.
b : The balance to set.

xmms_remote_get_skin ()

gchar*              xmms_remote_get_skin                (gint session);

Queries Audacious about it's skin.

session : Legacy XMMS-style session identifier.
Returns : A path to the currently selected skin.

xmms_remote_set_skin ()

void                xmms_remote_set_skin                (gint session,
                                                         gchar *skinfile);

Tells audacious to start using the skinfile provided.

session : Legacy XMMS-style session identifier.
skinfile : Path to a skinfile to use with Audacious.

xmms_remote_get_playlist_file ()

gchar*              xmms_remote_get_playlist_file       (gint session,
                                                         gint pos);

Queries Audacious about a playlist entry's file.

session : Legacy XMMS-style session identifier.
pos : The playlist position to query for.
Returns : A path to the file in the playlist at pos position.

xmms_remote_get_playlist_title ()

gchar*              xmms_remote_get_playlist_title      (gint session,
                                                         gint pos);

Queries Audacious about a playlist entry's title.

session : Legacy XMMS-style session identifier.
pos : The playlist position to query for.
Returns : The title for the entry in the playlist at pos position.

xmms_remote_get_playlist_time ()

gint                xmms_remote_get_playlist_time       (gint session,
                                                         gint pos);

Queries Audacious about a playlist entry's length.

session : Legacy XMMS-style session identifier.
pos : The playlist position to query for.
Returns : The length of the entry in the playlist at pos position.

xmms_remote_get_info ()

void                xmms_remote_get_info                (gint session,
                                                         gint *rate,
                                                         gint *freq,
                                                         gint *nch);

Queries Audacious about the current audio format.

session : Legacy XMMS-style session identifier.
rate : Pointer to an integer containing the bitrate.
freq : Pointer to an integer containing the frequency.
nch : Pointer to an integer containing the number of channels.

xmms_remote_main_win_toggle ()

void                xmms_remote_main_win_toggle         (gint session,
                                                         gboolean show);

Toggles the main window's visibility.

session : Legacy XMMS-style session identifier.
show : Whether or not to show the main window.

xmms_remote_pl_win_toggle ()

void                xmms_remote_pl_win_toggle           (gint session,
                                                         gboolean show);

Toggles the playlist window's visibility.

session : Legacy XMMS-style session identifier.
show : Whether or not to show the playlist window.

xmms_remote_eq_win_toggle ()

void                xmms_remote_eq_win_toggle           (gint session,
                                                         gboolean show);

Toggles the equalizer window's visibility.

session : Legacy XMMS-style session identifier.
show : Whether or not to show the equalizer window.

xmms_remote_is_main_win ()

gboolean            xmms_remote_is_main_win             (gint session);

Queries Audacious about the main window's visibility.

session : Legacy XMMS-style session identifier.
Returns : TRUE if visible, FALSE otherwise.

xmms_remote_is_pl_win ()

gboolean            xmms_remote_is_pl_win               (gint session);

Queries Audacious about the playlist window's visibility.

session : Legacy XMMS-style session identifier.
Returns : TRUE if visible, FALSE otherwise.

xmms_remote_is_eq_win ()

gboolean            xmms_remote_is_eq_win               (gint session);

Queries Audacious about the equalizer window's visibility.

session : Legacy XMMS-style session identifier.
Returns : TRUE if visible, FALSE otherwise.

xmms_remote_show_prefs_box ()

void                xmms_remote_show_prefs_box          (gint session);

Tells audacious to show the preferences pane.

session : Legacy XMMS-style session identifier.

xmms_remote_toggle_aot ()

void                xmms_remote_toggle_aot              (gint session,
                                                         gboolean ontop);

Tells audacious to toggle the always-on-top feature.

session : Legacy XMMS-style session identifier.
ontop : Whether or not Audacious should be always-on-top.

xmms_remote_eject ()

void                xmms_remote_eject                   (gint session);

Tells audacious to display the open files pane.

session : Legacy XMMS-style session identifier.

xmms_remote_playlist_prev ()

void                xmms_remote_playlist_prev           (gint session);

Tells audacious to move backwards in the playlist.

session : Legacy XMMS-style session identifier.

xmms_remote_playlist_next ()

void                xmms_remote_playlist_next           (gint session);

Tells audacious to move forward in the playlist.

session : Legacy XMMS-style session identifier.

xmms_remote_playlist_add_url_string ()

void                xmms_remote_playlist_add_url_string (gint session,
                                                         gchar *string);

Tells audacious to add an URI to the playlist.

session : Legacy XMMS-style session identifier.
string : The URI to add.

xmms_remote_is_running ()

gboolean            xmms_remote_is_running              (gint session);

Checks to see if an Audacious server is running.

session : Legacy XMMS-style session identifier.
Returns : TRUE if yes, otherwise FALSE.

xmms_remote_toggle_repeat ()

void                xmms_remote_toggle_repeat           (gint session);

Tells audacious to toggle the repeat feature.

session : Legacy XMMS-style session identifier.

xmms_remote_toggle_shuffle ()

void                xmms_remote_toggle_shuffle          (gint session);

Tells audacious to toggle the shuffle feature.

session : Legacy XMMS-style session identifier.

xmms_remote_is_repeat ()

gboolean            xmms_remote_is_repeat               (gint session);

Queries audacious about whether or not the repeat feature is active.

session : Legacy XMMS-style session identifier.
Returns : TRUE if yes, otherwise FALSE.

xmms_remote_is_shuffle ()

gboolean            xmms_remote_is_shuffle              (gint session);

Queries audacious about whether or not the shuffle feature is active.

session : Legacy XMMS-style session identifier.
Returns : TRUE if yes, otherwise FALSE.

xmms_remote_get_eq ()

void                xmms_remote_get_eq                  (gint session,
                                                         gfloat *preamp,
                                                         gfloat **bands);

Queries audacious about the equalizer settings.

session : Legacy XMMS-style session identifier.
preamp : Pointer to value for preamp setting.
bands : Pointer to array of band settings.

xmms_remote_get_eq_preamp ()

gfloat              xmms_remote_get_eq_preamp           (gint session);

Queries audacious about the equalizer preamp's setting.

session : Legacy XMMS-style session identifier.
Returns : The equalizer preamp's setting.

xmms_remote_get_eq_band ()

gfloat              xmms_remote_get_eq_band             (gint session,
                                                         gint band);

Queries audacious about an equalizer band's value.

session : Legacy XMMS-style session identifier.
band : Which band to lookup the value for.
Returns : The equalizer band's value.

xmms_remote_set_eq ()

void                xmms_remote_set_eq                  (gint session,
                                                         gfloat preamp,
                                                         gfloat *bands);

Tells audacious to set the equalizer up using the provided values.

session : Legacy XMMS-style session identifier.
preamp : Value for preamp setting.
bands : Array of band settings.

xmms_remote_set_eq_preamp ()

void                xmms_remote_set_eq_preamp           (gint session,
                                                         gfloat preamp);

Tells audacious to set the equalizer's preamp setting.

session : Legacy XMMS-style session identifier.
preamp : Value for preamp setting.

xmms_remote_set_eq_band ()

void                xmms_remote_set_eq_band             (gint session,
                                                         gint band,
                                                         gfloat value);

Tells audacious to set an equalizer band's setting.

session : Legacy XMMS-style session identifier.
band : The band to set the value for.
value : The value to set that band to.

xmms_remote_quit ()

void                xmms_remote_quit                    (gint session);

Tells audacious to quit.

session : Legacy XMMS-style session identifier.

xmms_remote_play_pause ()

void                xmms_remote_play_pause              (gint session);

Tells audacious to either play or pause.

session : Legacy XMMS-style session identifier.

xmms_remote_playlist_ins_url_string ()

void                xmms_remote_playlist_ins_url_string (gint session,
                                                         gchar *string,
                                                         gint pos);

Tells audacious to add an URI to the playlist at a specific position.

session : Legacy XMMS-style session identifier.
string : The URI to add.
pos : The position to add the URI at.

xmms_remote_playqueue_add ()

void                xmms_remote_playqueue_add           (gint session,
                                                         gint pos);

Tells audacious to add a playlist entry to the playqueue.

session : Legacy XMMS-style session identifier.
pos : The playlist position to add to the queue.

xmms_remote_playqueue_remove ()

void                xmms_remote_playqueue_remove        (gint session,
                                                         gint pos);

Tells audacious to remove a playlist entry from the playqueue.

session : Legacy XMMS-style session identifier.
pos : The playlist position to remove from the queue.

xmms_remote_get_playqueue_length ()

gint                xmms_remote_get_playqueue_length    (gint session);

Queries audacious about the playqueue's length.

session : Legacy XMMS-style session identifier.
Returns : The number of entries in the playqueue.

xmms_remote_toggle_advance ()

void                xmms_remote_toggle_advance          (gint session);

Tells audacious to toggle the no-playlist-advance feature.

session : Legacy XMMS-style session identifier.

xmms_remote_is_advance ()

gboolean            xmms_remote_is_advance              (gint session);

Queries audacious about whether or not the no-playlist-advance feature is active.

session : Legacy XMMS-style session identifier.
Returns : TRUE if yes, otherwise FALSE.

xmms_remote_activate ()

void                xmms_remote_activate                (gint session);

Tells audacious to display the main window and become the selected window.

session : Legacy XMMS-style session identifier.

xmms_remote_show_jtf_box ()

void                xmms_remote_show_jtf_box            (gint session);

Tells audacious to show the Jump-to-File pane.

session : Legacy XMMS-style session identifier.

xmms_remote_playqueue_clear ()

void                xmms_remote_playqueue_clear         (gint session);

Tells audacious to clear the playqueue.

session : Legacy XMMS-style session identifier.

xmms_remote_playqueue_is_queued ()

gboolean            xmms_remote_playqueue_is_queued     (gint session,
                                                         gint pos);

Queries audacious about whether or not a playlist entry is in the playqueue.

session : Legacy XMMS-style session identifier.
pos : Position to check queue for.
Returns : TRUE if yes, FALSE otherwise.

xmms_remote_get_playqueue_position ()

gint                xmms_remote_get_playqueue_position  (gint session,
                                                         gint pos);

Queries audacious about what the playqueue position is for a playlist entry.

session : Legacy XMMS-style session identifier.
pos : Position to check queue for.
Returns : TRUE if yes, FALSE otherwise.

xmms_remote_get_playqueue_queue_position ()

gint                xmms_remote_get_playqueue_queue_position
                                                        (gint session,
                                                         gint pos);

Queries audacious about what the playlist position is for a playqueue entry.

session : Legacy XMMS-style session identifier.
pos : Position to check queue for.
Returns : TRUE if yes, FALSE otherwise.

audacious_set_session_uri ()

void                audacious_set_session_uri           (gchar *uri);

Sets the Session URI where Audacious can be reached at.

uri : The session URI to set the client API to.

audacious_get_session_uri ()

gchar*              audacious_get_session_uri           (gint session);

Attempts to determine what the Session URI may be.

session : Legacy XMMS session id (usually 0).
Returns : A session URI.

audacious_set_session_type ()

void                audacious_set_session_type          (gint type);

Sets the type of session used by the audacious server.

type : The type to set the session type to.

xmms_remote_play_files ()

void                xmms_remote_play_files              (gint session,
                                                         GList *list);

Sends a list of URIs to Audacious to play.

session : Legacy XMMS-style session identifier.
list : A GList of URIs to play.

xmms_remote_add_files()

#define             xmms_remote_add_files(session,list)

Tells audacious to add files to the playlist.

session : Legacy XMMS-style session identifier.
list : A GList of files to add.