#include <kurifilter.h>
Public Types | |
| enum | URITypes |
Public Methods | |
| KURIFilterData () | |
| KURIFilterData (const KURL &url) | |
| KURIFilterData (const QString &url) | |
| KURIFilterData (const KURIFilterData &) | |
| ~KURIFilterData () | |
| bool | hasBeenFiltered () const |
| KURL | uri () const |
| QString | errorMsg () const |
| URITypes | uriType () const |
| void | setData (const QString &url) |
| void | setData (const KURL &url) |
| bool | setAbsolutePath (const QString &) |
| QString | absolutePath () const |
| bool | hasAbsolutePath () const |
| QString | argsAndOptions () const |
| bool | hasArgsAndOptions () const |
| QString | iconName () |
| KURIFilterData & | operator= (const KURL &url) |
| KURIFilterData & | operator= (const QString &url) |
Protected Methods | |
| void | init (const KURL &url=QString::null) |
This is a basic message object used for exchanging filtering information between the filter plugins and the application whenever the application requires more information about the URI than just a filtered version of it. Any application can create an instance of this class and send it to KURIFilter to have the filter plugins fill the necessary information.
@sect Example
QString text = "kde.org";
KURIFilterData d = text;
bool filtered = KURIFilter::self()->filter( d );
if( filtered )
print ( "URI: s
"Filtered URI: s
URI Type: i
"Was Filtered: i"
text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
The above code should yield the following output:
URI: kde.org Filtered URI: http://kde.org URI Type: 0 <== means NET_PROTOCOL Was Filtered: 1 <== means the URL was successfully filtered
Definition at line 64 of file kurifilter.h.
|
|
Describes the type of URI to be filtered. This enumerator prvoides the return value for uriType. A brief description for each value:
Definition at line 87 of file kurifilter.h. Referenced by KURIFilterPlugin::setURIType(), and uriType(). |
|
|
Default constructor. Creates a URIFilterData object. Definition at line 94 of file kurifilter.h. References init(). |
|
|
Creates a URIFilterData object from the given URL.
Definition at line 101 of file kurifilter.h. References init(). |
|
|
Creates a URIFilterData object from the given string.
Definition at line 108 of file kurifilter.h. References init(). |
|
|
Copy constructor. Creates a URIFilterData object from another URI filter data object.
|
|
|
Destructor. |
|
|
Returns the absolute path if one has already been set. |
|
|
Returns the command line options and arguments for a local resource when present.
|
|
|
Returns an error message. This functions returns the error message set by the plugin whenever the uri type is set to KURIFilterData::ERROR. Otherwise, it returns a QString::null.
Definition at line 156 of file kurifilter.h. |
|
|
Returns true if the supplied data has an absolute path. |
|
|
Returns true if the current data is a local resource with command line options and arguments. |
|
|
This method has been deprecated and will always return TRUE. You should instead use the result from the KURIFilter::filterURI() calls.
Definition at line 132 of file kurifilter.h. |
|
|
Returns the name of the icon that matches the current filtered URL. NOTE that this function will return a NULL string by default and when no associated icon is found.
|
|
|
Initializes the KURIFilterData on construction. Referenced by KURIFilterData(), operator=(), and setData(). |
|
|
Overloaded assigenment operator. This function allows you to easily assign a QString to a KURIFilterData object.
Definition at line 260 of file kurifilter.h. References init(). |
|
|
Overloaded assigenment operator. This function allows you to easily assign a KURL to a KURIFilterData object.
Definition at line 250 of file kurifilter.h. References init(). |
|
|
Sets the absolute path to be used whenever the supplied data is a relative local URL. NOTE: This function works only for a local resource and expects the absolute path to the relative URL set in this meta object. If you are extracting the absolute path from a KURL object, make sure you always set the argument below using KURL::path() instead of KURL::url() so that "file:/" would not be appended! Otherwise, the filter might not be able to make correct determination whether the relative URL locally exists!
|
|
|
Same as above except the argument is a URL. Use this function to set the string to be filtered when you construct an empty filter object.
Definition at line 186 of file kurifilter.h. References init(). |
|
|
Sets the URL to be filtered. Use this function to set the string to be filtered when you construct an empty filter object.
Definition at line 175 of file kurifilter.h. References init(). |
|
|
Returns the filtered or the original URL. This function returns the filtered url if one of the plugins sucessfully filtered the original URL. Otherwise, it returns the original URL. See hasBeenFiltered() and
Definition at line 144 of file kurifilter.h. |
|
|
Returns the URI type. This method always returns KURIFilterData::UNKNOWN if the given URL was not filtered. Definition at line 164 of file kurifilter.h. References URITypes. |
1.2.18