DBusSubtreeVTable - A class used to represent a virtual table for subtrees registered with Gio::DBusConnection::register_subtree(). More...
#include <giomm/dbusconnection.h>
Public Types | |
typedef sigc::slot < std::vector< Glib::ustring > , const Glib::RefPtr < DBusConnection >&, const Glib::ustring&, const Glib::ustring& > | SlotSubtreeEnumerate |
The type for a slot which handles enumerating child nodes. | |
typedef sigc::slot < std::vector< Glib::RefPtr < Gio::DBusInterfaceInfo > >, const Glib::RefPtr < DBusConnection >&, const Glib::ustring&, const Glib::ustring&, const Glib::ustring& > | SlotSubtreeIntrospect |
The type for a slot which handles introspecting a child node. | |
typedef sigc::slot< const DBusInterfaceVTable*, const Glib::RefPtr< DBusConnection > &, const Glib::ustring &, const Glib::ustring &, const Glib::ustring &, const Glib::ustring& > | SlotSubtreeDispatch |
The type for a slot which handles dispatching a remote call on a child node. | |
Public Member Functions | |
DBusSubtreeVTable (const SlotSubtreeEnumerate& slot_enumerate, const SlotSubtreeIntrospect& slot_introspect=SlotSubtreeIntrospect(), const SlotSubtreeDispatch& slot_dispatch=SlotSubtreeDispatch()) | |
Constructs a new DBusSubtreeVTable using specified slots. | |
virtual | ~DBusSubtreeVTable () |
Destructor. | |
GDBusSubtreeVTable* | gobj () |
Provides access to the underlying C object. | |
const GDBusSubtreeVTable* | gobj () const |
Provides access to the underlying C object. | |
Protected Attributes | |
GDBusSubtreeVTable | gobject_ |
SlotSubtreeEnumerate* | slot_enumerate_ |
SlotSubtreeIntrospect* | slot_introspect_ |
SlotSubtreeDispatch* | slot_dispatch_ |
DBusSubtreeVTable - A class used to represent a virtual table for subtrees registered with Gio::DBusConnection::register_subtree().
The only correct use of this class is to declare a global instance of it (or an instance local to the main function) and pass pointers to the instance to the methods that require such a parameter. The instance can be used for multiple registrations and the memory it uses will be freed at the end of execution. Any other use (like creating an instance local to a function and using that) may cause memory leaks or errors (if the instance is destroyed too early).
typedef sigc::slot< const DBusInterfaceVTable*, const Glib::RefPtr<DBusConnection>&, const Glib::ustring&, const Glib::ustring&, const Glib::ustring&, const Glib::ustring& > Gio::DBusSubtreeVTable::SlotSubtreeDispatch |
The type for a slot which handles dispatching a remote call on a child node.
Subtrees are flat. node, if non-0
, is always exactly one segment of the object path (ie: it never contains a slash).
for example,
const Gio::DBusInterfaceVTable* on_subtree_dispatch(const Glib::RefPtr<Gio::DBusConnection>& connection, const Glib::ustring& sender, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::ustring& node);
typedef sigc::slot< std::vector<Glib::ustring>, const Glib::RefPtr<DBusConnection>&, const Glib::ustring&, const Glib::ustring& > Gio::DBusSubtreeVTable::SlotSubtreeEnumerate |
The type for a slot which handles enumerating child nodes.
This slot is called when generating introspection data and also when preparing to dispatch incoming messages in the event that the Gio::DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not specified (ie: to verify that the object path is valid).
Hierarchies are not supported; the items that you return should not contain the '/' character.
For example,
std::vector<Glib::ustring> on_subtree_enumerate(const Glib::RefPtr<Gio::DBusConnection>& connection, const Glib::ustring& sender, const Glib::ustring& object_path);
typedef sigc::slot< std::vector< Glib::RefPtr<Gio::DBusInterfaceInfo> >, const Glib::RefPtr<DBusConnection>&, const Glib::ustring&, const Glib::ustring&, const Glib::ustring& > Gio::DBusSubtreeVTable::SlotSubtreeIntrospect |
The type for a slot which handles introspecting a child node.
Subtrees are flat. node, if non-0
, is always exactly one segment of the object path (ie: it never contains a slash).
This function should return an empty vector to indicate that there is no object at this node.
If this function returns a non-empty vector, the return value is expected to be a list of DBusInterfaceInfo structures describing the interfaces implemented by node.
for example,
std::vector< Glib::RefPtr<Gio::DBusInterFaceInfo> > on_subtree_introspect(const Glib::RefPtr<Gio::DBusConnection>& connection, const Glib::ustring& sender, const Glib::ustring& object_path, const Glib::ustring& node);
Gio::DBusSubtreeVTable::DBusSubtreeVTable | ( | const SlotSubtreeEnumerate & | slot_enumerate, |
const SlotSubtreeIntrospect & | slot_introspect = SlotSubtreeIntrospect() , |
||
const SlotSubtreeDispatch & | slot_dispatch = SlotSubtreeDispatch() |
||
) | [explicit] |
Constructs a new DBusSubtreeVTable using specified slots.
slot_enumerate | The slot for handling incoming method calls. |
slot_introspect | The slot for getting a property. |
slot_dispatch | The slot for setting a property. |
virtual Gio::DBusSubtreeVTable::~DBusSubtreeVTable | ( | ) | [virtual] |
Destructor.
GDBusSubtreeVTable* Gio::DBusSubtreeVTable::gobj | ( | ) | [inline] |
Provides access to the underlying C object.
const GDBusSubtreeVTable* Gio::DBusSubtreeVTable::gobj | ( | ) | const [inline] |
Provides access to the underlying C object.
GDBusSubtreeVTable Gio::DBusSubtreeVTable::gobject_ [protected] |