Package(QByteArray name_, AAptInterface* apt_);
~Package();
- void setName(QByteArray n_) { iName=n_; }
- void setMaemoDisplayName(QByteArray n_) { iMaemoDisplayName=n_; }
- void setInstalled(bool i_) { iIsInstalled=i_; }
+ inline void setName(QByteArray n_) { iName=n_; }
+ inline void setMaemoDisplayName(QByteArray n_) { iMaemoDisplayName=n_; }
+ inline void setInstalled(bool i_) { iIsInstalled=i_; }
void setMarkedForOperation(operation op_);
- void setVersion(QByteArray v_) { iVersion=v_; }
- void setDescShort(QByteArray d_) { iDescriptionShort=d_; }
- void appendDescLong(QByteArray d_) { iDescriptionLong.append(d_); }
- void setSection(QByteArray s_) { iSection=s_; }
- void setSize(int i_) { iSize=i_; }
- void setInstalledSize(int i_) { iInstalledSize=i_; }
- void appendIconData(QByteArray d_) { iIconData.append(d_); }
- void addFullFileName(QString f_) { iFullFileNames.append(f_); }
+ inline void setVersion(QByteArray v_) { iVersion=v_; }
+ inline void setDescShort(QByteArray d_) { iDescriptionShort=d_; }
+ inline void appendDescLong(QByteArray d_) { iDescriptionLong.append(d_); }
+ inline void setSection(QByteArray s_) { iSection=s_; }
+ inline void setSize(int i_) { iSize=i_; }
+ inline void setInstalledSize(int i_) { iInstalledSize=i_; }
+ inline void appendIconData(QByteArray d_) { iIconData.append(d_); }
+ inline void addFullFileName(QString f_) { iFullFileNames.append(f_); }
void updateStatus();
- void addRepository(Repository* r_) { iRepositories.append(r_); }
- void setDate(QDateTime d_) { iDate=d_; }
- void setBlacklisted(BlacklistSelect::blackList bl_) { iBlacklist=bl_; }
- void appendDepends(QByteArray line_);
- void appendConflicts(QByteArray line_);
- void appendPreDepends(QByteArray line_);
- void appendProvides(QByteArray line_);
- void appendReplaces(QByteArray line_);
- void appendBreaks(QByteArray line_);
- void appendRecommends(QByteArray line_);
- void appendSuggests(QByteArray line_);
- void appendUpgradeDescription(QByteArray d_) { iUpgradeDescription.append(d_); }
+ inline void addRepository(Repository* r_) { iRepositories.append(r_); }
+ inline void setDate(QDateTime d_) { iDate=d_; }
+ inline void setBlacklisted(BlacklistSelect::blackList bl_) { iBlacklist=bl_; }
+ inline void appendDepends(QByteArray line_) { iDepends << line_.split(','); }
+ inline void appendConflicts(QByteArray line_) { iConflicts << line_.split(','); }
+ inline void appendPreDepends(QByteArray line_) { iPreDepends << line_.split(','); }
+ inline void appendProvides(QByteArray line_) { iProvides << line_.split(','); }
+ inline void appendReplaces(QByteArray line_) { iReplaces << line_.split(','); }
+ inline void appendBreaks(QByteArray line_) { iBreaks << line_.split(','); }
+ inline void appendRecommends(QByteArray line_) { iRecommends << line_.split(','); }
+ inline void appendSuggests(QByteArray line_) { iSuggests << line_.split(','); }
+ inline void appendUpgradeDescription(QByteArray d_) { iUpgradeDescription.append(d_); }
void convertIcon();
- QString name() { return iName; }
- QString maemoDisplayName() { return QString::fromUtf8(iMaemoDisplayName); }
+ inline QString name() { return iName; }
+ inline QString maemoDisplayName() { return QString::fromUtf8(iMaemoDisplayName); }
QString displayName();
- bool isInstalled() { return iIsInstalled; }
- bool isMarkedForOperation() { return iMarkedForOperation; }
- operation markedOperation() { return iMarkedOperation; }
- QString version() { return iVersion; }
- QString descShort() { return QString::fromUtf8(iDescriptionShort); }
- QString descLong() { return QString::fromUtf8(iDescriptionLong); }
- QString section() { return iSection; }
- int size() { return iSize; }
- int installedSize() { return iInstalledSize; }
- QPixmap* icon() { return iIcon; }
+ inline bool isInstalled() { return iIsInstalled; }
+ inline bool isMarkedForOperation() { return iMarkedForOperation; }
+ inline operation markedOperation() { return iMarkedOperation; }
+ inline QString version() { return iVersion; }
+ inline QString descShort() { return QString::fromUtf8(iDescriptionShort); }
+ inline QString descLong() { return QString::fromUtf8(iDescriptionLong); }
+ inline QString section() { return iSection; }
+ inline int size() { return iSize; }
+ inline int installedSize() { return iInstalledSize; }
+ inline QPixmap* icon() { return iIcon; }
bool hasIconData();
bool isUpgradeable();
QString upgradeableVersion();
Package* availablePackage();
packageStatus status();
QString fileName();
- QStringList fullFileNames() { return iFullFileNames; }
- QDateTime date() { return iDate; }
- QList<Repository*> repositories() { return iRepositories; }
- BlacklistSelect::blackList blacklisted() { return iBlacklist; }
- bool isBlacklisted() { if(iBlacklist==BlacklistSelect::BlacklistNone) return false; else return true; }
- QStringList dependsRichText();
- QStringList conflictsRichText();
- QStringList preDependsRichText();
- QStringList providesRichText();
- QStringList replacesRichText();
- QStringList breaksRichText();
- QStringList recommendsRichText();
- QStringList suggestsRichText();
- QString upgradeDescription() { return QString::fromUtf8(iUpgradeDescription); }
+ inline QStringList fullFileNames() { return iFullFileNames; }
+ inline QDateTime date() { return iDate; }
+ inline QList<Repository*> repositories() { return iRepositories; }
+ inline BlacklistSelect::blackList blacklisted() { return iBlacklist; }
+ inline bool isBlacklisted() { if(iBlacklist==BlacklistSelect::BlacklistNone) return false; else return true; }
+ inline QString upgradeDescription() { return QString::fromUtf8(iUpgradeDescription); }
+ inline QList<QByteArray> depends() { return iDepends; }
+ inline QList<QByteArray> conflicts() { return iConflicts; }
+ inline QList<QByteArray> preDepends() { return iPreDepends; }
+ inline QList<QByteArray> provides() { return iProvides; }
+ inline QList<QByteArray> replaces() { return iReplaces; }
+ inline QList<QByteArray> breaks() { return iBreaks; }
+ inline QList<QByteArray> recommends() { return iRecommends; }
+ inline QList<QByteArray> suggests() { return iSuggests; }
+
+ QStringList checkConflicts_RichText();
static bool versionCompare(QString isNewer, QString compare);
+ static QStringList toTrimmedRichTextList(QList<QByteArray> list_in);
private:
+
+ static bool versionConflicts(QString conflictVer, QString operVer);
+
AAptInterface* iAptInterface;
QByteArray iName;