DACPPlayer

DACPPlayer

Synopsis

#define             DACP_TYPE_PLAYER
#define             DACP_PLAYER                         (o)
#define             IS_DACP_PLAYER                      (o)
#define             DACP_PLAYER_GET_INTERFACE           (o)
                    DACPPlayerIface;
                    DACPPlayer;
enum                DACPRepeatState;
enum                DACPPlayState;
GType               dacp_player_get_type                (void);
DAAPRecord *        dacp_player_now_playing_record      (DACPPlayer *player);
const guchar *      dacp_player_now_playing_artwork     (DACPPlayer *player,
                                                         guint width,
                                                         guint height);
void                dacp_player_play_pause              (DACPPlayer *player);
void                dacp_player_pause                   (DACPPlayer *player);
void                dacp_player_next_item               (DACPPlayer *player);
void                dacp_player_prev_item               (DACPPlayer *player);
void                dacp_player_cue_clear               (DACPPlayer *player);
void                dacp_player_cue_play                (DACPPlayer *player,
                                                         GList *records,
                                                         guint index);

Object Hierarchy

  GInterface
   +----DACPPlayer

Prerequisites

DACPPlayer requires GObject.

Properties

  "play-state"               DACPPlayState         : Read / Write
  "playing-time"             gulong                : Read / Write
  "repeat-state"             DACPRepeatState       : Read / Write
  "shuffle-state"            gboolean              : Read / Write
  "volume"                   gulong                : Read / Write

Description

Details

DACP_TYPE_PLAYER

#define DACP_TYPE_PLAYER               (dacp_player_get_type ())

The type for DACPPlayer.


DACP_PLAYER()

#define DACP_PLAYER(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), DACP_TYPE_PLAYER, DACPPlayer))

Casts a DACPPlayer or derived pointer into a (DACPPlayer *) pointer. Depending on the current debugging level, this function may invoke certain runtime checks to identify invalid casts.

o :

Object which is subject to casting.

IS_DACP_PLAYER()

#define IS_DACP_PLAYER(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), DACP_TYPE_PLAYER))

Checks whether a valid GTypeInstance pointer is of type DACP_TYPE_PLAYER.

o :

Instance to check for being a DACP_TYPE_PLAYER.

DACP_PLAYER_GET_INTERFACE()

#define             DACP_PLAYER_GET_INTERFACE(o)

Get the insterface structure associated to a DACPPlayer instance.

o :

a DACPPlayer instance.

Returns :

pointer to object interface structure.

DACPPlayerIface

typedef struct {
	GTypeInterface parent_class;

	DAAPRecord *(*now_playing_record)  (DACPPlayer *player);
	const guchar *(*now_playing_artwork)      (DACPPlayer *player, guint width, guint height);
	void (*play_pause)                 (DACPPlayer *player);
	void (*pause)                      (DACPPlayer *player);
	void (*next_item)                  (DACPPlayer *player);
	void (*prev_item)                  (DACPPlayer *player);

	void (*cue_clear)                  (DACPPlayer *player);
	void (*cue_play)                   (DACPPlayer *player, GList *records, guint index);
} DACPPlayerIface;


DACPPlayer

typedef struct _DACPPlayer DACPPlayer;


enum DACPRepeatState

typedef enum {
	REPEAT_NONE = 0,
	REPEAT_SINGLE = 1,
	REPEAT_ALL = 2
} DACPRepeatState;


enum DACPPlayState

typedef enum {
	PLAY_STOPPED = 2,
	PLAY_PAUSED = 3,
	PLAY_PLAYING = 4
} DACPPlayState;


dacp_player_get_type ()

GType               dacp_player_get_type                (void);

Returns :


dacp_player_now_playing_record ()

DAAPRecord *        dacp_player_now_playing_record      (DACPPlayer *player);

player :

a player

Returns :


dacp_player_now_playing_artwork ()

const guchar *      dacp_player_now_playing_artwork     (DACPPlayer *player,
                                                         guint width,
                                                         guint height);

player :

a player

width :

width

height :

height

Returns :


dacp_player_play_pause ()

void                dacp_player_play_pause              (DACPPlayer *player);

player :

a player

dacp_player_pause ()

void                dacp_player_pause                   (DACPPlayer *player);

player :

a player

dacp_player_next_item ()

void                dacp_player_next_item               (DACPPlayer *player);

player :

a player

dacp_player_prev_item ()

void                dacp_player_prev_item               (DACPPlayer *player);

player :


dacp_player_cue_clear ()

void                dacp_player_cue_clear               (DACPPlayer *player);

player :

a player

dacp_player_cue_play ()

void                dacp_player_cue_play                (DACPPlayer *player,
                                                         GList *records,
                                                         guint index);

player :

a player

records :

a list of records

index :

an index

Property Details

The "play-state" property

  "play-state"               DACPPlayState         : Read / Write

Play state.

Default value: PLAY_STOPPED


The "playing-time" property

  "playing-time"             gulong                : Read / Write

Playing time (ms).


The "repeat-state" property

  "repeat-state"             DACPRepeatState       : Read / Write

Repeat state.

Default value: REPEAT_NONE


The "shuffle-state" property

  "shuffle-state"            gboolean              : Read / Write

Shufle state.

Default value: FALSE


The "volume" property

  "volume"                   gulong                : Read / Write

Volume.

Allowed values: <= 100