#include <ipod.h>
Public Member Functions | |
IPod (const QString &ipodBase) | |
Constructs a new IPod instance for an iPod at the given path. Does not actually read the contents - you need to open it with open() . | |
virtual | ~IPod () |
The destructor. | |
bool | open () |
Tries to open an ipod. | |
void | initialize (const QString &title) |
Initializes this ipod by creating the nessessary directories and files. | |
bool | isOpen () |
Returns true if open() was called successfully for this instance. | |
bool | isStillConnected () |
Returns true if the ipod represented by this instance is still connected to the system. | |
void | close () |
Clears all data we got from this instance whether or not it was changed. | |
QString | getName () const |
Returns the name of the iPod. | |
void | setName (const QString &name) |
Sets the name of the iPod. | |
const QString & | getItunesDBError () const |
Returns the error occured during read or write. | |
const IPodSysInfo & | getSysInfo () const |
Returns the IPodSysInfo for this IPod instance (const). | |
IPodSysInfo & | getSysInfo () |
Returns the IPodSysInfo for this IPod instance. | |
const ITunesDB & | getITunesDB () const |
Returns the ITunesDB for this iPod (const). | |
ITunesDB & | getITunesDB () |
Returns the ITunesDB for this iPod. | |
void | synchronize () |
Writes back all the changed data to the device. | |
bool | isDirty () const |
Returns true if this instances data differ somehow from the original. | |
void | lock (bool write_lock) |
Lock control functions to prevent concurrent access to the iPod from different programs. | |
bool | isLocked () |
Returns true if the iPod got locked. | |
void | unlock () |
unlock an iPod previously locked | |
const QString & | getBasePath () const |
Returns the base path of the iPod. | |
bool | hasPodcasts () |
QStringList & | findUnreferencedMusicFiles (QStringList &list) const |
Finds all the files in the Music folders that don't have a track record. | |
Static Public Member Functions | |
static QString | createDistinctIPodName (const IPod &ipod) __attribute__((deprecated)) |
Protected Attributes | |
QString | m_ipodBase |
IPod::IPod | ( | const QString & | ipodBase | ) |
IPod::~IPod | ( | ) | [virtual] |
The destructor.
bool IPod::open | ( | ) |
Tries to open an ipod.
That means reading all important information from the device.
void IPod::initialize | ( | const QString & | title | ) |
bool IPod::isOpen | ( | ) |
bool IPod::isStillConnected | ( | ) |
Returns true if the ipod represented by this instance is still connected to the system.
void IPod::close | ( | ) |
Clears all data we got from this instance whether or not it was changed.
Resets the state of this instance.
QString IPod::getName | ( | ) | const |
Returns the name of the iPod.
void IPod::setName | ( | const QString & | name | ) |
Sets the name of the iPod.
When the iPod is not opened (isOpen() == false) nothing is changed
name | the new name for the iPod |
const QString & IPod::getItunesDBError | ( | ) | const |
Returns the error occured during read or write.
const IPodSysInfo & IPod::getSysInfo | ( | ) | const |
Returns the IPodSysInfo for this IPod instance (const).
IPodSysInfo & IPod::getSysInfo | ( | ) |
const ITunesDB & IPod::getITunesDB | ( | ) | const |
Returns the ITunesDB for this iPod (const).
ITunesDB & IPod::getITunesDB | ( | ) |
void IPod::synchronize | ( | ) |
Writes back all the changed data to the device.
This only includes control structures like the iTunesDB and DeviceInfo data.
bool IPod::isDirty | ( | ) | const [inline] |
Returns true if this instances data differ somehow from the original.
data from the iPod and need to be synchronized.
void IPod::lock | ( | bool | write_lock | ) |
Lock control functions to prevent concurrent access to the iPod from different programs.
locks the iPod
write_lock | if true the ipod will be locked exclusively |
bool IPod::isLocked | ( | ) |
Returns true if the iPod got locked.
void IPod::unlock | ( | ) |
unlock an iPod previously locked
const QString& IPod::getBasePath | ( | ) | const [inline] |
Returns the base path of the iPod.
(i.e. "/media/ipod" on linux or "E:" on a windows machine)
QString IPod::createDistinctIPodName | ( | const IPod & | ipod | ) | [static] |
This method creates a string containing the ipod base path encoded being distinct between different iPods simultanously connected to the system. Most users wont need this method - it's here as a relict from the old ipodslave code and may go away in the future
QStringList & IPod::findUnreferencedMusicFiles | ( | QStringList & | list | ) | const |
Finds all the files in the Music folders that don't have a track record.
The fully qualified pathes will be added to the given list.
list | the list to add the unreferences files to |