[kdbus] sync with kdbus (kdbus.h - commit: 5ae1ecac44cb)
[platform/upstream/glib.git] / gio / gtcpwrapperconnection.c
index deab98f..3bdecf1 100644 (file)
@@ -13,9 +13,7 @@
  * 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>
  */
@@ -23,7 +21,9 @@
 /**
  * SECTION:gtcpwrapperconnection
  * @title: GTcpWrapperConnection
- * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
+ * @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
 {
@@ -51,11 +55,6 @@ enum
   PROP_BASE_IO_STREAM
 };
 
-struct _GTcpWrapperConnectionPrivate
-{
-  GIOStream *base_io_stream;
-};
-
 static GInputStream *
 g_tcp_wrapper_connection_get_input_stream (GIOStream *io_stream)
 {
@@ -127,8 +126,6 @@ g_tcp_wrapper_connection_class_init (GTcpWrapperConnectionClass *klass)
   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;
@@ -150,9 +147,7 @@ g_tcp_wrapper_connection_class_init (GTcpWrapperConnectionClass *klass)
 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);
 }
 
 /**
@@ -162,7 +157,7 @@ g_tcp_wrapper_connection_init (GTcpWrapperConnection *connection)
  *
  * Wraps @base_io_stream and @socket together as a #GSocketConnection.
  *
- * Return value: the new #GSocketConnection.
+ * Returns: the new #GSocketConnection.
  *
  * Since: 2.28
  */
@@ -188,7 +183,7 @@ g_tcp_wrapper_connection_new (GIOStream *base_io_stream,
  *
  * 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)