mme_playlist_item_get()

Get an entry from a playlist

Synopsis:

#include <mme/playlist.h>

int mme_playlist_item_get( mme_playlist_hdl_t *hdl,
                           uint32_t *flags,
                           char *buffer,
                           size_t length );

Arguments:

hdl
A playlist connection handle.
flags
A pointer to flags to control the operation. See Flags below.
buffer
A pointer to a buffer
length
The length of the buffer, in bytes; may be 0.

Library:

mme

Description:

The function mme_playlist_item_get() retrieves the playlist entry at the position specified by mme_playlist_position_set(), and places it in the buffer referenced by buffer.

Successful completion (return value≥0) of a call to mme_playlist_item_get() does not mean that the function successfully read in the playlist entry. If the returned value is great than the allocated buffer length (length), you must increase the buffer length to at least the returned value and call the function again to read in the entry. Alternately, you can call mme_playlist_item_get() with the length argument set to 0 to get the playlist entry length, set the buffer size to the returned value, then call the function again.

Flags

The flags argument is used both to:

MME_PLAYLIST_FLAGS_*

The MME_PLAYLIST_FLAGS_* constants identify the type of item that has been retreived by a call to mme_playlist_item_get().

Constant Value Description
MME_PLAYLIST_FLAGS_PLAYLIST_ENTRY 0x00000001 The item is an unconverted entry from a playlist.
MME_PLAYLIST_FLAGS_PLAYLIST_FILE 0x00000002 The item is a playlist entry that has been converted to a real file.

MME_PLAYLIST_RESOLVE_*

The MME_PLAYLIST_RESOLVE_* constants determine how to process a playlist item retrieved with mme_playlist_item_get().

Constant Value Description
MME_PLAYLIST_RESOLVE_PLAYLIST_ENTRY 0x00000001 Convert the entry to a real file before returning it.

Events

None delivered.

Blocking and validation

This function performs no validations, and runs to completion.

Returns:

>0
Success: the length of the playlist entry, in bytes, even if the buffer is too short for the entry.
0
Success, but the end of the playlist has been reached.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

MME_PLAYLIST_*, mme_playlist_close(), mme_playlist_create(), mme_playlist_delete(), mme_playlist_generate_similar(), mme_playlist_hdl_t, mme_playlist_items_count_get(), mme_playlist_open(), mme_playlist_position_set(), mme_playlist_set_statement(), mme_playlist_item_get()