/*************************************************************************** * Copyright (C) 2005-2006 Nicolas Hadacek * * * * 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 PURL_H #define PURL_H #include "common/global/global.h" # include #include "common/global/log.h" #include "common/common/purl_base.h" namespace PURL { //---------------------------------------------------------------------------- class Http : public TQHttp { Q_OBJECT public: Http(const TQString &hostname); TQHttpResponseHeader _header; private slots: void responseHeaderReceivedSlot(const TQHttpResponseHeader &rh) { _header = rh; } }; class Url; class Directory; class Private; enum SeparatorType { UnixSeparator, WindowsSeparator }; //---------------------------------------------------------------------------- class Base { public: Base(const TQString &filepath = TQString()); Base(const KURL &url); bool operator <(const Base &url) const { return _url { public: UrlList() {} UrlList(const Url &url) { append(url); } UrlList(const TQValueList &list) : TQValueList(list) {} #if !defined(NO_KDE) UrlList(const KURL::List &list); #endif }; //---------------------------------------------------------------------------- class Directory : public Base { public: Directory(const TQString &path = TQString()); TQStringList files(const TQString &filter) const; Url findMatchingFilename(const TQString &filename) const; Directory up() const; Directory down(const TQString &path) const; static Directory current(); #if !defined(NO_KDE) bool create(Log::Generic &log) const; #endif }; } // namespace #endif