glibmm r512 - in trunk: . gio/src glib/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r512 - in trunk: . gio/src glib/src
- Date: Tue, 15 Jan 2008 14:50:47 +0000 (GMT)
Author: murrayc
Date: Tue Jan 15 14:50:47 2008
New Revision: 512
URL: http://svn.gnome.org/viewvc/glibmm?rev=512&view=rev
Log:
2008-01-15 Murray Cumming <murrayc murrayc com>
* gio/src/drive.ccg:
* gio/src/drive.hg: eject(), poll_for_media()
* gio/src/volume.ccg:
* gio/src/volume.hg: mount(), eject():
Add method overloads that take no slot.
Modified:
trunk/ChangeLog
trunk/gio/src/drive.ccg
trunk/gio/src/drive.hg
trunk/gio/src/volume.ccg
trunk/gio/src/volume.hg
trunk/glib/src/uriutils.hg
Modified: trunk/gio/src/drive.ccg
==============================================================================
--- trunk/gio/src/drive.ccg (original)
+++ trunk/gio/src/drive.ccg Tue Jan 15 14:50:47 2008
@@ -78,8 +78,16 @@
slot_copy);
}
-void Drive::poll_for_media(const Glib::RefPtr<Cancellable>& cancellable,
- const SlotAsyncReady& slot)
+void Drive::eject(GMountUnmountFlags flags)
+{
+ g_drive_eject(gobj(),
+ flags,
+ NULL, // cancellable
+ NULL,
+ NULL);
+}
+
+void Drive::poll_for_media(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
{
// Create a copy of the slot.
// A pointer to it will be passed through the callback's data parameter
@@ -105,5 +113,13 @@
slot_copy);
}
+void Drive::poll_for_media()
+{
+ g_drive_poll_for_media(gobj(),
+ NULL, // cancellable
+ NULL,
+ NULL);
+}
+
} // namespace Gio
Modified: trunk/gio/src/drive.hg
==============================================================================
--- trunk/gio/src/drive.hg (original)
+++ trunk/gio/src/drive.hg Tue Jan 15 14:50:47 2008
@@ -85,15 +85,24 @@
void eject(const SlotAsyncReady& slot, GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE);
_IGNORE(g_drive_eject)
+ /** Ejects the drive.
+ * @param slot A callback which will be called when the eject is completed.
+ * @param flags Flags affecting the unmount if required for eject.
+ */
+ void eject(GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE);
+
_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);
+ //TODO: Documentation:
+ void poll_for_media(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
void poll_for_media(const SlotAsyncReady& slot);
+ void poll_for_media();
+ _IGNORE(g_drive_poll_for_media)
+
_WRAP_METHOD(bool poll_for_media_finish(const Glib::RefPtr<AsyncResult>& result),
g_drive_poll_for_media_finish,
errthrow)
Modified: trunk/gio/src/volume.ccg
==============================================================================
--- trunk/gio/src/volume.ccg (original)
+++ trunk/gio/src/volume.ccg Tue Jan 15 14:50:47 2008
@@ -81,7 +81,28 @@
slot_copy);
}
-void Volume::eject(GMountUnmountFlags flags, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
+void
+Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation)
+{
+ g_volume_mount(gobj(),
+ mount_operation->gobj(),
+ NULL, // cancellable
+ NULL,
+ NULL);
+}
+
+void
+Volume::mount()
+{
+ g_volume_mount(gobj(),
+ NULL,
+ NULL, // cancellable
+ NULL,
+ NULL);
+}
+
+
+void Volume::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, GMountUnmountFlags flags)
{
// Create a copy of the slot.
// A pointer to it will be passed through the callback's data parameter
@@ -95,7 +116,7 @@
slot_copy);
}
-void Volume::eject(GMountUnmountFlags flags, const SlotAsyncReady& slot)
+void Volume::eject(const SlotAsyncReady& slot, GMountUnmountFlags flags)
{
// Create a copy of the slot.
// A pointer to it will be passed through the callback's data parameter
@@ -109,4 +130,14 @@
slot_copy);
}
+void Volume::eject(GMountUnmountFlags flags)
+{
+ g_volume_eject(gobj(),
+ flags,
+ NULL,
+ NULL,
+ NULL);
+}
+
} // namespace Gio
+
Modified: trunk/gio/src/volume.hg
==============================================================================
--- trunk/gio/src/volume.hg (original)
+++ trunk/gio/src/volume.hg Tue Jan 15 14:50:47 2008
@@ -79,6 +79,11 @@
void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot);
+
+ void mount(const Glib::RefPtr<MountOperation>& mount_operation);
+
+ void mount();
+
_IGNORE(g_volume_mount)
_WRAP_METHOD(bool mount_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -87,9 +92,11 @@
//TODO: Documentation.
//TODO: Use MountUnmountFlags instead of GMountUnmountFlags.
- void eject(GMountUnmountFlags flags, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
+ void eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE);
+
+ void eject(const SlotAsyncReady& slot, GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE);
- void eject(GMountUnmountFlags flags, const SlotAsyncReady& slot);
+ void eject(GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE);
_IGNORE(g_volume_eject)
_WRAP_METHOD(bool eject_finish(const Glib::RefPtr<AsyncResult>& result),
Modified: trunk/glib/src/uriutils.hg
==============================================================================
--- trunk/glib/src/uriutils.hg (original)
+++ trunk/glib/src/uriutils.hg Tue Jan 15 14:50:47 2008
@@ -19,11 +19,9 @@
_DEFS(glibmm,glib)
-#include <string>
-
+#include <glibmm/ustring.h>
#include <glibmmconfig.h>
-GLIBMM_USING_STD(string)
namespace Glib
{
@@ -47,7 +45,7 @@
* @ingroup UriUtils
* @newin2p16
*/
-std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = std::string());
+std::string uri_unescape_string(const Glib::ustring& escaped_string, const Glib::ustring& illegal_characters = Glib::ustring());
//TODO: Use iterator?
//char * g_uri_unescape_segment (const char *escaped_string,
@@ -85,7 +83,7 @@
* @ingroup UriUtils
* @newin2p16
*/
-std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = std::string(), bool allow_utf8 = true);
+std::string uri_escape_string(const std::string& unescaped, const Glib::ustring& reserved_chars_allowed = Glib::ustring(), bool allow_utf8 = true);
} // namespace Glib
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]