summaryrefslogtreecommitdiff
path: root/gio/src/seekable.ccg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2008-01-16 20:09:55 +0000
committerMurray Cumming <murrayc@src.gnome.org>2008-01-16 20:09:55 +0000
commitd64bfebd4d645a9b109b6b4da386d18300844688 (patch)
tree9713e9b920e3807fb9ef62bed76e8f4878dec836 /gio/src/seekable.ccg
parente081f66987efe916c37394b1d0d58eb5ec90b023 (diff)
downloadglibmm-d64bfebd4d645a9b109b6b4da386d18300844688.tar.gz
Added methods and vfuncs (though the .defs do not exist for the vfuncs
2008-01-16 Murray Cumming <murrayc@murrayc.com> * gio/src/seekable.ccg: * gio/src/seekable.hg: Added methods and vfuncs (though the .defs do not exist for the vfuncs yet.) svn path=/trunk/; revision=514
Diffstat (limited to 'gio/src/seekable.ccg')
-rw-r--r--gio/src/seekable.ccg46
1 files changed, 46 insertions, 0 deletions
diff --git a/gio/src/seekable.ccg b/gio/src/seekable.ccg
index 33488c5e..9deb7bef 100644
--- a/gio/src/seekable.ccg
+++ b/gio/src/seekable.ccg
@@ -19,3 +19,49 @@
#include <gio/gio.h>
+namespace Gio
+{
+
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool Seekable::seek(goffset offset, Glib::SeekType type)
+#else
+bool Seekable::seek(goffset offset, Glib::SeekType type, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ bool retvalue = g_seekable_seek(gobj(), offset, ((GSeekType)(type)), 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
+bool Seekable::truncate(goffset offset)
+#else
+bool Seekable::truncate(goffset offset, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ bool retvalue = g_seekable_truncate(gobj(), offset, 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
+