author | drw <drw> | 2004-01-20 19:33:27 (UTC) |
---|---|---|
committer | drw <drw> | 2004-01-20 19:33:27 (UTC) |
commit | da0557836c852fade427c03ad59d349f3294bbb8 (patch) (unidiff) | |
tree | 979907c816c09f3b3a290b58eac353094cbcd90e /noncore/settings/packagemanager/oipkg.h | |
parent | 996826e77a8f96ada424814716178e65caba9287 (diff) | |
download | opie-da0557836c852fade427c03ad59d349f3294bbb8.zip opie-da0557836c852fade427c03ad59d349f3294bbb8.tar.gz opie-da0557836c852fade427c03ad59d349f3294bbb8.tar.bz2 |
Convert to use libipkg
Diffstat (limited to 'noncore/settings/packagemanager/oipkg.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkg.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h index 4065f48..824fa17 100644 --- a/noncore/settings/packagemanager/oipkg.h +++ b/noncore/settings/packagemanager/oipkg.h | |||
@@ -23,39 +23,42 @@ | |||
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 | 31 | ||
32 | #ifndef OIPKG_H | 32 | #ifndef OIPKG_H |
33 | #define OIPKG_H | 33 | #define OIPKG_H |
34 | 34 | ||
35 | extern "C" { | ||
36 | #include <libipkg.h> | ||
37 | }; | ||
38 | |||
35 | #include <qobject.h> | 39 | #include <qobject.h> |
36 | 40 | ||
37 | #include <qpe/config.h> | 41 | #include <qpe/config.h> |
38 | 42 | ||
39 | #include "oconfitem.h" | 43 | #include "oconfitem.h" |
40 | #include "opackage.h" | 44 | #include "opackage.h" |
41 | 45 | ||
42 | // Ipkg execution options (m_ipkgExecOptions) | 46 | // Ipkg execution options (m_ipkgExecOptions) |
43 | #define FORCE_DEPENDS 0x0001 | 47 | #define FORCE_DEPENDS 0x0001 |
44 | #define FORCE_REMOVE 0x0002 | 48 | #define FORCE_REMOVE 0x0002 |
45 | #define FORCE_REINSTALL 0x0004 | 49 | #define FORCE_REINSTALL 0x0004 |
46 | #define FORCE_OVERWRITE 0x0008 | 50 | #define FORCE_OVERWRITE 0x0008 |
47 | 51 | ||
48 | class OConfItemList; | 52 | class OConfItemList; |
49 | class OProcess; | ||
50 | 53 | ||
51 | class OIpkg : public QObject | 54 | class OIpkg : public QObject |
52 | { | 55 | { |
53 | Q_OBJECT | 56 | Q_OBJECT |
54 | 57 | ||
55 | public: | 58 | public: |
56 | OIpkg( Config *config = 0x0, QObject *parent = 0x0, const char *name = 0x0 ); | 59 | OIpkg( Config *config = 0x0, QObject *parent = 0x0, const char *name = 0x0 ); |
57 | ~OIpkg(); | 60 | ~OIpkg(); |
58 | 61 | ||
59 | OConfItemList *configItems(); | 62 | OConfItemList *configItems(); |
60 | OConfItemList *servers(); | 63 | OConfItemList *servers(); |
61 | OConfItemList *destinations(); | 64 | OConfItemList *destinations(); |
@@ -67,34 +70,32 @@ public: | |||
67 | void setConfigItems( OConfItemList *configList ); | 70 | void setConfigItems( OConfItemList *configList ); |
68 | void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; } | 71 | void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; } |
69 | void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; } | 72 | void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; } |
70 | 73 | ||
71 | void saveSettings(); | 74 | void saveSettings(); |
72 | 75 | ||
73 | OPackageList *availablePackages( const QString &server = QString::null ); | 76 | OPackageList *availablePackages( const QString &server = QString::null ); |
74 | OPackageList *installedPackages( const QString &destName = QString::null, | 77 | OPackageList *installedPackages( const QString &destName = QString::null, |
75 | const QString &destPath = QString::null ); | 78 | const QString &destPath = QString::null ); |
76 | 79 | ||
77 | bool executeCommand( OPackage::Command command = OPackage::NotDefined, QStringList *parameters = 0x0, | 80 | bool executeCommand( OPackage::Command command = OPackage::NotDefined, QStringList *parameters = 0x0, |
78 | const QString &destination = QString::null, const QObject *receiver = 0x0, | 81 | const QString &destination = QString::null, const QObject *receiver = 0x0, |
79 | const char *slotOutput = 0x0, const char *slotErrors = 0x0, | 82 | const char *slotOutput = 0x0, bool rawOutput = true ); |
80 | const char *slotFinished = 0x0, bool rawOutput = true ); | ||
81 | void abortCommand(); | 83 | void abortCommand(); |
82 | 84 | ||
85 | void ipkgOutput( char *msg ); | ||
86 | |||
83 | private: | 87 | private: |
84 | Config *m_config; // Pointer to application configuration file | 88 | Config *m_config; // Pointer to application configuration file |
85 | QString m_ipkgExec; // Fully qualified path/filename of ipkg binary | 89 | args_t m_ipkgArgs; // libipkg configuration arguments |
86 | OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files | 90 | OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files |
87 | int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options | 91 | int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options |
88 | int m_ipkgExecVerbosity; // Ipkg execution verbosity level | 92 | int m_ipkgExecVerbosity; // Ipkg execution verbosity level |
89 | OProcess *m_ipkgProcess; // Pointer to process which Ipkg will run in | ||
90 | 93 | ||
91 | void loadConfiguration(); | 94 | void loadConfiguration(); |
92 | OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); | 95 | OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); |
93 | 96 | ||
94 | signals: | 97 | signals: |
95 | void execOutput( OProcess *process, char *buffer, int length ); | 98 | void execOutput( char *msg ); |
96 | void execErrors( OProcess *process, char *buffer, int length ); | ||
97 | void execFinished( OProcess *process, char *buffer, int length ); | ||
98 | }; | 99 | }; |
99 | 100 | ||
100 | #endif | 101 | #endif |