Diffstat (limited to 'noncore/settings/packagemanager/oipkg.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkg.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h index 3c96200..0263f50 100644 --- a/noncore/settings/packagemanager/oipkg.h +++ b/noncore/settings/packagemanager/oipkg.h | |||
@@ -47,62 +47,70 @@ extern "C" { | |||
47 | #define FORCE_DEPENDS 0x0001 | 47 | #define FORCE_DEPENDS 0x0001 |
48 | #define FORCE_REMOVE 0x0002 | 48 | #define FORCE_REMOVE 0x0002 |
49 | #define FORCE_REINSTALL 0x0004 | 49 | #define FORCE_REINSTALL 0x0004 |
50 | #define FORCE_OVERWRITE 0x0008 | 50 | #define FORCE_OVERWRITE 0x0008 |
51 | 51 | ||
52 | class OConfItemList; | 52 | class OConfItemList; |
53 | 53 | ||
54 | class OIpkg : public QObject | 54 | class OIpkg : public QObject |
55 | { | 55 | { |
56 | Q_OBJECT | 56 | Q_OBJECT |
57 | 57 | ||
58 | public: | 58 | public: |
59 | OIpkg( Config *config = 0x0, QObject *parent = 0x0, const char *name = 0x0 ); | 59 | OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l ); |
60 | ~OIpkg(); | 60 | ~OIpkg(); |
61 | 61 | ||
62 | OConfItemList *configItems(); | 62 | OConfItemList *configItems(); |
63 | OConfItemList *servers(); | 63 | OConfItemList *servers(); |
64 | OConfItemList *destinations(); | 64 | OConfItemList *destinations(); |
65 | OConfItemList *options(); | 65 | OConfItemList *options(); |
66 | 66 | ||
67 | int ipkgExecOptions() { return m_ipkgExecOptions; } | 67 | int ipkgExecOptions() { return m_ipkgExecOptions; } |
68 | int ipkgExecVerbosity() { return m_ipkgExecVerbosity; } | 68 | int ipkgExecVerbosity() { return m_ipkgExecVerbosity; } |
69 | 69 | ||
70 | void setConfigItems( OConfItemList *configList ); | 70 | void setConfigItems( OConfItemList *configList ); |
71 | void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; } | 71 | void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; } |
72 | void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; } | 72 | void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; } |
73 | 73 | ||
74 | void saveSettings(); | 74 | void saveSettings(); |
75 | 75 | ||
76 | OPackageList *availablePackages( const QString &server = QString::null ); | 76 | OPackageList *availablePackages( const QString &server = QString::null ); |
77 | OPackageList *installedPackages( const QString &destName = QString::null, | 77 | OPackageList *installedPackages( const QString &destName = QString::null, |
78 | const QString &destPath = QString::null ); | 78 | const QString &destPath = QString::null ); |
79 | 79 | ||
80 | OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined, | ||
81 | const QString &name = QString::null ); | ||
82 | |||
80 | bool executeCommand( OPackage::Command command = OPackage::NotDefined, | 83 | bool executeCommand( OPackage::Command command = OPackage::NotDefined, |
81 | const QStringList ¶meters = QStringList(), | 84 | const QStringList ¶meters = QStringList(), |
82 | const QString &destination = QString::null, | 85 | const QString &destination = QString::null, |
83 | const QObject *receiver = 0x0, | 86 | const QObject *receiver = 0l, |
84 | const char *slotOutput = 0x0, | 87 | const char *slotOutput = 0l, |
85 | bool rawOutput = true ); | 88 | bool rawOutput = true ); |
86 | void abortCommand(); | 89 | void abortCommand(); |
87 | 90 | ||
88 | void ipkgMessage( char *msg ); | 91 | void ipkgMessage( char *msg ); |
89 | void ipkgStatus( char *status ); | 92 | void ipkgStatus( char *status ); |
90 | void ipkgList( char *filelist ); | 93 | void ipkgList( char *filelist ); |
91 | 94 | ||
92 | private: | 95 | private: |
93 | Config *m_config; // Pointer to application configuration file | 96 | Config *m_config; // Pointer to application configuration file |
94 | args_t m_ipkgArgs; // libipkg configuration arguments | 97 | args_t m_ipkgArgs; // libipkg configuration arguments |
95 | OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files | 98 | OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files |
96 | int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options | 99 | int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options |
97 | int m_ipkgExecVerbosity; // Ipkg execution verbosity level | 100 | int m_ipkgExecVerbosity; // Ipkg execution verbosity level |
101 | QString m_rootPath; // Directory path where the 'root' destination is located | ||
98 | 102 | ||
99 | void loadConfiguration(); | 103 | void loadConfiguration(); |
100 | OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); | 104 | OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); |
105 | const QString &rootPath(); | ||
106 | void linkPackageDir( const QString &dest = QString::null ); | ||
107 | void unlinkPackage( const QString &package = QString::null, | ||
108 | OConfItemList *destList = 0l ); | ||
101 | 109 | ||
102 | signals: | 110 | signals: |
103 | void signalIpkgMessage( char *msg ); | 111 | void signalIpkgMessage( const QString &msg ); |
104 | void signalIpkgStatus( char *status ); | 112 | void signalIpkgStatus( const QString &status ); |
105 | void signalIpkgList( char *filelist ); | 113 | void signalIpkgList( const QString &filelist ); |
106 | }; | 114 | }; |
107 | 115 | ||
108 | #endif | 116 | #endif |