cleanup
[platform/upstream/glib.git] / gio / gfileoutputstream.c
index 7b77ba5..2754405 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/>.
  *
  * Author: Alexander Larsson <alexl@redhat.com>
  */
@@ -77,19 +75,18 @@ static GFileInfo *g_file_output_stream_real_query_info_finish (GFileOutputStream
                                                               GAsyncResult         *result,
                                                               GError              **error);
 
-G_DEFINE_TYPE_WITH_CODE (GFileOutputStream, g_file_output_stream, G_TYPE_OUTPUT_STREAM,
-                        G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
-                                               g_file_output_stream_seekable_iface_init));
-
 struct _GFileOutputStreamPrivate {
   GAsyncReadyCallback outstanding_callback;
 };
 
+G_DEFINE_TYPE_WITH_CODE (GFileOutputStream, g_file_output_stream, G_TYPE_OUTPUT_STREAM,
+                         G_ADD_PRIVATE (GFileOutputStream)
+                        G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
+                                               g_file_output_stream_seekable_iface_init));
+
 static void
 g_file_output_stream_class_init (GFileOutputStreamClass *klass)
 {
-  g_type_class_add_private (klass, sizeof (GFileOutputStreamPrivate));
-
   klass->query_info_async = g_file_output_stream_real_query_info_async;
   klass->query_info_finish = g_file_output_stream_real_query_info_finish;
 }
@@ -107,9 +104,7 @@ g_file_output_stream_seekable_iface_init (GSeekableIface *iface)
 static void
 g_file_output_stream_init (GFileOutputStream *stream)
 {
-  stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
-                                             G_TYPE_FILE_OUTPUT_STREAM,
-                                             GFileOutputStreamPrivate);
+  stream->priv = g_file_output_stream_get_instance_private (stream);
 }
 
 /**
@@ -193,8 +188,7 @@ async_ready_callback_wrapper (GObject *source_object,
  * g_file_output_stream_query_info_async:
  * @stream: a #GFileOutputStream.
  * @attributes: a file attribute query string.
- * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> 
- *     of the request.
+ * @io_priority: the [I/O priority][gio-GIOScheduler] of the request
  * @cancellable: optional #GCancellable object, %NULL to ignore. 
  * @callback: callback to call when the request is satisfied
  * @user_data: the data to pass to callback function