diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2010-11-07 20:57:43 -0500 |
---|---|---|
committer | José Alburquerque <jaalburqu@svn.gnome.org> | 2010-11-07 21:19:57 -0500 |
commit | 61d3f7d345df46d5ef8439cab8217e4cd1b296f3 (patch) | |
tree | 74c0b69f180283a55aa912b8a29b4595cb506ced | |
parent | ac35dceacb2e73282ae6e28e1367e9ef6498a3a7 (diff) | |
download | glibmm-61d3f7d345df46d5ef8439cab8217e4cd1b296f3.tar.gz |
UnixSocketAddress: Correct the wrapping of create() methods.
* gio/src/unixsocketaddress.hg: Remove the multi-parameter constructor
and create() method, handwriting the create() method instead to wrap
g_unix_socket_address_new_with_type() because the C function does more
than call g_object_new().
* gio/src/filelist.am: Typo.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | gio/src/filelist.am | 2 | ||||
-rw-r--r-- | gio/src/unixsocketaddress.ccg | 7 | ||||
-rw-r--r-- | gio/src/unixsocketaddress.hg | 18 |
4 files changed, 35 insertions, 3 deletions
@@ -1,5 +1,16 @@ 2010-11-07 José Alburquerque <jaalburqu@svn.gnome.org> + UnixSocketAddress: Correct the wrapping of create() methods. + + * gio/src/unixsocketaddress.hg: Remove the multi-parameter constructor + and create() method, handwriting the create() method instead to wrap + g_unix_socket_address_new_with_type() because the C function does more + than call g_object_new(). + + * gio/src/filelist.am: Typo. + +2010-11-07 José Alburquerque <jaalburqu@svn.gnome.org> + giomm: Add UnixSocketAddress. * tools/extra_defs_gen/generate_defs_gio.cc: diff --git a/gio/src/filelist.am b/gio/src/filelist.am index b85a219d..4a96daa1 100644 --- a/gio/src/filelist.am +++ b/gio/src/filelist.am @@ -94,7 +94,7 @@ giomm_files_posix_hg = \ desktopappinfo.hg \ unixconnection.hg \ unixcredentialsmessage.hg \ - unixfdlist.hg\ + unixfdlist.hg \ unixfdmessage.hg \ unixinputstream.hg \ unixoutputstream.hg \ diff --git a/gio/src/unixsocketaddress.ccg b/gio/src/unixsocketaddress.ccg index 07d2dd88..3c2eb1c8 100644 --- a/gio/src/unixsocketaddress.ccg +++ b/gio/src/unixsocketaddress.ccg @@ -22,4 +22,11 @@ namespace Gio { +Glib::RefPtr<UnixSocketAddress> +UnixSocketAddress::create(const std::string& path, UnixSocketAddressType type, + int path_len) +{ + return Glib::wrap(reinterpret_cast<GUnixSocketAddress*>(g_unix_socket_address_new_with_type(path.c_str(), path_len, static_cast<GUnixSocketAddressType>(type)))); +} + } //namespace Gio diff --git a/gio/src/unixsocketaddress.hg b/gio/src/unixsocketaddress.hg index 8527885e..68c0e6e9 100644 --- a/gio/src/unixsocketaddress.hg +++ b/gio/src/unixsocketaddress.hg @@ -49,11 +49,25 @@ class UnixSocketAddress _CLASS_GOBJECT(UnixSocketAddress, GUnixSocketAddress, G_UNIX_SOCKET_ADDRESS, SocketAddress, GSocketAddress) protected: - _WRAP_CTOR(UnixSocketAddress(const std::string& path, int path_len = -1, UnixSocketAddressType type = Gio::UNIX_SOCKET_ADDRESS_PATH), g_unix_socket_address_new_with_type) + _WRAP_CTOR(UnixSocketAddress(const std::string& path), g_unix_socket_address_new) + + //TODO: Possibly add when g_unix_socket_address_new_with_type() does not do + //more than call g_object_new() (maybe file a bug). + //_WRAP_CTOR(UnixSocketAddress(const std::string& path, int path_len = -1, UnixSocketAddressType type = Gio::UNIX_SOCKET_ADDRESS_PATH), g_unix_socket_address_new_with_type) public: + _WRAP_METHOD_DOCS_ONLY(g_unix_socket_address_new) + _WRAP_CREATE(const std::string& path) + + //TODO: Add when the above constructor is included, removing the handwritten + //create() method for it below. + //_WRAP_METHOD_DOCS_ONLY(g_unix_socket_address_new_with_type) + //_WRAP_CREATE(const std::string& path, int path_len = -1, UnixSocketAddressType type = Gio::UNIX_SOCKET_ADDRESS_PATH) + _WRAP_METHOD_DOCS_ONLY(g_unix_socket_address_new_with_type) - _WRAP_CREATE(const std::string& path, int path_len = -1, UnixSocketAddressType type = Gio::UNIX_SOCKET_ADDRESS_PATH) + static Glib::RefPtr<UnixSocketAddress> create(const std::string& path, + UnixSocketAddressType type = Gio::UNIX_SOCKET_ADDRESS_ABSTRACT, + int path_len = -1); // Deprecated. _IGNORE(g_unix_socket_address_get_is_abstract) |