Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

package.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                              
00004                =.            Copyright (c)  2002 Andy Qua <andy.qua@blueyonder.co.uk>
00005              .=l.                                Dan Williams <drw@handhelds.org>
00006            .>+-=
00007  _;:,     .>    :=|.         This file is free software; you can
00008 .> <`_,   >  .   <=          redistribute it and/or modify it under
00009 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00010 .="- .-=="i,     .._         License as published by the Free Software
00011  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00012      ._= =}       :          or (at your option) any later version.
00013     .%`+i>       _;_.
00014     .i_,=:_.      -<s.       This file is distributed in the hope that
00015      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00016     : ..    .:,     . . .    without even the implied warranty of
00017     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00018   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00019 ..}^=.=       =       ;      Public License for more details.
00020 ++=   -.     .`     .:
00021  :     =  ...= . :.=-        You should have received a copy of the GNU
00022  -.   .:....=;==+<;          General Public License along with this file;
00023   -_. . .   )=.  =           see the file COPYING. If not, write to the
00024     --        :-=`           Free Software Foundation, Inc.,
00025                              59 Temple Place - Suite 330,
00026                              Boston, MA 02111-1307, USA.
00027 
00028 */
00029 
00030 #ifndef PACKAGE_H
00031 #define PACKAGE_H
00032 
00033 #include <stdlib.h>
00034 
00039 #include <qstring.h>
00040 #include "destination.h"
00041 
00042 class Package
00043 {
00044 public:
00045         Package( QString &name );
00046         Package( char *name );
00047         ~Package();
00048 
00049     void setLocalPackage( Package *p );
00050     void setPackageName( const QString &name );
00051     void setVersion( const QString &v );
00052     void setStatus( const QString &s );
00053     void setDescription( const QString &d );
00054     void setFilename( const QString &f );
00055         void setPackageStoredLocally( bool local )      { packageStoredLocally = local; }
00056     void setInstalledToRoot( bool root )        { installedToRoot = root; }
00057     void setInstalledTo( Destination *d )       { installedTo = d; }
00058     void setDependancies( QString &deps )       { dependancies = deps; }
00059     void setPackageSize( const QString &size )         { packageSize = size; }
00060     void setSection( const QString &sect)              { section = sect; }
00061 
00062     Package *getLocalPackage()       { return localPackage; }
00063     QString getPackageName()         { return packageName; }
00064     QString getVersion()             { return version; }
00065     QString getStatus()              { return status; }
00066     QString getDescription()         { return description; }
00067     QString getFilename()            { return filename; }
00068     QString getDependancies()        { return dependancies; }
00069     QString getPackageSize()         { return packageSize; }
00070     QString getSection()             { return section; }
00071     bool    getNewVersionAvailable() { return differentVersionAvailable; }
00072 
00073     bool isInstalled();
00074         bool isPackageStoredLocally()   { return packageStoredLocally; }
00075     bool isInstalledToRoot()     { return installedToRoot; }
00076     QString getInstalledVersion();
00077     QString getInstalledPackageName();
00078     Destination *getInstalledTo()   { return installedTo; }
00079 
00080     QString toString();
00081 
00082 
00083 private:
00084     Package *localPackage;
00085 
00086     QString packageName;
00087     QString version;
00088     QString status;
00089     QString description;
00090     QString filename;
00091     bool packageStoredLocally;
00092     bool installedToRoot;
00093     bool installed;
00094     bool differentVersionAvailable;
00095     QString dependancies;
00096     QString packageSize;
00097     QString section;
00098 
00099     Destination *installedTo;
00100 };
00101 
00102 #endif

Generated on Sat Nov 5 16:17:47 2005 for OPIE by  doxygen 1.4.2