-rw-r--r-- | noncore/settings/aqpkg/ipkg.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/ipkg.h b/noncore/settings/aqpkg/ipkg.h new file mode 100644 index 0000000..63588c4 --- a/dev/null +++ b/noncore/settings/aqpkg/ipkg.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /*************************************************************************** | ||
2 | ipkg.h - description | ||
3 | ------------------- | ||
4 | begin : Sat Aug 31 2002 | ||
5 | copyright : (C) 2002 by Andy Qua | ||
6 | email : andy.qua@blueyonder.co.uk | ||
7 | ***************************************************************************/ | ||
8 | |||
9 | /*************************************************************************** | ||
10 | * * | ||
11 | * This program is free software; you can redistribute it and/or modify * | ||
12 | * it under the terms of the GNU General Public License as published by * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | |||
18 | #ifndef IPKG_H | ||
19 | #define IPKG_H | ||
20 | |||
21 | |||
22 | /** | ||
23 | *@author Andy Qua | ||
24 | */ | ||
25 | |||
26 | #include <qobject.h> | ||
27 | #include <qstring.h> | ||
28 | #include <qlist.h> | ||
29 | |||
30 | #define FORCE_DEPENDS 0x0001 | ||
31 | #define FORCE_REMOVE 0x0002 | ||
32 | #define FORCE_REINSTALL 0x0004 | ||
33 | #define FORCE_OVERWRITE 0x0008 | ||
34 | #define MAKE_LINKS 0x0010 | ||
35 | |||
36 | class Ipkg : public QObject | ||
37 | { | ||
38 | Q_OBJECT | ||
39 | public: | ||
40 | Ipkg(); | ||
41 | ~Ipkg(); | ||
42 | bool runIpkg( ); | ||
43 | |||
44 | void setOption( const char *opt ) { option = opt; } | ||
45 | void setPackage( const char *pkg ) { package = pkg; } | ||
46 | void setDestination( const char *dest ) { destination = dest; } | ||
47 | void setDestinationDir( const char *dir ) { destDir = dir; } | ||
48 | void setFlags( int fl ) { flags = fl; } | ||
49 | void setRuntimeDirectory( const char *dir ) { runtimeDir = dir; } | ||
50 | |||
51 | signals: | ||
52 | void outputText( const QString &text ); | ||
53 | |||
54 | private: | ||
55 | bool createLinks; | ||
56 | QString option; | ||
57 | QString package; | ||
58 | QString destination; | ||
59 | QString destDir; | ||
60 | int flags; | ||
61 | QString runtimeDir; | ||
62 | |||
63 | QList<QString> *dependantPackages; | ||
64 | |||
65 | int executeIpkgCommand( QString &cmd, const QString option ); | ||
66 | void linkPackage( const QString &packFileName, const QString &dest, const QString &destDir ); | ||
67 | QStringList* getList( const QString &packageFilename, const QString &destDir ); | ||
68 | void processFileList( const QStringList *fileList, const QString &destDir ); | ||
69 | void processLinkDir( const QString &file, const QString &baseDir, const QString &destDir ); | ||
70 | }; | ||
71 | |||
72 | #endif | ||