|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KURIFilterData
public class KURIFilterData
A basic message object used for exchanging filtering information between the filter plugins and the application requesting the filtering service. 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 KURIFilter to have the plugins fill out all possible information about the URI. xample
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
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 | |
---|---|
|
KURIFilterData()
Default constructor. |
protected |
KURIFilterData(java.lang.Class dummy)
|
|
KURIFilterData(KURIFilterData data)
Copy constructor. |
|
KURIFilterData(KURL url)
Creates a URIFilterData object from the given URL. |
|
KURIFilterData(java.lang.String url)
Creates a URIFilterData object from the given string. |
Method Summary | |
---|---|
java.lang.String |
absolutePath()
Returns the absolute path if one has already been set. |
java.lang.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() |
java.lang.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. |
java.lang.String |
iconName()
Returns the name of the icon that matches the current filtered URL. |
protected void |
init()
|
protected void |
init(KURL url)
Initializes the KURIFilterData on construction. |
protected void |
init(java.lang.String url)
Initializes the KURIFilterData on construction. |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
boolean |
setAbsolutePath(java.lang.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(KURL url)
Same as above except the argument is a URL. |
void |
setData(java.lang.String url)
Sets the URL to be filtered. |
java.lang.String |
typedString()
|
KURL |
uri()
Returns the filtered or the original URL. |
int |
uriType()
Returns the URI type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NET_PROTOCOL
public static final int LOCAL_FILE
public static final int LOCAL_DIR
public static final int EXECUTABLE
public static final int HELP
public static final int SHELL
public static final int BLOCKED
public static final int ERROR
public static final int UNKNOWN
Constructor Detail |
---|
protected KURIFilterData(java.lang.Class dummy)
public KURIFilterData()
public KURIFilterData(KURL url)
url
- is the URL to be filtered.public KURIFilterData(java.lang.String url)
url
- is the string to be filtered.public KURIFilterData(KURIFilterData data)
data
- the uri filter data to be copied.Method Detail |
---|
public KURL uri()
public java.lang.String errorMsg()
public int uriType()
public void setData(java.lang.String url)
url
- the string to be filtered.public void setData(KURL url)
url
- the URL to be filtered.public boolean setAbsolutePath(java.lang.String abs_path)
abs_path
- the abolute path to the local resource.
public java.lang.String absolutePath()
hasAbsolutePath()
public boolean hasAbsolutePath()
absolutePath()
public java.lang.String argsAndOptions()
public boolean hasArgsAndOptions()
public java.lang.String iconName()
public void setCheckForExecutables(boolean check)
public boolean checkForExecutables()
public java.lang.String typedString()
protected void init(KURL url)
url
- the URL to initialize the object withprotected void init(java.lang.String url)
url
- the URL to initialize the object withprotected void init()
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |