//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.



class KUriFilterData
{
%TypeHeaderCode
#include <kurifilter.h>
%End



public:
    enum UriTypes
    {
        NetProtocol,
        LocalFile,
        LocalDir,
        Executable,
        Help,
        Shell,
        Blocked,
        Error,
        Unknown
    };

                            KUriFilterData ();
    explicit                KUriFilterData (const KUrl& url);
    explicit                KUriFilterData (const QString& url);
//ig                            KUriFilterData (const KUriFilterData& data);
    KUrl                    uri () const;
    QString                 errorMsg () const;
    KUriFilterData::UriTypes  uriType () const;
    void                    setData (const KUrl& url);
    void                    setData (const QString& url);
    bool                    setAbsolutePath (const QString& abs_path);
    QString                 absolutePath () const;
    bool                    hasAbsolutePath () const;
    QString                 argsAndOptions () const;
    bool                    hasArgsAndOptions () const;
    QString                 iconName ();
    void                    setCheckForExecutables (bool check);
    bool                    checkForExecutables () const;
    QString                 typedString () const;

private:
//force
                            KUriFilterData (const KUriFilterData& other);
//end
public:
    ~KUriFilterData ();
    QString                 searchTerm () const;
    QChar                   searchTermSeparator () const;
    QString                 searchProvider () const;
    QStringList             preferredSearchProviders () const;
    QString                 queryForPreferredSearchProvider (const QString& provider) const;
    QString                 iconNameForPreferredSearchProvider (const QString& provider) const;
    QStringList             alternateSearchProviders () const;
    QString                 alternateDefaultSearchProvider () const;
    void                    setAlternateSearchProviders (const QStringList& providers);
    void                    setAlternateDefaultSearchProvider (const QString& provider);
};
// KUriFilterData


class KUriFilterPlugin : QObject
{
%TypeHeaderCode
#include <kurifilter.h>
%End


public:
    explicit                KUriFilterPlugin (const QString& name, QObject* parent /TransferThis/ = 0);
    virtual bool            filterUri (KUriFilterData& data) const=0;
    virtual KCModule*       configModule (QWidget*, const char*) const;
    virtual QString         configName () const;

protected:
    void                    setFilteredUri (KUriFilterData& data, const KUrl& uri) const;
    void                    setErrorMsg (KUriFilterData& data, const QString& errmsg) const;
    void                    setUriType (KUriFilterData& data, KUriFilterData::UriTypes type) const;
    void                    setArguments (KUriFilterData& data, const QString& args) const;
    void                    setSearchProvider (KUriFilterData& data, const QString& provider, const QString& term, const QChar& separator) const;
//ig    void                    setPreferredSearchProviders (KUriFilterData& data, const KUriFilterPlugin::ProviderInfoList& providers) const;
    QString                 iconNameFor (const KUrl& url, KUriFilterData::UriTypes type) const;
};
// KUriFilterPlugin


class KUriFilter
{
%TypeHeaderCode
#include <kurifilter.h>
%End


public:
    static KUriFilter*      self ();
    bool                    filterUri (KUriFilterData& data, const QStringList& filters = QStringList());
    bool                    filterUri (KUrl& uri, const QStringList& filters = QStringList());
    bool                    filterUri (QString& uri, const QStringList& filters = QStringList());
    KUrl                    filteredUri (const KUrl& uri, const QStringList& filters = QStringList());
    QString                 filteredUri (const QString& uri, const QStringList& filters = QStringList());
    QStringList             pluginNames () const;

protected:
                            KUriFilter ();
    void                    loadPlugins ();

private:
//force
                            KUriFilter (const KUriFilter& other);
//end
public:
    ~KUriFilter ();
    bool                    filterSearchUri (KUriFilterData& data);
};
// KUriFilter


