[glibmm: 5/8] re-generate .defs for giomm, fix a coupel methods
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Subject: [glibmm: 5/8] re-generate .defs for giomm, fix a coupel methods
- Date: Thu, 18 Jun 2009 12:42:09 -0400 (EDT)
commit 25c8839db5addd59f0fbee154bd18dd4f5515bea
Author: Jonathon Jongsma <jonathon quotidian org>
Date: Thu Jun 18 11:24:25 2009 -0500
re-generate .defs for giomm, fix a coupel methods
* gio/src/gio_methods.defs: re-generate
* gio/src/socketaddress.hg: uncomment method that was being
generated incorrectly due to out-of-date .defs
* gio/src/socketconnectable.ccg:
* gio/src/socketconnectable.hg: wrap the next_async() manually
because we need to do the slot adaptation stuff
ChangeLog | 9 +
gio/src/gio_methods.defs | 360 +++++++++++++++++++++++++++++++++--------
gio/src/socketaddress.hg | 3 +-
gio/src/socketconnectable.ccg | 17 ++
gio/src/socketconnectable.hg | 2 +-
5 files changed, 318 insertions(+), 73 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index aa3e6d2..bcd16f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
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
+ * gio/src/socketconnectable.ccg:
+ * gio/src/socketconnectable.hg: wrap the next_async() manually
+ because we need to do the slot adaptation stuff
+
+2009-06-18 Jonathon Jongsma <jonathon quotidian org>
+
* gio/src/resolver.ccg:
* gio/src/resolver.hg: remove some overloads for now and get the
lookup_service() API working with the list of SrvTargets
diff --git a/gio/src/gio_methods.defs b/gio/src/gio_methods.defs
index 6cfbb67..e49f0d1 100644
--- a/gio/src/gio_methods.defs
+++ b/gio/src/gio_methods.defs
@@ -445,8 +445,8 @@
(c-name "GFileQueryInfoFlags")
(gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS")
(values
- '("none" "G_FILE_QUERY_INFO_NONE")
- '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
+ '("ne" "G_FILE_QUERY_INFO_NONE")
+ '("follow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
)
)
@@ -466,7 +466,7 @@
(c-name "GMountMountFlags")
(gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
(values
- '("none" "G_MOUNT_MOUNT_NONE")
+ '("e" "G_MOUNT_MOUNT_NONE")
)
)
@@ -480,6 +480,28 @@
)
)
+(define-enum StartFlags
+ (in-module "GDrive")
+ (c-name "GDriveStartFlags")
+ (gtype-id "G_TYPE_DRIVE_START_FLAGS")
+ (values
+ '("e" "G_DRIVE_START_NONE")
+ )
+)
+
+(define-enum StartStopType
+ (in-module "GDrive")
+ (c-name "GDriveStartStopType")
+ (gtype-id "G_TYPE_DRIVE_START_STOP_TYPE")
+ (values
+ '("unknown" "G_DRIVE_START_STOP_TYPE_UNKNOWN")
+ '("shutdown" "G_DRIVE_START_STOP_TYPE_SHUTDOWN")
+ '("network" "G_DRIVE_START_STOP_TYPE_NETWORK")
+ '("multidisk" "G_DRIVE_START_STOP_TYPE_MULTIDISK")
+ '("password" "G_DRIVE_START_STOP_TYPE_PASSWORD")
+ )
+)
+
(define-flags CopyFlags
(in-module "GFile")
(c-name "GFileCopyFlags")
@@ -662,10 +684,10 @@
(c-name "GSocketFamily")
(gtype-id "G_TYPE_SOCKET_FAMILY")
(values
- '("invalid" "G_SOCKET_FAMILY_INVALID")
- '("unix" "G_SOCKET_FAMILY_UNIX")
- '("ipv4" "G_SOCKET_FAMILY_IPV4")
- '("ipv6" "G_SOCKET_FAMILY_IPV6")
+ '("g-socket-family-invalid" "G_SOCKET_FAMILY_INVALID")
+ '("#ifdef" "#ifdef")
+ '("#endif" "#endif")
+ '("g-socket-family-ipv6" "G_SOCKET_FAMILY_IPV6")
)
)
@@ -686,13 +708,26 @@
(c-name "GSocketMsgFlags")
(gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
(values
- '("invalid" "G_SOCKET_MSG_INVALID")
+ '("none" "G_SOCKET_MSG_NONE")
'("oob" "G_SOCKET_MSG_OOB")
'("peek" "G_SOCKET_MSG_PEEK")
'("dontroute" "G_SOCKET_MSG_DONTROUTE")
)
)
+(define-enum Protocol
+ (in-module "GSocket")
+ (c-name "GSocketProtocol")
+ (gtype-id "G_TYPE_SOCKET_PROTOCOL")
+ (values
+ '("unknown" "G_SOCKET_PROTOCOL_UNKNOWN")
+ '("default" "G_SOCKET_PROTOCOL_DEFAULT")
+ '("tcp" "G_SOCKET_PROTOCOL_TCP")
+ '("udp" "G_SOCKET_PROTOCOL_UDP")
+ '("sctp" "G_SOCKET_PROTOCOL_SCTP")
+ )
+)
+
;; From gappinfo.h
@@ -1840,6 +1875,69 @@
(return-type "char**")
)
+(define-method get_start_stop_type
+ (of-object "GDrive")
+ (c-name "g_drive_get_start_stop_type")
+ (return-type "GDriveStartStopType")
+)
+
+(define-method can_start
+ (of-object "GDrive")
+ (c-name "g_drive_can_start")
+ (return-type "gboolean")
+)
+
+(define-method start
+ (of-object "GDrive")
+ (c-name "g_drive_start")
+ (return-type "none")
+ (parameters
+ '("GDriveStartFlags" "flags")
+ '("GMountOperation*" "start_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method start_finish
+ (of-object "GDrive")
+ (c-name "g_drive_start_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method can_stop
+ (of-object "GDrive")
+ (c-name "g_drive_can_stop")
+ (return-type "gboolean")
+)
+
+(define-method stop
+ (of-object "GDrive")
+ (c-name "g_drive_stop")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method stop_finish
+ (of-object "GDrive")
+ (c-name "g_drive_stop_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
;; From gemblemedicon.h
@@ -3056,6 +3154,51 @@
)
)
+(define-method start_mountable
+ (of-object "GFile")
+ (c-name "g_file_start_mountable")
+ (return-type "none")
+ (parameters
+ '("GDriveStartFlags" "flags")
+ '("GMountOperation*" "start_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method start_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_start_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method stop_mountable
+ (of-object "GFile")
+ (c-name "g_file_stop_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method stop_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_stop_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
(define-method query_default_handler
(of-object "GFile")
(c-name "g_file_query_default_handler")
@@ -4100,6 +4243,12 @@
(return-type "const-guint8*")
)
+(define-method get_native_size
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_native_size")
+ (return-type "gsize")
+)
+
(define-method get_family
(of-object "GInetAddress")
(c-name "g_inet_address_get_family")
@@ -4461,6 +4610,16 @@
(return-type "GType")
)
+(define-function g_drive_start_flags_get_type
+ (c-name "g_drive_start_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function g_drive_start_stop_type_get_type
+ (c-name "g_drive_start_stop_type_get_type")
+ (return-type "GType")
+)
+
(define-function g_file_copy_flags_get_type
(c-name "g_file_copy_flags_get_type")
(return-type "GType")
@@ -4536,6 +4695,11 @@
(return-type "GType")
)
+(define-function g_socket_protocol_get_type
+ (c-name "g_socket_protocol_get_type")
+ (return-type "GType")
+)
+
;; From gioerror.h
@@ -5243,7 +5407,7 @@
(c-name "g_network_address_parse")
(return-type "GSocketConnectable*")
(parameters
- '("const-char*" "host_and_port")
+ '("const-gchar*" "host_and_port")
'("guint16" "default_port")
'("GError**" "error")
)
@@ -5956,6 +6120,7 @@
(parameters
'("gpointer" "dest")
'("gsize" "destlen")
+ '("GError**" "error")
)
)
@@ -6013,7 +6178,7 @@
(define-method get_protocol
(of-object "GSocketClient")
(c-name "g_socket_client_get_protocol")
- (return-type "const-char*")
+ (return-type "GSocketProtocol")
)
(define-method set_protocol
@@ -6021,7 +6186,7 @@
(c-name "g_socket_client_set_protocol")
(return-type "none")
(parameters
- '("const-char*" "protocol")
+ '("GSocketProtocol" "protocol")
)
)
@@ -6056,8 +6221,20 @@
(c-name "g_socket_client_connect_to_host")
(return-type "GSocketConnection*")
(parameters
- '("const-char*" "hostname")
- '("int" "port")
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_service
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("const-gchar*" "domain")
+ '("const-gchar*" "service")
'("GCancellable*" "cancellable")
'("GError**" "error")
)
@@ -6090,8 +6267,8 @@
(c-name "g_socket_client_connect_to_host_async")
(return-type "none")
(parameters
- '("const-char*" "hostname")
- '("int" "port")
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
'("GCancellable*" "cancellable")
'("GAsyncReadyCallback" "callback")
'("gpointer" "user_data")
@@ -6108,6 +6285,29 @@
)
)
+(define-method connect_to_service_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "domain")
+ '("const-gchar*" "service")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_to_service_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
;; From gsocketconnectable.h
@@ -6173,7 +6373,7 @@
(parameters
'("GSocketFamily" "family")
'("GSocketType" "type")
- '("gint" "protocol")
+ '("gint" "protocol_id")
)
)
@@ -6246,7 +6446,7 @@
(parameters
'("GSocketFamily" "family")
'("GSocketType" "type")
- '("gint" "protocol_id")
+ '("GSocketProtocol" "protocol")
'("GError**" "error")
)
)
@@ -6278,16 +6478,10 @@
(return-type "GSocketType")
)
-(define-method get_protocol_id
+(define-method get_protocol
(of-object "GSocket")
- (c-name "g_socket_get_protocol_id")
- (return-type "gint")
-)
-
-(define-method get_protocol_name
- (of-object "GSocket")
- (c-name "g_socket_get_protocol_name")
- (return-type "char*")
+ (c-name "g_socket_get_protocol")
+ (return-type "GSocketProtocol")
)
(define-method get_local_address
@@ -6323,21 +6517,6 @@
(return-type "gboolean")
)
-(define-method set_reuse_address
- (of-object "GSocket")
- (c-name "g_socket_set_reuse_address")
- (return-type "none")
- (parameters
- '("gboolean" "reuse")
- )
-)
-
-(define-method get_reuse_address
- (of-object "GSocket")
- (c-name "g_socket_get_reuse_address")
- (return-type "gboolean")
-)
-
(define-method set_keepalive
(of-object "GSocket")
(c-name "g_socket_set_keepalive")
@@ -6395,9 +6574,9 @@
)
)
-(define-method check_pending_error
+(define-method check_connect_result
(of-object "GSocket")
- (c-name "g_socket_check_pending_error")
+ (c-name "g_socket_check_connect_result")
(return-type "gboolean")
(parameters
'("GError**" "error")
@@ -6488,25 +6667,6 @@
)
)
-(define-method receive_control_message
- (of-object "GSocket")
- (c-name "g_socket_receive_control_message")
- (return-type "GSocketControlMessage*")
- (parameters
- '("GError**" "error")
- )
-)
-
-(define-method send_control_message
- (of-object "GSocket")
- (c-name "g_socket_send_control_message")
- (return-type "gboolean")
- (parameters
- '("GSocketControlMessage*" "message")
- '("GError**" "error")
- )
-)
-
(define-method receive_message
(of-object "GSocket")
(c-name "g_socket_receive_message")
@@ -6546,6 +6706,17 @@
)
)
+(define-method shutdown
+ (of-object "GSocket")
+ (c-name "g_socket_shutdown")
+ (return-type "gboolean")
+ (parameters
+ '("gboolean" "shutdown_read")
+ '("gboolean" "shutdown_write")
+ '("GError**" "error")
+ )
+)
+
(define-method is_closed
(of-object "GSocket")
(c-name "g_socket_is_closed")
@@ -6562,12 +6733,10 @@
)
)
-(define-function g_socket_protocol_id_lookup_by_name
- (c-name "g_socket_protocol_id_lookup_by_name")
- (return-type "gint")
- (parameters
- '("const-char*" "protocol_name")
- )
+(define-method speaks_ipv4
+ (of-object "GSocket")
+ (c-name "g_socket_speaks_ipv4")
+ (return-type "gboolean")
)
@@ -6612,8 +6781,9 @@
(parameters
'("GSocketAddress*" "address")
'("GSocketType" "type")
- '("const-char*" "protocol")
+ '("GSocketProtocol" "protocol")
'("GObject*" "source_object")
+ '("GSocketAddress**" "effective_address")
'("GError**" "error")
)
)
@@ -6623,7 +6793,7 @@
(c-name "g_socket_listener_add_inet_port")
(return-type "gboolean")
(parameters
- '("int" "port")
+ '("guint16" "port")
'("GObject*" "source_object")
'("GError**" "error")
)
@@ -6808,6 +6978,21 @@
(return-type "GType")
)
+(define-method set_graceful_disconnect
+ (of-object "GTcpConnection")
+ (c-name "g_tcp_connection_set_graceful_disconnect")
+ (return-type "none")
+ (parameters
+ '("gboolean" "graceful_disconnect")
+ )
+)
+
+(define-method get_graceful_disconnect
+ (of-object "GTcpConnection")
+ (c-name "g_tcp_connection_get_graceful_disconnect")
+ (return-type "gboolean")
+)
+
;; From gthemedicon.h
@@ -6874,6 +7059,9 @@
(c-name "g_threaded_socket_service_new")
(is-constructor-of "GThreadedSocketService")
(return-type "GSocketService*")
+ (parameters
+ '("int" "max_threads")
+ )
)
@@ -7564,4 +7752,36 @@
)
)
+(define-function g_unix_socket_address_new_abstract
+ (c-name "g_unix_socket_address_new_abstract")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("const-gchar*" "path")
+ '("int" "path_len")
+ )
+)
+
+(define-method get_path
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_path")
+ (return-type "const-char*")
+)
+
+(define-method get_path_len
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_path_len")
+ (return-type "gsize")
+)
+
+(define-method get_is_abstract
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_is_abstract")
+ (return-type "gboolean")
+)
+
+(define-function g_unix_socket_address_abstract_names_supported
+ (c-name "g_unix_socket_address_abstract_names_supported")
+ (return-type "gboolean")
+)
+
diff --git a/gio/src/socketaddress.hg b/gio/src/socketaddress.hg
index f5193b7..199c14c 100644
--- a/gio/src/socketaddress.hg
+++ b/gio/src/socketaddress.hg
@@ -45,8 +45,7 @@ class SocketAddress : public Glib::Object,
public:
_WRAP_CREATE(gpointer native, gsize len)
_WRAP_METHOD(SocketFamily get_family() const, g_socket_address_get_family)
- //FIXME: not being generated correctly
- //_WRAP_METHOD(bool to_native(gpointer dest, gsize destlen), g_socket_address_to_native, errthrow)
+ _WRAP_METHOD(bool to_native(gpointer dest, gsize destlen), g_socket_address_to_native, errthrow)
_WRAP_METHOD(gssize get_native_size() const, g_socket_address_get_native_size)
};
diff --git a/gio/src/socketconnectable.ccg b/gio/src/socketconnectable.ccg
index 3624042..206818a 100644
--- a/gio/src/socketconnectable.ccg
+++ b/gio/src/socketconnectable.ccg
@@ -19,6 +19,23 @@
#include <gio/gio.h>
#include <giomm/socketaddress.h>
+#include "slot_async.h"
namespace Gio {
+
+ void
+ SocketAddressEnumerator::next_async(const Glib::RefPtr<Cancellable>& cancellable,
+ const SlotAsyncReady& slot)
+ {
+ // Create a copy of the slot.
+ // A pointer to it will be passed through the callback's data parameter
+ // and deleted in the callback.
+ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+ g_socket_address_enumerator_next_async(gobj(),
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+ }
+
} // namespace Gio
diff --git a/gio/src/socketconnectable.hg b/gio/src/socketconnectable.hg
index 8dcb72c..3e205fd 100644
--- a/gio/src/socketconnectable.hg
+++ b/gio/src/socketconnectable.hg
@@ -46,7 +46,7 @@ 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)
+ void next_async(const Glib::RefPtr<Cancellable>& cancellable, 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]