Class for representing D-Bus object paths. More...
#include <qdbusobjectpath.h>
Public Member Functions | |
| QDBusObjectPath () | |
| Creates an empty and invalid object path. | |
| QDBusObjectPath (const QDBusObjectPath &other) | |
Creates copy of the given other object path. | |
| QDBusObjectPath (const QCString &other) | |
Creates copy of the given other object path. | |
| QDBusObjectPath (const QDBusObjectPath &parentNode, const QCString &nodeName) | |
| Creates an object path for an object as a child of the parent node. | |
| bool | isValid () const |
| Returns whether the current content is considered a valid object path. | |
| QDBusObjectPath | parentNode () const |
| Returns the object path of this path's parent node. | |
Static Public Member Functions | |
| static int | validate (const QCString &path) |
| Checks the given string for validity as a D-Bus object path. | |
Class for representing D-Bus object paths.
This data type is necessary to correctly represent object paths in the context of D-Bus messages, since normal strings have a different D-Bus signature than object paths.
| QDBusObjectPath::QDBusObjectPath | ( | ) |
Creates an empty and invalid object path.
| QDBusObjectPath::QDBusObjectPath | ( | const QDBusObjectPath & | other | ) |
Creates copy of the given other object path.
| other | the object path to copy |
| QDBusObjectPath::QDBusObjectPath | ( | const QCString & | other | ) |
Creates copy of the given other object path.
| other | the object path to copy |
| QDBusObjectPath::QDBusObjectPath | ( | const QDBusObjectPath & | parentNode, | |
| const QCString & | nodeName | |||
| ) |
Creates an object path for an object as a child of the parent node.
This is basically like specifying a directory and a file name to create the file's full path.
Example:
QDBusObjectPath rootNode("/"); // => "/" QDBusObjectPath childNod(rootNode, "child"); // => "/child" QDBusObjectPath grandChildNode(childNode, "grandchild"); // => "/child/grandchild"
| parentNode | the object path to create the child on | |
| nodeName | the name of the child node |
| bool QDBusObjectPath::isValid | ( | ) | const |
Returns whether the current content is considered a valid object path.
true if the object's content describe a valid object path, otherwise false | QDBusObjectPath QDBusObjectPath::parentNode | ( | ) | const |
Returns the object path of this path's parent node.
This is basically like getting the directory of an file path
| static int QDBusObjectPath::validate | ( | const QCString & | path | ) | [static] |
Checks the given string for validity as a D-Bus object path.
See section Object paths for information on object path formatting.
| path | the string to check |
-1 if the object path is valid, otherwise the index of the first violating character
1.6.2