[glibmm: 6/8] add overloads without a 'cancellable' argument for SocketAddressEnumerator methods
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Subject: [glibmm: 6/8] add overloads without a 'cancellable' argument for SocketAddressEnumerator methods
- Date: Thu, 18 Jun 2009 12:42:14 -0400 (EDT)
commit 805d93de8cc5058d2c95b1fef4fd4c26228c3025
Author: Jonathon Jongsma <jonathon quotidian org>
Date: Thu Jun 18 11:29:04 2009 -0500
add overloads without a 'cancellable' argument for SocketAddressEnumerator methods
ChangeLog | 6 ++++++
gio/src/socketconnectable.ccg | 21 +++++++++++++++++++++
gio/src/socketconnectable.hg | 10 ++++++++--
3 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bcd16f7..2f30416 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-06-18 Jonathon Jongsma <jonathon quotidian org>
+ * gio/src/socketconnectable.ccg:
+ * gio/src/socketconnectable.hg: add overloads without a
+ 'cancellable' argument for SocketAddressEnumerator methods
+
+2009-06-18 Jonathon Jongsma <jonathon quotidian org>
+
* gio/src/gio_methods.defs: re-generate
* gio/src/socketaddress.hg: uncomment method that was being
generated incorrectly due to out-of-date .defs
diff --git a/gio/src/socketconnectable.ccg b/gio/src/socketconnectable.ccg
index 206818a..235f288 100644
--- a/gio/src/socketconnectable.ccg
+++ b/gio/src/socketconnectable.ccg
@@ -38,4 +38,25 @@ namespace Gio {
slot_copy);
}
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ Glib::RefPtr<SocketAddress>
+ SocketAddressEnumerator::next()
+#else
+ Glib::RefPtr<SocketAddress>
+ SocketAddressEnumerator::next(std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+ {
+ GError* gerror = 0;
+ Glib::RefPtr<SocketAddress> retvalue = Glib::wrap(g_socket_address_enumerator_next(gobj(), NULL, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
+#else
+ if(gerror)
+ error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ return retvalue;
+
+ }
} // namespace Gio
diff --git a/gio/src/socketconnectable.hg b/gio/src/socketconnectable.hg
index 3e205fd..43d6f8c 100644
--- a/gio/src/socketconnectable.hg
+++ b/gio/src/socketconnectable.hg
@@ -43,10 +43,16 @@ class SocketAddressEnumerator : public Glib::Object
_CLASS_GOBJECT(SocketAddressEnumerator, GSocketAddressEnumerator, G_SOCKET_ADDRESS_ENUMERATOR, Glib::Object, GObject)
public:
- // TODO: overloads without cancellable
_WRAP_METHOD(Glib::RefPtr<SocketAddress> next(const Glib::RefPtr<Cancellable>& cancellable), g_socket_address_enumerator_next, errthrow)
- // TODO: overloads without cancellable
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ Glib::RefPtr<SocketAddress> next();
+#else
+ Glib::RefPtr<SocketAddress> next(std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
void next_async(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
+ void next_async(const SlotAsyncReady& slot);
+
_WRAP_METHOD(Glib::RefPtr<SocketAddress> next_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_address_enumerator_next_finish, errthrow)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]