summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkg.h
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/oipkg.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h
index 9a7802c..88f0e32 100644
--- a/noncore/settings/packagemanager/oipkg.h
+++ b/noncore/settings/packagemanager/oipkg.h
@@ -1,93 +1,95 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 3
4 Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org> 4 Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
5 =. 5 =.
6 .=l. 6 .=l.
7           .>+-= 7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can 8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_,   >  .   <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software 11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_. 14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17 : ..    .:,     . . . without even the implied warranty of 17 : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details. 21++=   -.     .`     .: details.
22:     =  ...= . :.=- 22:     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#ifndef OIPKG_H 31#ifndef OIPKG_H
32#define OIPKG_H 32#define OIPKG_H
33 33
34#include "oconfitem.h" 34#include "oconfitem.h"
35#include "opackage.h" 35#include "opackage.h"
36 36
37#include <qpe/config.h> 37#include <qpe/config.h>
38 38
39#include <qobject.h> 39#include <qobject.h>
40 40
41// Ipkg execution options (m_ipkgExecOptions) 41// Ipkg execution options (m_ipkgExecOptions)
42#define FORCE_DEPENDS 0x0001 42#define FORCE_DEPENDS 0x0001
43#define FORCE_REMOVE 0x0002 43#define FORCE_REMOVE 0x0002
44#define FORCE_REINSTALL 0x0004 44#define FORCE_REINSTALL 0x0004
45#define FORCE_OVERWRITE 0x0008 45#define FORCE_OVERWRITE 0x0008
46#define FORCE_RECURSIVE 0x0010
47#define FORCE_VERBOSE_WGET 0x0020
46 48
47class OConfItemList; 49class OConfItemList;
48 50
49class OIpkg : public QObject 51class OIpkg : public QObject
50{ 52{
51 Q_OBJECT 53 Q_OBJECT
52 54
53public: 55public:
54 OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l ); 56 OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l );
55 ~OIpkg(); 57 ~OIpkg();
56 58
57 OConfItemList *configItems(); 59 OConfItemList *configItems();
58 OConfItemList *servers(); 60 OConfItemList *servers();
59 OConfItemList *destinations(); 61 OConfItemList *destinations();
60 OConfItemList *options(); 62 OConfItemList *options();
61 63
62 int ipkgExecOptions() { return m_ipkgExecOptions; } 64 int ipkgExecOptions() { return m_ipkgExecOptions; }
63 int ipkgExecVerbosity() { return m_ipkgExecVerbosity; } 65 int ipkgExecVerbosity() { return m_ipkgExecVerbosity; }
64 66
65 void setConfigItems( OConfItemList *configList ); 67 void setConfigItems( OConfItemList *configList );
66 void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; } 68 void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; }
67 void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; } 69 void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; }
68 70
69 void saveSettings(); 71 void saveSettings();
70 72
71 OPackageList *availablePackages( const QString &server = QString::null ); 73 OPackageList *availablePackages( const QString &server = QString::null );
72 OPackageList *installedPackages( const QString &destName = QString::null, 74 OPackageList *installedPackages( const QString &destName = QString::null,
73 const QString &destPath = QString::null ); 75 const QString &destPath = QString::null );
74 76
75 OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined, 77 OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined,
76 const QString &name = QString::null ); 78 const QString &name = QString::null );
77 79
78 bool executeCommand( OPackage::Command command = OPackage::NotDefined, 80 bool executeCommand( OPackage::Command command = OPackage::NotDefined,
79 const QStringList &parameters = QStringList(), 81 const QStringList &parameters = QStringList(),
80 const QString &destination = QString::null, 82 const QString &destination = QString::null,
81 const QObject *receiver = 0l, 83 const QObject *receiver = 0l,
82 const char *slotOutput = 0l, 84 const char *slotOutput = 0l,
83 bool rawOutput = true ); 85 bool rawOutput = true );
84 void abortCommand(); 86 void abortCommand();
85 87
86 void ipkgMessage( char *msg ); 88 void ipkgMessage( char *msg );
87 void ipkgStatus( char *status ); 89 void ipkgStatus( char *status );
88 void ipkgList( char *filelist ); 90 void ipkgList( char *filelist );
89 91
90private: 92private:
91 Config *m_config; // Pointer to application configuration file 93 Config *m_config; // Pointer to application configuration file
92 OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files 94 OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files
93 int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options 95 int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options