* 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., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Authors: Nicolas Dufresne <nicolas.dufresne@colllabora.co.uk>
*/
/**
- * SECTION: gtcpwrapperconnection
+ * SECTION:gtcpwrapperconnection
* @title: GTcpWrapperConnection
- * @short_description: a wrapper for non-#GSocketConnection-based
- * #GIOStream<!-- -->s that are nonetheless based on a #GSocket
+ * @short_description: Wrapper for non-GSocketConnection-based,
+ * GSocket-based GIOStreams
+ * @include: gio/gio.h
* @see_also: #GSocketConnection.
*
* A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
#include "gtcpconnection.h"
#include "glibintl.h"
-G_DEFINE_TYPE (GTcpWrapperConnection,
- g_tcp_wrapper_connection, G_TYPE_TCP_CONNECTION);
+struct _GTcpWrapperConnectionPrivate
+{
+ GIOStream *base_io_stream;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GTcpWrapperConnection, g_tcp_wrapper_connection, G_TYPE_TCP_CONNECTION)
enum
{
PROP_BASE_IO_STREAM
};
-struct _GTcpWrapperConnectionPrivate
-{
- GIOStream *base_io_stream;
-};
-
static GInputStream *
g_tcp_wrapper_connection_get_input_stream (GIOStream *io_stream)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GIOStreamClass *stream_class = G_IO_STREAM_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GTcpWrapperConnectionPrivate));
-
gobject_class->set_property = g_tcp_wrapper_connection_set_property;
gobject_class->get_property = g_tcp_wrapper_connection_get_property;
gobject_class->finalize = g_tcp_wrapper_connection_finalize;
static void
g_tcp_wrapper_connection_init (GTcpWrapperConnection *connection)
{
- connection->priv = G_TYPE_INSTANCE_GET_PRIVATE (connection,
- G_TYPE_TCP_WRAPPER_CONNECTION,
- GTcpWrapperConnectionPrivate);
+ connection->priv = g_tcp_wrapper_connection_get_instance_private (connection);
}
/**
*
* Wraps @base_io_stream and @socket together as a #GSocketConnection.
*
- * Return value: the new #GSocketConnection.
+ * Returns: the new #GSocketConnection.
*
* Since: 2.28
*/
*
* Get's @conn's base #GIOStream
*
- * Return value: (transfer none): @conn's base #GIOStream
+ * Returns: (transfer none): @conn's base #GIOStream
*/
GIOStream *
g_tcp_wrapper_connection_get_base_io_stream (GTcpWrapperConnection *conn)