public class MenuLoader extends Object
MetadataFinder, even though those are technically menu operations.| Modifier and Type | Method and Description |
|---|---|
static MenuLoader |
getInstance()
Get the singleton instance of this class.
|
List<Message> |
requestAlbumMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for an Album menu.
|
List<Message> |
requestAlbumTrackMenuFrom(SlotReference slotReference,
int sortOrder,
int albumId)
Ask the specified player for an Album Track menu.
|
List<Message> |
requestArtistAlbumMenuFrom(SlotReference slotReference,
int sortOrder,
int artistId)
Ask the specified player for an Artist Album menu.
|
List<Message> |
requestArtistAlbumTrackMenuFrom(SlotReference slotReference,
int sortOrder,
int artistId,
int albumId)
Ask the specified player for an Artist Album Tracks menu.
|
List<Message> |
requestArtistMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for an Artist menu.
|
List<Message> |
requestBpmMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a BPM menu.
|
List<Message> |
requestBpmRangeMenuFrom(SlotReference slotReference,
int sortOrder,
int bpm)
Ask the specified player for a tempo range menu for a given BPM.
|
List<Message> |
requestFolderMenuFrom(SlotReference slotReference,
int sortOrder,
int folderId)
Ask the specified player for a Folder menu for exploring its raw filesystem.
|
List<Message> |
requestGenreArtistAlbumMenuFrom(SlotReference slotReference,
int sortOrder,
int genreId,
int artistId)
Ask the specified player for a Genre Artist Albums menu.
|
List<Message> |
requestGenreArtistAlbumTrackMenuFrom(SlotReference slotReference,
int sortOrder,
int genreId,
int artistId,
int albumId)
Ask the specified player for a Genre Artist Album Tracks menu.
|
List<Message> |
requestGenreArtistMenuFrom(SlotReference slotReference,
int sortOrder,
int genreId)
Ask the specified player for a Genre Artists menu.
|
List<Message> |
requestGenreMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a Genre menu.
|
List<Message> |
requestHistoryMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a History menu.
|
List<Message> |
requestHistoryPlaylistFrom(SlotReference slotReference,
int sortOrder,
int historyId)
Ask the specified player a History playlist.
|
List<Message> |
requestKeyMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a Key menu.
|
List<Message> |
requestKeyNeighborMenuFrom(SlotReference slotReference,
int sortOrder,
int keyId)
Ask the specified player for a key neighbor menu for a given key.
|
List<Message> |
requestMoreSearchResultsFrom(int player,
CdjStatus.TrackSourceSlot slot,
int sortOrder,
String text,
int offset,
int count)
Ask the specified player for more database records whose names contain
text. |
List<Message> |
requestPlaylistMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a Playlist menu.
|
List<Message> |
requestRatingMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a Rating menu.
|
List<Message> |
requestRootMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for its top-level menu of menus.
|
List<Message> |
requestSearchResultsFrom(int player,
CdjStatus.TrackSourceSlot slot,
int sortOrder,
String text,
AtomicInteger count)
Ask the specified player for database records whose names contain
text. |
List<Message> |
requestTrackMenuFrom(SlotReference slotReference,
int sortOrder)
Ask the specified player for a Track menu.
|
List<Message> |
requestTracksByBpmRangeFrom(SlotReference slotReference,
int sortOrder,
int bpm,
int range)
Ask the specified player for tracks whose tempo falls within a specific percentage of a given BPM.
|
List<Message> |
requestTracksByKeyAndDistanceFrom(SlotReference slotReference,
int sortOrder,
int keyId,
int distance)
Ask the specified player for a track menu for an allowed distance from a given key.
|
List<Message> |
requestTracksByRatingFrom(SlotReference slotReference,
int sortOrder,
int rating)
Ask the specified player for a track menu for a given rating.
|
public List<Message> requestRootMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
MetadataFinder must be running for us to
know the right kind of message to send, because it depends on whether the slot holds a rekordbox database or not.
If we can't tell (because it's not running), we will just guess that there is one, and perhaps get back nothing.slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for details, although it does not seem to have an effect on the root menuException - if there is a problem obtaining the menupublic List<Message> requestPlaylistMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
MetadataFinder.requestPlaylistItemsFrom(int, CdjStatus.TrackSourceSlot, int, int, boolean) asking for
the playlist folder with ID 0, but it is also made available here since this is likely where people will be
looking for the capability. To get the contents of individual playlists or sub-folders, pass the playlist or
folder ID obtained by calling this to that function.slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menuMetadataFinder.requestPlaylistItemsFrom(int, CdjStatus.TrackSourceSlot, int, int, boolean)public List<Message> requestHistoryMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for details, although it does not seem to have an effect on the history menuException - if there is a problem obtaining the menupublic List<Message> requestHistoryPlaylistFrom(SlotReference slotReference, int sortOrder, int historyId) throws Exception
slotReference - the player and slot for which the playlist is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailshistoryId - identifies which history session's playlist is desiredException - if there is a problem obtaining the playlistpublic List<Message> requestTrackMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestArtistMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestArtistAlbumMenuFrom(SlotReference slotReference, int sortOrder, int artistId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsartistId - the artist whose album menu is desiredException - if there is a problem obtaining the menupublic List<Message> requestArtistAlbumTrackMenuFrom(SlotReference slotReference, int sortOrder, int artistId, int albumId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsartistId - the artist whose album track menu is desiredalbumId - the album whose track menu is desired, or -1 for all albumsException - if there is a problem obtaining the menupublic List<Message> requestAlbumTrackMenuFrom(SlotReference slotReference, int sortOrder, int albumId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsalbumId - the album whose track menu is desiredException - if there is a problem obtaining the menupublic List<Message> requestGenreMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestGenreArtistMenuFrom(SlotReference slotReference, int sortOrder, int genreId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsgenreId - the genre whose artist menu is desiredException - if there is a problem obtaining the menupublic List<Message> requestGenreArtistAlbumMenuFrom(SlotReference slotReference, int sortOrder, int genreId, int artistId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsgenreId - the genre whose artist album menu is desiredartistId - the artist whose album menu is desired, or -1 for all artistsException - if there is a problem obtaining the menupublic List<Message> requestGenreArtistAlbumTrackMenuFrom(SlotReference slotReference, int sortOrder, int genreId, int artistId, int albumId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsgenreId - the genre whose artist album track menu is desiredartistId - the artist whose album track menu is desired, or -1 for all artistsalbumId - the album whose track menu is desired, or -1 for all albumsException - if there is a problem obtaining the menupublic List<Message> requestAlbumMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestKeyMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestKeyNeighborMenuFrom(SlotReference slotReference, int sortOrder, int keyId) throws Exception
slotReference - the player and slot for which the menu is desiredkeyId - the key whose available compatible keys are desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestTracksByKeyAndDistanceFrom(SlotReference slotReference, int sortOrder, int keyId, int distance) throws Exception
slotReference - the player and slot for which the menu is desiredkeyId - the key whose compatible tracks are desireddistance - how far along the circle of fifths are the tracks allowed to be from the specified keysortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestBpmMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestBpmRangeMenuFrom(SlotReference slotReference, int sortOrder, int bpm) throws Exception
slotReference - the player and slot for which the menu is desiredbpm - the tempo whose nearby ranges are desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestTracksByBpmRangeFrom(SlotReference slotReference, int sortOrder, int bpm, int range) throws Exception
slotReference - the player and slot for which the menu is desiredbpm - the tempo that tracks must be close torange - the percentage by which the actual tempo may differ for a track to still be returnedsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestRatingMenuFrom(SlotReference slotReference, int sortOrder) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestTracksByRatingFrom(SlotReference slotReference, int sortOrder, int rating) throws Exception
slotReference - the player and slot for which the menu is desiredrating - the desired rating for tracks to be returnedsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsException - if there is a problem obtaining the menupublic List<Message> requestFolderMenuFrom(SlotReference slotReference, int sortOrder, int folderId) throws Exception
slotReference - the player and slot for which the menu is desiredsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for detailsfolderId - identifies the folder whose contents should be listed, use -1 to get the root folderException - if there is a problem obtaining the menupublic List<Message> requestSearchResultsFrom(int player, CdjStatus.TrackSourceSlot slot, int sortOrder, String text, AtomicInteger count) throws Exception
text. If count is not
null, no more than that many results will be returned, and the value will be set to the total number
of results that were available. Otherwise all results will be returned.player - the player number whose database is to be searchedslot - the slot in which the database can be foundsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for details, although it does not seem to have an effect on searches.text - the search text used to filter the resultscount - if present, sets an upper limit on the number of results to return, and will get set
to the actual number that were availableException - if there is a problem performing the searchpublic List<Message> requestMoreSearchResultsFrom(int player, CdjStatus.TrackSourceSlot slot, int sortOrder, String text, int offset, int count) throws Exception
text. This can be used after
calling requestSearchResultsFrom(int, CdjStatus.TrackSourceSlot, int, String, AtomicInteger) to obtain
a partial result and the total count available, to gradually expand the search under direction from the user.player - the player number whose database is to be searchedslot - the slot in which the database can be foundsortOrder - the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the
Packet Analysis
document for details, although it does not seem to have an effect on searches.text - the search text used to filter the resultsoffset - the first result desired (the first available result has offset 0)count - the number of results to return (if more than the number available, fewer will simply be returned)Exception - if there is a problem performing the searchpublic static MenuLoader getInstance()
Copyright © 2016–2018 Deep Symmetry, LLC. All rights reserved.