akabeipackage_p.h 1.68 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* This file is part of the Chakra project

   Copyright (C) 2010 Dario Freddi <drf@chakra-project.org>

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.
*/

#ifndef AKABEIPACKAGE_P_H
#define AKABEIPACKAGE_P_H

#include "akabeipackage.h"

#include <QtCore/QStringList>
Dario Freddi's avatar
Dario Freddi committed
17
#include <QtCore/QUrl>
Dario Freddi's avatar
Dario Freddi committed
18
#include <QtCore/QHash>
19 20 21 22 23 24

namespace Akabei {

class PackagePrivate
{
public:
25 26 27 28 29 30 31 32
    PackagePrivate(Database *db, int id, const QString& n)
        : database(db)
        , databaseId(id)
        , name(n)
        , version(QString())
        , _p_validated(false)
        , _p_md5checked(false) {}

33 34 35 36 37 38 39
    virtual ~PackagePrivate() {}

    Database *database;
    int databaseId;

    QString name;
    QString filename;
Dario Freddi's avatar
Dario Freddi committed
40
    Package::Version version;
41
    QString desc;
42
    QUrl url;
43
    QString packager;
44
    QByteArray md5sum;
45 46
    QString arch;
    QDateTime buildDate;
Dario Freddi's avatar
Dario Freddi committed
47
    QDateTime installDate;
48
    qint32 size;
Dario Freddi's avatar
Dario Freddi committed
49
    qint32 isize;
50
    QStringList files;
51 52
    QStringList deps;
    QStringList conflicts;
53 54 55 56
    QStringList optdepends;
    QStringList replaces;
    QString license;
    QStringList backup;
57
    QString scriptlet;
Dario Freddi's avatar
Dario Freddi committed
58 59
    QUrl screenshot;
    Package::InstallReason reason;
60 61 62 63 64

    QStringList providers;
    QStringList mimetypes;
    QStringList hooks;

65 66 67
    bool hasScriptlet;
    bool hasHooks;

68
    QList<Group*> groups;
Dario Freddi's avatar
Dario Freddi committed
69
    QHash< QString, QHash< QString, Delta* > > deltaCache;
70

71
    QString pathToArchive;
72 73

    void attemptLoadFromCache();
74 75 76

    bool _p_validated;
    bool _p_md5checked;
77 78 79 80 81
};

}

#endif // AKABEIPACKAGE_P_H