.TH "KURIFilterData" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KURIFilterData \- A basic message object used for exchanging filtering information between the filter plugins and the application requesting the filtering service. A message object for exchanging filtering URI info.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kurifilter.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBURITypes\fP { \fBNET_PROTOCOL\fP = 0, \fBLOCAL_FILE\fP, \fBLOCAL_DIR\fP, \fBEXECUTABLE\fP, \fBHELP\fP, \fBSHELL\fP, \fBBLOCKED\fP, \fBERROR\fP, \fBUNKNOWN\fP }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKURIFilterData\fP ()"
.br
.ti -1c
.RI "\fBKURIFilterData\fP (const \fBKURL\fP &url)"
.br
.ti -1c
.RI "\fBKURIFilterData\fP (const \fBQString\fP &url)"
.br
.ti -1c
.RI "\fBKURIFilterData\fP (const \fBKURIFilterData\fP &data)"
.br
.ti -1c
.RI "\fB~KURIFilterData\fP ()"
.br
.ti -1c
.RI "KDE_DEPRECATED bool \fBhasBeenFiltered\fP () const "
.br
.ti -1c
.RI "\fBKURL\fP \fBuri\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBerrorMsg\fP () const "
.br
.ti -1c
.RI "\fBURITypes\fP \fBuriType\fP () const "
.br
.ti -1c
.RI "void \fBsetData\fP (const \fBQString\fP &url)"
.br
.ti -1c
.RI "void \fBsetData\fP (const \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBsetAbsolutePath\fP (const \fBQString\fP &abs_path)"
.br
.ti -1c
.RI "\fBQString\fP \fBabsolutePath\fP () const "
.br
.ti -1c
.RI "bool \fBhasAbsolutePath\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBargsAndOptions\fP () const "
.br
.ti -1c
.RI "bool \fBhasArgsAndOptions\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBiconName\fP ()"
.br
.ti -1c
.RI "void \fBsetCheckForExecutables\fP (bool check)"
.br
.ti -1c
.RI "bool \fBcheckForExecutables\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBtypedString\fP () const "
.br
.ti -1c
.RI "\fBKURIFilterData\fP & \fBoperator=\fP (const \fBKURL\fP &url)"
.br
.ti -1c
.RI "\fBKURIFilterData\fP & \fBoperator=\fP (const \fBQString\fP &url)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBinit\fP (const \fBKURL\fP &url)"
.br
.ti -1c
.RI "void \fBinit\fP (const \fBQString\fP &url=QString::null)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKURIFilterPlugin\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
A basic message object used for exchanging filtering information between the filter plugins and the application requesting the filtering service. A message object for exchanging filtering URI info. 

Use this object if you require a more detailed information about the URI you want to filter. Any application can create an instance of this class and send it to \fBKURIFilter\fP to have the plugins fill out all possible information about the URI.
.PP
\fBExample\fP 
.PP
.PP
.nf
   QString text = 'kde.org';
   KURIFilterData d = text;
   bool filtered = KURIFilter::self()->filter( d );
   cout << 'URL: ' << text.latin1() << endl
        << 'Filtered URL: ' << d.uri().url().latin1() << endl
        << 'URI Type: ' << d.uriType() << endl
        << 'Was Filtered: ' << filtered << endl;
.fi
.PP
.PP
The above code should yield the following output: 
.PP
.nf
   URI: kde.org
   Filtered URI: http://kde.org
   URI Type: 0            <== means NET_PROTOCOL
   Was Filtered: 1        <== means the URL was successfully filtered

.fi
.PP
.PP
\fBAuthor:\fP
.RS 4
Dawit Alemayehu <adawit at kde.org> 
.RE
.PP

.PP
Definition at line 78 of file kurifilter.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKURIFilterData::URITypes\fP"
.PP
Describes the type of the URI that was filtered. 
.PP
Here is a brief description of the types:
.PP
.PD 0
.IP "\(bu" 2
NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc... 
.IP "\(bu" 2
LOCAL_FILE - A local file whose executable flag is not set 
.IP "\(bu" 2
LOCAL_DIR - A local directory 
.IP "\(bu" 2
EXECUTABLE - A local file whose executable flag is set 
.IP "\(bu" 2
HELP - A man or info page 
.IP "\(bu" 2
SHELL - A shell executable (ex: echo 'Test...' >> ~/testfile) 
.IP "\(bu" 2
BLOCKED - A URI that should be blocked/filtered (ex: ad filtering) 
.IP "\(bu" 2
ERROR - An incorrect URI (ex: '~johndoe' when user johndoe does not exist in that system ) 
.IP "\(bu" 2
UNKNOWN - A URI that is not identified. Default value when a KURIFilterData is first created. 
.PP

.PP
Definition at line 99 of file kurifilter.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KURIFilterData::KURIFilterData ()\fC [inline]\fP"
.PP
Default constructor. 
.PP
Creates a URIFilterData object. 
.PP
Definition at line 106 of file kurifilter.h.
.SS "KURIFilterData::KURIFilterData (const \fBKURL\fP & url)\fC [inline]\fP"
.PP
Creates a URIFilterData object from the given URL. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP is the URL to be filtered. 
.RE
.PP

.PP
Definition at line 113 of file kurifilter.h.
.SS "KURIFilterData::KURIFilterData (const \fBQString\fP & url)\fC [inline]\fP"
.PP
Creates a URIFilterData object from the given string. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP is the string to be filtered. 
.RE
.PP

.PP
Definition at line 120 of file kurifilter.h.
.SS "KURIFilterData::KURIFilterData (const \fBKURIFilterData\fP & data)"
.PP
Copy constructor. 
.PP
Creates a URIFilterData object from another URI filter data object.
.PP
\fBParameters:\fP
.RS 4
\fIdata\fP the uri filter data to be copied. 
.RE
.PP

.PP
Definition at line 60 of file kurifilter.cpp.
.SS "KURIFilterData::~\fBKURIFilterData\fP ()"
.PP
Destructor. 
.PP
Definition at line 74 of file kurifilter.cpp.
.SH "Member Function Documentation"
.PP 
.SS "KDE_DEPRECATED bool KURIFilterData::hasBeenFiltered () const\fC [inline]\fP"
.PP
This method has been deprecated and will always return true. 
.PP
You should instead use the result from the \fBKURIFilter::filterURI()\fP calls.
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 144 of file kurifilter.h.
.SS "\fBKURL\fP KURIFilterData::uri () const\fC [inline]\fP"
.PP
Returns the filtered or the original URL. 
.PP
This function returns the filtered url if one of the plugins successfully filtered the original URL. Otherwise, it returns the original URL. See \fBhasBeenFiltered()\fP and
.PP
\fBReturns:\fP
.RS 4
the filtered or original url. 
.RE
.PP

.PP
Definition at line 156 of file kurifilter.h.
.PP
Referenced by KURIFilter::filteredURI(), and KURIFilter::filterURI().
.SS "\fBQString\fP KURIFilterData::errorMsg () const\fC [inline]\fP"
.PP
Returns an error message. 
.PP
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.
.PP
\fBReturns:\fP
.RS 4
the error message or a NULL when there is none. 
.RE
.PP

.PP
Definition at line 168 of file kurifilter.h.
.SS "\fBURITypes\fP KURIFilterData::uriType () const\fC [inline]\fP"
.PP
Returns the URI type. 
.PP
This method always returns KURIFilterData::UNKNOWN if the given URL was not filtered. 
.PP
\fBReturns:\fP
.RS 4
the type of the URI 
.RE
.PP

.PP
Definition at line 177 of file kurifilter.h.
.SS "void KURIFilterData::setData (const \fBQString\fP & url)\fC [inline]\fP"
.PP
Sets the URL to be filtered. 
.PP
Use this function to set the string to be filtered when you construct an empty filter object.
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP the string to be filtered. 
.RE
.PP

.PP
Definition at line 188 of file kurifilter.h.
.SS "void KURIFilterData::setData (const \fBKURL\fP & url)\fC [inline]\fP"
.PP
Same as above except the argument is a URL. 
.PP
Use this function to set the string to be filtered when you construct an empty filter object.
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP the URL to be filtered. 
.RE
.PP

.PP
Definition at line 199 of file kurifilter.h.
.SS "bool KURIFilterData::setAbsolutePath (const \fBQString\fP & abs_path)"
.PP
Sets the absolute path to be used whenever the supplied data is a relative local URL. 
.PP
NOTE: This function should only be used for local resources, i.e. the 'file:/' protocol. It is useful for specifying the absolute path in cases where the actual URL might be relative. meta object. If deriving the path from a \fBKURL\fP, make sure you set the argument for this function to the result of calling path () instead of url ().
.PP
\fBParameters:\fP
.RS 4
\fIabs_path\fP the abolute path to the local resource. 
.RE
.PP
\fBReturns:\fP
.RS 4
true if absolute path is successfully set. Otherwise, false. 
.RE
.PP

.PP
Definition at line 124 of file kurifilter.cpp.
.PP
References KURL::isLocalFile(), and KURL::isValid().
.SS "\fBQString\fP KURIFilterData::absolutePath () const"
.PP
Returns the absolute path if one has already been set. 
.PP
\fBReturns:\fP
.RS 4
the absolute path, or QString::null 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBhasAbsolutePath()\fP 
.RE
.PP

.PP
Definition at line 136 of file kurifilter.cpp.
.SS "bool KURIFilterData::hasAbsolutePath () const"
.PP
Checks whether the supplied data had an absolute path. 
.PP
\fBReturns:\fP
.RS 4
true if the supplied data has an absolute path 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBabsolutePath()\fP 
.RE
.PP

.PP
Definition at line 119 of file kurifilter.cpp.
.PP
References QString::isEmpty().
.SS "\fBQString\fP KURIFilterData::argsAndOptions () const"
.PP
Returns the command line options and arguments for a local resource when present. 
.PP
\fBReturns:\fP
.RS 4
options and arguments when present, otherwise QString::null 
.RE
.PP

.PP
Definition at line 141 of file kurifilter.cpp.
.SS "bool KURIFilterData::hasArgsAndOptions () const"
.PP
Checks whether the current data is a local resource with command line options and arguments. 
.PP
\fBReturns:\fP
.RS 4
true if the current data has command line options and arguments 
.RE
.PP

.PP
Definition at line 114 of file kurifilter.cpp.
.PP
References QString::isEmpty().
.SS "\fBQString\fP KURIFilterData::iconName ()"
.PP
Returns the name of the icon that matches the current filtered URL. 
.PP
NOTE that this function will return a NULL string by default and when no associated icon is found.
.PP
\fBReturns:\fP
.RS 4
the name of the icon associated with the resource, or QString::null if not found 
.RE
.PP

.PP
Definition at line 146 of file kurifilter.cpp.
.PP
References QString::findRev(), QString::fromLatin1(), KMimeType::iconForURL(), QString::mid(), KService::serviceByDesktopName(), and KURL::url().
.SS "void KURIFilterData::setCheckForExecutables (bool check)"
.PP
Check whether the provided uri is executable or not. 
.PP
Setting this to false ensures that typing the name of an executable does not start that application. This is useful in the location bar of a browser. The default value is true.
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 109 of file kurifilter.cpp.
.SS "bool KURIFilterData::checkForExecutables () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
true if the filters should attempt to check whether the supplied uri is an executable. False otherwise.
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 277 of file kurifilter.h.
.SS "\fBQString\fP KURIFilterData::typedString () const"
.PP
\fBReturns:\fP
.RS 4
the string as typed by the user, before any URL processing is done 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 104 of file kurifilter.cpp.
.SS "\fBKURIFilterData\fP& KURIFilterData::operator= (const \fBKURL\fP & url)\fC [inline]\fP"
.PP
Overloaded assigenment operator. 
.PP
This function allows you to easily assign a \fBKURL\fP to a KURIFilterData object.
.PP
\fBReturns:\fP
.RS 4
an instance of a KURIFilterData object. 
.RE
.PP

.PP
Definition at line 293 of file kurifilter.h.
.SS "\fBKURIFilterData\fP& KURIFilterData::operator= (const \fBQString\fP & url)\fC [inline]\fP"
.PP
Overloaded assigenment operator. 
.PP
This function allows you to easily assign a \fBQString\fP to a KURIFilterData object.
.PP
\fBReturns:\fP
.RS 4
an instance of a KURIFilterData object. 
.RE
.PP

.PP
Definition at line 303 of file kurifilter.h.
.SS "void KURIFilterData::init (const \fBKURL\fP & url)\fC [protected]\fP"
.PP
Initializes the KURIFilterData on construction. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP the URL to initialize the object with 
.RE
.PP

.PP
Definition at line 80 of file kurifilter.cpp.
.SS "void KURIFilterData::init (const \fBQString\fP & url = \fCQString::null\fP)\fC [protected]\fP"
.PP
Initializes the KURIFilterData on construction. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP the URL to initialize the object with 
.RE
.PP

.PP
Definition at line 92 of file kurifilter.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
