summaryrefslogtreecommitdiff
authordrw <drw>2005-04-01 20:32:01 (UTC)
committer drw <drw>2005-04-01 20:32:01 (UTC)
commitcc4594a5c8d45d2f8d14c6ac1723a8ed39577f8f (patch) (side-by-side diff)
tree3500347a14f4106be68712c4d4af49e3c69f7248
parent629c1c9a366f56e9d98940f8dcd0778d039f1421 (diff)
downloadopie-cc4594a5c8d45d2f8d14c6ac1723a8ed39577f8f.zip
opie-cc4594a5c8d45d2f8d14c6ac1723a8ed39577f8f.tar.gz
opie-cc4594a5c8d45d2f8d14c6ac1723a8ed39577f8f.tar.bz2
Fix linking issue with libipkg >= 0.99.146, at least until I can come up with a better way to do it...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp5
-rw-r--r--noncore/settings/packagemanager/oipkg.h7
2 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp
index 127204d..7bc2040 100644
--- a/noncore/settings/packagemanager/oipkg.cpp
+++ b/noncore/settings/packagemanager/oipkg.cpp
@@ -17,48 +17,53 @@ _;:, .> :=|. This program is free software; you can
: .. .:, . . . without even the implied warranty of
=_ + =;=|` MERCHANTABILITY or FITNESS FOR A
_.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.= = ; Library General Public License for more
++= -. .` .: details.
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "oipkg.h"
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <stdlib.h>
#include <unistd.h>
+extern "C" {
+#include <libipkg.h>
+};
+args_t m_ipkgArgs; // libipkg configuration arguments
+
const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file
const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files
const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists
const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location
const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location
OIpkg *oipkg;
// Ipkg callback functions
int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg )
{
// Display message only if it is below the message level threshold
if ( conf && ( conf->verbosity < level ) )
return 0;
else
oipkg->ipkgMessage( msg );
return 0;
}
char *fIpkgResponse( char */*question*/ )
{
return 0l;
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h
index 0263f50..4e390fa 100644
--- a/noncore/settings/packagemanager/oipkg.h
+++ b/noncore/settings/packagemanager/oipkg.h
@@ -18,99 +18,94 @@ _;:, .> :=|. This program is free software; you can
=_ + =;=|` MERCHANTABILITY or FITNESS FOR A
_.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.= = ; Library General Public License for more
++= -. .` .: details.
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef OIPKG_H
#define OIPKG_H
#include "oconfitem.h"
#include "opackage.h"
#include <qpe/config.h>
#include <qobject.h>
-extern "C" {
-#include <libipkg.h>
-};
-
// Ipkg execution options (m_ipkgExecOptions)
#define FORCE_DEPENDS 0x0001
#define FORCE_REMOVE 0x0002
#define FORCE_REINSTALL 0x0004
#define FORCE_OVERWRITE 0x0008
class OConfItemList;
class OIpkg : public QObject
{
Q_OBJECT
public:
OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l );
~OIpkg();
OConfItemList *configItems();
OConfItemList *servers();
OConfItemList *destinations();
OConfItemList *options();
int ipkgExecOptions() { return m_ipkgExecOptions; }
int ipkgExecVerbosity() { return m_ipkgExecVerbosity; }
void setConfigItems( OConfItemList *configList );
void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; }
void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; }
void saveSettings();
OPackageList *availablePackages( const QString &server = QString::null );
OPackageList *installedPackages( const QString &destName = QString::null,
const QString &destPath = QString::null );
OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined,
const QString &name = QString::null );
-
+
bool executeCommand( OPackage::Command command = OPackage::NotDefined,
const QStringList &parameters = QStringList(),
const QString &destination = QString::null,
const QObject *receiver = 0l,
const char *slotOutput = 0l,
bool rawOutput = true );
void abortCommand();
void ipkgMessage( char *msg );
void ipkgStatus( char *status );
void ipkgList( char *filelist );
private:
Config *m_config; // Pointer to application configuration file
- args_t m_ipkgArgs; // libipkg configuration arguments
OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files
int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options
int m_ipkgExecVerbosity; // Ipkg execution verbosity level
QString m_rootPath; // Directory path where the 'root' destination is located
void loadConfiguration();
OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined );
const QString &rootPath();
void linkPackageDir( const QString &dest = QString::null );
void unlinkPackage( const QString &package = QString::null,
OConfItemList *destList = 0l );
signals:
void signalIpkgMessage( const QString &msg );
void signalIpkgStatus( const QString &status );
void signalIpkgList( const QString &filelist );
};
#endif