From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RCgYB-0006Um-05 for garchives@archives.gentoo.org; Sat, 08 Oct 2011 23:43:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B98F21C121; Sat, 8 Oct 2011 23:43:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CDD5A21C121 for ; Sat, 8 Oct 2011 23:43:19 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 399EE1B4009 for ; Sat, 8 Oct 2011 23:43:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0895A8004F for ; Sat, 8 Oct 2011 23:43:18 +0000 (UTC) From: "Theofilos Intzoglou" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Theofilos Intzoglou" Message-ID: Subject: [gentoo-commits] proj/c-portage:cmake_port commit in: src/Qt/ X-VCS-Repository: proj/c-portage X-VCS-Files: src/Qt/qportage.cpp src/Qt/qportage.h X-VCS-Directories: src/Qt/ X-VCS-Committer: parapente X-VCS-Committer-Name: Theofilos Intzoglou X-VCS-Revision: c31cce5c15b253e55edcf86cafdaea10264347e1 Date: Sat, 8 Oct 2011 23:43:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: db4488a99d912f63368cca4b61a20499 commit: c31cce5c15b253e55edcf86cafdaea10264347e1 Author: Theofilos Intzoglou gmail com> AuthorDate: Sat Oct 8 23:42:38 2011 +0000 Commit: Theofilos Intzoglou gmail com> CommitDate: Sat Oct 8 23:42:38 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/c-portage.git= ;a=3Dcommit;h=3Dc31cce5c The begginings of a portage class (compilable but not complete) --- src/Qt/qportage.cpp | 178 +++++++++++++++++++++++++++++++++++++++++++++= ++++++ src/Qt/qportage.h | 67 +++++++++++++++++++ 2 files changed, 245 insertions(+), 0 deletions(-) diff --git a/src/Qt/qportage.cpp b/src/Qt/qportage.cpp new file mode 100644 index 0000000..bf313ea --- /dev/null +++ b/src/Qt/qportage.cpp @@ -0,0 +1,178 @@ +/* + + Copyright (C) 2011 =CE=98=CE=B5=CF=8C=CF=86=CE=B9=CE=BB=CE=BF=CF=82= =CE=99=CE=BD=CF=84=CE=B6=CF=8C=CE=B3=CE=BB=CE=BF=CF=85 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110= -1301 USA +*/ + + +#include "helper.h" +#include "qportage.h" +#include +#include + +namespace CppPortage { + +portage::portage(QObject* parent): QObject(parent) +{ + +} + +portage::~portage() +{ + +} + +QString portage::bestVersion(QStringList ) +{ + +} + +QStringList portage::getAllNodes() +{ + StringList *clist; + QStringList strlist; + =20 + clist =3D portageGetAllNodes(); + strlist =3D CListToQStringList(clist); + stringListFree(clist); + =20 + return strlist; +} + +QString portage::getBestEbuild(const QString& ) +{ + +} + +QString portage::getDepEbuild(const QString& ) +{ + +} + +int portage::getHardMasked(const QString& , QStringList& , QStringList& = ) +{ + +} + +QStringList portage::getInstalledFiles(const QString &package) +{ + StringList *clist; + QStringList strlist; + =20 + clist =3D portageGetInstalledFiles(package.toUtf8().data()); + strlist =3D CListToQStringList(clist); + stringListFree(clist); + =20 + return strlist; +} + +QStringList portage::getInstalledList() +{ + StringList *clist; + QStringList strlist; + + clist =3D portageGetInstalledList(); + strlist =3D CListToQStringList(clist); + stringListFree(clist); + =20 + return strlist; +} + +QString portage::getMaskingReason(const QString& ) +{ + +} + +QStringList portage::getMaskingStatus(const QString& ) +{ + +} + +QString portage::getOverlay(const QString& ) +{ + +} + +QString portage::getOverlayNameFromPath(const QString& ) +{ + +} + +QString portage::getOverlayNameFromPkg(const QString& ) +{ + +} + +long int portage::getPackageSizeInt(const QString& ) +{ + +} + +QString portage::getPackageSizeString(const QString& ) +{ + +} + +QString portage::getPath(const QString &package, int ) +{ + +} + +PackageProperties* portage::getProperties(const QString &package) +{ + return portageGetProperties(package.toUtf8().data()); +} + +QStringList portage::getResolvedPkgs() +{ + StringList *clist; + QStringList strlist; + =20 + clist =3D portageGetResolvedPkgs(); + strlist =3D CListToQStringList(clist); + stringListFree(clist); + =20 + return strlist; +} + +QStringList portage::getUnresolvedPkgs() +{ + StringList *clist; + QStringList strlist; + =20 + clist =3D portageGetUnresolvedPkgs(); + strlist =3D CListToQStringList(clist); + stringListFree(clist); + =20 + return strlist; +} + +QStringList portage::getVersions(const QString &package, bool include_ma= sked) +{ + StringList *clist =3D portageGetVersions(package.toUtf8().data(), in= clude_masked); + QStringList strlist =3D CListToQStringList(clist); + stringListFree(clist); + =20 + return strlist; +} + +bool portage::isOverlay(const QString &package) +{ + return portageIsOverlay(package.toUtf8().data()); +} + + +} // End of namespace \ No newline at end of file diff --git a/src/Qt/qportage.h b/src/Qt/qportage.h new file mode 100644 index 0000000..8cdd7b3 --- /dev/null +++ b/src/Qt/qportage.h @@ -0,0 +1,67 @@ +/* + + Copyright (C) 2011 =CE=98=CE=B5=CF=8C=CF=86=CE=B9=CE=BB=CE=BF=CF=82= =CE=99=CE=BD=CF=84=CE=B6=CF=8C=CE=B3=CE=BB=CE=BF=CF=85 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110= -1301 USA +*/ + + +#ifndef QPORTAGE_H +#define QPORTAGE_H + +#include +#include + +class PackageProperties; + +namespace CppPortage { + +class portage : public QObject +{ + Q_OBJECT + =20 + explicit portage(QObject* parent =3D 0); + virtual ~portage(); + + QStringList getVersions(const QString&, bool); + int getHardMasked(const QString&, QStringList&, = QStringList&); + QStringList getInstalledFiles(const QString&); + =20 + QString bestVersion(QStringList); + QString getBestEbuild(const QString&); + QString getDepEbuild(const QString&); + =20 + QStringList getMaskingStatus(const QString&); + QString getMaskingReason(const QString&); + =20 + long int getPackageSizeInt(const QString&); + QString getPackageSizeString(const QString&); + PackageProperties* getProperties(const QString&); + bool isOverlay(const QString&); + QString getOverlay(const QString&); + QString getOverlayNameFromPath(const QString&); + QString getOverlayNameFromPkg(const QString&); + QString getPath(const QString&, int); + =20 + QStringList getResolvedPkgs(); + QStringList getUnresolvedPkgs(); + QStringList getAllNodes(); + QStringList getInstalledList(); + +}; // End of class + +} // End of namespace + +#endif // QPORTAGE_H