#include <playlist.h>
This interface allows filtering of playlist modification operations.
Implemented by components "locking" playlists; use playlist_manager::playlist_lock_install() etc to takeover specific playlist with your instance of playlist_lock.
Definition at line 3 of file playlist.h.
Enumerator |
---|
filter_add |
|
filter_remove |
|
filter_reorder |
|
filter_replace |
|
filter_rename |
|
filter_remove_playlist |
|
filter_default_action |
|
Definition at line 5 of file playlist.h.
virtual bool playlist_lock::execute_default_action |
( |
t_size |
p_item | ) |
|
|
pure virtual |
Executes "default action" (doubleclick etc) for specified playlist item. When the playlist is not locked, default action starts playback of the item.
- Returns
- True if custom default action was executed, false to fall-through to default one for non-locked playlists (start playback).
virtual t_uint32 playlist_lock::get_filter_mask |
( |
| ) |
|
|
pure virtual |
Queries which actions the lock filters. The return value must not change while the lock is registered with playlist_manager. The return value is a combination of one or more filter_* constants.
Retrieves human-readable name of playlist lock to display.
virtual void playlist_lock::on_playlist_index_change |
( |
t_size |
p_new_index | ) |
|
|
pure virtual |
Notifies lock about changed index of the playlist, in result of user reordering playlists or removing other playlists.
virtual void playlist_lock::on_playlist_remove |
( |
| ) |
|
|
pure virtual |
Notifies lock about the locked playlist getting removed.
Queries whether specified item replacement operation is allowed in the locked playlist.
- Parameters
-
p_index | Index of the item being replaced. |
p_old | Old value of the item being replaced. |
p_new | New value of the item being replaced. |
- Returns
- True to allow the operation, false to block it.
Queries whether specified item insertiion operation is allowed in the locked playlist.
- Parameters
-
p_base | Index from which the items are being inserted. |
p_data | Items being inserted. |
p_selection | Caller-requested selection state of items being inserted. |
- Returns
- True to allow the operation, false to block it.
virtual bool playlist_lock::query_items_remove |
( |
const bit_array & |
p_mask, |
|
|
bool |
p_force |
|
) |
| |
|
pure virtual |
Queries whether specified item removal operation is allowed in the locked playlist.
- Parameters
-
p_mask | Specifies which items from locked playlist are being removed. |
p_force | If set to true, the call is made only for notification purpose and items are getting removed regardless (after e.g. they have been physically removed). |
- Returns
- True to allow the operation, false to block it. Note that return value is ignored if p_force is set to true.
virtual bool playlist_lock::query_items_reorder |
( |
const t_size * |
p_order, |
|
|
t_size |
p_count |
|
) |
| |
|
pure virtual |
Queries whether specified item reorder operation is allowed in the locked playlist.
- Parameters
-
p_order | Pointer to array containing permutation defining requested reorder operation. |
p_count | Number of items in array pointed to by p_order. This should always be equal to number of items on the locked playlist. |
- Returns
- True to allow the operation, false to block it.
virtual bool playlist_lock::query_playlist_remove |
( |
| ) |
|
|
pure virtual |
Queries whether removal of the locked playlist is allowed. Note that the lock will be released when the playlist is removed.
- Returns
- True to allow the operation, false to block it.
virtual bool playlist_lock::query_playlist_rename |
( |
const char * |
p_new_name, |
|
|
t_size |
p_new_name_len |
|
) |
| |
|
pure virtual |
Queries whether renaming the locked playlist is allowed.
- Parameters
-
p_new_name | Requested new name of the playlist; a UTF-8 encoded string. |
p_new_name_len | Length limit of the name string, in bytes (actual string may be shorter if null terminator is encountered before). Set this to infinite to use plain null-terminated strings. |
- Returns
- True to allow the operation, false to block it.
virtual void playlist_lock::show_ui |
( |
| ) |
|
|
pure virtual |
Requests user interface of component controlling the playlist lock to be shown.
The documentation for this class was generated from the following file: