summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2008-01-21 12:57:54 +0000
committerMurray Cumming <murrayc@src.gnome.org>2008-01-21 12:57:54 +0000
commit03b22f7204694550d48f32a4ed1c18fe158f1093 (patch)
treee056776790b562d71335abfd2ef3ef966fb17386
parent15c71975e19e29c3a1ea5211618dd8a591a484cd (diff)
downloadglibmm-03b22f7204694550d48f32a4ed1c18fe158f1093.tar.gz
Regenerated.
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. svn path=/trunk/; revision=533
-rw-r--r--ChangeLog11
-rw-r--r--gio/src/file.ccg76
-rw-r--r--gio/src/file.hg68
-rw-r--r--gio/src/fileinputstream.ccg42
-rw-r--r--gio/src/fileinputstream.hg44
-rw-r--r--gio/src/fileoutputstream.ccg46
-rw-r--r--gio/src/fileoutputstream.hg95
-rw-r--r--gio/src/gio_methods.defs478
8 files changed, 840 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index fa8075e2..d41dcbf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
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.
+
+2008-01-21 Murray Cumming <murrayc@murrayc.com>
+
* gio/src/inputstream.ccg:
* gio/src/inputstream.hg: Added method overloads and documentation.
diff --git a/gio/src/file.ccg b/gio/src/file.ccg
index ff89208d..fea3f4ff 100644
--- a/gio/src/file.ccg
+++ b/gio/src/file.ccg
@@ -1070,4 +1070,80 @@ Glib::RefPtr<FileOutputStream> File::replace(const std::string& etag, bool make_
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
diff --git a/gio/src/file.hg b/gio/src/file.hg
index ff408ad2..cbf2cd9c 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -960,9 +960,71 @@ public:
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.
diff --git a/gio/src/fileinputstream.ccg b/gio/src/fileinputstream.ccg
index 238fffb0..eb9b40e8 100644
--- a/gio/src/fileinputstream.ccg
+++ b/gio/src/fileinputstream.ccg
@@ -49,8 +49,46 @@ SignalProxy_query_async_callback(GObject*, GAsyncResult* res, void* data)
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 @@ FileInputStream::query_info_async(const std::string& attributes, const SlotAsync
}
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
diff --git a/gio/src/fileinputstream.hg b/gio/src/fileinputstream.hg
index 25a1584b..3d6d3534 100644
--- a/gio/src/fileinputstream.hg
+++ b/gio/src/fileinputstream.hg
@@ -47,9 +47,39 @@ class FileInputStream
_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 @@ public:
*
* 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)
diff --git a/gio/src/fileoutputstream.ccg b/gio/src/fileoutputstream.ccg
index 92f9f9bc..9eef3c4b 100644
--- a/gio/src/fileoutputstream.ccg
+++ b/gio/src/fileoutputstream.ccg
@@ -51,8 +51,50 @@ SignalProxy_async_callback(GObject*, GAsyncResult* res, void* data)
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 @@ FileOutputStream::query_info_async(const std::string& attributes, const SlotAsyn
}
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
diff --git a/gio/src/fileoutputstream.hg b/gio/src/fileoutputstream.hg
index 6fadfb5d..cee4a0d2 100644
--- a/gio/src/fileoutputstream.hg
+++ b/gio/src/fileoutputstream.hg
@@ -53,15 +53,98 @@ class FileOutputStream
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),
diff --git a/gio/src/gio_methods.defs b/gio/src/gio_methods.defs
index 8d22a314..0bd2d0eb 100644
--- a/gio/src/gio_methods.defs
+++ b/gio/src/gio_methods.defs
@@ -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")
+)
+
+