summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/pmipkg.h
blob: cb0759adaee741f1312622d7149d606b934c7cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#ifndef PMIPKG_H
#define PMIPKG_H

#include <qobject.h>
#include <qlist.h>
#include <qstring.h>
#include <qwidget.h>
#include "pksettings.h"
#include "runwindow.h"
#include "packagelist.h"
#include "installdialog.h"
#include "debug.h"

#define createLink 0
#define removeLink 1

class OipkgPackage;
class PmIpkg : public QObject
{
  Q_OBJECT
public:
  PmIpkg( PackageManagerSettings* , QWidget* p=0,  const char * name=0, WFlags f=0 );
  ~PmIpkg();

  int linkOpp;
  void loadList( PackageList* );
  void commit();
  void update();
  void show();
  void clearLists();

public slots:
	void doIt();
 	void install();
  void remove();
  void installFile(const QString &fileName, const QString &dest="");
  void removeFile(const QString &fileName, const QString &dest="");
  void createLinks( const QString &dest );
  void removeLinks( const QString &dest );


private:
	QString ipkg_cmd;
  PackageManagerSettings* settings;
  RunWindow *runwindow;
  InstallDialog *installDialog;
  QList<OipkgPackage> to_remove;
  QList<OipkgPackage> to_install;
  void makeLinks(OipkgPackage*);
  void linkPackage( QString, QString );
  void processLinkDir( QString , QString );
  bool runIpkg(const QString& args, const QString& dest="" );
  void out( QString );
	QStringList* getList( QString, QString );
	void processFileList( QStringList*, QString );
 	

};

#endif