7 filter_remove = 1 << 1,
8 filter_reorder = 1 << 2,
9 filter_replace = 1 << 3,
10 filter_rename = 1 << 4,
11 filter_remove_playlist = 1 << 5,
12 filter_default_action = 1 << 6,
25 virtual bool query_items_reorder(
const t_size * p_order,
t_size p_count) = 0;
30 virtual bool query_items_remove(
const bit_array & p_mask,
bool p_force) = 0;
41 virtual bool query_playlist_rename(
const char * p_new_name,
t_size p_new_name_len) = 0;
44 virtual bool query_playlist_remove() = 0;
47 virtual bool execute_default_action(
t_size p_item) = 0;
49 virtual void on_playlist_index_change(
t_size p_new_index) = 0;
51 virtual void on_playlist_remove() = 0;
55 virtual void show_ui() = 0;
57 virtual t_uint32 get_filter_mask() = 0;
86 virtual t_size get_playlist_count() = 0;
88 virtual t_size get_active_playlist() = 0;
90 virtual void set_active_playlist(
t_size p_index) = 0;
92 virtual t_size get_playing_playlist() = 0;
94 virtual void set_playing_playlist(
t_size p_index) = 0;
96 virtual bool remove_playlists(
const bit_array & p_mask) = 0;
102 virtual t_size create_playlist(
const char * p_name,
t_size p_name_length,
t_size p_index) = 0;
109 virtual t_size playlist_get_item_count(
t_size p_playlist) = 0;
113 virtual t_size playlist_get_focus_item(
t_size p_playlist) = 0;
118 virtual bool playlist_reorder_items(
t_size p_playlist,
const t_size * p_order,
t_size p_count) = 0;
125 virtual bool playlist_remove_items(
t_size p_playlist,
const bit_array & mask)=0;
129 virtual void playlist_set_focus_item(
t_size p_playlist,
t_size p_item) = 0;
133 virtual void playlist_ensure_visible(
t_size p_playlist,
t_size p_item) = 0;
138 virtual bool playlist_rename(
t_size p_index,
const char * p_name,
t_size p_name_length) = 0;
142 virtual void playlist_undo_backup(
t_size p_playlist) = 0;
145 virtual bool playlist_undo_restore(
t_size p_playlist) = 0;
148 virtual bool playlist_redo_restore(
t_size p_playlist) = 0;
150 virtual bool playlist_is_undo_available(
t_size p_playlist) = 0;
152 virtual bool playlist_is_redo_available(
t_size p_playlist) = 0;
169 virtual bool get_playing_item_location(
t_size * p_playlist,
t_size * p_index) = 0;
176 virtual bool playlist_sort_by_format(
t_size p_playlist,
const char * p_pattern,
bool p_sel_only) = 0;
185 virtual bool playlist_lock_is_present(
t_size p_playlist) = 0;
187 virtual bool playlist_lock_show_ui(
t_size p_playlist) = 0;
188 virtual t_uint32 playlist_lock_get_filter_mask(
t_size p_playlist) = 0;
192 virtual t_size playback_order_get_count() = 0;
196 virtual const char * playback_order_get_name(
t_size p_index) = 0;
199 virtual GUID playback_order_get_guid(
t_size p_index) = 0;
201 virtual t_size playback_order_get_active() = 0;
203 virtual void playback_order_set_active(
t_size p_index) = 0;
205 virtual void queue_remove_mask(
bit_array const & p_mask) = 0;
206 virtual void queue_add_item_playlist(
t_size p_playlist,
t_size p_item) = 0;
208 virtual t_size queue_get_count() = 0;
216 virtual void register_callback(
class playlist_callback * p_callback,
unsigned p_flags) = 0;
226 virtual void modify_callback(
class playlist_callback * p_callback,
unsigned p_flags) = 0;
231 virtual bool playlist_execute_default_action(
t_size p_playlist,
t_size p_item) = 0;
240 bool highlight_playing_item();
242 bool remove_playlist(
t_size p_playlist);
244 bool remove_playlist_switch(
t_size p_playlist);
247 bool playlist_is_item_selected(
t_size p_playlist,
t_size p_item);
257 bool playlist_move_selection(
t_size p_playlist,
int p_delta);
265 void playlist_clear(
t_size p_playlist);
267 void playlist_clear_selection(
t_size p_playlist);
268 void playlist_remove_selection(
t_size p_playlist,
bool p_crop =
false);
276 t_size activeplaylist_get_item_count();
278 t_size activeplaylist_get_focus_item();
282 bool activeplaylist_reorder_items(
const t_size * order,
t_size count);
283 void activeplaylist_set_selection(
const bit_array & affected,
const bit_array & status);
284 bool activeplaylist_remove_items(
const bit_array & mask);
286 void activeplaylist_set_focus_item(
t_size p_item);
288 void activeplaylist_ensure_visible(
t_size p_item);
289 bool activeplaylist_rename(
const char * p_name,
t_size p_name_len);
291 void activeplaylist_undo_backup();
292 bool activeplaylist_undo_restore();
293 bool activeplaylist_redo_restore();
295 bool activeplaylist_is_item_selected(
t_size p_item);
298 void activeplaylist_move_selection(
int p_delta);
303 void activeplaylist_clear();
321 void reset_playing_playlist();
323 void activeplaylist_clear_selection();
324 void activeplaylist_remove_selection(
bool p_crop =
false);
328 void playlist_set_selection_single(
t_size p_playlist,
t_size p_item,
bool p_state);
329 void activeplaylist_set_selection_single(
t_size p_item,
bool p_state);
332 t_size activeplaylist_get_selection_count(
t_size p_max);
337 t_size find_playlist(
const char * p_name,
t_size p_name_length = ~0);
338 t_size find_or_create_playlist(
const char * p_name,
t_size p_name_length = ~0);
339 t_size find_or_create_playlist_unlocked(
const char * p_name,
t_size p_name_length = ~0);
343 bool activeplaylist_sort_by_format(
const char * spec,
bool p_sel_only);
345 t_uint32 activeplaylist_lock_get_filter_mask();
346 bool activeplaylist_is_undo_available();
347 bool activeplaylist_is_redo_available();
349 bool activeplaylist_execute_default_action(
t_size p_item);
353 void active_playlist_fix();
357 void playlist_activate_delta(
int p_delta);
371 static void g_make_selection_move_permutation(
t_size * p_output,
t_size p_count,
const bit_array & p_selection,
int p_delta);
400 virtual bool playlist_have_property(
t_size p_playlist,
const GUID & p_property) = 0;
405 virtual bool playlist_remove_property(
t_size p_playlist,
const GUID & p_property) = 0;
422 virtual bool playlist_have_runtime_property(
t_size p_playlist,
const GUID & p_property) = 0;
427 virtual bool playlist_remove_runtime_property(
t_size p_playlist,
const GUID & p_property) = 0;
434 PFC_STATIC_ASSERT(
sizeof(p_data[0]) == 1 );
443 PFC_STATIC_ASSERT(
sizeof(p_data[0]) == 1 );
457 if (!playlist_get_runtime_property(p_playlist,p_property,ptr))
return false;
458 return ptr->service_query_t(p_data);
465 template<
typename _t_
int>
469 playlist_set_property(p_playlist,p_property,temp);
476 template<
typename _t_
int>
479 if (!playlist_get_property(p_playlist,p_property,temp))
return false;
480 if (temp.
get_size() !=
sizeof(_t_int))
return false;
492 virtual t_size recycler_get_count() = 0;
496 virtual void recycler_purge(
const bit_array & mask) = 0;
497 virtual void recycler_restore(
t_size which) = 0;
499 void recycler_restore_by_id(
t_uint32 id);
515 virtual void on_items_reordered(
t_size p_playlist,
const t_size * p_order,
t_size p_count)=0;
518 virtual void on_items_selection_change(
t_size p_playlist,
const bit_array & p_affected,
const bit_array & p_state) = 0;
521 virtual void on_items_modified(
t_size p_playlist,
const bit_array & p_mask)=0;
532 virtual void on_item_ensure_visible(
t_size p_playlist,
t_size p_idx)=0;
534 virtual void on_playlist_activate(
t_size p_old,
t_size p_new) = 0;
535 virtual void on_playlist_created(
t_size p_index,
const char * p_name,
t_size p_name_len) = 0;
536 virtual void on_playlists_reorder(
const t_size * p_order,
t_size p_count) = 0;
537 virtual void on_playlists_removing(
const bit_array & p_mask,
t_size p_old_count,
t_size p_new_count) = 0;
538 virtual void on_playlists_removed(
const bit_array & p_mask,
t_size p_old_count,
t_size p_new_count) = 0;
539 virtual void on_playlist_renamed(
t_size p_index,
const char * p_new_name,
t_size p_new_name_len) = 0;
541 virtual void on_default_format_changed() = 0;
542 virtual void on_playback_order_changed(
t_size p_new_index) = 0;
543 virtual void on_playlist_locked(
t_size p_playlist,
bool p_locked) = 0;
546 flag_on_items_added = 1 << 0,
547 flag_on_items_reordered = 1 << 1,
548 flag_on_items_removing = 1 << 2,
549 flag_on_items_removed = 1 << 3,
550 flag_on_items_selection_change = 1 << 4,
551 flag_on_item_focus_change = 1 << 5,
552 flag_on_items_modified = 1 << 6,
553 flag_on_items_modified_fromplayback = 1 << 7,
554 flag_on_items_replaced = 1 << 8,
555 flag_on_item_ensure_visible = 1 << 9,
556 flag_on_playlist_activate = 1 << 10,
557 flag_on_playlist_created = 1 << 11,
558 flag_on_playlists_reorder = 1 << 12,
559 flag_on_playlists_removing = 1 << 13,
560 flag_on_playlists_removed = 1 << 14,
561 flag_on_playlist_renamed = 1 << 15,
562 flag_on_default_format_changed = 1 << 16,
563 flag_on_playback_order_changed = 1 << 17,
564 flag_on_playlist_locked = 1 << 18,
567 flag_item_ops = flag_on_items_added | flag_on_items_reordered | flag_on_items_removing | flag_on_items_removed | flag_on_items_selection_change | flag_on_item_focus_change | flag_on_items_modified | flag_on_items_modified_fromplayback | flag_on_items_replaced | flag_on_item_ensure_visible,
568 flag_playlist_ops = flag_on_playlist_activate | flag_on_playlist_created | flag_on_playlists_reorder | flag_on_playlists_removing | flag_on_playlists_removed | flag_on_playlist_renamed | flag_on_playlist_locked,
578 virtual unsigned get_flags() = 0;
587 virtual void on_items_reordered(
const t_size * p_order,
t_size p_count)=0;
590 virtual void on_items_selection_change(
const bit_array & p_affected,
const bit_array & p_state) = 0;
591 virtual void on_item_focus_change(
t_size p_from,
t_size p_to)=0;
592 virtual void on_items_modified(
const bit_array & p_mask)=0;
595 virtual void on_item_ensure_visible(
t_size p_idx)=0;
597 virtual void on_playlist_switch() = 0;
598 virtual void on_playlist_renamed(
const char * p_new_name,
t_size p_new_name_len) = 0;
599 virtual void on_playlist_locked(
bool p_locked) = 0;
601 virtual void on_default_format_changed() = 0;
602 virtual void on_playback_order_changed(
t_size p_new_index) = 0;
605 flag_on_items_added = 1 << 0,
606 flag_on_items_reordered = 1 << 1,
607 flag_on_items_removing = 1 << 2,
608 flag_on_items_removed = 1 << 3,
609 flag_on_items_selection_change = 1 << 4,
610 flag_on_item_focus_change = 1 << 5,
611 flag_on_items_modified = 1 << 6,
612 flag_on_items_modified_fromplayback = 1 << 7,
613 flag_on_items_replaced = 1 << 8,
614 flag_on_item_ensure_visible = 1 << 9,
615 flag_on_playlist_switch = 1 << 10,
616 flag_on_playlist_renamed = 1 << 11,
617 flag_on_playlist_locked = 1 << 12,
618 flag_on_default_format_changed = 1 << 13,
619 flag_on_playback_order_changed = 1 << 14,
704 virtual unsigned get_flags() = 0;
744 virtual bool process_dropped_files_check(interface
IDataObject * pDataObject) = 0;
747 virtual bool process_dropped_files_check_if_native(interface
IDataObject * pDataObject) = 0;
754 virtual bool process_dropped_files_check_ex(interface
IDataObject * pDataObject, DWORD * p_effect) = 0;
775 virtual void on_aborted() = 0;
787 op_flag_no_filter = 1 << 0,
789 op_flag_background = 1 << 1,
791 op_flag_delay_ui = 1 << 2,
831 m_handles = p_handles;
866 const t_size active = api->get_active_playlist();
867 if (active == ~0)
return false;
868 return (api->playlist_lock_get_filter_mask(active) & what) == 0;
void playlist_activate_next()
void on_items_removing(t_size p_playlist, const bit_array &p_mask, t_size p_old_count, t_size p_new_count)
dropped_files_data_impl()
metadb_handle_ptr m_handle
playlist_callback_single()
~playlist_callback_single_impl_base()
const t_item * get_ptr() const
void reorder(reorder_callback &p_callback, const t_size *p_order, t_size p_count)
void on_playlist_locked(t_size p_playlist, bool p_locked)
This interface allows filtering of playlist modification operations. Implemented by components "locki...
void on_items_modified_fromplayback(const bit_array &p_mask, play_control::t_display_level p_level)
void encode_little_endian(t_uint8 *p_buffer, TInt p_value)
metadb_handle_list m_handles
virtual void on_lock_state_change()
playlist_callback_single implementation helper - registers itself on creation / unregisters on destru...
void on_items_modified(const bit_array &p_mask)
void on_playlist_renamed(const char *p_new_name, t_size p_new_name_len)
abort_callback_impl abort_callback_dummy
bool queue_is_active()
Helper; returns whether there are items in the playback queue.
Bit array interface class, constant version (you can only retrieve values). Range of valid indexes d...
bool playlist_get_runtime_property(t_size p_playlist, const GUID &p_property, service_ptr_t< _t_interface > &p_data)
Read a runtime playlist property.
void playlist_set_property(t_size p_playlist, const GUID &p_property, const t_array &p_data)
Write a persistent playlist property.
void on_playlists_removing(const bit_array &p_mask, t_size p_old_count, t_size p_new_count)
void set_handles(const pfc::list_base_const_t< metadb_handle_ptr > &p_handles)
void on_playlists_reorder(const t_size *p_order, t_size p_count)
void set_paths(pfc::string_list_const const &p_paths)
void on_item_ensure_visible(t_size p_playlist, t_size p_idx)
playlist_callback implementation helper - registers itself on creation / unregisters on destruction...
void decode_little_endian(TInt &p_out, const t_uint8 *p_buffer)
void on_default_format_changed()
void queue_flush()
Helper; removes all items from the playback queue.
Class used for async processing of IDataObject. Content of IDataObject can be dumped into dropped_fil...
void on_playlist_created(t_size p_index, const char *p_name, t_size p_name_len)
void on_items_added(t_size p_playlist, t_size p_start, const pfc::list_base_const_t< metadb_handle_ptr > &p_data, const bit_array &p_selection)
~playlist_callback_impl_base()
bool playlist_get_property_int(t_size p_playlist, const GUID &p_property, _t_int &p_value)
Read a persistent playlist property.
playlist_lock_change_notify()
void on_items_added(t_size p_base, const pfc::list_base_const_t< metadb_handle_ptr > &p_data, const bit_array &p_selection)
playlist_callback_impl_base(t_uint32 p_flags=0)
void on_items_replaced(t_size p_playlist, const bit_array &p_mask, const pfc::list_base_const_t< t_on_items_replaced_entry > &p_data)
void on_items_reordered(t_size p_playlist, const t_size *p_order, t_size p_count)
bool playlist_get_property(t_size p_playlist, const GUID &p_property, t_array &p_data)
Read a persistent playlist property.
void on_items_modified(t_size p_playlist, const bit_array &p_mask)
void on_items_removed(t_size p_playlist, const bit_array &p_mask, t_size p_old_count, t_size p_new_count)
void on_items_replaced(const bit_array &p_mask, const pfc::list_base_const_t< playlist_callback::t_on_items_replaced_entry > &p_data)
void on_playlist_activate(t_size p_old, t_size p_new)
void set_size(t_size p_size)
This service provides methods for all sorts of playlist interaction. All playlist_manager methods are...
void on_items_selection_change(const bit_array &p_affected, const bit_array &p_state)
void set_callback_flags(t_uint32 p_flags)
void on_items_removed(const bit_array &p_mask, t_size p_old_count, t_size p_new_count)
void playlist_set_property_int(t_size p_playlist, const GUID &p_property, _t_int p_value)
Write a persistent playlist property.
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
Implementation of dropped_files_data.
Extension of the playlist_manager service that manages playlist properties. Playlist properties come ...
Bit array interface class, variable version (you can both set and retrieve values). As with the constant version, valid index range depends on the context.
void on_playlist_renamed(t_size p_index, const char *p_new_name, t_size p_new_name_len)
void on_items_removing(const bit_array &p_mask, t_size p_old_count, t_size p_new_count)
void on_playlist_locked(bool p_locked)
bool operator==(const replaygain_info &item1, const replaygain_info &item2)
void on_playlists_removed(const bit_array &p_mask, t_size p_old_count, t_size p_new_count)
t_display_level
Type used to indicate level of dynamic playback-related info displayed. Safe to use with <> opereator...
playlist_callback_single_impl_base(t_uint32 p_flags=0)
void on_playback_order_changed(t_size p_new_index)
~playlist_callback_single()
Callback interface for playlist enumeration methods.
t_size activeplaylist_get_selected_count(bit_array const &p_mask)
void on_items_modified_fromplayback(t_size p_playlist, const bit_array &p_mask, play_control::t_display_level p_level)
void set_callback_flags(t_uint32 p_flags)
void playlist_activate_previous()
void on_item_focus_change(t_size p_from, t_size p_to)
void on_default_format_changed()
bool operator!=(const replaygain_info &item1, const replaygain_info &item2)
void on_playlist_switch()
void on_playlist_switch()
void on_items_selection_change(t_size p_playlist, const bit_array &p_affected, const bit_array &p_state)
void on_item_focus_change(t_size p_playlist, t_size p_from, t_size p_to)
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
bool is_playlist_command_available(t_uint32 what) const
void on_item_ensure_visible(t_size p_idx)
pfc::string_list_impl m_paths
void on_playlist_locked(bool p_locked)
For use with playlist_incoming_item_filter_v2::process_locations_async().
void on_playback_order_changed(t_size p_new_index)
service_ptr_t< process_locations_notify > process_locations_notify_ptr
void on_items_reordered(const t_size *p_order, t_size p_count)