org.kde.koala
public class KURIFilterData extends Object implements QtSupport
String text = "kde.org"; KURIFilterData d = text; boolean 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;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
UNKNOWN: A message object for exchanging filtering URI info.
Field Summary | |
---|---|
static int | BLOCKED |
static int | ERROR |
static int | EXECUTABLE |
static int | HELP |
static int | LOCAL_DIR |
static int | LOCAL_FILE |
static int | NET_PROTOCOL
Describes the type of the URI that was filtered.
|
static int | SHELL |
static int | UNKNOWN |
Constructor Summary | |
---|---|
protected | KURIFilterData(Class dummy) |
KURIFilterData()
Default constructor.
| |
KURIFilterData(KURL url)
Creates a URIFilterData object from the given URL. | |
KURIFilterData(String url)
Creates a URIFilterData object from the given string. | |
KURIFilterData(KURIFilterData data)
Copy constructor.
|
Method Summary | |
---|---|
String | absolutePath()
Returns the absolute path if one has already been set. |
String | argsAndOptions()
Returns the command line options and arguments for a
local resource when present. |
boolean | checkForExecutables() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
String | errorMsg()
Returns an error message.
|
protected void | finalize() Deletes the wrapped C++ instance |
boolean | hasAbsolutePath()
Checks whether the supplied data had an absolute path. |
boolean | hasArgsAndOptions()
Checks whether the current data is a local resource with
command line options and arguments. |
String | iconName()
Returns the name of the icon that matches
the current filtered URL.
|
protected void | init(KURL url)
Initializes the KURIFilterData on construction. |
protected void | init(String url)
Initializes the KURIFilterData on construction. |
protected void | init() |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
boolean | setAbsolutePath(String abs_path)
Sets the absolute path to be used whenever the supplied
data is a relative local URL.
|
void | setCheckForExecutables(boolean check)
Check whether the provided uri is executable or not.
|
void | setData(String url)
Sets the URL to be filtered.
|
void | setData(KURL url)
Same as above except the argument is a URL.
|
String | typedString() |
KURL | uri()
Returns the filtered or the original URL.
|
int | uriType()
Returns the URI type.
|
UNKNOWN: Default constructor.
Parameters: url is the URL to be filtered.
UNKNOWN: Creates a URIFilterData object from the given URL.
Parameters: url is the string to be filtered.
UNKNOWN: Creates a URIFilterData object from the given string.
Parameters: data the uri filter data to be copied.
UNKNOWN: Copy constructor.
Returns: the absolute path, or null
See Also: KURIFilterData
UNKNOWN: Returns the absolute path if one has already been set.
Returns: options and arguments when present, otherwise null
UNKNOWN: Returns the command line options and arguments for a local resource when present.
Returns: true if the filters should attempt to check whether the supplied uri is an executable. False otherwise.
UNKNOWN:
Returns: the error message or a NULL when there is none.
UNKNOWN: Returns an error message.
Returns: true if the supplied data has an absolute path
See Also: KURIFilterData
UNKNOWN: Checks whether the supplied data had an absolute path.
Returns: true if the current data has command line options and arguments
UNKNOWN: Checks whether the current data is a local resource with command line options and arguments.
Returns: the name of the icon associated with the resource, or null if not found
UNKNOWN: Returns the name of the icon that matches the current filtered URL.
Parameters: url the URL to initialize the object with
UNKNOWN: Initializes the KURIFilterData on construction.
Parameters: url the URL to initialize the object with
UNKNOWN: Initializes the KURIFilterData on construction.
Parameters: abs_path the abolute path to the local resource.
Returns: true if absolute path is successfully set. Otherwise, false.
UNKNOWN: Sets the absolute path to be used whenever the supplied data is a relative local URL.
UNKNOWN: Check whether the provided uri is executable or not.
Parameters: url the string to be filtered.
UNKNOWN: Sets the URL to be filtered.
Parameters: url the URL to be filtered.
UNKNOWN: Same as above except the argument is a URL.
Returns: the string as typed by the user, before any URL processing is done
UNKNOWN:
Returns: the filtered or original url.
UNKNOWN: Returns the filtered or the original URL.
Returns: the type of the URI
UNKNOWN: Returns the URI type.