mme_playlist_delete()

Delete a specified playlist

Synopsis:

#include <mme/mme.h>

int mme_playlist_delete( mme_hdl_t *hdl,
                         uint64_t *plid );

Arguments:

hdl
An MME connection handle.
plid
The ID of the playlist to be deleted.

Library:

mme

Description:

The function mme_playlist_delete() deletes a playlist from the playlists table, and its data from the playlistdata table.

This function does not delete custom playlists in the playlistdata_custom table. Custom playlists must be deleted manually.

The following example provided in mme_connect.sql shows how to create triggers to delete entries from the playlistdata_custom table when the client application calls mme_playlist_delete() to delete a playlist:

CREATE TEMP TRIGGER playlistdata_custom_delete DELETE ON playlists
    BEGIN
        DELETE FROM playlistdata_custom WHERE plid=OLD.plid;
    END;

Events

None delivered.

Blocking and validation

This function runs to completion.

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_PLAYLIST_*, mme_playlist_close(), mme_playlist_create(), mme_playlist_generate_similar(), mme_playlist_hdl_t, mme_playlist_item_get(), mme_playlist_items_count_get(), mme_playlist_open(), mme_playlist_position_set(), mme_playlist_set_statement(), mme_playlist_sync()