Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
Macros | Functions | Variables
dbus.c File Reference
#include <glib.h>
#include <string.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
#include <dbus/dbus-glib-lowlevel.h>
#include "dbus.h"
#include "dbus-service.h"
#include "dbus-server-bindings.h"
#include <math.h>
#include <libaudcore/hook.h>
#include "debug.h"
#include "drct.h"
#include "playlist.h"
#include "interface.h"
#include "misc.h"

Go to the source code of this file.

Macros

#define DBUS_TYPE_G_STRING_VALUE_HASHTABLE   (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
 

Functions

static void mpris_playlist_update_hook (void *unused, MprisTrackList *obj)
 
void audacious_rc_class_init (RemoteObjectClass *klass)
 
void mpris_root_class_init (MprisRootClass *klass)
 
void mpris_player_class_init (MprisPlayerClass *klass)
 
void mpris_tracklist_class_init (MprisTrackListClass *klass)
 
void audacious_rc_init (RemoteObject *object)
 
void mpris_root_init (MprisRoot *object)
 
void mpris_player_init (MprisPlayer *object)
 
void mpris_tracklist_init (MprisTrackList *object)
 
void init_dbus ()
 
void cleanup_dbus (void)
 
static GValue * tuple_value_to_gvalue (const Tuple *tuple, const char *key)
 
static void tuple_insert_to_hash_full (GHashTable *md, const Tuple *tuple, const char *tuple_key, const char *key)
 Retrieves value named tuple_key and inserts it inside hash table. More...
 
static void tuple_insert_to_hash (GHashTable *md, const Tuple *tuple, const char *key)
 
static void remove_metadata_value (void *value)
 
static GHashTable * make_mpris_metadata (const char *filename, const Tuple *tuple)
 
static GValue * get_field (int playlist, int entry, const char *field)
 
static GHashTable * get_mpris_metadata (int playlist, int entry)
 
bool_t mpris_root_identity (MprisRoot *obj, char **identity, GError **error)
 
bool_t mpris_root_quit (MprisPlayer *obj, GError **error)
 
bool_t mpris_player_next (MprisPlayer *obj, GError **error)
 
bool_t mpris_player_prev (MprisPlayer *obj, GError **error)
 
bool_t mpris_player_pause (MprisPlayer *obj, GError **error)
 
bool_t mpris_player_stop (MprisPlayer *obj, GError **error)
 
bool_t mpris_player_play (MprisPlayer *obj, GError **error)
 
bool_t mpris_player_repeat (MprisPlayer *obj, bool_t rpt, GError **error)
 
static void append_int_value (GValueArray *ar, int tmp)
 
static int get_playback_status (void)
 
bool_t mpris_player_get_status (MprisPlayer *obj, GValueArray **status, GError **error)
 
bool_t mpris_player_get_metadata (MprisPlayer *obj, GHashTable **metadata, GError **error)
 
bool_t mpris_player_get_caps (MprisPlayer *obj, int *capabilities, GError **error)
 
bool_t mpris_player_volume_set (MprisPlayer *obj, int vol, GError **error)
 
bool_t mpris_player_volume_get (MprisPlayer *obj, int *vol, GError **error)
 
bool_t mpris_player_position_set (MprisPlayer *obj, int pos, GError **error)
 
bool_t mpris_player_position_get (MprisPlayer *obj, int *pos, GError **error)
 
bool_t mpris_emit_caps_change (MprisPlayer *obj)
 
bool_t mpris_emit_track_change (MprisPlayer *obj)
 
bool_t mpris_emit_status_change (MprisPlayer *obj, PlaybackStatus status)
 
bool_t mpris_emit_tracklist_change (MprisTrackList *obj, int playlist)
 
bool_t mpris_tracklist_get_metadata (MprisTrackList *obj, int pos, GHashTable **metadata, GError **error)
 
bool_t mpris_tracklist_get_current_track (MprisTrackList *obj, int *pos, GError **error)
 
bool_t mpris_tracklist_get_length (MprisTrackList *obj, int *length, GError **error)
 
bool_t mpris_tracklist_add_track (MprisTrackList *obj, char *uri, bool_t play, GError **error)
 
bool_t mpris_tracklist_del_track (MprisTrackList *obj, int pos, GError **error)
 
bool_t mpris_tracklist_loop (MprisTrackList *obj, bool_t loop, GError **error)
 
bool_t mpris_tracklist_random (MprisTrackList *obj, bool_t random, GError **error)
 
bool_t audacious_rc_version (RemoteObject *obj, char **version, GError **error)
 
bool_t audacious_rc_quit (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_eject (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_main_win_visible (RemoteObject *obj, bool_t *visible, GError **error)
 
bool_t audacious_rc_show_main_win (RemoteObject *obj, bool_t show, GError **error)
 
bool_t audacious_rc_get_tuple_fields (RemoteObject *obj, char ***fields, GError **error)
 
bool_t audacious_rc_play (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_pause (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_stop (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_playing (RemoteObject *obj, bool_t *is_playing, GError **error)
 
bool_t audacious_rc_paused (RemoteObject *obj, bool_t *is_paused, GError **error)
 
bool_t audacious_rc_stopped (RemoteObject *obj, bool_t *is_stopped, GError **error)
 
bool_t audacious_rc_status (RemoteObject *obj, char **status, GError **error)
 
bool_t audacious_rc_info (RemoteObject *obj, int *rate, int *freq, int *nch, GError **error)
 
bool_t audacious_rc_time (RemoteObject *obj, int *time, GError **error)
 
bool_t audacious_rc_seek (RemoteObject *obj, unsigned int pos, GError **error)
 
bool_t audacious_rc_volume (RemoteObject *obj, int *vl, int *vr, GError **error)
 
bool_t audacious_rc_set_volume (RemoteObject *obj, int vl, int vr, GError **error)
 
bool_t audacious_rc_balance (RemoteObject *obj, int *balance, GError **error)
 
bool_t audacious_rc_position (RemoteObject *obj, int *pos, GError **error)
 
bool_t audacious_rc_advance (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_reverse (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_length (RemoteObject *obj, int *length, GError **error)
 
bool_t audacious_rc_song_title (RemoteObject *obj, unsigned int pos, char **title, GError **error)
 
bool_t audacious_rc_song_filename (RemoteObject *obj, unsigned int pos, char **filename, GError **error)
 
bool_t audacious_rc_song_length (RemoteObject *obj, unsigned int pos, int *length, GError **error)
 
bool_t audacious_rc_song_frames (RemoteObject *obj, unsigned int pos, int *length, GError **error)
 
bool_t audacious_rc_song_tuple (RemoteObject *obj, unsigned int pos, char *field, GValue *value, GError **error)
 
bool_t audacious_rc_jump (RemoteObject *obj, unsigned int pos, GError **error)
 
bool_t audacious_rc_add (RemoteObject *obj, char *file, GError **error)
 
bool_t audacious_rc_add_url (RemoteObject *obj, char *file, GError **error)
 
static Index * strings_to_index (char **strings)
 
bool_t audacious_rc_add_list (RemoteObject *obj, char **filenames, GError **error)
 
bool_t audacious_rc_open_list (RemoteObject *obj, char **filenames, GError **error)
 
bool_t audacious_rc_open_list_to_temp (RemoteObject *obj, char **filenames, GError **error)
 
bool_t audacious_rc_delete (RemoteObject *obj, unsigned int pos, GError **error)
 
bool_t audacious_rc_clear (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_auto_advance (RemoteObject *obj, bool_t *is_advance, GError **error)
 
bool_t audacious_rc_toggle_auto_advance (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_repeat (RemoteObject *obj, bool_t *is_repeating, GError **error)
 
bool_t audacious_rc_toggle_repeat (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_shuffle (RemoteObject *obj, bool_t *is_shuffling, GError **error)
 
bool_t audacious_rc_toggle_shuffle (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_stop_after (RemoteObject *obj, bool_t *is_stopping, GError **error)
 
bool_t audacious_rc_toggle_stop_after (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_show_prefs_box (RemoteObject *obj, bool_t show, GError **error)
 
bool_t audacious_rc_show_about_box (RemoteObject *obj, bool_t show, GError **error)
 
bool_t audacious_rc_show_jtf_box (RemoteObject *obj, bool_t show, GError **error)
 
bool_t audacious_rc_show_filebrowser (RemoteObject *obj, bool_t show, GError **error)
 
bool_t audacious_rc_play_pause (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_get_info (RemoteObject *obj, int *rate, int *freq, int *nch, GError **error)
 
bool_t audacious_rc_toggle_aot (RemoteObject *obj, bool_t ontop, GError **error)
 
bool_t audacious_rc_playqueue_add (RemoteObject *obj, int pos, GError **error)
 
bool_t audacious_rc_playqueue_remove (RemoteObject *obj, int pos, GError **error)
 
bool_t audacious_rc_playqueue_clear (RemoteObject *obj, GError **error)
 
bool_t audacious_rc_get_playqueue_length (RemoteObject *obj, int *length, GError **error)
 
bool_t audacious_rc_queue_get_list_pos (RemoteObject *obj, int qpos, int *pos, GError **error)
 
bool_t audacious_rc_queue_get_queue_pos (RemoteObject *obj, int pos, int *qpos, GError **error)
 
bool_t audacious_rc_playqueue_is_queued (RemoteObject *obj, int pos, bool_t *is_queued, GError **error)
 
bool_t audacious_rc_playlist_ins_url_string (RemoteObject *obj, char *url, int pos, GError **error)
 
bool_t audacious_rc_playlist_add (RemoteObject *obj, void *list, GError **error)
 
bool_t audacious_rc_playlist_enqueue_to_temp (RemoteObject *obj, char *url, GError **error)
 
bool_t audacious_rc_get_eq (RemoteObject *obj, double *preamp, GArray **bands, GError **error)
 
bool_t audacious_rc_get_eq_preamp (RemoteObject *obj, double *preamp, GError **error)
 
bool_t audacious_rc_get_eq_band (RemoteObject *obj, int band, double *value, GError **error)
 
bool_t audacious_rc_set_eq (RemoteObject *obj, double preamp, GArray *bands, GError **error)
 
bool_t audacious_rc_set_eq_preamp (RemoteObject *obj, double preamp, GError **error)
 
bool_t audacious_rc_set_eq_band (RemoteObject *obj, int band, double value, GError **error)
 
bool_t audacious_rc_equalizer_activate (RemoteObject *obj, bool_t active, GError **error)
 
bool_t audacious_rc_get_active_playlist_name (RemoteObject *obj, char **title, GError **error)
 
DBusGProxy * audacious_get_dbus_proxy (void)
 

Variables

static DBusGConnection * dbus_conn = NULL
 
static unsigned int signals [LAST_SIG] = { 0 }
 
static unsigned int tracklist_signals [LAST_TRACKLIST_SIG] = { 0 }
 
MprisPlayermpris = NULL
 
MprisTrackListmpris_tracklist = NULL
 

Macro Definition Documentation

#define DBUS_TYPE_G_STRING_VALUE_HASHTABLE   (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))

Definition at line 55 of file dbus.c.

Referenced by mpris_player_class_init(), and mpris_player_init().

Function Documentation

static void append_int_value ( GValueArray *  ar,
int  tmp 
)
static

Definition at line 366 of file dbus.c.

Referenced by mpris_emit_status_change(), and mpris_player_get_status().

DBusGProxy* audacious_get_dbus_proxy ( void  )

Definition at line 1042 of file dbus.c.

Referenced by do_remote().

bool_t audacious_rc_add ( RemoteObject obj,
char *  file,
GError **  error 
)

Definition at line 764 of file dbus.c.

bool_t audacious_rc_add_list ( RemoteObject obj,
char **  filenames,
GError **  error 
)

Definition at line 784 of file dbus.c.

bool_t audacious_rc_add_url ( RemoteObject obj,
char *  file,
GError **  error 
)

Definition at line 769 of file dbus.c.

bool_t audacious_rc_advance ( RemoteObject obj,
GError **  error 
)

Definition at line 687 of file dbus.c.

bool_t audacious_rc_auto_advance ( RemoteObject obj,
bool_t is_advance,
GError **  error 
)

Definition at line 818 of file dbus.c.

bool_t audacious_rc_balance ( RemoteObject obj,
int balance,
GError **  error 
)

Definition at line 673 of file dbus.c.

void audacious_rc_class_init ( RemoteObjectClass klass)

Definition at line 59 of file dbus.c.

bool_t audacious_rc_clear ( RemoteObject obj,
GError **  error 
)

Definition at line 811 of file dbus.c.

bool_t audacious_rc_delete ( RemoteObject obj,
unsigned int  pos,
GError **  error 
)

Definition at line 805 of file dbus.c.

bool_t audacious_rc_eject ( RemoteObject obj,
GError **  error 
)

Definition at line 562 of file dbus.c.

bool_t audacious_rc_equalizer_activate ( RemoteObject obj,
bool_t  active,
GError **  error 
)

Definition at line 1027 of file dbus.c.

bool_t audacious_rc_get_active_playlist_name ( RemoteObject obj,
char **  title,
GError **  error 
)

Definition at line 1033 of file dbus.c.

bool_t audacious_rc_get_eq ( RemoteObject obj,
double *  preamp,
GArray **  bands,
GError **  error 
)

Definition at line 986 of file dbus.c.

bool_t audacious_rc_get_eq_band ( RemoteObject obj,
int  band,
double *  value,
GError **  error 
)

Definition at line 1002 of file dbus.c.

bool_t audacious_rc_get_eq_preamp ( RemoteObject obj,
double *  preamp,
GError **  error 
)

Definition at line 996 of file dbus.c.

bool_t audacious_rc_get_info ( RemoteObject obj,
int rate,
int freq,
int nch,
GError **  error 
)

Definition at line 901 of file dbus.c.

bool_t audacious_rc_get_playqueue_length ( RemoteObject obj,
int length,
GError **  error 
)

Definition at line 938 of file dbus.c.

bool_t audacious_rc_get_tuple_fields ( RemoteObject obj,
char ***  fields,
GError **  error 
)

Definition at line 582 of file dbus.c.

bool_t audacious_rc_info ( RemoteObject obj,
int rate,
int freq,
int nch,
GError **  error 
)

Definition at line 642 of file dbus.c.

void audacious_rc_init ( RemoteObject object)

Definition at line 88 of file dbus.c.

bool_t audacious_rc_jump ( RemoteObject obj,
unsigned int  pos,
GError **  error 
)

Definition at line 758 of file dbus.c.

bool_t audacious_rc_length ( RemoteObject obj,
int length,
GError **  error 
)

Definition at line 699 of file dbus.c.

bool_t audacious_rc_main_win_visible ( RemoteObject obj,
bool_t visible,
GError **  error 
)

Definition at line 568 of file dbus.c.

bool_t audacious_rc_open_list ( RemoteObject obj,
char **  filenames,
GError **  error 
)

Definition at line 791 of file dbus.c.

bool_t audacious_rc_open_list_to_temp ( RemoteObject obj,
char **  filenames,
GError **  error 
)

Definition at line 798 of file dbus.c.

bool_t audacious_rc_pause ( RemoteObject obj,
GError **  error 
)

Definition at line 602 of file dbus.c.

bool_t audacious_rc_paused ( RemoteObject obj,
bool_t is_paused,
GError **  error 
)

Definition at line 620 of file dbus.c.

bool_t audacious_rc_play ( RemoteObject obj,
GError **  error 
)

Definition at line 596 of file dbus.c.

bool_t audacious_rc_play_pause ( RemoteObject obj,
GError **  error 
)

Definition at line 895 of file dbus.c.

bool_t audacious_rc_playing ( RemoteObject obj,
bool_t is_playing,
GError **  error 
)

Definition at line 614 of file dbus.c.

bool_t audacious_rc_playlist_add ( RemoteObject obj,
void *  list,
GError **  error 
)

Definition at line 973 of file dbus.c.

bool_t audacious_rc_playlist_enqueue_to_temp ( RemoteObject obj,
char *  url,
GError **  error 
)

Definition at line 978 of file dbus.c.

bool_t audacious_rc_playlist_ins_url_string ( RemoteObject obj,
char *  url,
int  pos,
GError **  error 
)

Definition at line 966 of file dbus.c.

Referenced by audacious_rc_add(), audacious_rc_add_url(), and audacious_rc_playlist_add().

bool_t audacious_rc_playqueue_add ( RemoteObject obj,
int  pos,
GError **  error 
)

Definition at line 914 of file dbus.c.

bool_t audacious_rc_playqueue_clear ( RemoteObject obj,
GError **  error 
)

Definition at line 931 of file dbus.c.

bool_t audacious_rc_playqueue_is_queued ( RemoteObject obj,
int  pos,
bool_t is_queued,
GError **  error 
)

Definition at line 959 of file dbus.c.

bool_t audacious_rc_playqueue_remove ( RemoteObject obj,
int  pos,
GError **  error 
)

Definition at line 920 of file dbus.c.

bool_t audacious_rc_position ( RemoteObject obj,
int pos,
GError **  error 
)

Definition at line 681 of file dbus.c.

bool_t audacious_rc_queue_get_list_pos ( RemoteObject obj,
int  qpos,
int pos,
GError **  error 
)

Definition at line 945 of file dbus.c.

bool_t audacious_rc_queue_get_queue_pos ( RemoteObject obj,
int  pos,
int qpos,
GError **  error 
)

Definition at line 952 of file dbus.c.

bool_t audacious_rc_quit ( RemoteObject obj,
GError **  error 
)

Definition at line 556 of file dbus.c.

bool_t audacious_rc_repeat ( RemoteObject obj,
bool_t is_repeating,
GError **  error 
)

Definition at line 830 of file dbus.c.

bool_t audacious_rc_reverse ( RemoteObject obj,
GError **  error 
)

Definition at line 693 of file dbus.c.

bool_t audacious_rc_seek ( RemoteObject obj,
unsigned int  pos,
GError **  error 
)

Definition at line 655 of file dbus.c.

bool_t audacious_rc_set_eq ( RemoteObject obj,
double  preamp,
GArray *  bands,
GError **  error 
)

Definition at line 1008 of file dbus.c.

bool_t audacious_rc_set_eq_band ( RemoteObject obj,
int  band,
double  value,
GError **  error 
)

Definition at line 1021 of file dbus.c.

bool_t audacious_rc_set_eq_preamp ( RemoteObject obj,
double  preamp,
GError **  error 
)

Definition at line 1015 of file dbus.c.

bool_t audacious_rc_set_volume ( RemoteObject obj,
int  vl,
int  vr,
GError **  error 
)

Definition at line 667 of file dbus.c.

bool_t audacious_rc_show_about_box ( RemoteObject obj,
bool_t  show,
GError **  error 
)

Definition at line 873 of file dbus.c.

bool_t audacious_rc_show_filebrowser ( RemoteObject obj,
bool_t  show,
GError **  error 
)

Definition at line 887 of file dbus.c.

bool_t audacious_rc_show_jtf_box ( RemoteObject obj,
bool_t  show,
GError **  error 
)

Definition at line 879 of file dbus.c.

bool_t audacious_rc_show_main_win ( RemoteObject obj,
bool_t  show,
GError **  error 
)

Definition at line 575 of file dbus.c.

bool_t audacious_rc_show_prefs_box ( RemoteObject obj,
bool_t  show,
GError **  error 
)

Definition at line 867 of file dbus.c.

bool_t audacious_rc_shuffle ( RemoteObject obj,
bool_t is_shuffling,
GError **  error 
)

Definition at line 842 of file dbus.c.

bool_t audacious_rc_song_filename ( RemoteObject obj,
unsigned int  pos,
char **  filename,
GError **  error 
)

Definition at line 717 of file dbus.c.

bool_t audacious_rc_song_frames ( RemoteObject obj,
unsigned int  pos,
int length,
GError **  error 
)

Definition at line 736 of file dbus.c.

Referenced by audacious_rc_song_length().

bool_t audacious_rc_song_length ( RemoteObject obj,
unsigned int  pos,
int length,
GError **  error 
)

Definition at line 729 of file dbus.c.

bool_t audacious_rc_song_title ( RemoteObject obj,
unsigned int  pos,
char **  title,
GError **  error 
)

Definition at line 705 of file dbus.c.

bool_t audacious_rc_song_tuple ( RemoteObject obj,
unsigned int  pos,
char *  field,
GValue *  value,
GError **  error 
)

Definition at line 743 of file dbus.c.

bool_t audacious_rc_status ( RemoteObject obj,
char **  status,
GError **  error 
)

Definition at line 632 of file dbus.c.

bool_t audacious_rc_stop ( RemoteObject obj,
GError **  error 
)

Definition at line 608 of file dbus.c.

bool_t audacious_rc_stop_after ( RemoteObject obj,
bool_t is_stopping,
GError **  error 
)

Definition at line 854 of file dbus.c.

bool_t audacious_rc_stopped ( RemoteObject obj,
bool_t is_stopped,
GError **  error 
)

Definition at line 626 of file dbus.c.

bool_t audacious_rc_time ( RemoteObject obj,
int time,
GError **  error 
)

Definition at line 649 of file dbus.c.

bool_t audacious_rc_toggle_aot ( RemoteObject obj,
bool_t  ontop,
GError **  error 
)

Definition at line 908 of file dbus.c.

bool_t audacious_rc_toggle_auto_advance ( RemoteObject obj,
GError **  error 
)

Definition at line 824 of file dbus.c.

bool_t audacious_rc_toggle_repeat ( RemoteObject obj,
GError **  error 
)

Definition at line 836 of file dbus.c.

bool_t audacious_rc_toggle_shuffle ( RemoteObject obj,
GError **  error 
)

Definition at line 848 of file dbus.c.

bool_t audacious_rc_toggle_stop_after ( RemoteObject obj,
GError **  error 
)

Definition at line 860 of file dbus.c.

bool_t audacious_rc_version ( RemoteObject obj,
char **  version,
GError **  error 
)

Definition at line 550 of file dbus.c.

bool_t audacious_rc_volume ( RemoteObject obj,
int vl,
int vr,
GError **  error 
)

Definition at line 661 of file dbus.c.

void cleanup_dbus ( void  )

Definition at line 198 of file dbus.c.

Referenced by shut_down().

static GValue* get_field ( int  playlist,
int  entry,
const char *  field 
)
static

Definition at line 287 of file dbus.c.

Referenced by audacious_rc_song_tuple().

static GHashTable* get_mpris_metadata ( int  playlist,
int  entry 
)
static

Definition at line 298 of file dbus.c.

Referenced by mpris_player_get_metadata(), and mpris_tracklist_get_metadata().

static int get_playback_status ( void  )
static

Definition at line 375 of file dbus.c.

Referenced by mpris_emit_status_change(), and mpris_player_get_status().

void init_dbus ( void  )

Definition at line 172 of file dbus.c.

Referenced by init_two().

static GHashTable* make_mpris_metadata ( const char *  filename,
const Tuple *  tuple 
)
static

Definition at line 256 of file dbus.c.

Referenced by get_mpris_metadata(), and mpris_emit_track_change().

bool_t mpris_emit_caps_change ( MprisPlayer obj)

Definition at line 438 of file dbus.c.

bool_t mpris_emit_status_change ( MprisPlayer obj,
PlaybackStatus  status 
)

Definition at line 468 of file dbus.c.

bool_t mpris_emit_track_change ( MprisPlayer obj)

Definition at line 444 of file dbus.c.

bool_t mpris_emit_tracklist_change ( MprisTrackList obj,
int  playlist 
)

Definition at line 486 of file dbus.c.

Referenced by mpris_playlist_update_hook().

void mpris_player_class_init ( MprisPlayerClass klass)

Definition at line 67 of file dbus.c.

bool_t mpris_player_get_caps ( MprisPlayer obj,
int capabilities,
GError **  error 
)

Definition at line 407 of file dbus.c.

bool_t mpris_player_get_metadata ( MprisPlayer obj,
GHashTable **  metadata,
GError **  error 
)

Definition at line 394 of file dbus.c.

bool_t mpris_player_get_status ( MprisPlayer obj,
GValueArray **  status,
GError **  error 
)

Definition at line 383 of file dbus.c.

void mpris_player_init ( MprisPlayer object)

Definition at line 128 of file dbus.c.

bool_t mpris_player_next ( MprisPlayer obj,
GError **  error 
)

Definition at line 330 of file dbus.c.

bool_t mpris_player_pause ( MprisPlayer obj,
GError **  error 
)

Definition at line 342 of file dbus.c.

bool_t mpris_player_play ( MprisPlayer obj,
GError **  error 
)

Definition at line 354 of file dbus.c.

bool_t mpris_player_position_get ( MprisPlayer obj,
int pos,
GError **  error 
)

Definition at line 431 of file dbus.c.

bool_t mpris_player_position_set ( MprisPlayer obj,
int  pos,
GError **  error 
)

Definition at line 425 of file dbus.c.

bool_t mpris_player_prev ( MprisPlayer obj,
GError **  error 
)

Definition at line 336 of file dbus.c.

bool_t mpris_player_repeat ( MprisPlayer obj,
bool_t  rpt,
GError **  error 
)

Definition at line 360 of file dbus.c.

bool_t mpris_player_stop ( MprisPlayer obj,
GError **  error 
)

Definition at line 348 of file dbus.c.

bool_t mpris_player_volume_get ( MprisPlayer obj,
int vol,
GError **  error 
)

Definition at line 419 of file dbus.c.

bool_t mpris_player_volume_set ( MprisPlayer obj,
int  vol,
GError **  error 
)

Definition at line 413 of file dbus.c.

static void mpris_playlist_update_hook ( void *  unused,
MprisTrackList obj 
)
static

Definition at line 492 of file dbus.c.

Referenced by cleanup_dbus(), and init_dbus().

void mpris_root_class_init ( MprisRootClass klass)

Definition at line 63 of file dbus.c.

bool_t mpris_root_identity ( MprisRoot obj,
char **  identity,
GError **  error 
)

Definition at line 316 of file dbus.c.

void mpris_root_init ( MprisRoot object)

Definition at line 120 of file dbus.c.

bool_t mpris_root_quit ( MprisPlayer obj,
GError **  error 
)

Definition at line 322 of file dbus.c.

bool_t mpris_tracklist_add_track ( MprisTrackList obj,
char *  uri,
bool_t  play,
GError **  error 
)

Definition at line 522 of file dbus.c.

void mpris_tracklist_class_init ( MprisTrackListClass klass)

Definition at line 82 of file dbus.c.

bool_t mpris_tracklist_del_track ( MprisTrackList obj,
int  pos,
GError **  error 
)

Definition at line 529 of file dbus.c.

bool_t mpris_tracklist_get_current_track ( MprisTrackList obj,
int pos,
GError **  error 
)

Definition at line 509 of file dbus.c.

bool_t mpris_tracklist_get_length ( MprisTrackList obj,
int length,
GError **  error 
)

Definition at line 516 of file dbus.c.

bool_t mpris_tracklist_get_metadata ( MprisTrackList obj,
int  pos,
GHashTable **  metadata,
GError **  error 
)

Definition at line 499 of file dbus.c.

void mpris_tracklist_init ( MprisTrackList object)

Definition at line 152 of file dbus.c.

bool_t mpris_tracklist_loop ( MprisTrackList obj,
bool_t  loop,
GError **  error 
)

Definition at line 535 of file dbus.c.

bool_t mpris_tracklist_random ( MprisTrackList obj,
bool_t  random,
GError **  error 
)

Definition at line 542 of file dbus.c.

static void remove_metadata_value ( void *  value)
static

Definition at line 250 of file dbus.c.

Referenced by make_mpris_metadata().

static Index* strings_to_index ( char **  strings)
static
static void tuple_insert_to_hash ( GHashTable *  md,
const Tuple *  tuple,
const char *  key 
)
static

Definition at line 244 of file dbus.c.

Referenced by make_mpris_metadata().

static void tuple_insert_to_hash_full ( GHashTable *  md,
const Tuple *  tuple,
const char *  tuple_key,
const char *  key 
)
static

Retrieves value named tuple_key and inserts it inside hash table.

Parameters
[in,out]mdGHashTable to insert into
[in]tupleTuple to read data from
[in]tuple_keyTuple field key
[in]keykey used for inserting into hash table.

Definition at line 236 of file dbus.c.

Referenced by make_mpris_metadata(), and tuple_insert_to_hash().

static GValue* tuple_value_to_gvalue ( const Tuple *  tuple,
const char *  key 
)
static

Definition at line 203 of file dbus.c.

Referenced by get_field(), and tuple_insert_to_hash_full().

Variable Documentation

DBusGConnection* dbus_conn = NULL
static
MprisPlayer* mpris = NULL

Definition at line 47 of file dbus.c.

MprisTrackList* mpris_tracklist = NULL

Definition at line 48 of file dbus.c.

unsigned int signals[LAST_SIG] = { 0 }
static
unsigned int tracklist_signals[LAST_TRACKLIST_SIG] = { 0 }
static

Definition at line 45 of file dbus.c.

Referenced by mpris_emit_tracklist_change(), and mpris_tracklist_class_init().