/usr/include/giomm-2.4/giomm/dbusinterfaceskeleton.h is in libglibmm-2.4-dev 2.39.93-0ubuntu1.
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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | // -*- c++ -*-
// Generated by gmmproc 2.39.93 -- DO NOT MODIFY!
#ifndef _GIOMM_DBUSINTERFACESKELETON_H
#define _GIOMM_DBUSINTERFACESKELETON_H
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/* Copyright (C) 2013 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 <glibmm/object.h>
#include <giomm/dbusinterface.h>
//For the GDBusMethodInvocation type in the *_p.h file.
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton;
typedef struct _GDBusInterfaceSkeletonClass GDBusInterfaceSkeletonClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gio
{
namespace DBus
{ class InterfaceSkeleton_Class; } // namespace DBus
} // namespace Gio
namespace Gio
{
namespace DBus
{
/** @addtogroup giommEnums giomm Enums and Flags */
/**
* @var InterfaceSkeletonFlags DBUS_INTERFACE_SKELETON_FLAGS_NONE
* No flags set.
*
* @var InterfaceSkeletonFlags DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
* Each method invocation is handled ina thread dedicated to the invocation. This means that the method implementation can use blocking IOwithout blocking any other part of the process. It also means that the method implementation mustuse locking to access data structures used by other threads.
*
* @enum InterfaceSkeletonFlags
*
* Flags describing the behavior of a DBusInterfaceSkeleton instance.
*
* @newin{2,30}
* @ingroup giommEnums
* @par Bitwise operators:
* <tt>%InterfaceSkeletonFlags operator|(InterfaceSkeletonFlags, InterfaceSkeletonFlags)</tt><br>
* <tt>%InterfaceSkeletonFlags operator&(InterfaceSkeletonFlags, InterfaceSkeletonFlags)</tt><br>
* <tt>%InterfaceSkeletonFlags operator^(InterfaceSkeletonFlags, InterfaceSkeletonFlags)</tt><br>
* <tt>%InterfaceSkeletonFlags operator~(InterfaceSkeletonFlags)</tt><br>
* <tt>%InterfaceSkeletonFlags& operator|=(InterfaceSkeletonFlags&, InterfaceSkeletonFlags)</tt><br>
* <tt>%InterfaceSkeletonFlags& operator&=(InterfaceSkeletonFlags&, InterfaceSkeletonFlags)</tt><br>
* <tt>%InterfaceSkeletonFlags& operator^=(InterfaceSkeletonFlags&, InterfaceSkeletonFlags)</tt><br>
*/
enum InterfaceSkeletonFlags
{
DBUS_INTERFACE_SKELETON_FLAGS_NONE = 0x0,
DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD = (1<<0)
};
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags operator|(InterfaceSkeletonFlags lhs, InterfaceSkeletonFlags rhs)
{ return static_cast<InterfaceSkeletonFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags operator&(InterfaceSkeletonFlags lhs, InterfaceSkeletonFlags rhs)
{ return static_cast<InterfaceSkeletonFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags operator^(InterfaceSkeletonFlags lhs, InterfaceSkeletonFlags rhs)
{ return static_cast<InterfaceSkeletonFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags operator~(InterfaceSkeletonFlags flags)
{ return static_cast<InterfaceSkeletonFlags>(~static_cast<unsigned>(flags)); }
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags& operator|=(InterfaceSkeletonFlags& lhs, InterfaceSkeletonFlags rhs)
{ return (lhs = static_cast<InterfaceSkeletonFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags& operator&=(InterfaceSkeletonFlags& lhs, InterfaceSkeletonFlags rhs)
{ return (lhs = static_cast<InterfaceSkeletonFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
/** @ingroup giommEnums */
inline InterfaceSkeletonFlags& operator^=(InterfaceSkeletonFlags& lhs, InterfaceSkeletonFlags rhs)
{ return (lhs = static_cast<InterfaceSkeletonFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
class InterfaceInfo;
class Connection;
class MethodInvocation;
/** Abstract base class for D-Bus interfaces on the service side.
* @newin{2,38}
*/
class InterfaceSkeleton
: public Glib::Object,
public Interface
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef InterfaceSkeleton CppObjectType;
typedef InterfaceSkeleton_Class CppClassType;
typedef GDBusInterfaceSkeleton BaseObjectType;
typedef GDBusInterfaceSkeletonClass BaseClassType;
private: friend class InterfaceSkeleton_Class;
static CppClassType interfaceskeleton_class_;
private:
// noncopyable
InterfaceSkeleton(const InterfaceSkeleton&);
InterfaceSkeleton& operator=(const InterfaceSkeleton&);
protected:
explicit InterfaceSkeleton(const Glib::ConstructParams& construct_params);
explicit InterfaceSkeleton(GDBusInterfaceSkeleton* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
virtual ~InterfaceSkeleton();
/** Get the GType for this class, for use with the underlying GObject type system.
*/
static GType get_type() G_GNUC_CONST;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GDBusInterfaceSkeleton* gobj() { return reinterpret_cast<GDBusInterfaceSkeleton*>(gobject_); }
///Provides access to the underlying C GObject.
const GDBusInterfaceSkeleton* gobj() const { return reinterpret_cast<GDBusInterfaceSkeleton*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GDBusInterfaceSkeleton* gobj_copy();
private:
public:
/** If @a interface has outstanding changes, request for these changes to be
* emitted immediately.
*
* For example, an exported D-Bus interface may queue up property
* changes and emit the
* `org.freedesktop.DBus.Properties::Propert``
* signal later (e.g. in an idle handler). This technique is useful
* for collapsing multiple property changes into one.
*
* @newin{2,30}
*/
void flush();
/** Gets D-Bus introspection information for the D-Bus interface
* implemented by @a interface.
*
* @newin{2,30}
* @return A DBusInterfaceInfo (never <tt>0</tt>). Do not free.
*/
Glib::RefPtr<InterfaceInfo> get_info();
/** Gets D-Bus introspection information for the D-Bus interface
* implemented by @a interface.
*
* @newin{2,30}
* @return A DBusInterfaceInfo (never <tt>0</tt>). Do not free.
*/
Glib::RefPtr<const InterfaceInfo> get_info() const;
//TODO: _WRAP_METHOD(GDBusInterfaceVTable* get_vtable(), g_dbus_interface_skeleton_get_vtable)
/** Gets all D-Bus properties for @a interface.
*
* @newin{2,30}
* @return A Variant of type
* ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS].
* Free with Glib::variant_unref().
*/
Glib::VariantBase get_properties() const;
/** Exports @a interface at @a object_path on @a connection.
*
* This can be called multiple times to export the same @a interface
* onto multiple connections however the @a object_path provided must be
* the same for all connections.
*
* Use g_dbus_interface_skeleton_unexport() to unexport the object.
*
* @newin{2,30}
* @param connection A DBusConnection to export @a interface on.
* @param object_path The path to export the interface at.
* @return <tt>true</tt> if the interface was exported on @a connection, otherwise <tt>false</tt> with
* @a error set.
*/
void export_interface_skeleton(const Glib::RefPtr<Connection>& connection, const Glib::ustring& object_path);
/** Stops exporting @a interface on all connections it is exported on.
*
* To unexport @a interface from only a single connection, use
* g_dbus_interface_skeleton_unexport_from_connection()
*
* @newin{2,30}
*/
void unexport();
/** Stops exporting @a interface on @a connection.
*
* To stop exporting on all connections the interface is exported on,
* use g_dbus_interface_skeleton_unexport().
*
* @newin{2,32}
* @param connection A DBusConnection.
*/
void unexport_from_connection(const Glib::RefPtr<Connection>& connection);
/** Gets the first connection that @a interface is exported on, if any.
*
* @newin{2,30}
* @return A DBusConnection or <tt>0</tt> if @a interface is
* not exported anywhere. Do not free, the object belongs to @a interface.
*/
Glib::RefPtr<Connection> get_connection();
/** Gets the first connection that @a interface is exported on, if any.
*
* @newin{2,30}
* @return A DBusConnection or <tt>0</tt> if @a interface is
* not exported anywhere. Do not free, the object belongs to @a interface.
*/
Glib::RefPtr<const Connection> get_connection() const;
/** Gets a list of the connections that @a interface is exported on.
*
* @newin{2,32}
* @return A list of
* all the connections that @a interface is exported on. The returned
* list should be freed with Glib::list_free() after each element has
* been freed with Glib::object_unref().
*/
std::vector< Glib::RefPtr<Connection> > get_connections();
/** Gets a list of the connections that @a interface is exported on.
*
* @newin{2,32}
* @return A list of
* all the connections that @a interface is exported on. The returned
* list should be freed with Glib::list_free() after each element has
* been freed with Glib::object_unref().
*/
std::vector< Glib::RefPtr<const Connection> > get_connections() const;
/** Checks if @a interface is exported on @a connection.
*
* @newin{2,32}
* @param connection A DBusConnection.
* @return <tt>true</tt> if @a interface is exported on @a connection, <tt>false</tt> otherwise.
*/
bool has_connection(const Glib::RefPtr<const Connection>& connection) const;
/** Gets the object path that @a interface is exported on, if any.
*
* @newin{2,30}
* @return A string owned by @a interface or <tt>0</tt> if @a interface is not exported
* anywhere. Do not free, the string belongs to @a interface.
*/
Glib::ustring get_object_path() const;
/** Gets the DBusInterfaceSkeletonFlags that describes what the behavior
* of @a interface
*
* @newin{2,30}
* @return One or more flags from the DBusInterfaceSkeletonFlags enumeration.
*/
InterfaceSkeletonFlags get_flags() const;
/** Sets flags describing what the behavior of @a skeleton should be.
*
* @newin{2,30}
* @param flags Flags from the DBusInterfaceSkeletonFlags enumeration.
*/
void set_flags(InterfaceSkeletonFlags flags);
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Flags for the interface skeleton.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< InterfaceSkeletonFlags > property_g_flags() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Flags for the interface skeleton.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< InterfaceSkeletonFlags > property_g_flags() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
/**
* @par Slot Prototype:
* <tt>bool on_my_%authorize_method(const Glib::RefPtr<MethodInvocation>& invocation)</tt>
*
* Emitted when a method is invoked by a remote caller and used to
* determine if the method call is authorized.
*
* Note that this signal is emitted in a thread dedicated to
* handling the method call so handlers are allowed to perform
* blocking IO. This means that it is appropriate to call e.g.
* [polkit_authority_check_authorization_sync()](http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync)
* with the
* [POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION](http://hal.freedesktop.org/docs/polkit/PolkitAuthority.htmlP::OLKIT-CHECK-AUTHORIZATION-FLAGS-ALLOW-USER-INTERACTION:CAPS)
* flag set.
*
* If <tt>false</tt> is returned then no further handlers are run and the
* signal handler must take a reference to @a invocation and finish
* handling the call (e.g. return an error via
* g_dbus_method_invocation_return_error()).
*
* Otherwise, if <tt>true</tt> is returned, signal emission continues. If no
* handlers return <tt>false</tt>, then the method is dispatched. If
* @a interface has an enclosing DBusObjectSkeleton, then the
* DBusObjectSkeleton::signal_authorize_method() signal handlers run before
* the handlers for this signal.
*
* The default class handler just returns <tt>true</tt>.
*
* Please note that the common case is optimized: if no signals
* handlers are connected and the default class handler isn't
* overridden (for both @a interface and the enclosing
* DBusObjectSkeleton, if any) and DBusInterfaceSkeleton::property_g_flags() does
* not have the
* DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
* flags set, no dedicated thread is ever used and the call will be
* handled in the same thread as the object that @a interface belongs
* to was exported in.
*
* @newin{2,30}
* @param invocation A DBusMethodInvocation.
* @return <tt>true</tt> if the call is authorized, <tt>false</tt> otherwise.
*/
Glib::SignalProxy1< bool,const Glib::RefPtr<MethodInvocation>& > signal_authorize_method();
//TODO: The virtual functions.
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
/// This is a default handler for the signal signal_authorize_method().
virtual bool on_authorize_method(const Glib::RefPtr<MethodInvocation>& invocation);
};
} // namespace DBus
} // namespace Gio
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gio::DBus::InterfaceSkeleton
*/
Glib::RefPtr<Gio::DBus::InterfaceSkeleton> wrap(GDBusInterfaceSkeleton* object, bool take_copy = false);
}
#endif /* _GIOMM_DBUSINTERFACESKELETON_H */
|