summaryrefslogtreecommitdiff
path: root/gio/src/socketconnectable.hg
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon@quotidian.org>2009-06-17 23:58:30 -0500
committerJonathon Jongsma <jonathon@quotidian.org>2009-06-17 23:59:22 -0500
commita82096484640702ff700a3494dcff74527d7953f (patch)
tree60f4bab70519ff6f962563383951d5a38e7d515a /gio/src/socketconnectable.hg
parentf365326dd970083f339b393ea3ae0efcf3ce091c (diff)
downloadglibmm-a82096484640702ff700a3494dcff74527d7953f.tar.gz
Add initial wrappers for SocketConnectable, SocketAddress
Diffstat (limited to 'gio/src/socketconnectable.hg')
-rw-r--r--gio/src/socketconnectable.hg67
1 files changed, 67 insertions, 0 deletions
diff --git a/gio/src/socketconnectable.hg b/gio/src/socketconnectable.hg
new file mode 100644
index 00000000..8dcb72cb
--- /dev/null
+++ b/gio/src/socketconnectable.hg
@@ -0,0 +1,67 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2007 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/interface.h>
+#include <giomm/cancellable.h>
+#include <giomm/asyncresult.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/interface_p.h)
+_PINCLUDE(glibmm/private/object_p.h)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GSocketConnectableIface GSocketConnectableIface;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gio
+{
+
+class SocketAddress;
+
+/** Enumerator type for objects that contain or generate SocketAddresses
+ *
+ * @newin2p22
+ */
+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
+ //_WRAP_METHOD(void next_async(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot), g_socket_address_enumerator_next_async)
+ _WRAP_METHOD(Glib::RefPtr<SocketAddress> next_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_address_enumerator_next_finish, errthrow)
+};
+
+/** Interface for potential socket endpoints
+ *
+ * @newin2p22
+ */
+class SocketConnectable : public Glib::Interface
+{
+ _CLASS_INTERFACE(SocketConnectable, GSocketConnectable, G_SOCKET_CONNECTABLE, GSocketConnectableIface)
+
+public:
+ // TODO
+ _WRAP_METHOD (Glib::RefPtr<SocketAddressEnumerator> enumerate(), g_socket_connectable_enumerate)
+};
+
+} // namespace Gio
+