QDBusObjectPath Class Reference

Class for representing D-Bus object paths. More...

#include <qdbusobjectpath.h>

List of all members.

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.

Detailed Description

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.

See also:
Object paths

Constructor & Destructor Documentation

QDBusObjectPath::QDBusObjectPath (  ) 

Creates an empty and invalid object path.

QDBusObjectPath::QDBusObjectPath ( const QDBusObjectPath other  ) 

Creates copy of the given other object path.

Parameters:
other the object path to copy
QDBusObjectPath::QDBusObjectPath ( const QCString &  other  ) 

Creates copy of the given other object path.

Parameters:
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"
Parameters:
parentNode the object path to create the child on
nodeName the name of the child node

Member Function Documentation

bool QDBusObjectPath::isValid (  )  const

Returns whether the current content is considered a valid object path.

Note:
Calls validate() to perform a check on the current content
Returns:
true if the object's content describe a valid object path, otherwise false
See also:
Object paths
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

Returns:
the parent node's object path or an empty and invalid object if this is already the root node
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.

Parameters:
path the string to check
Returns:
-1 if the object path is valid, otherwise the index of the first violating character
See also:
isValid()

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2