diff options
author | Murray Cumming <murrayc@murrayc.com> | 2008-02-03 22:37:21 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2008-02-03 22:37:21 +0000 |
commit | 28fb124f4f79b068a0290ee3991b33c8896108ae (patch) | |
tree | 16d5a8a552de66e4acd50a6555468728e2da318b /gio/src/file.ccg | |
parent | aaccdc2ace9a0893f5775007f601f339d4f96255 (diff) | |
download | glibmm-28fb124f4f79b068a0290ee3991b33c8896108ae.tar.gz |
Added types. Regenerated.
2008-02-03 Murray Cumming <murrayc@murrayc.com>
* tools/extra_defs_gen/generate_defs_gio.cc: Added types.
* gio/src/gio_signals.defs: Regenerated.
* tools/m4/convert_gio.m4:
* gio/src/drive.hg:
* gio/src/filterinputstream.hg:
* gio/src/filteroutputstream.hg:
* gio/src/mount.hg:
* gio/src/mountoperation.hg:
* gio/src/volume.hg:
* gio/src/volumemonitor.hg: Added signals and properties.
* gio/src/file.ccg:
* gio/src/file.hg: Added query_filesystem_info() without a cancellable.
svn path=/trunk/; revision=573
Diffstat (limited to 'gio/src/file.ccg')
-rw-r--r-- | gio/src/file.ccg | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gio/src/file.ccg b/gio/src/file.ccg index 36f0a2b3..017dedab 100644 --- a/gio/src/file.ccg +++ b/gio/src/file.ccg @@ -375,6 +375,27 @@ Glib::RefPtr<FileInfo> File::query_filesystem_info(const Glib::RefPtr<Cancellabl } #ifdef GLIBMM_EXCEPTIONS_ENABLED +Glib::RefPtr<FileInfo> File::query_filesystem_info(const std::string& attributes) +#else +Glib::RefPtr<FileInfo> File::query_filesystem_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_query_filesystem_info(gobj(), 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; +} + +#ifdef GLIBMM_EXCEPTIONS_ENABLED Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags) #else Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error) |