[glibmm] wrap a couple added GDrive methods
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Subject: [glibmm] wrap a couple added GDrive methods
- Date: Thu, 9 Jul 2009 21:27:49 +0000 (UTC)
commit 59d2b6bace1f4f8717e273588286f0de37b6a552
Author: Jonathon Jongsma <jonathon quotidian org>
Date: Thu Jul 9 20:18:17 2009 +0100
wrap a couple added GDrive methods
* gio/src/drive.ccg:
* gio/src/drive.hg:
* gio/src/gio_enums.defs:
* tools/m4/convert_gio.m4: wrap added GDrive methods: start(),
stop(), start_finish(), stop_finish(), can_start(), can_start(),
can_start_degraded()
ChangeLog | 9 +++++
gio/src/drive.ccg | 75 +++++++++++++++++++++++++++++++++++++++++++++++
gio/src/drive.hg | 21 +++++++++++++
gio/src/gio_enums.defs | 1 +
tools/m4/convert_gio.m4 | 1 +
5 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6f41d66..f175cf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-07-09 Jonathon Jongsma <jonathon quotidian org>
+ * gio/src/drive.ccg:
+ * gio/src/drive.hg:
+ * gio/src/gio_enums.defs:
+ * tools/m4/convert_gio.m4: wrap added GDrive methods: start(),
+ stop(), start_finish(), stop_finish(), can_start(), can_start(),
+ can_start_degraded()
+
+2009-07-09 Jonathon Jongsma <jonathon quotidian org>
+
* gio/src/gio_methods.defs: re-generated defs
* gio/src/socket.ccg:
* gio/src/socket.hg: fix build breakage caused by the addition of a
diff --git a/gio/src/drive.ccg b/gio/src/drive.ccg
index b45e74d..0b7d6d8 100644
--- a/gio/src/drive.ccg
+++ b/gio/src/drive.ccg
@@ -96,5 +96,80 @@ void Drive::poll_for_media()
NULL);
}
+void
+Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation,
+ const Glib::RefPtr<Cancellable>& cancellable,
+ const SlotAsyncReady& slot,
+ MountUnmountFlags flags)
+{
+ // 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_stop(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ mount_operation->gobj(),
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+void
+Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation,
+ const SlotAsyncReady& slot,
+ MountUnmountFlags flags)
+{
+ // 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_stop(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ mount_operation->gobj(),
+ NULL,
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+
+void
+Drive::start(const Glib::RefPtr<MountOperation>& mount_operation,
+ const Glib::RefPtr<Cancellable>& cancellable,
+ const SlotAsyncReady& slot,
+ DriveStartFlags flags)
+{
+ // 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_start(gobj(),
+ static_cast<GDriveStartFlags>(flags),
+ mount_operation->gobj(),
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+void
+Drive::start(const Glib::RefPtr<MountOperation>& mount_operation,
+ const SlotAsyncReady& slot,
+ DriveStartFlags flags)
+{
+ // 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_start(gobj(),
+ static_cast<GDriveStartFlags>(flags),
+ mount_operation->gobj(),
+ NULL,
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
} // namespace Gio
diff --git a/gio/src/drive.hg b/gio/src/drive.hg
index 932da46..8d7d6ff 100644
--- a/gio/src/drive.hg
+++ b/gio/src/drive.hg
@@ -32,6 +32,8 @@ typedef struct _GDriveIface GDriveIface;
namespace Gio
{
+_WRAP_ENUM(DriveStartFlags, GDriveStartFlags)
+
/** Virtual File System drive management.
*
* This represent a piece of hardware connected to the machine. It's generally only created for removable hardware or hardware with removable media.
@@ -112,6 +114,25 @@ public:
_WRAP_METHOD(std::string get_identifier(const std::string& kind) const, g_drive_get_identifier)
_WRAP_METHOD(Glib::StringArrayHandle enumerate_identifiers() const, g_drive_enumerate_identifiers)
+ /** @newin2p22 */
+ void start(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, DriveStartFlags flags = DRIVE_START_NONE);
+ /** @newin2p22 */
+ void start(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, DriveStartFlags flags = DRIVE_START_NONE);
+ _IGNORE(g_drive_start)
+ _WRAP_METHOD(bool start_finish(const Glib::RefPtr<AsyncResult>& result), g_drive_start_finish, errthrow);
+ /** @newin2p22 */
+ _WRAP_METHOD(bool can_start() const, g_drive_can_start)
+ /** @newin2p22 */
+ _WRAP_METHOD(bool can_start_degraded() const, g_drive_can_start_degraded)
+
+ /** @newin2p22 */
+ void stop(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
+ /** @newin2p22 */
+ void stop(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountUnmountFlags flags = MOUNT_UNMOUNT_NONE);
+ _IGNORE(g_drive_stop)
+ _WRAP_METHOD(bool stop_finish(const Glib::RefPtr<AsyncResult>& result), g_drive_stop_finish, errthrow);
+ /** @newin2p22 */
+ _WRAP_METHOD(bool can_stop() const, g_drive_can_stop)
/** @newin2p20
*/
diff --git a/gio/src/gio_enums.defs b/gio/src/gio_enums.defs
index 4c42806..f3861fc 100644
--- a/gio/src/gio_enums.defs
+++ b/gio/src/gio_enums.defs
@@ -44,6 +44,7 @@
'("uint64" "G_FILE_ATTRIBUTE_TYPE_UINT64" "6")
'("int64" "G_FILE_ATTRIBUTE_TYPE_INT64" "7")
'("object" "G_FILE_ATTRIBUTE_TYPE_OBJECT" "8")
+ '("stringv" "G_FILE_ATTRIBUTE_TYPE_STRINGV" "9")
)
)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index cf56daf..0b0ba7d 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -20,6 +20,7 @@ _CONV_ENUM(G,SocketFamily)
_CONV_ENUM(G,SocketType)
_CONV_ENUM(G,SocketProtocol)
_CONV_ENUM(G,SocketMsgFlags)
+_CONV_ENUM(G,DriveStartFlags)
# AppInfo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]