YGetAudioCDTracks(3)

YGetAudioCDTracks3

Audio cd tracks list retrieving

Usage

#include <Y2/Y.h>
#include <Y2/Ylib.h>

YAudioCDTrackStruct **YGetAudioCDTracks(

YConnection *connection,

int *count
)

Arguments

connection

Specifies the connection to the Y server, obtained by a call to YOpenConnection.

count

Specifies a pointer to an int that will indicate the number of dynamically allocated YAudioCDTrackStruct structures returned.

Overview

The YGetAudioCDTracks function fetches a list of audio CD track values from the Y server. If no audio CD is present then NULL is returned.

Return value

The YGetAudioCDTracks function returns a pointer to an array of pointers of YAudioCDTrackStruct structures. The returned pointer needs to be deallocated by calling YFreeAudioCDTracksList.

Can return NULL on error.

Examples

#include <stdio.h>
#include <Y2/Y.h>
#include <Y2/Ylib.h>

int main(int argc, char *argv[])
{

YAudioCDTrackStruct **list;

int count;

YConnection *con = YOpenConnection(

"/usr/sbin/starty",

"127.0.0.1:9433"

);

if(con == NULL)

return(1);

list = YGetAudioCDTracks(con, &count);

/* Iterate through list here. */

YFreeAudioCDTracksList(list, count);

YCloseConnection(con, False);

return(0);
}

Releases

Unchanged in 4 releases since Debian 3.1 (Sarge).

  1. 3.1–6.0

From liby-dev 2.14.5-7 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.