/usr/include/giomm-2.4/giomm/dbussubtreevtable.h is in libglibmm-2.4-dev 2.42.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | // -*- c++ -*-
// Generated by gmmproc 2.42.0 -- DO NOT MODIFY!
#ifndef _GIOMM_DBUSSUBTREEVTABLE_H
#define _GIOMM_DBUSSUBTREEVTABLE_H
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2010 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <giomm/dbusmethodinvocation.h>
#include <giomm/dbusinterfacevtable.h>
#include <gio/gio.h>
namespace Gio
{
namespace DBus
{
/** This represents a virtual table for
* subtrees registered with Gio::DBus::Connection::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).
*
* @newin{2,28}
* @ingroup DBus
*/
class SubtreeVTable
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef SubtreeVTable CppObjectType;
typedef GDBusSubtreeVTable BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
private:
public:
/** 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,
* @code
* std::vector<Glib::ustring> on_subtree_enumerate(const
* Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring&
* sender, const Glib::ustring& object_path);
* @endcode
*/
typedef sigc::slot<
std::vector<Glib::ustring>,
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&
> SlotSubtreeEnumerate;
/** The type for a slot which handles introspecting a child node.
*
* Subtrees are flat. @a node, if non-<tt>0</tt>, 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 InterfaceInfo structures describing the interfaces
* implemented by node.
*
* for example,
* @code
* std::vector< Glib::RefPtr<Gio::DBus::InterFaceInfo> >
* on_subtree_introspect(const Glib::RefPtr<Gio::DBus::Connection>&
* connection, const Glib::ustring& sender, const Glib::ustring&
* object_path, const Glib::ustring& node);
* @endcode
*/
typedef sigc::slot<
std::vector< Glib::RefPtr<Gio::DBus::InterfaceInfo> >,
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&
> SlotSubtreeIntrospect;
/** The type for a slot which handles dispatching a remote call on a child
* node.
*
* Subtrees are flat. @a node, if non-<tt>0</tt>, is always exactly one
* segment of the object path (ie: it never contains a slash).
*
* for example,
* @code
* const Gio::DBus::InterfaceVTable* on_subtree_dispatch(const
* Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring&
* sender, const Glib::ustring& object_path, const Glib::ustring&
* interface_name, const Glib::ustring& node);
* @endcode
*/
typedef sigc::slot<
const InterfaceVTable*,
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&
> SlotSubtreeDispatch;
/** Constructs a new SubtreeVTable using specified slots.
* @param slot_enumerate The slot for handling incoming method calls.
* @param slot_introspect The slot for getting a property.
* @param slot_dispatch The slot for setting a property.
*/
explicit SubtreeVTable(
const SlotSubtreeEnumerate& slot_enumerate,
const SlotSubtreeIntrospect& slot_introspect = SlotSubtreeIntrospect(),
const SlotSubtreeDispatch& slot_dispatch = SlotSubtreeDispatch()
);
/// Destructor.
virtual ~SubtreeVTable();
/// Provides access to the underlying C object.
GDBusSubtreeVTable* gobj()
{ return reinterpret_cast<GDBusSubtreeVTable*>(&gobject_); }
/// Provides access to the underlying C object.
const GDBusSubtreeVTable* gobj() const
{ return reinterpret_cast<const GDBusSubtreeVTable*>(&gobject_); }
private:
// Non-copyable.
SubtreeVTable(const SubtreeVTable& other);
SubtreeVTable& operator=(const SubtreeVTable& other);
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These are so the C callbacks and the
// Gio::DBus::Connection::register_subtreee() method can have access to the
// copies of the slots used for creation when registering.
SlotSubtreeEnumerate* get_slot_enumerate() const;
SlotSubtreeIntrospect* get_slot_introspect() const;
SlotSubtreeDispatch* get_slot_dispatch() const;
#endif
protected:
// The underlying C instance.
GDBusSubtreeVTable gobject_;
// Pointers to copies of the slots used to create an instance.
SlotSubtreeEnumerate* slot_enumerate_;
SlotSubtreeIntrospect* slot_introspect_;
SlotSubtreeDispatch* slot_dispatch_;
};
} //namespace DBus
} // namespace Gio
#endif /* _GIOMM_DBUSSUBTREEVTABLE_H */
|