summaryrefslogtreecommitdiff
path: root/gio/src
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2009-02-06 11:29:20 +0000
committerMurray Cumming <murrayc@src.gnome.org>2009-02-06 11:29:20 +0000
commitc4b29696aad6585c06568e05fbb69455992dd15d (patch)
treeb4adaf5dfc6a58addb6ad83ebbed60431929678c /gio/src
parentfce253639d0dd1014de8dcca3b57d6d68434fc07 (diff)
downloadglibmm-c4b29696aad6585c06568e05fbb69455992dd15d.tar.gz
Regenerated.
2009-02-06 Murray Cumming <murrayc@murrayc.com> * gio/src/gio_methods.defs: Regenerated. * gio/src/filterinputstream.hg: Added get/set_close_base_stream(). * gio/src/filteroutputstream.hg: Added get/set_close_base_stream(). * gio/src/unixinputstream.hg: Added get_fd() and get/set_close_fd(). * gio/src/unixoutputstream.hg: Added get_fd() and get/set_close_fd(). * gio/src/datainputstream.[hg|ccg]: Added read_until_async(), read_until_finish(), read_line_async() and read_line_finish(). Added documentation for read_until() and read_line(). svn path=/trunk/; revision=784
Diffstat (limited to 'gio/src')
-rw-r--r--gio/src/cancellable.hg2
-rw-r--r--gio/src/datainputstream.ccg84
-rw-r--r--gio/src/datainputstream.hg89
-rw-r--r--gio/src/filterinputstream.hg3
-rw-r--r--gio/src/filteroutputstream.hg3
-rw-r--r--gio/src/gio_methods.defs849
-rw-r--r--gio/src/unixinputstream.hg4
-rw-r--r--gio/src/unixoutputstream.hg4
8 files changed, 738 insertions, 300 deletions
diff --git a/gio/src/cancellable.hg b/gio/src/cancellable.hg
index 9a10eb38..777d0e06 100644
--- a/gio/src/cancellable.hg
+++ b/gio/src/cancellable.hg
@@ -59,7 +59,7 @@ public:
g_cancellable_pop_current)
_WRAP_METHOD(void reset(), g_cancellable_reset)
- // FIXME: is this useful in the C++ API?
+ // TODO: is this useful in the C++ API?
//_WRAP_METHOD(void make_pollfd(PollFD* pollfd), g_cancellable_make_pollfd)
_WRAP_SIGNAL(void cancelled(), cancelled)
diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg
index 0fc02b9e..3ff2c8f9 100644
--- a/gio/src/datainputstream.ccg
+++ b/gio/src/datainputstream.ccg
@@ -210,6 +210,47 @@ bool DataInputStream::read_line(std::string& line, std::auto_ptr<Glib::Error>& e
return false;
}
+void DataInputStream::read_line_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
+{
+ // Create a copy of the slot.
+ // A pointer to it will be passed through the callback's data parameter
+ // and deleted in the callback.
+ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+ g_data_input_stream_read_line_async(gobj(),
+ io_priority,
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
+#else
+bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ gsize size = 0;
+ gchar* buffer = g_data_input_stream_read_line_finish(gobj(), Glib::unwrap(result), &size, &(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
+
+ bool retval = false;
+ if(buffer && size)
+ {
+ retval = (buffer != 0);
+ data = std::string(buffer, size);
+ g_free (buffer);
+ }
+
+ return retval;
+}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool DataInputStream::read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable)
@@ -269,4 +310,47 @@ bool DataInputStream::read_until(std::string& data, const std::string& stop_char
return false;
}
+void DataInputStream::read_until_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
+{
+ // Create a copy of the slot.
+ // A pointer to it will be passed through the callback's data parameter
+ // and deleted in the callback.
+ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+ g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(),
+ io_priority,
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
+#else
+bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ gsize size = 0;
+ gchar* buffer = g_data_input_stream_read_until_finish(gobj(), Glib::unwrap(result), &size, &(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
+
+ bool retval = false;
+ if(buffer && size)
+ {
+ retval = (buffer != 0);
+ data = std::string(buffer, size);
+ g_free (buffer);
+ }
+
+ return retval;
+}
+
+
} // namespace Gio
diff --git a/gio/src/datainputstream.hg b/gio/src/datainputstream.hg
index 98fb30d0..e78715fe 100644
--- a/gio/src/datainputstream.hg
+++ b/gio/src/datainputstream.hg
@@ -100,6 +100,7 @@ public:
#endif //GLIBMM_EXCEPTIONS_ENABLED
_WRAP_METHOD(gint64 read_int64(const Glib::RefPtr<Cancellable>& cancellable), g_data_input_stream_read_int64, errthrow)
+
/** non-cancellable version of read_int64()
*/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -118,19 +119,30 @@ public:
guint64 read_uint64(std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- _IGNORE(g_data_input_stream_read_line)
- // FIXME: In C, these functions return NULL if there is an error (i.e. end of
- // stream reached), but if we use std::string, we don't have a way to tell an
- // empty string from NULL. Perhaps we should use raw pointers as in C, but
- // that would mean we need to worry about freeing the C string...
+ //Note that we return a bool because we can't use std::string to distinguish between an empty string and a NULL.
+
+ /** Reads a line from the data input stream.
+ *
+ * The operation can be cancelled by triggering the cancellable object from
+ * another thread. If the operation
+ * was cancelled, a Gio::Error with CANCELLED will be thrown.
+ *
+ * @param data A string to fill with the read data (without the newlines).
+ * @param cancellable A cancellable object.
+ * @result true if the read succeeded without error.
+ */
#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool read_line(std::string& line, const Glib::RefPtr<Cancellable>& cancellable);
#else
bool read_line(std::string& line, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
+ _IGNORE(g_data_input_stream_read_line)
- /** non-cancellable version of read_line()
+ /** A non-cancellable version of read_line().
+ *
+ * @param data A string to fill with the read data (without the newlines).
+ * @result true if the read succeeded without error.
*/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool read_line(std::string& line);
@@ -138,15 +150,49 @@ public:
bool read_line(std::string& line, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- _IGNORE(g_data_input_stream_read_until)
-
+ /** The asynchronous version of read_until(). It is
+ * an error to have two outstanding calls to this function.
+ *
+ * @param slot The slot to call when the request is satisfied.
+ * @param cancellable A cancellable object.
+ * @param io_priority The I/O priority of the request.
+ * @result true if the read succeeded without error.
+ */
+ void read_line_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
+ _IGNORE(g_data_input_stream_read_line_async)
+
+ /** Finish an asynchronous call started by read_line_async().
+ *
+ * @param result The AsyncResult that was provided to the callback slot.
+ * @param data A string to fill with the read data.
+ * @result true if the read succeeded without error.
+ */
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ bool read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
+ #else
+ bool read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data, std::auto_ptr<Glib::Error>& error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ _IGNORE(g_data_input_stream_read_line_finish)
+
+ /** Reads a string from the data input stream, up to the first
+ * occurrence of any of the stop characters.
+ *
+ * @param data A string to fill with the read data.
+ * @param stop_chars Characters to terminate the read.
+ * @param cancellable A cancellable object.
+ * @result true if the read succeeded without error.
+ */
#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable);
#else
bool read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
+ _IGNORE(g_data_input_stream_read_until)
- /** non-cancellable version of read_until()
+ /** A non-cancellable version of read_until().
+ * @param stop_chars Characters to terminate the read.
+ * @param data A string to fill with the read data.
+ * @result true if the read succeeded without error.
*/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool read_until(std::string& data, const std::string& stop_chars);
@@ -154,6 +200,31 @@ public:
bool read_until(std::string& data, const std::string& stop_chars, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
+ /** The asynchronous version of read_until(). It is
+ * an error to have two outstanding calls to this function.
+ *
+ * @param stop_chars Characters to terminate the read.
+ * @param slot The slot to call when the request is satisfied.
+ * @param cancellable A cancellable object.
+ * @param io_priority The I/O priority of the request.
+ * @result true if the read succeeded without error.
+ */
+ void read_until_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
+ _IGNORE(g_data_input_stream_read_until_async)
+
+ /** Finish an asynchronous call started by read_until_async().
+ *
+ * @param result The AsyncResult that was provided to the callback slot.
+ * @param data A string to fill with the read data.
+ * @result true if the read succeeded without error.
+ */
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ bool read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
+ #else
+ bool read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data, std::auto_ptr<Glib::Error>& error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ _IGNORE(g_data_input_stream_read_until_finish)
+
_WRAP_PROPERTY("byte-order", DataStreamByteOrder)
_WRAP_PROPERTY("newline-type", DataStreamNewlineType)
};
diff --git a/gio/src/filterinputstream.hg b/gio/src/filterinputstream.hg
index 93df2c53..b4129b77 100644
--- a/gio/src/filterinputstream.hg
+++ b/gio/src/filterinputstream.hg
@@ -46,6 +46,9 @@ public:
g_filter_input_stream_get_base_stream,
refreturn, constversion)
+ _WRAP_METHOD(bool get_close_base_stream() const, g_filter_input_stream_get_close_base_stream)
+ _WRAP_METHOD(void set_close_base_stream(bool close_base = true), g_filter_input_stream_set_close_base_stream)
+
_WRAP_PROPERTY("base-stream", Glib::RefPtr<InputStream>)
_WRAP_PROPERTY("close-base-stream", bool)
};
diff --git a/gio/src/filteroutputstream.hg b/gio/src/filteroutputstream.hg
index 02c79524..e0649da6 100644
--- a/gio/src/filteroutputstream.hg
+++ b/gio/src/filteroutputstream.hg
@@ -46,6 +46,9 @@ public:
g_filter_output_stream_get_base_stream,
refreturn, constversion)
+ _WRAP_METHOD(bool get_close_base_stream() const, g_filter_output_stream_get_close_base_stream)
+ _WRAP_METHOD(void set_close_base_stream(bool close_base = true), g_filter_output_stream_set_close_base_stream)
+
_WRAP_PROPERTY("base-stream", Glib::RefPtr<InputStream>)
_WRAP_PROPERTY("close-base-stream", bool)
};
diff --git a/gio/src/gio_methods.defs b/gio/src/gio_methods.defs
index 4d69a679..cc436d85 100644
--- a/gio/src/gio_methods.defs
+++ b/gio/src/gio_methods.defs
@@ -98,6 +98,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")
@@ -160,6 +181,13 @@
(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")
@@ -423,6 +451,7 @@
'("host-not-found" "G_IO_ERROR_HOST_NOT_FOUND")
'("would-merge" "G_IO_ERROR_WOULD_MERGE")
'("failed-handled" "G_IO_ERROR_FAILED_HANDLED")
+ '("too-many-open-files" "G_IO_ERROR_TOO_MANY_OPEN_FILES")
)
)
@@ -742,6 +771,10 @@
+;; From gasynchelper.h
+
+
+
;; From gasyncresult.h
(define-function g_async_result_get_type
@@ -1100,6 +1133,10 @@
+;; From gcontenttypeprivate.h
+
+
+
;; From gdatainputstream.h
(define-function g_data_input_stream_get_type
@@ -1227,6 +1264,29 @@
)
)
+(define-method read_line_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_async")
+ (return-type "none")
+ (parameters
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_line_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
(define-method read_until
(of-object "GDataInputStream")
(c-name "g_data_input_stream_read_until")
@@ -1239,6 +1299,30 @@
)
)
+(define-method read_until_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "stop_chars")
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_until_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
;; From gdataoutputstream.h
@@ -1362,6 +1446,68 @@
+;; 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_from_keyfile
+ (c-name "g_desktop_app_info_new_from_keyfile")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("GKeyFile*" "key_file")
+ )
+)
+
+(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")
+ )
+)
+
+(define-function g_desktop_app_info_lookup_get_type
+ (c-name "g_desktop_app_info_lookup_get_type")
+ (return-type "GType")
+)
+
+(define-method get_default_for_uri_scheme
+ (of-object "GDesktopAppInfoLookup")
+ (c-name "g_desktop_app_info_lookup_get_default_for_uri_scheme")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "uri_scheme")
+ )
+)
+
+
+
;; From gdrive.h
(define-function g_drive_get_type
@@ -1483,6 +1629,10 @@
+;; From gdummyfile.h
+
+
+
;; From gemblemedicon.h
(define-function g_emblemed_icon_get_type
@@ -1615,6 +1765,10 @@
+;; From gfileattribute-priv.h
+
+
+
;; From gfileenumerator.h
(define-function g_file_enumerator_get_type
@@ -3448,6 +3602,21 @@
(return-type "GInputStream*")
)
+(define-method get_close_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_get_close_base_stream")
+ (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_set_close_base_stream")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_base")
+ )
+)
+
;; From gfilteroutputstream.h
@@ -3463,6 +3632,21 @@
(return-type "GOutputStream*")
)
+(define-method get_close_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_get_close_base_stream")
+ (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_set_close_base_stream")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_base")
+ )
+)
+
;; From gicon.h
@@ -3657,6 +3841,10 @@
+;; From gioalias.h
+
+
+
;; From gioenums.h
@@ -3791,6 +3979,10 @@
+;; From gio-marshal.h
+
+
+
;; From giomodule.h
(define-function g_io_module_get_type
@@ -3910,6 +4102,10 @@
+;; From giomodule-priv.h
+
+
+
;; From gioscheduler.h
(define-function g_io_scheduler_push_job
@@ -4001,6 +4197,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
@@ -4365,6 +4603,10 @@
+;; From gmountprivate.h
+
+
+
;; From gnativevolumemonitor.h
(define-function g_native_volume_monitor_get_type
@@ -4559,6 +4801,10 @@
+;; From gpollfilemonitor.h
+
+
+
;; From gseekable.h
(define-function g_seekable_get_type
@@ -4779,6 +5025,16 @@
)
)
+(define-function g_simple_async_result_is_valid
+ (c-name "g_simple_async_result_is_valid")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GObject*" "source")
+ '("gpointer" "source_tag")
+ )
+)
+
(define-function g_simple_async_report_error_in_idle
(c-name "g_simple_async_report_error_in_idle")
(return-type "none")
@@ -4859,317 +5115,51 @@
-;; From gvfs.h
-
-(define-function g_vfs_get_type
- (c-name "g_vfs_get_type")
- (return-type "GType")
-)
-
-(define-method is_active
- (of-object "GVfs")
- (c-name "g_vfs_is_active")
- (return-type "gboolean")
-)
-
-(define-method get_file_for_path
- (of-object "GVfs")
- (c-name "g_vfs_get_file_for_path")
- (return-type "GFile*")
- (parameters
- '("const-char*" "path")
- )
-)
-
-(define-method get_file_for_uri
- (of-object "GVfs")
- (c-name "g_vfs_get_file_for_uri")
- (return-type "GFile*")
- (parameters
- '("const-char*" "uri")
- )
-)
-
-(define-method parse_name
- (of-object "GVfs")
- (c-name "g_vfs_parse_name")
- (return-type "GFile*")
- (parameters
- '("const-char*" "parse_name")
- )
-)
-
-(define-function g_vfs_get_default
- (c-name "g_vfs_get_default")
- (return-type "GVfs*")
-)
-
-(define-function g_vfs_get_local
- (c-name "g_vfs_get_local")
- (return-type "GVfs*")
-)
+;; From gunionvolumemonitor.h
-;; From gvolume.h
+;; From gunixinputstream.h
-(define-function g_volume_get_type
- (c-name "g_volume_get_type")
+(define-function g_unix_input_stream_get_type
+ (c-name "g_unix_input_stream_get_type")
(return-type "GType")
)
-(define-method get_name
- (of-object "GVolume")
- (c-name "g_volume_get_name")
- (return-type "char*")
-)
-
-(define-method get_icon
- (of-object "GVolume")
- (c-name "g_volume_get_icon")
- (return-type "GIcon*")
-)
-
-(define-method get_uuid
- (of-object "GVolume")
- (c-name "g_volume_get_uuid")
- (return-type "char*")
-)
-
-(define-method get_drive
- (of-object "GVolume")
- (c-name "g_volume_get_drive")
- (return-type "GDrive*")
-)
-
-(define-method get_mount
- (of-object "GVolume")
- (c-name "g_volume_get_mount")
- (return-type "GMount*")
-)
-
-(define-method can_mount
- (of-object "GVolume")
- (c-name "g_volume_can_mount")
- (return-type "gboolean")
-)
-
-(define-method can_eject
- (of-object "GVolume")
- (c-name "g_volume_can_eject")
- (return-type "gboolean")
-)
-
-(define-method should_automount
- (of-object "GVolume")
- (c-name "g_volume_should_automount")
- (return-type "gboolean")
-)
-
-(define-method mount
- (of-object "GVolume")
- (c-name "g_volume_mount")
- (return-type "none")
- (parameters
- '("GMountMountFlags" "flags")
- '("GMountOperation*" "mount_operation")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-method mount_finish
- (of-object "GVolume")
- (c-name "g_volume_mount_finish")
- (return-type "gboolean")
+(define-function g_unix_input_stream_new
+ (c-name "g_unix_input_stream_new")
+ (is-constructor-of "GUnixInputStream")
+ (return-type "GInputStream*")
(parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
+ '("gint" "fd")
+ '("gboolean" "close_fd")
)
)
-(define-method eject
- (of-object "GVolume")
- (c-name "g_volume_eject")
+(define-method set_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_set_close_fd")
(return-type "none")
(parameters
- '("GMountUnmountFlags" "flags")
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
+ '("gboolean" "close_fd")
)
)
-(define-method eject_finish
- (of-object "GVolume")
- (c-name "g_volume_eject_finish")
+(define-method get_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_close_fd")
(return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-method get_identifier
- (of-object "GVolume")
- (c-name "g_volume_get_identifier")
- (return-type "char*")
- (parameters
- '("const-char*" "kind")
- )
-)
-
-(define-method enumerate_identifiers
- (of-object "GVolume")
- (c-name "g_volume_enumerate_identifiers")
- (return-type "char**")
)
-(define-method get_activation_root
- (of-object "GVolume")
- (c-name "g_volume_get_activation_root")
- (return-type "GFile*")
-)
-
-
-
-;; From gvolumemonitor.h
-
-(define-function g_volume_monitor_get_type
- (c-name "g_volume_monitor_get_type")
- (return-type "GType")
-)
-
-(define-function g_volume_monitor_get
- (c-name "g_volume_monitor_get")
- (return-type "GVolumeMonitor*")
-)
-
-(define-method get_connected_drives
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_connected_drives")
- (return-type "GList*")
-)
-
-(define-method get_volumes
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_volumes")
- (return-type "GList*")
-)
-
-(define-method get_mounts
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_mounts")
- (return-type "GList*")
-)
-
-(define-method get_volume_for_uuid
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_volume_for_uuid")
- (return-type "GVolume*")
- (parameters
- '("const-char*" "uuid")
- )
-)
-
-(define-method get_mount_for_uuid
- (of-object "GVolumeMonitor")
- (c-name "g_volume_monitor_get_mount_for_uuid")
- (return-type "GMount*")
- (parameters
- '("const-char*" "uuid")
- )
-)
-
-(define-function g_volume_monitor_adopt_orphan_mount
- (c-name "g_volume_monitor_adopt_orphan_mount")
- (return-type "GVolume*")
- (parameters
- '("GMount*" "mount")
- )
-)
-
-
-
-;; 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_from_keyfile
- (c-name "g_desktop_app_info_new_from_keyfile")
- (return-type "GDesktopAppInfo*")
- (parameters
- '("GKeyFile*" "key_file")
- )
-)
-
-(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")
- )
-)
-
-(define-function g_desktop_app_info_lookup_get_type
- (c-name "g_desktop_app_info_lookup_get_type")
- (return-type "GType")
-)
-
-(define-method get_default_for_uri_scheme
- (of-object "GDesktopAppInfoLookup")
- (c-name "g_desktop_app_info_lookup_get_default_for_uri_scheme")
- (return-type "GAppInfo*")
- (parameters
- '("const-char*" "uri_scheme")
- )
+(define-method get_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_fd")
+ (return-type "gint")
)
-;; 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
@@ -5416,9 +5406,288 @@
(is-constructor-of "GUnixOutputStream")
(return-type "GOutputStream*")
(parameters
- '("int" "fd")
- '("gboolean" "close_fd_at_close")
+ '("gint" "fd")
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method set_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method get_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_close_fd")
+ (return-type "gboolean")
+)
+
+(define-method get_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_fd")
+ (return-type "gint")
+)
+
+
+
+;; From gunixvolume.h
+
+
+
+;; From gunixvolumemonitor.h
+
+
+
+;; From gvfs.h
+
+(define-function g_vfs_get_type
+ (c-name "g_vfs_get_type")
+ (return-type "GType")
+)
+
+(define-method is_active
+ (of-object "GVfs")
+ (c-name "g_vfs_is_active")
+ (return-type "gboolean")
+)
+
+(define-method get_file_for_path
+ (of-object "GVfs")
+ (c-name "g_vfs_get_file_for_path")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "path")
+ )
+)
+
+(define-method get_file_for_uri
+ (of-object "GVfs")
+ (c-name "g_vfs_get_file_for_uri")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "uri")
)
)
+(define-method parse_name
+ (of-object "GVfs")
+ (c-name "g_vfs_parse_name")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "parse_name")
+ )
+)
+
+(define-function g_vfs_get_default
+ (c-name "g_vfs_get_default")
+ (return-type "GVfs*")
+)
+
+(define-function g_vfs_get_local
+ (c-name "g_vfs_get_local")
+ (return-type "GVfs*")
+)
+
+
+
+;; From gvolume.h
+
+(define-function g_volume_get_type
+ (c-name "g_volume_get_type")
+ (return-type "GType")
+)
+
+(define-method get_name
+ (of-object "GVolume")
+ (c-name "g_volume_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GVolume")
+ (c-name "g_volume_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_uuid
+ (of-object "GVolume")
+ (c-name "g_volume_get_uuid")
+ (return-type "char*")
+)
+
+(define-method get_drive
+ (of-object "GVolume")
+ (c-name "g_volume_get_drive")
+ (return-type "GDrive*")
+)
+
+(define-method get_mount
+ (of-object "GVolume")
+ (c-name "g_volume_get_mount")
+ (return-type "GMount*")
+)
+
+(define-method can_mount
+ (of-object "GVolume")
+ (c-name "g_volume_can_mount")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GVolume")
+ (c-name "g_volume_can_eject")
+ (return-type "gboolean")
+)
+
+(define-method should_automount
+ (of-object "GVolume")
+ (c-name "g_volume_should_automount")
+ (return-type "gboolean")
+)
+
+(define-method mount
+ (of-object "GVolume")
+ (c-name "g_volume_mount")
+ (return-type "none")
+ (parameters
+ '("GMountMountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_finish
+ (of-object "GVolume")
+ (c-name "g_volume_mount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject
+ (of-object "GVolume")
+ (c-name "g_volume_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GVolume")
+ (c-name "g_volume_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_identifier
+ (of-object "GVolume")
+ (c-name "g_volume_get_identifier")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "kind")
+ )
+)
+
+(define-method enumerate_identifiers
+ (of-object "GVolume")
+ (c-name "g_volume_enumerate_identifiers")
+ (return-type "char**")
+)
+
+(define-method get_activation_root
+ (of-object "GVolume")
+ (c-name "g_volume_get_activation_root")
+ (return-type "GFile*")
+)
+
+
+
+;; From gvolumemonitor.h
+
+(define-function g_volume_monitor_get_type
+ (c-name "g_volume_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-function g_volume_monitor_get
+ (c-name "g_volume_monitor_get")
+ (return-type "GVolumeMonitor*")
+)
+
+(define-method get_connected_drives
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_connected_drives")
+ (return-type "GList*")
+)
+
+(define-method get_volumes
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_volumes")
+ (return-type "GList*")
+)
+
+(define-method get_mounts
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_mounts")
+ (return-type "GList*")
+)
+
+(define-method get_volume_for_uuid
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_volume_for_uuid")
+ (return-type "GVolume*")
+ (parameters
+ '("const-char*" "uuid")
+ )
+)
+
+(define-method get_mount_for_uuid
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_mount_for_uuid")
+ (return-type "GMount*")
+ (parameters
+ '("const-char*" "uuid")
+ )
+)
+
+(define-function g_volume_monitor_adopt_orphan_mount
+ (c-name "g_volume_monitor_adopt_orphan_mount")
+ (return-type "GVolume*")
+ (parameters
+ '("GMount*" "mount")
+ )
+)
+
+
+
+;; From gwin32appinfo.h
+
+(define-function g_win32_app_info_get_type
+ (c-name "g_win32_app_info_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gwin32mount.h
+
+
+
+;; From gwin32volumemonitor.h
+
diff --git a/gio/src/unixinputstream.hg b/gio/src/unixinputstream.hg
index 05a1556f..ff8e8012 100644
--- a/gio/src/unixinputstream.hg
+++ b/gio/src/unixinputstream.hg
@@ -45,6 +45,10 @@ protected:
public:
_WRAP_CREATE(int fd, bool close_fd_at_close)
+ _WRAP_METHOD(void set_close_fd(bool close_fd = true), g_unix_input_stream_set_close_fd)
+ _WRAP_METHOD(bool get_close_fd() const, g_unix_input_stream_get_close_fd)
+ _WRAP_METHOD(int get_fd() const, g_unix_input_stream_get_fd)
+
_WRAP_PROPERTY("fd", int)
_WRAP_PROPERTY("close-fd", bool)
};
diff --git a/gio/src/unixoutputstream.hg b/gio/src/unixoutputstream.hg
index 4dd526f0..8b69acf8 100644
--- a/gio/src/unixoutputstream.hg
+++ b/gio/src/unixoutputstream.hg
@@ -44,6 +44,10 @@ protected:
public:
_WRAP_CREATE(int fd, bool close_fd_at_close)
+ _WRAP_METHOD(void set_close_fd(bool close_fd = true), g_unix_output_stream_set_close_fd)
+ _WRAP_METHOD(bool get_close_fd() const, g_unix_output_stream_get_close_fd)
+ _WRAP_METHOD(int get_fd() const, g_unix_output_stream_get_fd)
+
_WRAP_PROPERTY("fd", int)
_WRAP_PROPERTY("close-fd", bool)
};