ipoddevicedetails.h

00001  /*****************************************************************************
00002  *   Copyright (C) 2004 by Andrew de Quincey                                  *
00003  *   adq@lidskialf.net                                                        *
00004  *   Copyright (C) 2005 by Michael Schulze                                    *
00005  *   mike.s@genion.de                                                         *
00006  *                                                                            *
00007  *  The code contained in this file is free software; you can redistribute    *
00008  *  it and/or modify it under the terms of the GNU Lesser General Public      *
00009  *  License as published by the Free Software Foundation; either version      *
00010  *  2.1 of the License, or (at your option) any later version.                *
00011  *                                                                            *
00012  *  This file is distributed in the hope that it will be useful,              *
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00015  *  Lesser General Public License for more details.                           *
00016  *                                                                            *
00017  *  You should have received a copy of the GNU Lesser General Public          *
00018  *  License along with this code; if not, write to the Free Software          *
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *
00020  *                                                                            *
00021  *  iTunes and iPod are trademarks of Apple                                   *
00022  *                                                                            *
00023  *  This product is not supported/written/published by Apple!                 *
00024  *****************************************************************************/
00025 
00026 #ifndef IPODDEVICEDETAILS_H
00027 #define IPODDEVICEDETAILS_H
00028 
00029 #include <qstring.h>
00030 #include <qstringlist.h>
00031 #include <qfile.h>
00032 
00033 /**
00034  * Class encapsulating the DeviceDetails (name, owner, comment).
00035  * @author Andrew de Quincey
00036  */
00037 class IPodDeviceDetails {
00038 public:
00039     IPodDeviceDetails(const QString& filename);
00040     ~IPodDeviceDetails();
00041     bool load();
00042     bool save();
00043     void clear();
00044 
00045     /**
00046      * Accessor for name property.
00047      *
00048      * @return The value.
00049      */
00050     const QString& getName() const;
00051 
00052     /**
00053      * Accessor for owner property.
00054      *
00055      * @return The name.
00056      */
00057     const QString& getOwner() const;
00058 
00059     /**
00060      * Accessor for comment property.
00061      *
00062      * @return The comment.
00063      */
00064     const QString& getComment() const;
00065 
00066     /**
00067      * Setter for name property.
00068      *
00069      * @param name The value.
00070      */
00071     void setName(const QString& name);
00072 
00073     /**
00074      * Setter for owner property.
00075      *
00076      * @param owner The name of the owner.
00077      */
00078     void setOwner(const QString& owner);
00079 
00080     /**
00081      * Setter for comment property.
00082      *
00083      * @param comment The comment.
00084      */
00085     void setComment(const QString& comment);
00086 
00087 private:
00088     // QString readDeviceInfoString(QFile& file, int position);
00089     QStringList readDeviceInfos( QFile& file );
00090     QString filename;
00091 
00092     QString name;
00093     QString owner;
00094     QString comment;
00095 
00096     bool dirty;
00097 };
00098 
00099 #endif

Generated on Wed Nov 28 03:04:37 2007 for libqtpod by  doxygen 1.5.0