diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | gio/src/actiongroup.hg | 4 | ||||
-rw-r--r-- | gio/src/memoryoutputstream.hg | 4 | ||||
-rw-r--r-- | gio/src/networkservice.hg | 4 | ||||
-rw-r--r-- | gio/src/socket.ccg | 24 | ||||
-rw-r--r-- | gio/src/socket.hg | 9 | ||||
-rw-r--r-- | gio/src/socketaddressenumerator.hg | 16 | ||||
-rw-r--r-- | gio/src/socketclient.hg | 9 | ||||
-rw-r--r-- | gio/src/socketconnectable.hg | 9 |
9 files changed, 88 insertions, 10 deletions
@@ -1,5 +1,24 @@ 2010-11-03 José Alburquerque <jaalburqu@svn.gnome.org> + giomm: Wrap several unwrapped functions. + + * gio/src/memoryoutputstream.hg: Added stream_steal_data(), and a + get_data() constant version. + * gio/src/networkservice.hg: Added get_scheme(), set_scheme(). + Wrapped the "scheme" property. + * gio/src/socket.{ccg,hg}: Added get_timeout(), set_timeout(), + receive_with_blocking() and send_with_blocking(). + * gio/src/socketclient.hg: Add get_enable_proxy(), set_enable_proxy(), + get_timeout(), set_timeout() and add_application_proxy(). + * gio/src/socketconnectable.hg: Added proxy_enumerate() and an + enumerate() constant version. + + * gio/src/socketaddressenumerator.hg: Added TODO's. + + * gio/src/actiongroup.hg: Small class docs correction. + +2010-11-03 José Alburquerque <jaalburqu@svn.gnome.org> + Application, ActionGroup: Add Doxygen class documentation. * gio/src/application.hg: Add class docs. diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg index 06121017..05f3a059 100644 --- a/gio/src/actiongroup.hg +++ b/gio/src/actiongroup.hg @@ -34,14 +34,14 @@ namespace Gio * ActionGroup represents a group of actions. * * Each action in the group has a unique name (which is a string). All method - * calls, except list_actions() take the name of an action as * an argument. + * calls, except list_actions() take the name of an action as an argument. * * The GActionGroup API is meant to be the 'public' API to the action group. * The calls here are exactly the interaction that 'external forces' (eg: UI, * incoming D-Bus messages, etc.) are supposed to have with actions. * 'Internal' APIs (ie: ones meant only to be accessed by the action group * implementation) are found on subclasses. This is why you will find -- for - * example -- get_action_enabled() but not an equivalent set() call. + * example -- get_action_enabled() but not an equivalent @c set() call. * * Signals are emitted on the action group in response to state changes on * individual actions. diff --git a/gio/src/memoryoutputstream.hg b/gio/src/memoryoutputstream.hg index a9d491b8..dda03766 100644 --- a/gio/src/memoryoutputstream.hg +++ b/gio/src/memoryoutputstream.hg @@ -50,7 +50,11 @@ protected: public: // TODO: more C++-like interface using sigc++ _WRAP_CREATE(void* data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function) + _WRAP_METHOD(void* get_data(), g_memory_output_stream_get_data) + _WRAP_METHOD(const void* get_data() const, g_memory_output_stream_get_data, constversion) + _WRAP_METHOD(void* steal_data(), g_memory_output_stream_steal_data) + _WRAP_METHOD(gsize get_size() const, g_memory_output_stream_get_size) _WRAP_METHOD(gsize get_data_size() const, g_memory_output_stream_get_data_size) diff --git a/gio/src/networkservice.hg b/gio/src/networkservice.hg index 97e1925e..e5288e8d 100644 --- a/gio/src/networkservice.hg +++ b/gio/src/networkservice.hg @@ -54,8 +54,12 @@ public: _WRAP_METHOD(Glib::ustring get_protocol() const, g_network_service_get_protocol) _WRAP_METHOD(Glib::ustring get_domain() const, g_network_service_get_domain) + _WRAP_METHOD(Glib::ustring get_scheme() const, g_network_service_get_scheme) + _WRAP_METHOD(void set_scheme(const Glib::ustring& scheme), g_network_service_set_scheme) + _WRAP_PROPERTY("domain", Glib::ustring) _WRAP_PROPERTY("protocol", Glib::ustring) + _WRAP_PROPERTY("scheme", Glib::ustring) _WRAP_PROPERTY("service", Glib::ustring) }; diff --git a/gio/src/socket.ccg b/gio/src/socket.ccg index 9c3f1e42..2d1cb3df 100644 --- a/gio/src/socket.ccg +++ b/gio/src/socket.ccg @@ -137,4 +137,28 @@ gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, return retvalue; } +gssize Socket::receive_with_blocking(gchar* buffer, gsize size, bool blocking, + const Glib::RefPtr<Cancellable>& cancellable) +{ + GError* gerror = 0; + gssize const retvalue = g_socket_receive_with_blocking(gobj(), buffer, size, + blocking, Glib::unwrap(cancellable), &(gerror)); + if(gerror) + ::Glib::Error::throw_exception(gerror); + + return retvalue; +} + +gssize Socket::send_with_blocking(gchar* buffer, gsize size, bool blocking, + const Glib::RefPtr<Cancellable>& cancellable) +{ + GError* gerror = 0; + gssize const retvalue = g_socket_send_with_blocking(gobj(), buffer, size, + blocking, Glib::unwrap(cancellable), &(gerror)); + if(gerror) + ::Glib::Error::throw_exception(gerror); + + return retvalue; +} + } // namespace Gio diff --git a/gio/src/socket.hg b/gio/src/socket.hg index 8b24918d..be19c693 100644 --- a/gio/src/socket.hg +++ b/gio/src/socket.hg @@ -177,6 +177,15 @@ public: _WRAP_METHOD(Glib::RefPtr<Credentials> get_credentials(), g_socket_get_credentials, errthrow) _WRAP_METHOD(Glib::RefPtr<const Credentials> get_credentials() const, g_socket_get_credentials, errthrow) + + _WRAP_METHOD(guint get_timeout() const, g_socket_get_timeout) + _WRAP_METHOD(void set_timeout(guint timeout), g_socket_set_timeout) + + _WRAP_METHOD_DOCS_ONLY(g_socket_receive_with_blocking) + gssize receive_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>()); + + _WRAP_METHOD_DOCS_ONLY(g_socket_send_with_blocking) + gssize send_with_blocking(gchar* buffer, gsize size, bool blocking, const Glib::RefPtr<Cancellable>& cancellable = Glib::RefPtr<Cancellable>()); _WRAP_PROPERTY("blocking", bool) _WRAP_PROPERTY("family", SocketFamily) diff --git a/gio/src/socketaddressenumerator.hg b/gio/src/socketaddressenumerator.hg index 132e670d..6cdfd655 100644 --- a/gio/src/socketaddressenumerator.hg +++ b/gio/src/socketaddressenumerator.hg @@ -39,14 +39,18 @@ class SocketAddressEnumerator : public Glib::Object _CLASS_GOBJECT(SocketAddressEnumerator, GSocketAddressEnumerator, G_SOCKET_ADDRESS_ENUMERATOR, Glib::Object, GObject) public: - _WRAP_METHOD(Glib::RefPtr<SocketAddress> next(const Glib::RefPtr<Cancellable>& cancellable), g_socket_address_enumerator_next, errthrow) - Glib::RefPtr<SocketAddress> next(); + _WRAP_METHOD(Glib::RefPtr<SocketAddress> next(const Glib::RefPtr<Cancellable>& cancellable), g_socket_address_enumerator_next, errthrow) - _IGNORE(g_socket_address_enumerator_next_async) - void next_async(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); - void next_async(const SlotAsyncReady& slot); + //TODO: Docs. + Glib::RefPtr<SocketAddress> next(); - _WRAP_METHOD(Glib::RefPtr<SocketAddress> next_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_address_enumerator_next_finish, errthrow) + _IGNORE(g_socket_address_enumerator_next_async) + void next_async(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + + //TODO: Docs. + 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) }; } // namespace Gio diff --git a/gio/src/socketclient.hg b/gio/src/socketclient.hg index 764d42b8..acdd79ce 100644 --- a/gio/src/socketclient.hg +++ b/gio/src/socketclient.hg @@ -96,6 +96,15 @@ void connect_to_service_async(const Glib::ustring& domain, const Glib::ustring& void connect_to_service_async(const Glib::ustring& domain, const Glib::ustring& service, const SlotAsyncReady& slot); _WRAP_METHOD(Glib::RefPtr<SocketConnection> connect_to_service_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_client_connect_to_service_finish, errthrow) + _WRAP_METHOD(bool get_enable_proxy() const, g_socket_client_get_enable_proxy) + _WRAP_METHOD(void set_enable_proxy(bool enable), g_socket_client_set_enable_proxy) + + _WRAP_METHOD(guint get_timeout() const, g_socket_client_get_timeout) + _WRAP_METHOD(void set_timeout(guint enable), g_socket_client_set_timeout) + + _WRAP_METHOD(void add_application_proxy(const Glib::ustring& protocol), g_socket_client_add_application_proxy) + + _WRAP_PROPERTY("family", SocketFamily) _WRAP_PROPERTY("local-address", Glib::RefPtr<SocketAddress>) _WRAP_PROPERTY("protocol", SocketProtocol) diff --git a/gio/src/socketconnectable.hg b/gio/src/socketconnectable.hg index 7aa3a570..1e3cb623 100644 --- a/gio/src/socketconnectable.hg +++ b/gio/src/socketconnectable.hg @@ -40,8 +40,13 @@ 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) + _WRAP_METHOD (Glib::RefPtr<SocketAddressEnumerator> enumerate(), g_socket_connectable_enumerate) + _WRAP_METHOD (Glib::RefPtr<const SocketAddressEnumerator> enumerate() const, g_socket_connectable_enumerate, constversion) + + _WRAP_METHOD(Glib::RefPtr<SocketAddressEnumerator> proxy_enumerate(), g_socket_connectable_proxy_enumerate) + _WRAP_METHOD(Glib::RefPtr<const SocketAddressEnumerator> proxy_enumerate() const, g_socket_connectable_proxy_enumerate, constversion) + + //TODO: Wrap vfuncs. }; } // namespace Gio |