glibmm r505 - in trunk: . gio/src



Author: murrayc
Date: Fri Jan 11 14:14:32 2008
New Revision: 505
URL: http://svn.gnome.org/viewvc/glibmm?rev=505&view=rev

Log:
2008-01-11  Murray Cumming  <murrayc murrayc com>

* gio/src/file.ccg:
* gio/src/file.hg: Rename create() to create_file(), 
create_async() to create_file_async() and 
create_finish() to create_file_finish() to slightly 
reduce confusion with the static create*() methods.

Modified:
   trunk/ChangeLog
   trunk/gio/src/file.ccg
   trunk/gio/src/file.hg

Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg	(original)
+++ trunk/gio/src/file.ccg	Fri Jan 11 14:14:32 2008
@@ -224,7 +224,7 @@
 }
 
 void
-File::create_async(FileCreateFlags flags,
+File::create_file_async(FileCreateFlags flags,
                    int io_priority,
                    const Glib::RefPtr<Cancellable>& cancellable,
                    const SlotAsyncReady& slot)
@@ -243,7 +243,7 @@
 }
 
 void
-File::create_async(FileCreateFlags flags,
+File::create_file_async(FileCreateFlags flags,
                    int io_priority,
                    const SlotAsyncReady& slot)
 {

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Fri Jan 11 14:14:32 2008
@@ -174,7 +174,10 @@
   _WRAP_METHOD(Glib::RefPtr<FileOutputStream> append_to(FileCreateFlags flags, const Glib::RefPtr<Cancellable>& cancellable),
                g_file_append_to,
                refreturn, errthrow)
-  _WRAP_METHOD(Glib::RefPtr<FileOutputStream> create(FileCreateFlags flags, const Glib::RefPtr<Cancellable>& cancellable),
+
+  //We renamed this to create_file from (g_file_create()), to avoid confusion with static create() methods, 
+  //but I would still like to choose a different word, but can't think of a good one. murrayc.
+  _WRAP_METHOD(Glib::RefPtr<FileOutputStream> create_file(FileCreateFlags flags, const Glib::RefPtr<Cancellable>& cancellable),
                g_file_create,
                refreturn, errthrow)
 
@@ -213,32 +216,34 @@
                refreturn, errthrow)
 
 
-  //TODO: create() can't be the correct name. murrayc.
+  //We renamed this to create_file_async from (g_file_create_async()), to avoid confusion with static create() methods, 
+  //but I would still like to choose a different word, but can't think of a good one. murrayc. See also create_file().
+
   /** Asynchronously creates a new file and returns an output stream for writing to it. The file must not already exist.
    * For more details, see create() which is the synchronous version of this call.
    *
-   * When the operation is finished, @a slot will be called. You can then call create_finish() to get the result of the operation.
+   * When the operation is finished, @a slot will be called. You can then call create_file_finish() to get the result of the operation.
    * 
    * @param flags a set of FileCreateFlags.
    * @param io_priority The I/O priority of the request.
    * @param cancellable A Cancellable object which can be used to cancel the operation.
    * @param slot A callback slot which will be called when the request is satisfied.
    */
-  void create_async(FileCreateFlags flags, int io_priority, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
+  void create_file_async(FileCreateFlags flags, int io_priority, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
 
   /** Asynchronously creates a new file and returns an output stream for writing to it. The file must not already exist.
    * For more details, see create() which is the synchronous version of this call.
    *
-   * When the operation is finished, @a slot will be called. You can then call create_finish() to get the result of the operation.
+   * When the operation is finished, @a slot will be called. You can then call create_file_finish() to get the result of the operation.
    * 
    * @param flags a set of FileCreateFlags.
    * @param io_priority The I/O priority of the request.
    * @param slot A callback slot which will be called when the request is satisfied.
    */
-  void create_async(FileCreateFlags flags, int io_priority, const SlotAsyncReady& slot);
+  void create_file_async(FileCreateFlags flags, int io_priority, const SlotAsyncReady& slot);
   _IGNORE(g_file_create_async)
 
-  _WRAP_METHOD(Glib::RefPtr<FileOutputStream> create_finish(const Glib::RefPtr<AsyncResult>& result),
+  _WRAP_METHOD(Glib::RefPtr<FileOutputStream> create_file_finish(const Glib::RefPtr<AsyncResult>& result),
                g_file_create_finish,
                refreturn, errthrow)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]