25 #ifndef __kurifilter_h__
26 #define __kurifilter_h__
28 #include <tqptrlist.h>
30 #include <tqstringlist.h>
39 class KURIFilterPrivate;
40 class KURIFilterDataPrivate;
100 enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
157 KURL
uri()
const {
return m_pURI; }
189 void setData(
const TQString& url ) { reinit( url ); }
200 void setData(
const KURL& url ) { reinit( url ); }
216 bool setAbsolutePath(
const TQString& abs_path );
223 TQString absolutePath()
const;
230 bool hasAbsolutePath()
const;
238 TQString argsAndOptions()
const;
245 bool hasArgsAndOptions()
const;
268 TQPixmap customIconPixmap();
280 void setCheckForExecutables (
bool check);
294 TQString typedString()
const;
322 void init(
const KURL& url);
328 void init(
const TQString& url = TQString::null );
334 void reinit(
const KURL& url);
335 void reinit(
const TQString& url = TQString::null);
337 bool m_bCheckForExecutables;
340 TQString m_strErrMsg;
341 TQString m_strIconName;
345 KURIFilterDataPrivate *d;
347 TQPixmap m_customIconPixmap;
378 KURIFilterPlugin( TQObject *parent = 0,
const char *name = 0,
double pri = 1.0 );
385 virtual TQString
name()
const {
return m_strName; }
395 virtual double priority()
const {
return m_dblPriority; }
413 virtual TDECModule *
configModule( TQWidget*,
const char* )
const {
return 0; }
427 void setFilteredURI (
KURIFilterData& data,
const KURL& uri )
const;
433 data.m_strErrMsg = errmsg;
441 data.m_bChanged =
true;
448 void setArguments(
KURIFilterData& data,
const TQString& args )
const;
451 double m_dblPriority;
454 virtual void virtual_hook(
int id,
void* data );
456 class KURIFilterPluginPrivate *d;
466 virtual int compareItems(Item a, Item b)
469 return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
473 KURIFilterPrivate *d;
572 bool filterURI(
KURIFilterData& data,
const TQStringList& filters = TQStringList() );
585 bool filterURI( KURL &uri,
const TQStringList& filters = TQStringList() );
598 bool filterURI( TQString &uri,
const TQStringList& filters = TQStringList() );
611 KURL filteredURI(
const KURL &uri,
const TQStringList& filters = TQStringList() );
624 TQString filteredURI(
const TQString &uri,
const TQStringList& filters = TQStringList() );
632 TQPtrListIterator<KURIFilterPlugin> pluginsIterator()
const;
640 TQStringList pluginNames()
const;
664 KURIFilterPrivate *d;
KURIFilterData & operator=(const KURL &url)
Overloaded assigenment operator.
URITypes
Describes the type of the URI that was filtered.
void setErrorMsg(KURIFilterData &data, const TQString &errmsg) const
Sets the error message in data to errormsg.
A basic message object used for exchanging filtering information between the filter plugins and the a...
virtual double priority() const
Returns the filter's priority.
Base class for URI filter plugins.
Manages the filtering of URIs.
virtual TDECModule * configModule(TQWidget *, const char *) const
Creates a configuration module for the filter.
TDE_DEPRECATED bool hasBeenFiltered() const
This method has been deprecated and will always return true.
URITypes uriType() const
Returns the URI type.
void setData(const KURL &url)
Same as above except the argument is a URL.
KURIFilterData(const TQString &url)
Creates a URIFilterData object from the given string.
void setData(const TQString &url)
Sets the URL to be filtered.
KURIFilterData()
Default constructor.
virtual TQString name() const
Returns the filter's name.
KURIFilterData(const KURL &url)
Creates a URIFilterData object from the given URL.
A list of filter plugins.
void setURIType(KURIFilterData &data, KURIFilterData::URITypes type) const
Sets the URI type in data to type.
KURL uri() const
Returns the filtered or the original URL.
KURIFilterData & operator=(const TQString &url)
Overloaded assigenment operator.
bool checkForExecutables() const
virtual TQString configName() const
Returns the name of the configuration module for the filter.
TQString errorMsg() const
Returns an error message.