mme_trksession_append_files()

Append tracks or a stream to a file-based track session

Synopsis:

#include <mme/mme.h>

int mme_trksession_append_files( mme_hdl_t *hdl,
                                 uint64_t trksessionid,
                                 int nfiles,
                                 uint64_t *msid,
                                 const char **filename );

Arguments:

hdl
An MME connection handle.
trksessionid
The ID of the track session to update.
nfiles
The number of files to append to the track session.
msid
A pointer to an array filled with the same msid (mediastore ID); this msid must be the msid of the FTYPE_DEVICE fid (file ID ) that was used to create the track session.
filename
A pointer to an array of strings. The content of these strings depends on the mediastore type associated with the pointer. See The filename array below.

Library:

mme

Description:

The function mme_trksession_append_files() appends files (or streams) to an existing file-based track session. It can be used to add to a track session tracks of interest discovered through the explorer API, subject to the following conditions:

When mme_trksession_append_files() successfully appends a file, files or a stream to a track session it delivers an MME_EVENT_TRKSESSIONVIEW_UPDATE event to indicate to the client application that the track session has changed.

The filename array

The strings in the array referred to by filename can be filenames of tracks to be played, URLs of streams to be played, or strings appropriate for other types of media.

The formats of the strings in the array referred to by filename are dependent on the types of mediastore referred to in the msid array. Thus, for example, if an msid in the msid array is of type internet stream, then the string at the same position in the filename array must be a full URL.

If filename points to an array of tracks, it includes the path to the file on the mediastore, but it does not include the mountpath to the mediastore. The path in filename must begin with a “/” (slash). For example: /songs_folder/album_folder/.


Note: The design that requires the repetition of the same mediastore ID throughout the array referenced by msid is implemented to facilitate the implementation of more advanced file append capabilities in the future.

Events

MME_EVENT_TRKSESSIONVIEW_UPDATE.

Blocking and validation

This function doesn't block.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_trksession_clear_files(), mme_trksession_get_info(), mme_trksession_resume_state(), mme_trksession_save_state(), mme_trksession_set_files()