From 722c77e7ced15a015cc7befbe6b63e2db1935f0a Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 15 Jul 2011 13:03:56 +0200 Subject: [PATCH] move the needed datastructures into Package --- private/package_p.h | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/private/package_p.h b/private/package_p.h index 9bd222f9d..af43970fb 100644 --- a/private/package_p.h +++ b/private/package_p.h @@ -29,20 +29,53 @@ namespace Plasma { +class ContentStructure +{ + public: + ContentStructure() + : directory(false), + required(false) + { + } + + ContentStructure(const ContentStructure &other) + { + paths = other.paths; + name = other.name; + mimeTypes = other.mimeTypes; + directory = other.directory; + required = other.required; + } + + QStringList paths; + QString name; + QStringList mimeTypes; + bool directory : 1; + bool required : 1; +}; + class PackagePrivate { public: - PackagePrivate(const PackageStructure::Ptr st, const QString &p); + PackagePrivate(); PackagePrivate(const PackagePrivate &other); ~PackagePrivate(); PackagePrivate &operator=(const PackagePrivate &rhs); + void createPackageMetadata(const QString &path); void updateHash(const QString &basePath, const QString &subPath, const QDir &dir, QCryptographicHash &hash); - PackageStructure::Ptr structure; - Service *service; - bool valid; + QString type; + QString path; + QStringList contentsPrefixPaths; + QString defaultPackageRoot; + QString servicePrefix; + QMap contents; + QStringList mimeTypes; + KPluginInfo *metadata; + bool externalPaths : 1; + bool valid : 1; }; }