summaryrefslogtreecommitdiff
path: root/gio/src/fileoutputstream.hg
diff options
context:
space:
mode:
Diffstat (limited to 'gio/src/fileoutputstream.hg')
-rw-r--r--gio/src/fileoutputstream.hg95
1 files changed, 89 insertions, 6 deletions
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),