diff options
Diffstat (limited to 'src/dpkg.h')
-rw-r--r-- | src/dpkg.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/dpkg.h b/src/dpkg.h new file mode 100644 index 0000000..1092386 --- /dev/null +++ b/src/dpkg.h @@ -0,0 +1,50 @@ +/*************************************************************************** + * Copyright (C) 2003 by Sylvain Joyeux * + * [email protected] * + * * + * 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. * + ***************************************************************************/ +#ifndef DPKG_H +#define DPKG_H + +#include <config.h> + +#include "packagemanager.h" +#include <kprocio.h> + +/** +@author Sylvain Joyeux +*/ +class Dpkg : public PackageManager +{ + Q_OBJECT + + typedef void (Dpkg::*ReceiveMethod) (const QStringList& lines); + ReceiveMethod m_receive; + + KProcIO m_process; + QString m_buffer; + +private slots: + void readReady(KProcIO* io); + +private: + void receiveSearch(const QStringList& line); + void receiveList(const QStringList& line); + +public: + Dpkg(QObject *parent = 0, const char *name = 0); + ~Dpkg(); + + virtual bool list(const QString& package); + virtual bool search(const QString& file); + + virtual int capabilities(int query) const; + + virtual QString getOnlineForm(); +}; + +#endif |