#include <ipod_cpp.h>
Public Member Functions | |
IPodPlaylist (IPod &ipod) | |
Constructor, creates a new empty playlist on the iPod. | |
~IPodPlaylist () | |
Destructor, does not delete the playlist. | |
void | Remove (void) |
Removes the playlist from the iPod. | |
std::string | GetText (int tag) |
Retrieves a text attribute from the playlist. | |
void | SetText (int tag, std::string s) |
Sets a text attribute for the playlist. | |
bool | HasText (int tag) |
Indicates whether the playlist currently has a particular string. | |
uint32_t | GetAttribute (int tag) |
Return a numerical attribute for the playlist. | |
void | SetAttribute (int tag, uint32_t value) |
Set the value of an attribute for the playlist. | |
unsigned long | TrackItemCount (void) |
Return the number of track items in this playlist. | |
IPodTrackItem | TrackItemByIndex (unsigned long index) |
Return an object encapsulating a track item. | |
Friends | |
class | IPod |
class | IPodTrackItem |
IPodPlaylist::IPodPlaylist | ( | IPod & | ipod | ) |
Constructor, creates a new empty playlist on the iPod.
ipod | the iPod on which to create the playlist |
std::string IPodPlaylist::GetText | ( | int | tag | ) |
Retrieves a text attribute from the playlist.
tag | an identifier for the string to be retrieved, only IPOD_TITLE currently supported |
cout << "Playlist name is " << playlist.GetText(IPOD_TITLE) << endl;
void IPodPlaylist::SetText | ( | int | tag, | |
std::string | s | |||
) |
Sets a text attribute for the playlist.
tag | an identifier for the string to be modified or added, only IPOD_TITLE currently supported | |
s | the string to be assigned in the current encoding |
std:string title = "Favorites"; playlist.SetText(IPOD_TITLE,title);
bool IPodPlaylist::HasText | ( | int | tag | ) |
Indicates whether the playlist currently has a particular string.
tag | an identifier for the string being queried, true only for IPOD_TITLE |
uint32_t IPodPlaylist::GetAttribute | ( | int | tag | ) |
Return a numerical attribute for the playlist.
tag | an identifier for the attribute to be retrieved |
cout << "Playlist is " << (playlist.GetAttribute(IPOD_PLAYLIST_HIDDEN)?"hidden":"visible") << endl;
void IPodPlaylist::SetAttribute | ( | int | tag, | |
uint32_t | value | |||
) |
Set the value of an attribute for the playlist.
tag | an identifier for the attribute to be modified | |
value | the new value for the attribute |
playlist.SetAttribute(IPOD_PLAYLIST_HIDDEN,1);
unsigned long IPodPlaylist::TrackItemCount | ( | void | ) |
Return the number of track items in this playlist.
IPodTrackItem IPodPlaylist::TrackItemByIndex | ( | unsigned long | index | ) |
Return an object encapsulating a track item.
index | the index of the track item to be retrieved |