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
|
// -*- 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 <glibmm/object.h>
#include <giomm/iostream.h>
#include <giomm/asyncresult.h>
#include <giomm/credentials.h>
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
//TODO: Use a GDbus namespace, and remove the DBus prefixes.
namespace Gio
{
_WRAP_ENUM(DBusCapabilityFlags, GDBusCapabilityFlags, NO_GTYPE)
/** TODO
*
* @newin{2,26}
*/
class DBusConnection : public Glib::Object
{
protected:
_CLASS_GOBJECT(DBusConnection, GDBusConnection, G_DBUS_CONNECTION, Glib::Object, GObject)
public:
_WRAP_METHOD(bool is_closed() const, g_dbus_connection_is_closed)
//TODO: Documentation.
void close();
//TODO: Documentation.
void close(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
//TODO: Documentation.
void close(const SlotAsyncReady& slot);
_IGNORE(g_dbus_connection_close)
_WRAP_METHOD(bool close_finish(const Glib::RefPtr<AsyncResult>& result),
g_dbus_connection_close_finish, errthrow)
//TODO: Documentation.
void close_sync();
//TODO: Documentation.
_WRAP_METHOD(void close_sync(const Glib::RefPtr<Cancellable>& cancellable), g_dbus_connection_close_sync, errthrow)
//TODO: Documentation.
void flush();
//TODO: Documentation.
void flush(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
//TODO: Documentation.
void flush(const SlotAsyncReady& slot);
_IGNORE(g_dbus_connection_flush)
_WRAP_METHOD(bool flush_finish(const Glib::RefPtr<AsyncResult>& result),
g_dbus_connection_flush_finish, errthrow)
//TODO: Documentation.
void flush_sync();
//TODO: Documentation.
_WRAP_METHOD(void flush_sync(const Glib::RefPtr<Cancellable>& cancellable), g_dbus_connection_flush_sync, errthrow)
_WRAP_METHOD(Glib::RefPtr<IOStream> get_stream(), g_dbus_connection_get_stream, refreturn)
_WRAP_METHOD(Glib::RefPtr<const IOStream> get_stream() const, g_dbus_connection_get_stream, refreturn, constversion)
_WRAP_METHOD(Glib::ustring get_guid() const, g_dbus_connection_get_guid)
_WRAP_METHOD(Glib::ustring get_unique_name() const, g_dbus_connection_get_unique_name)
_WRAP_METHOD(Glib::RefPtr<Credentials> get_peer_credentials(), g_dbus_connection_get_peer_credentials, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Credentials> get_peer_credentials() const, g_dbus_connection_get_peer_credentials, refreturn, constversion)
_WRAP_METHOD(bool get_exit_on_close() const, g_dbus_connection_get_exit_on_close)
_WRAP_METHOD(void set_exit_on_close(bool exit_on_close = true), g_dbus_connection_set_exit_on_close)
_WRAP_METHOD(DBusCapabilityFlags get_capabilities() const, g_dbus_connection_get_capabilities)
};
} // namespace Gio
|