//
//     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 KStandardDirs
{
%TypeHeaderCode
#include <kstandarddirs.h>
%End


public:
                            KStandardDirs ();

    enum SearchOption
    {
        NoSearchOptions,
        Recursive,
        NoDuplicates,
        IgnoreExecBit
    };

    typedef QFlags<KStandardDirs::SearchOption> SearchOptions;

    void                    addPrefix (const QString& dir);
    void                    addXdgConfigPrefix (const QString& dir);
    void                    addXdgDataPrefix (const QString& dir);
    bool                    addResourceType (const char* type, const QString& relativename, bool priority = 1);
    bool                    addResourceType (const char* type, const char* basetype, const QString& relativename, bool priority = 1);
    bool                    addResourceType (const char* type, const char* basetype, const char* relativename, bool priority = 1);
    bool                    addResourceDir (const char* type, const QString& absdir, bool priority = 1);
    QString                 findResource (const char* type, const QString& filename) const;
    bool                    isRestrictedResource (const char* type, const QString& relPath = QString()) const;
    quint32                 calcResourceHash (const char* type, const QString& filename, KStandardDirs::SearchOptions options = KStandardDirs::NoSearchOptions) const;
    QStringList             findDirs (const char* type, const QString& reldir) const;
    QString                 findResourceDir (const char* type, const QString& filename) const;
    QStringList             findAllResources (const char* type, const QString& filter = QString(), KStandardDirs::SearchOptions options = KStandardDirs::NoSearchOptions) const;
    QStringList             findAllResources (const char* type, const QString& filter, KStandardDirs::SearchOptions options, QStringList& relPaths) const;
    static QStringList      systemPaths (const QString& pstr = QString());
    static QString          findExe (const QString& appname, const QString& pathstr = QString(), KStandardDirs::SearchOptions options = KStandardDirs::NoSearchOptions);
    static int              findAllExe (QStringList& list, const QString& appname, const QString& pathstr = QString(), KStandardDirs::SearchOptions options = KStandardDirs::NoSearchOptions);
    bool                    addCustomized (KConfig* config);
    QStringList             resourceDirs (const char* type) const;
    QStringList             allTypes () const;
    QString                 saveLocation (const char* type, const QString& suffix = QString(), bool create = 1) const;
    QString                 relativeLocation (const char* type, const QString& absPath);
    static bool             makeDir (const QString& dir, int mode = 0755);
    static QString          kde_default (const char* type);
    QString                 kfsstnd_prefixes ();
    QString                 kfsstnd_xdg_conf_prefixes ();
    QString                 kfsstnd_xdg_data_prefixes ();
    QString                 localkdedir () const;
    QString                 localxdgdatadir () const;
    QString                 localxdgconfdir () const;
    static QString          installPath (const char* type);
    static bool             exists (const QString& fullPath);
    static QString          realPath (const QString& dirname);
    static QString          realFilePath (const QString& filename);
    static QString          locate (const char* type, const QString& filename, const KComponentData& cData = KGlobal::mainComponent());
    static QString          locateLocal (const char* type, const QString& filename, const KComponentData& cData = KGlobal::mainComponent());
    static QString          locateLocal (const char* type, const QString& filename, bool createDir, const KComponentData& cData = KGlobal::mainComponent());
    static bool             checkAccess (const QString& pathname, int mode);

private:
                            KStandardDirs (const KStandardDirs&);
};   // KStandardDirs


