YGetAudioCDTracks(3)
NAME
YGetAudioCDTracks - Audio CD tracks list retrieving
SYNTAX
#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.
DESCRIPTION
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.
EXAMPLE
#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) - list = YGetAudioCDTracks(con, &count);
- /* Iterate through list here. */
- YFreeAudioCDTracksList(list, count);
- YCloseConnection(con, False);
- return(0);
- }