diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-17 21:54:36 +0100 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-17 21:54:36 +0100 |
commit | d3d5cb3a4a2c2cb2bd0c2571304d59e19bc08452 (patch) | |
tree | a8abe16d02d6ebde1700985bb0c5074941c13378 | |
parent | c87c8a81947a68507e8f3bcaf8e0e969b3e5331b (diff) | |
download | pygobject-d3d5cb3a4a2c2cb2bd0c2571304d59e19bc08452.tar.gz |
Wrap new API added in GIO-UNIX 2.22
-rw-r--r-- | gio/unix-types.defs | 22 | ||||
-rw-r--r-- | gio/unix.defs | 115 | ||||
-rw-r--r-- | gio/unix.override | 8 |
3 files changed, 144 insertions, 1 deletions
diff --git a/gio/unix-types.defs b/gio/unix-types.defs index fea11e96..ed1ed9f1 100644 --- a/gio/unix-types.defs +++ b/gio/unix-types.defs @@ -1,5 +1,12 @@ ;; -*- scheme -*- +(define-object Connection + (in-module "giounix") + (parent "GSocketConnection") + (c-name "GUnixConnection") + (gtype-id "G_TYPE_UNIX_CONNECTION") +) + (define-object DesktopAppInfo (docstring "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n" @@ -12,6 +19,13 @@ (gtype-id "G_TYPE_DESKTOP_APP_INFO") ) +(define-object FDMessage + (in-module "giounix") + (parent "GSocketControlMessage") + (c-name "GUnixFDMessage") + (gtype-id "G_TYPE_UNIX_FD_MESSAGE") +) + (define-object InputStream (in-module "giounix") (parent "GInputStream") @@ -31,3 +45,11 @@ (c-name "GUnixMountEntry") (gtype-id "GIO_UNIX_MOUNT_ENTRY_TYPE") ) + +(define-object SocketAddress + (in-module "giounix") + (parent "GSocketAddress") + (c-name "GUnixSocketAddress") + (gtype-id "G_TYPE_UNIX_SOCKET_ADDRESS") +) + diff --git a/gio/unix.defs b/gio/unix.defs index 018a3513..ff43ed6a 100644 --- a/gio/unix.defs +++ b/gio/unix.defs @@ -2,6 +2,36 @@ (include "unix-types.defs") +;; From gunixconnection.h + +(define-function g_unix_connection_get_type + (c-name "g_unix_connection_get_type") + (return-type "GType") +) + +(define-method send_fd + (of-object "GUnixConnection") + (c-name "g_unix_connection_send_fd") + (return-type "gboolean") + (parameters + '("gint" "fd") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + +(define-method receive_fd + (of-object "GUnixConnection") + (c-name "g_unix_connection_receive_fd") + (return-type "gint") + (parameters + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + + + ;; From gdesktopappinfo.h (define-function desktop_app_info_get_type @@ -48,7 +78,39 @@ ) ) -;; From gunixmount.h + + +;; From gunixfdmessage.h + +(define-function g_unix_fd_message_get_type + (c-name "g_unix_fd_message_get_type") + (return-type "GType") +) + +(define-function g_unix_fd_message_new + (c-name "g_unix_fd_message_new") + (is-constructor-of "GUnixFdMessage") + (return-type "GSocketControlMessage*") +) + +(define-method steal_fds + (of-object "GUnixFDMessage") + (c-name "g_unix_fd_message_steal_fds") + (return-type "gint*") + (parameters + '("gint*" "length") + ) +) + +(define-method append_fd + (of-object "GUnixFDMessage") + (c-name "g_unix_fd_message_append_fd") + (return-type "gboolean") + (parameters + '("gint" "fd") + '("GError**" "error") + ) +) @@ -360,3 +422,54 @@ (c-name "g_unix_output_stream_get_fd") (return-type "gint") ) + + + +;; From gunixsocketaddress.h + +(define-function g_unix_socket_address_get_type + (c-name "g_unix_socket_address_get_type") + (return-type "GType") +) + +(define-function g_unix_socket_address_new + (c-name "g_unix_socket_address_new") + (is-constructor-of "GUnixSocketAddress") + (return-type "GSocketAddress*") + (parameters + '("const-gchar*" "path") + ) +) + +(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/unix.override b/gio/unix.override index bdf710e5..fd691e81 100644 --- a/gio/unix.override +++ b/gio/unix.override @@ -23,10 +23,14 @@ headers #define NO_IMPORT_PYGOBJECT #include <pygobject.h> +#include <gio/gio.h> #include <gio/gdesktopappinfo.h> #include <gio/gunixinputstream.h> #include <gio/gunixmounts.h> #include <gio/gunixoutputstream.h> +#include <gio/gunixconnection.h> +#include <gio/gunixfdmessage.h> +#include <gio/gunixsocketaddress.h> #define GIO_UNIX_MOUNT_ENTRY_TYPE (_gio_unix_mount_entry_get_type ()) @@ -46,6 +50,10 @@ modulename gio.unix import gobject.GObject as PyGObject_Type import gio.InputStream as PyGInputStream_Type import gio.OutputStream as PyGOutputStream_Type +import gio.SocketAddress as PyGSocketAddress_Type +import gio.Cancellable as PyGCancellable_Type +import gio.SocketConnection as PyGSocketConnection_Type +import gio.SocketControlMessage as PyGSocketControlMessage_Type %% ignore-glob *_get_type |