File indexing completed on 2024-04-28 04:57:33

0001 /* This file is part of the KDE project
0002 
0003    Copyright (C) 2006 Manolo Valdes <nolis71cu@gmail.com>
0004 
0005    This program is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU General Public
0007    License as published by the Free Software Foundation; either
0008    version 2 of the License, or (at your option) any later version.
0009 */
0010 
0011 #ifndef MIRROR_H
0012 #define MIRROR_H
0013 
0014 #include <QObject>
0015 #include <QUrl>
0016 
0017 #include <KIO/TransferJob>
0018 
0019 class mirror : public QObject
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     mirror();
0025     void search(const QUrl &url, QObject *receiver, const char *member);
0026     void search(const QString &fileName, QObject *receiver, const char *member);
0027 
0028 Q_SIGNALS:
0029 
0030     void urls(QList<QUrl> &);
0031 
0032 private Q_SLOTS:
0033 
0034     void slotData(KIO::Job *, const QByteArray &data);
0035     void slotResult(KJob *job);
0036 
0037 private:
0038     QString m_search_engine;
0039     KIO::TransferJob *m_job;
0040     QUrl m_url;
0041     QList<QUrl> m_Urls;
0042     QByteArray m_data;
0043 };
0044 
0045 void MirrorSearch(const QUrl &url, QObject *receiver, const char *member);
0046 void MirrorSearch(const QString &fileName, QObject *receiver, const char *member);
0047 
0048 #endif // MIRROR_H