source: src-qt4/pc-softwaremanager/containers.h @ c24d6287

releng/10.0.1releng/10.0.2
Last change on this file since c24d6287 was c24d6287, checked in by Ken Moore <ken@…>, 5 months ago

Make sure that when an upgrade fails in the AppCafe?, it defaults to trying to download the latest PBI manually before throwing an error. This catches the situations where the user is actually "upgrading" to an older version of an application because of an un-approval of the latest PBI for some reason.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1/***************************************************************************
2 *   Copyright (C) 2011 - iXsystems                                       *
3 *   kris@pcbsd.org  *
4 *   tim@pcbsd.org   *
5 *   ken@pcbsd.org   *
6 *                                                                         *
7 *   Permission is hereby granted, free of charge, to any person obtaining *
8 *   a copy of this software and associated documentation files (the       *
9 *   "Software"), to deal in the Software without restriction, including   *
10 *   without limitation the rights to use, copy, modify, merge, publish,   *
11 *   distribute, sublicense, and/or sell copies of the Software, and to    *
12 *   permit persons to whom the Software is furnished to do so, subject to *
13 *   the following conditions:                                             *
14 *                                                                         *
15 *   The above copyright notice and this permission notice shall be        *
16 *   included in all copies or substantial portions of the Software.       *
17 *                                                                         *
18 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
19 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
20 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
21 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
22 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
23 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
24 *   OTHER DEALINGS IN THE SOFTWARE.                                       *
25 ***************************************************************************/
26#ifndef _APPCAFE_CONTAINERS_H
27#define _APPCAFE_CONTAINERS_H
28
29#include <QString>
30#include <QProcess>
31#include <QObject>
32#include <QDebug>
33
34// Info Container for Installed PBI's (pbi_info <pbi-name> data)
35class InstalledPBI{
36       
37  public:
38    enum PBISTATUS{ NONE, DOWNLOADING, INSTALLING, REMOVING, UPDATING, PENDINGDOWNLOAD, PENDINGINSTALL, PENDINGREMOVAL, PENDINGUPDATE, UPDATEAVAILABLE, WORKING };
39    QString name, version, author, website, arch, path, icon, license, mdate, metaID, downloadfile, description, maintainer, fbsdversion, rawmdate;
40    PBISTATUS status;
41    bool rootInstall, autoUpdate, desktopIcons, menuIcons, mimetypes;
42   
43    InstalledPBI(){
44      rootInstall=FALSE; autoUpdate=FALSE; desktopIcons=FALSE; menuIcons=FALSE;
45      status = NONE;
46    }
47    ~InstalledPBI(){}
48    void setStatus(PBISTATUS stat){ status = stat; }
49   
50};
51
52// Info Container for PBI Meta information on a repo
53class MetaPBI{
54       
55  public:
56    QString name, category, remoteIcon, localIcon, author, website, license, appType, description, shortdescription,maintainer,dateadded;
57    QStringList tags;
58    QString latestVersion, latestDatetime, latestArch, latestSizeK, latestFilename; //newest version in the index
59    QString backupVersion, backupDatetime, backupArch, backupSizeK, backupFilename; //next-to-newest version in the index
60    bool requiresroot;
61   
62    MetaPBI(){ requiresroot=FALSE; }
63    ~MetaPBI(){}
64               
65};
66
67// Info Container for Category Meta information on a repo
68class MetaCategory{
69       
70  public:
71    QString name, remoteIcon, localIcon, description;
72   
73    MetaCategory(){}
74    ~MetaCategory(){}
75   
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.