glibmm r533 - in trunk: . gio/src



Author: murrayc
Date: Mon Jan 21 12:57:54 2008
New Revision: 533
URL: http://svn.gnome.org/viewvc/glibmm?rev=533&view=rev

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

* gio/src/gio_methods.defs: Regenerated.
* gio/src/file.ccg:
* gio/src/file.hg:
* gio/src/fileinputstream.ccg:
* gio/src/fileinputstream.hg:
* gio/src/fileoutputstream.ccg:
* gio/src/fileoutputstream.hg: More overloads, parameter reordering, 
and documentation.

Modified:
   trunk/ChangeLog
   trunk/gio/src/file.ccg
   trunk/gio/src/file.hg
   trunk/gio/src/fileinputstream.ccg
   trunk/gio/src/fileinputstream.hg
   trunk/gio/src/fileoutputstream.ccg
   trunk/gio/src/fileoutputstream.hg
   trunk/gio/src/gio_methods.defs

Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg	(original)
+++ trunk/gio/src/file.ccg	Mon Jan 21 12:57:54 2008
@@ -1070,4 +1070,80 @@
   return retvalue;
 }
 
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileMonitor> File::monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
+#else
+Glib::RefPtr<FileMonitor> File::monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_directory(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  return retvalue;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileMonitor> File::monitor_directory(FileMonitorFlags flags)
+#else
+Glib::RefPtr<FileMonitor> File::monitor_directory(FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_directory(gobj(), ((GFileMonitorFlags)(flags)), NULL, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  return retvalue;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileMonitor> File::monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
+#else
+Glib::RefPtr<FileMonitor> File::monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags,  std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_file(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  return retvalue;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileMonitor> File::monitor_file(FileMonitorFlags flags)
+#else
+Glib::RefPtr<FileMonitor> File::monitor_file(FileMonitorFlags flags,  std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_file(gobj(), ((GFileMonitorFlags)(flags)), NULL, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  return retvalue;
+}
+
 } // namespace Gio

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Mon Jan 21 12:57:54 2008
@@ -960,9 +960,71 @@
                g_file_eject_mountable_finish,
                errthrow)
 
-  //TODO: The GError isn't being passed to the C functoin, for some reason. murrayc.
-  //_WRAP_METHOD(Glib::RefPtr<FileMonitor> monitor_directory(FileMonitorFlags flags, const Glib::RefPtr<Cancellable>& cancellable), g_file_monitor_directory, errthrow)
-  //_WRAP_METHOD(Glib::RefPtr<FileMonitor> monitor_file(FileMonitorFlags flags, const Glib::RefPtr<Cancellable>& cancellable), g_file_monitor_file, errthrow)
+ 
+  /** Obtains a directory monitor for the given file.
+   * This may fail if directory monitoring is not supported.
+   * 
+   * The operation can be cancelled by triggering the cancellable object from another thread. If the operation
+   * was cancelled, the error IO_ERROR_CANCELLED will be returned.
+   *
+   * @param cancellable A Cancellable object.
+   * @param flags A set of FileMonitorFlags.
+   * @return A FileMonitor for the file , 
+   * or <tt>0</tt> on error.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileMonitor> monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags = FILE_MONITOR_NONE);
+#else
+  Glib::RefPtr<FileMonitor> monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  /** Obtains a directory monitor for the given file.
+   * This may fail if directory monitoring is not supported.
+   * 
+   * @param flags A set of FileMonitorFlags.
+   * @return A FileMonitor for the file , 
+   * or <tt>0</tt> on error.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileMonitor> monitor_directory(FileMonitorFlags flags = FILE_MONITOR_NONE);
+#else
+  Glib::RefPtr<FileMonitor> monitor_directory(FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+  _IGNORE(g_file_monitor_directory)
+
+  _WRAP_METHOD(Glib::RefPtr<FileMonitor> monitor_file(FileMonitorFlags flags, const Glib::RefPtr<Cancellable>& cancellable), g_file_monitor_file, errthrow)
+
+  /** Obtains a file monitor for the given file. If no file notification
+   * mechanism exists, then regular polling of the file is used.
+   * 
+   * The operation can be cancelled by triggering the cancellable object from another thread. If the operation
+   * was cancelled, the error IO_ERROR_CANCELLED will be returned.
+   *
+   * @param flags A set of FileMonitorFlags.
+   * @param A Cancellable object.
+   * @return A FileMonitor for the file.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileMonitor> monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags = FILE_MONITOR_NONE);
+#else
+  Glib::RefPtr<FileMonitor> monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  /** Obtains a file monitor for the given file. If no file notification
+   * mechanism exists, then regular polling of the file is used.
+   * 
+   * The operation can be cancelled by triggering the cancellable object from another thread. If the operation
+   * was cancelled, the error IO_ERROR_CANCELLED will be returned.
+   *
+   * @param flags A set of FileMonitorFlags.
+   * @param A Cancellable object.
+   * @return A FileMonitor for the file.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileMonitor> monitor_file(FileMonitorFlags flags = FILE_MONITOR_NONE);
+#else
+  Glib::RefPtr<FileMonitor> monitor_file(FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
 
 
   //TODO: Documentation.

Modified: trunk/gio/src/fileinputstream.ccg
==============================================================================
--- trunk/gio/src/fileinputstream.ccg	(original)
+++ trunk/gio/src/fileinputstream.ccg	Mon Jan 21 12:57:54 2008
@@ -49,8 +49,46 @@
 namespace Gio
 {
 
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
+#else
+Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  return retvalue;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileInfo> FileInputStream::query_info(const std::string& attributes)
+#else
+Glib::RefPtr<FileInfo> FileInputStream::query_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), NULL, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  return retvalue;
+}
+
 void
-FileInputStream::query_info_async(const std::string& attributes, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
+FileInputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, int io_priority)
 {
   // Create a copy of the slot.
   // A pointer to it will be passed through the callback's data parameter
@@ -66,7 +104,7 @@
 }
 
 void
-FileInputStream::query_info_async(const std::string& attributes, const SlotAsyncReady& slot, int io_priority)
+FileInputStream::query_info_async(const SlotAsyncReady& slot, const std::string& attributes, int io_priority)
 {
   // Create a copy of the slot.
   // A pointer to it will be passed through the callback's data parameter

Modified: trunk/gio/src/fileinputstream.hg
==============================================================================
--- trunk/gio/src/fileinputstream.hg	(original)
+++ trunk/gio/src/fileinputstream.hg	Mon Jan 21 12:57:54 2008
@@ -47,9 +47,39 @@
   _IMPLEMENTS_INTERFACE(Seekable)
 
 public:
-  _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info(const std::string& attributes, const Glib::RefPtr<Cancellable>& cancellable),
-               g_file_input_stream_query_info,
-               errthrow)
+
+  /** Queries a file input stream the given @a attributes. This function blocks 
+   * while querying the stream. For the asynchronous (non-blocking) version 
+   * of this function, see query_info_async(). While the 
+   * stream is blocked, the stream will set the pending flag internally, and 
+   * any other operations on the stream will fail with IO_ERROR_PENDING.
+   *
+   * @param attributes A file attribute query string.
+   * @param cancellable A Cancellable object.
+   * @return A FileInfo, or an empty RefPtr on error.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileInfo> query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*");
+#else
+  Glib::RefPtr<FileInfo> query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  /** Queries a file input stream the given @a attributes. This function blocks 
+   * while querying the stream. For the asynchronous (non-blocking) version 
+   * of this function, see query_info_async(). While the 
+   * stream is blocked, the stream will set the pending flag internally, and 
+   * any other operations on the stream will fail with IO_ERROR_PENDING.
+   *
+   * @param attributes A file attribute query string.
+   * @return A FileInfo, or an empty RefPtr on error.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileInfo> query_info(const std::string& attributes = "*");
+#else
+  Glib::RefPtr<FileInfo> query_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+  _IGNORE(g_file_input_stream_query_info)
+
 
   /** Queries the stream information asynchronously. For the synchronous version of this function, see query_info().
    *
@@ -58,22 +88,22 @@
    *
    * When the operation is finished, @a slot will be called. You can then call query_info_finish() to get the result of the operation.
    *
-   * @param attributes A file attribute query string.
    * @param slot A callback slot which will be called when the request is satisfied.
    * @param cancellable A Cancellable object which can be used to cancel the operation.
+   * @param attributes A file attribute query string.
    * @param io_priority The I/O priority of the request.
    */
-  void query_info_async(const std::string& attributes, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
 
   /** Queries the stream information asynchronously. For the synchronous version of this function, see query_info().
    *
    * When the operation is finished, @a slot will be called. You can then call query_info_finish() to get the result of the operation.
    *
-   * @param attributes A file attribute query string.
    * @param slot A callback slot which will be called when the request is satisfied.
+   * @param attributes A file attribute query string.
    * @param io_priority The I/O priority of the request.
    */
-  void query_info_async(const std::string& attributes, const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
 
   _IGNORE(g_file_input_stream_query_info_async)
 

Modified: trunk/gio/src/fileoutputstream.ccg
==============================================================================
--- trunk/gio/src/fileoutputstream.ccg	(original)
+++ trunk/gio/src/fileoutputstream.ccg	Mon Jan 21 12:57:54 2008
@@ -51,8 +51,50 @@
 namespace Gio
 {
 
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
+#else
+Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  if(retvalue)
+    retvalue->reference(); //The function does not do a ref for us.
+  return retvalue;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<FileInfo> FileOutputStream::query_info(const std::string& attributes)
+#else
+Glib::RefPtr<FileInfo> FileOutputStream::query_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), NULL, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+#else
+  if(gerror)
+    error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  if(retvalue)
+    retvalue->reference(); //The function does not do a ref for us.
+  return retvalue;
+}
+
 void
-FileOutputStream::query_info_async(const std::string& attributes, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
+FileOutputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, int io_priority)
 {
   // Create a copy of the slot.
   // A pointer to it will be passed through the callback's data parameter
@@ -68,7 +110,7 @@
 }
 
 void
-FileOutputStream::query_info_async(const std::string& attributes, const SlotAsyncReady& slot, int io_priority)
+FileOutputStream::query_info_async(const SlotAsyncReady& slot, const std::string& attributes, int io_priority)
 {
   // Create a copy of the slot.
   // A pointer to it will be passed through the callback's data parameter

Modified: trunk/gio/src/fileoutputstream.hg
==============================================================================
--- trunk/gio/src/fileoutputstream.hg	(original)
+++ trunk/gio/src/fileoutputstream.hg	Mon Jan 21 12:57:54 2008
@@ -53,15 +53,98 @@
 public:
   //TODO: vfuncs and overloads without Cancellable
 
-  _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info(const std::string& attributes, const Glib::RefPtr<Cancellable>& cancellable),
-               g_file_output_stream_query_info,
-               refreturn, errthrow)
 
+  /** Queries a file output stream for the given @a attributes . 
+   * This function blocks while querying the stream. For the asynchronous 
+   * version of this function, see query_info_async(). 
+   * While the stream is blocked, the stream will set the pending flag 
+   * internally, and any other operations on the stream will fail with 
+   * IO_ERROR_PENDING.
+   * 
+   * Can fail if the stream was already closed (with an 
+   * IO_ERROR_CLOSED error), the stream has pending operations (with an IO_ERROR_PENDING error),
+   * or if querying info is not supported for 
+   * the stream's interface (with an IO_ERROR_NOT_SUPPORTED error). In
+   * all cases of failure, an empty RefPtr will be returned.
+   * 
+   * The operation can be cancelled by triggering the cancellable object from another thread. If the operation
+   * was cancelled, the error IO_ERROR_CANCELLED will be set, and an empty RefPtr will 
+   * be returned.
+   *
+   * @param cancellable A Cancellable object.
+   * @param attributes A file attribute query string.
+   * @return A FileInfo for the stream, or an empty RefPtr on error.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileInfo> query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*");
+#else
+  Glib::RefPtr<FileInfo> query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+  /** Queries a file output stream for the given @a attributes . 
+   * This function blocks while querying the stream. For the asynchronous 
+   * version of this function, see query_info_async(). 
+   * While the stream is blocked, the stream will set the pending flag 
+   * internally, and any other operations on the stream will fail with 
+   * IO_ERROR_PENDING.
+   * 
+   * Can fail if the stream was already closed (with an 
+   * IO_ERROR_CLOSED error), the stream has pending operations (with an IO_ERROR_PENDING error),
+   * or if querying info is not supported for 
+   * the stream's interface (with an IO_ERROR_NOT_SUPPORTED error). In
+   * all cases of failure, an empty RefPtr will be returned.
+   * 
+   * The operation can be cancelled by triggering the cancellable object from another thread. If the operation
+   * was cancelled, the error IO_ERROR_CANCELLED will be set, and an empty RefPtr will 
+   * be returned.
+   *
+   * @param cancellable A Cancellable object.
+   * @param attributes A file attribute query string.
+   * @return A FileInfo for the stream, or an empty RefPtr on error.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<FileInfo> query_info(const std::string& attributes = "*");
+#else
+  Glib::RefPtr<FileInfo> query_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+  _IGNORE(g_file_output_stream_query_info)
+
+
+
+  /** Queries the stream information asynchronously.
+   * When the operation is finished @a slot will be called. 
+   * You can then call query_info_finish() 
+   * to get the result of the operation.
+   *
+   * For the synchronous version of this function, 
+   * see query_info(). 
+   * 
+   * If @cancellable is not %NULL, then the operation can be cancelled by
+   * triggering the cancellable object from another thread. If the operation
+   * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
+   * 
+   * @param slot Callback to call when the request is satisfied.
+   * @param cancellable A Cancellable object.
+   * @param attributes A file attribute query string.
+   * @param io_priority The <io-priority of the request.
+   */
+  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
+
+  /** Queries the stream information asynchronously.
+   * When the operation is finished @a slot will be called. 
+   * You can then call query_info_finish() 
+   * to get the result of the operation.
+   *
+   * For the synchronous version of this function, 
+   * see query_info(). 
+   * 
+   * @param slot Callback to call when the request is satisfied.
+   * @param attributes A file attribute query string.
+   * @param io_priority The <io-priority of the request.
+   */
+  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
   _IGNORE(g_file_input_stream_query_info_async)
 
-  void query_info_async(const std::string& attributes, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
-  void query_info_async(const std::string& attributes, const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
-
   //TODO: cancellable can probably be NULL.
 
   _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(const Glib::RefPtr<AsyncResult>& result),

Modified: trunk/gio/src/gio_methods.defs
==============================================================================
--- trunk/gio/src/gio_methods.defs	(original)
+++ trunk/gio/src/gio_methods.defs	Mon Jan 21 12:57:54 2008
@@ -92,6 +92,27 @@
   (gtype-id "G_TYPE_LOADABLE_ICON")
 )
 
+(define-object DirectoryMonitor
+  (in-module "GLocal")
+  (parent "GFileMonitor")
+  (c-name "GLocalDirectoryMonitor")
+  (gtype-id "G_TYPE_LOCAL_DIRECTORY_MONITOR")
+)
+
+(define-object FileInputStream
+  (in-module "GLocal")
+  (parent "GFileInputStream")
+  (c-name "GLocalFileInputStream")
+  (gtype-id "G_TYPE_LOCAL_FILE_INPUT_STREAM")
+)
+
+(define-object FileMonitor
+  (in-module "GLocal")
+  (parent "GFileMonitor")
+  (c-name "GLocalFileMonitor")
+  (gtype-id "G_TYPE_LOCAL_FILE_MONITOR")
+)
+
 (define-object InputStream
   (in-module "GMemory")
   (parent "GInputStream")
@@ -147,12 +168,33 @@
   (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
 )
 
+(define-object FileOutputStream
+  (in-module "GLocal")
+  (parent "GFileOutputStream")
+  (c-name "GLocalFileOutputStream")
+  (gtype-id "G_TYPE_LOCAL_FILE_OUTPUT_STREAM")
+)
+
 (define-object e
   (in-module "GSeekabl")
   (c-name "GSeekable")
   (gtype-id "G_TYPE_SEEKABLE")
 )
 
+(define-object InputStream
+  (in-module "GUnix")
+  (parent "GInputStream")
+  (c-name "GUnixInputStream")
+  (gtype-id "G_TYPE_UNIX_INPUT_STREAM")
+)
+
+(define-object OutputStream
+  (in-module "GUnix")
+  (parent "GOutputStream")
+  (c-name "GUnixOutputStream")
+  (gtype-id "G_TYPE_UNIX_OUTPUT_STREAM")
+)
+
 (define-object s
   (in-module "GVf")
   (parent "GObject")
@@ -645,6 +687,10 @@
 
 
 
+;; From gasynchelper.h
+
+
+
 ;; From gasyncresult.h
 
 (define-function g_async_result_get_type
@@ -978,6 +1024,10 @@
 
 
 
+;; From gcontenttypeprivate.h
+
+
+
 ;; From gdatainputstream.h
 
 (define-function g_data_input_stream_get_type
@@ -1240,6 +1290,46 @@
 
 
 
+;; From gdesktopappinfo.h
+
+(define-function g_desktop_app_info_get_type
+  (c-name "g_desktop_app_info_get_type")
+  (return-type "GType")
+)
+
+(define-function g_desktop_app_info_new_from_filename
+  (c-name "g_desktop_app_info_new_from_filename")
+  (return-type "GDesktopAppInfo*")
+  (parameters
+    '("const-char*" "filename")
+  )
+)
+
+(define-function g_desktop_app_info_new
+  (c-name "g_desktop_app_info_new")
+  (is-constructor-of "GDesktopAppInfo")
+  (return-type "GDesktopAppInfo*")
+  (parameters
+    '("const-char*" "desktop_id")
+  )
+)
+
+(define-method get_is_hidden
+  (of-object "GDesktopAppInfo")
+  (c-name "g_desktop_app_info_get_is_hidden")
+  (return-type "gboolean")
+)
+
+(define-function g_desktop_app_info_set_desktop_env
+  (c-name "g_desktop_app_info_set_desktop_env")
+  (return-type "none")
+  (parameters
+    '("const-char*" "desktop_env")
+  )
+)
+
+
+
 ;; From gdrive.h
 
 (define-function g_drive_get_type
@@ -1346,6 +1436,10 @@
 
 
 
+;; From gdummyfile.h
+
+
+
 ;; From gfileattribute.h
 
 (define-function g_file_attribute_info_list_new
@@ -1394,6 +1488,10 @@
 
 
 
+;; From gfileattribute-priv.h
+
+
+
 ;; From gfileenumerator.h
 
 (define-function g_file_enumerator_get_type
@@ -1786,6 +1884,15 @@
   )
 )
 
+(define-method query_exists
+  (of-object "GFile")
+  (c-name "g_file_query_exists")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable")
+  )
+)
+
 (define-method query_info
   (of-object "GFile")
   (c-name "g_file_query_info")
@@ -1843,6 +1950,28 @@
   )
 )
 
+(define-method find_enclosing_mount_async
+  (of-object "GFile")
+  (c-name "g_file_find_enclosing_mount_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method find_enclosing_mount_finish
+  (of-object "GFile")
+  (c-name "g_file_find_enclosing_mount_finish")
+  (return-type "GMount*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
 (define-method enumerate_children
   (of-object "GFile")
   (c-name "g_file_enumerate_children")
@@ -2238,6 +2367,7 @@
   (parameters
     '("GFileMonitorFlags" "flags")
     '("GCancellable*" "cancellable")
+    '("GError**" "error")
   )
 )
 
@@ -2248,6 +2378,7 @@
   (parameters
     '("GFileMonitorFlags" "flags")
     '("GCancellable*" "cancellable")
+    '("GError**" "error")
   )
 )
 
@@ -3355,6 +3486,10 @@
 
 
 
+;; From gioalias.h
+
+
+
 ;; From gioenumtypes.h
 
 (define-function g_app_info_create_flags_get_type
@@ -3470,6 +3605,10 @@
 
 
 
+;; From gio-marshal.h
+
+
+
 ;; From giomodule.h
 
 (define-function g_io_module_get_type
@@ -3508,6 +3647,10 @@
 
 
 
+;; From giomodule-priv.h
+
+
+
 ;; From gioscheduler.h
 
 (define-function g_io_scheduler_push_job
@@ -3595,6 +3738,48 @@
 
 
 
+;; From glocaldirectorymonitor.h
+
+(define-function g_local_directory_monitor_get_type
+  (c-name "g_local_directory_monitor_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From glocalfileenumerator.h
+
+
+
+;; From glocalfile.h
+
+
+
+;; From glocalfileinfo.h
+
+
+
+;; From glocalfileinputstream.h
+
+
+
+;; From glocalfilemonitor.h
+
+(define-function g_local_file_monitor_get_type
+  (c-name "g_local_file_monitor_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From glocalfileoutputstream.h
+
+
+
+;; From glocalvfs.h
+
+
+
 ;; From gmemoryinputstream.h
 
 (define-function g_memory_input_stream_get_type
@@ -3901,6 +4086,10 @@
 
 
 
+;; From gmountprivate.h
+
+
+
 ;; From gnativevolumemonitor.h
 
 (define-function g_native_volume_monitor_get_type
@@ -4095,6 +4284,10 @@
 
 
 
+;; From gpollfilemonitor.h
+
+
+
 ;; From gseekable.h
 
 (define-function g_seekable_get_type
@@ -4377,6 +4570,282 @@
 
 
 
+;; From gunionvolumemonitor.h
+
+
+
+;; From gunixinputstream.h
+
+(define-function g_unix_input_stream_get_type
+  (c-name "g_unix_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function g_unix_input_stream_new
+  (c-name "g_unix_input_stream_new")
+  (is-constructor-of "GUnixInputStream")
+  (return-type "GInputStream*")
+  (parameters
+    '("int" "fd")
+    '("gboolean" "close_fd_at_close")
+  )
+)
+
+
+
+;; From gunixmount.h
+
+
+
+;; From gunixmounts.h
+
+(define-function g_unix_mount_free
+  (c-name "g_unix_mount_free")
+  (return-type "none")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-method free
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_free")
+  (return-type "none")
+)
+
+(define-function g_unix_mount_compare
+  (c-name "g_unix_mount_compare")
+  (return-type "gint")
+  (parameters
+    '("GUnixMountEntry*" "mount1")
+    '("GUnixMountEntry*" "mount2")
+  )
+)
+
+(define-function g_unix_mount_get_mount_path
+  (c-name "g_unix_mount_get_mount_path")
+  (return-type "const-char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_get_device_path
+  (c-name "g_unix_mount_get_device_path")
+  (return-type "const-char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_get_fs_type
+  (c-name "g_unix_mount_get_fs_type")
+  (return-type "const-char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_is_readonly
+  (c-name "g_unix_mount_is_readonly")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_is_system_internal
+  (c-name "g_unix_mount_is_system_internal")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_guess_can_eject
+  (c-name "g_unix_mount_guess_can_eject")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_guess_should_display
+  (c-name "g_unix_mount_guess_should_display")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_guess_name
+  (c-name "g_unix_mount_guess_name")
+  (return-type "char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function g_unix_mount_guess_icon
+  (c-name "g_unix_mount_guess_icon")
+  (return-type "GIcon*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-method compare
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_compare")
+  (return-type "gint")
+  (parameters
+    '("GUnixMountPoint*" "mount2")
+  )
+)
+
+(define-method get_mount_path
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_get_mount_path")
+  (return-type "const-char*")
+)
+
+(define-method get_device_path
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_get_device_path")
+  (return-type "const-char*")
+)
+
+(define-method get_fs_type
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_get_fs_type")
+  (return-type "const-char*")
+)
+
+(define-method is_readonly
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_is_readonly")
+  (return-type "gboolean")
+)
+
+(define-method is_user_mountable
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_is_user_mountable")
+  (return-type "gboolean")
+)
+
+(define-method is_loopback
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_is_loopback")
+  (return-type "gboolean")
+)
+
+(define-method guess_can_eject
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_guess_can_eject")
+  (return-type "gboolean")
+)
+
+(define-method guess_name
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_guess_name")
+  (return-type "char*")
+)
+
+(define-method guess_icon
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_guess_icon")
+  (return-type "GIcon*")
+)
+
+(define-function g_unix_mount_points_get
+  (c-name "g_unix_mount_points_get")
+  (return-type "GList*")
+  (parameters
+    '("guint64*" "time_read")
+  )
+)
+
+(define-function g_unix_mounts_get
+  (c-name "g_unix_mounts_get")
+  (return-type "GList*")
+  (parameters
+    '("guint64*" "time_read")
+  )
+)
+
+(define-function g_unix_mount_at
+  (c-name "g_unix_mount_at")
+  (return-type "GUnixMountEntry*")
+  (parameters
+    '("const-char*" "mount_path")
+    '("guint64*" "time_read")
+  )
+)
+
+(define-function g_unix_mounts_changed_since
+  (c-name "g_unix_mounts_changed_since")
+  (return-type "gboolean")
+  (parameters
+    '("guint64" "time")
+  )
+)
+
+(define-function g_unix_mount_points_changed_since
+  (c-name "g_unix_mount_points_changed_since")
+  (return-type "gboolean")
+  (parameters
+    '("guint64" "time")
+  )
+)
+
+(define-function g_unix_mount_monitor_get_type
+  (c-name "g_unix_mount_monitor_get_type")
+  (return-type "GType")
+)
+
+(define-function g_unix_mount_monitor_new
+  (c-name "g_unix_mount_monitor_new")
+  (is-constructor-of "GUnixMountMonitor")
+  (return-type "GUnixMountMonitor*")
+)
+
+(define-function g_unix_is_mount_path_system_internal
+  (c-name "g_unix_is_mount_path_system_internal")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "mount_path")
+  )
+)
+
+
+
+;; From gunixoutputstream.h
+
+(define-function g_unix_output_stream_get_type
+  (c-name "g_unix_output_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function g_unix_output_stream_new
+  (c-name "g_unix_output_stream_new")
+  (is-constructor-of "GUnixOutputStream")
+  (return-type "GOutputStream*")
+  (parameters
+    '("int" "fd")
+    '("gboolean" "close_fd_at_close")
+  )
+)
+
+
+
+;; From gunixvolume.h
+
+
+
+;; From gunixvolumemonitor.h
+
+
+
 ;; From gvfs.h
 
 (define-function g_vfs_get_type
@@ -4581,3 +5050,12 @@
 )
 
 
+
+;; From gwin32appinfo.h
+
+(define-function g_win32_app_info_get_type
+  (c-name "g_win32_app_info_get_type")
+  (return-type "GType")
+)
+
+



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