glibmm r501 - in trunk: . gio/src
- From: markoa svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r501 - in trunk: . gio/src
- Date: Thu, 10 Jan 2008 19:27:16 +0000 (GMT)
Author: markoa
Date: Thu Jan 10 19:27:15 2008
New Revision: 501
URL: http://svn.gnome.org/viewvc/glibmm?rev=501&view=rev
Log:
2008-01-10 Marko Anastasov <marko anastasov gmail com>
* gio/src/drive.hg:
* gio/src/drive.ccg: Added poll_for_media, poll_for_media_finish.
* gio/src/fileinputstream.hg:
* gio/src/fileoutputstream.hg:
* gio/src/inputstream.hg:
* gio/src/volume.hg: Modified *_finish functions to take a const
AsyncResult.
Modified:
trunk/ChangeLog
trunk/gio/src/drive.ccg
trunk/gio/src/drive.hg
trunk/gio/src/fileinputstream.hg
trunk/gio/src/fileoutputstream.hg
trunk/gio/src/inputstream.hg
trunk/gio/src/volume.hg
Modified: trunk/gio/src/drive.ccg
==============================================================================
--- trunk/gio/src/drive.ccg (original)
+++ trunk/gio/src/drive.ccg Thu Jan 10 19:27:15 2008
@@ -78,5 +78,32 @@
slot_copy);
}
+void Drive::poll_for_media(const Glib::RefPtr<Cancellable>& cancellable,
+ const SlotAsyncReady& slot)
+{
+ // 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_drive_poll_for_media(gobj(),
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+void Drive::poll_for_media(const SlotAsyncReady& slot)
+{
+ // 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_drive_poll_for_media(gobj(),
+ NULL, // cancellable
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
} // namespace Gio
Modified: trunk/gio/src/drive.hg
==============================================================================
--- trunk/gio/src/drive.hg (original)
+++ trunk/gio/src/drive.hg Thu Jan 10 19:27:15 2008
@@ -83,10 +83,19 @@
void eject(GMountUnmountFlags flags, const SlotAsyncReady& slot);
_IGNORE(g_drive_eject)
- _WRAP_METHOD(bool eject_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(bool eject_finish(const Glib::RefPtr<AsyncResult>& result),
g_drive_eject_finish,
errthrow)
+ _IGNORE(g_drive_poll_for_media)
+ void poll_for_media(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
+
+ void poll_for_media(const SlotAsyncReady& slot);
+
+ _WRAP_METHOD(bool poll_for_media_finish(const Glib::RefPtr<AsyncResult>& result),
+ g_drive_poll_for_media_finish,
+ errthrow)
+
/* vfuncs */
_WRAP_VFUNC(Glib::ustring get_name() const, "get_name")
Modified: trunk/gio/src/fileinputstream.hg
==============================================================================
--- trunk/gio/src/fileinputstream.hg (original)
+++ trunk/gio/src/fileinputstream.hg Thu Jan 10 19:27:15 2008
@@ -67,7 +67,7 @@
const SlotAsyncReady& slot);
_IGNORE(g_file_input_stream_query_info_async)
- _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(const Glib::RefPtr<AsyncResult>& result),
g_file_input_stream_query_info_finish,
errthrow)
Modified: trunk/gio/src/fileoutputstream.hg
==============================================================================
--- trunk/gio/src/fileoutputstream.hg (original)
+++ trunk/gio/src/fileoutputstream.hg Thu Jan 10 19:27:15 2008
@@ -45,7 +45,7 @@
void query_info_async(const std::string& attributes, int io_priority, Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
//TODO: cancellable can probalby be NULL.
- _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(const Glib::RefPtr<AsyncResult>& result),
g_file_output_stream_query_info_finish,
refreturn, errthrow)
Modified: trunk/gio/src/inputstream.hg
==============================================================================
--- trunk/gio/src/inputstream.hg (original)
+++ trunk/gio/src/inputstream.hg Thu Jan 10 19:27:15 2008
@@ -59,21 +59,21 @@
void read_async(void* buffer, gsize count, int io_priority, Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
- _WRAP_METHOD(gssize read_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(gssize read_finish(const Glib::RefPtr<AsyncResult>& result),
g_input_stream_read_finish,
errthrow)
_IGNORE(g_input_stream_skip_async)
void skip_async(gsize count, int io_priority, Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
- _WRAP_METHOD(gssize skip_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(gssize skip_finish(const Glib::RefPtr<AsyncResult>& result),
g_input_stream_skip_finish,
errthrow)
_IGNORE(g_input_stream_close_async)
void close_async(int io_priority, Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
- _WRAP_METHOD(gboolean close_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(gboolean close_finish(const Glib::RefPtr<AsyncResult>& result),
g_input_stream_close_finish,
errthrow)
Modified: trunk/gio/src/volume.hg
==============================================================================
--- trunk/gio/src/volume.hg (original)
+++ trunk/gio/src/volume.hg Thu Jan 10 19:27:15 2008
@@ -65,7 +65,7 @@
void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot);
- _WRAP_METHOD(bool mount_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(bool mount_finish(const Glib::RefPtr<AsyncResult>& result),
g_volume_mount_finish,
errthrow)
@@ -76,7 +76,7 @@
void eject(GMountUnmountFlags flags, const SlotAsyncReady& slot);
_IGNORE(g_volume_eject)
- _WRAP_METHOD(bool eject_finish(Glib::RefPtr<AsyncResult>& result),
+ _WRAP_METHOD(bool eject_finish(const Glib::RefPtr<AsyncResult>& result),
g_volume_eject_finish,
errthrow)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]