Main Page | Class List | File List | Class Members | File Members

IPodPlaylist Class Reference

A class representing a playlist on the iPod. More...

#include <ipod_cpp.h>

List of all members.

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


Detailed Description

A class representing a playlist on the iPod.


Constructor & Destructor Documentation

IPodPlaylist::IPodPlaylist IPod ipod  ) 
 

Constructor, creates a new empty playlist on the iPod.

Parameters:
ipod the iPod on which to create the playlist


Member Function Documentation

uint32_t IPodPlaylist::GetAttribute int  tag  ) 
 

Return a numerical attribute for the playlist.

Parameters:
tag an identifier for the attribute to be retrieved
Returns:
the current value for the attribute
  cout << "Playlist is " << (playlist.GetAttribute(IPOD_PLAYLIST_HIDDEN)?"hidden":"visible") << endl;

std::string IPodPlaylist::GetText int  tag  ) 
 

Retrieves a text attribute from the playlist.

Parameters:
tag an identifier for the string to be retrieved, only IPOD_TITLE currently supported
Returns:
the text of the string in the current encoding
   cout << "Playlist name is " << playlist.GetText(IPOD_TITLE) << endl;

bool IPodPlaylist::HasText int  tag  ) 
 

Indicates whether the playlist currently has a particular string.

Parameters:
tag an identifier for the string being queried, true only for IPOD_TITLE
Returns:
a boolean indicating whether or not the string item exists in the playlist

void IPodPlaylist::SetAttribute int  tag,
uint32_t  value
 

Set the value of an attribute for the playlist.

Parameters:
tag an identifier for the attribute to be modified
value the new value for the attribute
   playlist.SetAttribute(IPOD_PLAYLIST_HIDDEN,1);

void IPodPlaylist::SetText int  tag,
std::string  s
 

Sets a text attribute for the playlist.

Parameters:
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);

IPodTrackItem IPodPlaylist::TrackItemByIndex unsigned long  index  ) 
 

Return an object encapsulating a track item.

Parameters:
index the index of the track item to be retrieved
Returns:
an object encapsulating a track item

unsigned long IPodPlaylist::TrackItemCount void   ) 
 

Return the number of track items in this playlist.

Returns:
the number of track items in the playlist


The documentation for this class was generated from the following file:
Generated on Tue Dec 13 14:55:22 2005 for libipod by  doxygen 1.3.9.1