~ubuntu-branches/ubuntu/natty/kdebase-runtime/natty-proposed

« back to all changes in this revision

Viewing changes to kurifilter-plugins/fixhost/fixhosturifilter.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-24 11:07:10 UTC
  • mto: (0.8.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 129.
  • Revision ID: james.westby@ubuntu.com-20101124110710-6dbsyw0yh21qvn82
Tags: upstream-4.5.80
ImportĀ upstreamĀ versionĀ 4.5.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef _FIXHOSTURIFILTER_H_
22
22
#define _FIXHOSTURIFILTER_H_
23
23
 
24
 
#include <time.h>
25
 
 
26
 
#include <kgenericfactory.h>
27
 
#include <kurifilter.h>
28
 
 
29
 
#include<QtCore/QEventLoop>
30
 
#include<QtNetwork/QHostInfo>
 
24
#include <KDE/KUriFilter>
 
25
 
 
26
class QHostInfo;
 
27
class QEventLoop;
31
28
 
32
29
/*
33
 
 This filter tries to automatically prepend www. to http URLs that
34
 
 need it.
 
30
 This filter tries to automatically prepend www. to http URLs that need it.
35
31
*/
36
 
 
37
32
class FixHostUriFilter : public KUriFilterPlugin
38
33
{
39
 
    Q_OBJECT
40
 
 
41
 
    public:
42
 
        FixHostUriFilter( QObject* parent, const QVariantList& args );
43
 
        virtual bool filterUri( KUriFilterData &data ) const;
44
 
    private slots:
45
 
        void lookedUp( const QHostInfo &hostInfo );
46
 
    private:
47
 
        bool exists( const KUrl& url ) const;
48
 
 
49
 
        mutable QEventLoop *m_eventLoop;
50
 
        mutable int m_lookupId;
51
 
        mutable bool m_hostExists;
 
34
Q_OBJECT
 
35
 
 
36
public:
 
37
    FixHostUriFilter(QObject* parent, const QVariantList& args);
 
38
    virtual bool filterUri(KUriFilterData &data) const;
 
39
 
 
40
private Q_SLOTS:
 
41
    void lookedUp(const QHostInfo &hostInfo);
 
42
 
 
43
private:
 
44
    bool exists(const KUrl& url) const;
 
45
 
 
46
    mutable QEventLoop *m_eventLoop;
 
47
    mutable int m_lookupId;
 
48
    mutable bool m_hostExists;
52
49
};
53
50
 
54
51
#endif