1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 #ifndef _GIOMM_DBUSADDRESS_H
3 #define _GIOMM_DBUSADDRESS_H
4 
5 
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8 
9 /* Copyright (C) 2010 The giomm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 #include <giomm/dbusconnection.h>
26 
27 
28 namespace Gio
29 {
30 
31 namespace DBus
32 {
33 
34 namespace Address
35 {
36 
37 /** Checks if @a string is a D-Bus address.
38  *
39  * This doesn't check if @a string is actually supported by BusServer or
40  * BusConnection - use is_supported_address() to do more checks.
41  *
42  * @param string A string.
43  * @return <tt>true</tt> if @a string is a valid D-Bus address, <tt>false</tt>
44  * otherwise.
45  * @newin{2,28}
46  * @ingroup DBus
47  */
48 GIOMM_API
49 bool is_address(const std::string& string);
50 
51 /** Like is_address() but also checks if the library supports the transports
52  * in @a address and that key/value pairs for each transport are valid.
53  *
54  * @param address A supposed address.
55  * @return <tt>true</tt> if @a address is a valid D-Bus address that is
56  * supported by this library, <tt>false</tt> otherwise.
57  * @throw Glib::Error.
58  * @newin{2,28}
59  * @ingroup DBus
60  */
61 GIOMM_API
62 bool is_supported(const std::string& address);
63 
64 /** Asynchronously connects to an endpoint specified by @a address and sets up
65  * the connection so it is in a state to run the client-side of the D-Bus
66  * authentication conversation.
67  *
68  * When the operation is finished, @a slot will be invoked. You can then call
69  * get_stream_finish() to get the result of the operation.
70  *
71  * This is an asynchronous failable function. See get_stream_sync() for the
72  * synchronous version.
73  *
74  * @param address A valid D-Bus address.
75  * @param cancellable A Cancellable.
76  * @param slot A SlotAsyncReady to call when the request is satisfied.
77  * @newin{2,28}
78  * @ingroup DBus
79  */
80 GIOMM_API
81 void get_stream(const std::string& address, const SlotAsyncReady slot,
82   const Glib::RefPtr<Cancellable>& cancellable);
83 
84 /// A non-cancellable version of get_stream().
85 GIOMM_API
86 void get_stream(const std::string& address, const SlotAsyncReady slot);
87 
88 /** Finishes an operation started with get_stream().
89  *
90  * @param res A AsyncResult obtained from the SlotAsyncReady passed to
91  * get_stream().
92  * @param out_guid Return location to store the GUID extracted from address,
93  * if any.
94  * @return A IOStream.
95  * @throw Glib::Error.
96  * @newin{2,28}
97  * @ingroup DBus
98  */
99 GIOMM_API
100 Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res,
101   std::string& out_guid);
102 
103 /** Finishes an operation started with get_stream().
104  *
105  * @param res A AsyncResult obtained from the SlotAsyncReady passed to
106  * get_stream().
107  * @return A IOStream.
108  * @throw Glib::Error.
109  * @newin{2,28}
110  * @ingroup DBus
111  */
112 GIOMM_API
113 Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res);
114 
115 /** Synchronously connects to an endpoint specified by @a address and sets up
116  * the connection so it is in a state to run the client-side of the D-Bus
117  * authentication conversation.
118  *
119  * This is a synchronous failable function. See get_stream() for the
120  * asynchronous version.
121  *
122  * @param address A valid D-Bus address.
123  * @param cancellable A Cancellable.
124  * @param out_guid A return location to store the GUID extracted from address,
125  * if any.
126  * @return A IOStream.
127  * @throw Glib::Error.
128  * @newin{2,28}
129  * @ingroup DBus
130  */
131 GIOMM_API
132 Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
133   const Glib::RefPtr<Cancellable>& cancellable, std::string& out_guid);
134 
135 /// A non-cancellable version of get_stream_sync().
136 GIOMM_API
137 Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
138   std::string& out_guid);
139 
140 /** Synchronously connects to an endpoint specified by @a address and sets up
141  * the connection so it is in a state to run the client-side of the D-Bus
142  * authentication conversation.
143  *
144  * This is a synchronous failable function. See get_stream() for the
145  * asynchronous version.
146  *
147  * @param address A valid D-Bus address.
148  * @param cancellable A Cancellable.
149  * @return A IOStream.
150  * @throw Glib::Error.
151  * @newin{2,28}
152  * @ingroup DBus
153  */
154 GIOMM_API
155 Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
156   const Glib::RefPtr<Cancellable>& cancellable);
157 
158 /// A non-cancellable version of get_stream_sync().
159 GIOMM_API
160 Glib::RefPtr<IOStream> get_stream_sync(const std::string& address);
161 
162 /** Synchronously looks up the D-Bus address for the well-known message bus
163  * instance specified by @a bus_type. This may involve using various platform
164  * specific mechanisms.
165  *
166  * @param bus_type A BusType.
167  * @param cancellable A Cancellable.
168  * @return A valid D-Bus address string for @a bus_type.
169  * @throw Glib::Error.
170  * @newin{2,28}
171  * @ingroup DBus
172  */
173 GIOMM_API
174 std::string get_for_bus_sync(BusType bus_type,
175   const Glib::RefPtr<Cancellable>& cancellable);
176 
177 /// A non-cancellable get_for_bus_sync().
178 GIOMM_API
179 std::string get_for_bus_sync(BusType bus_type);
180 
181 } // namespace Address
182 
183 } // namespace DBus
184 
185 } // namespace Gio
186 
187 
188 #endif /* _GIOMM_DBUSADDRESS_H */
189 
190