diff options
author | Murray Cumming <murrayc@murrayc.com> | 2017-04-18 19:03:24 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2017-04-18 21:53:15 +0200 |
commit | 4e7d70dbbb33259a9718853b12d81571bd01c7ae (patch) | |
tree | 59b4c1448677d1ffe2a1ae58cc4b97ee4074ae2f | |
parent | fb077adcbac777517d0a445bb8d35f75c25da022 (diff) | |
download | glibmm-4e7d70dbbb33259a9718853b12d81571bd01c7ae.tar.gz |
Gio::Drive: Move enums into class.
-rw-r--r-- | gio/src/drive.ccg | 6 | ||||
-rw-r--r-- | gio/src/drive.hg | 12 | ||||
-rw-r--r-- | gio/src/file.ccg | 4 | ||||
-rw-r--r-- | gio/src/file.hg | 4 | ||||
-rw-r--r-- | tools/m4/convert_gio.m4 | 4 |
5 files changed, 16 insertions, 14 deletions
diff --git a/gio/src/drive.ccg b/gio/src/drive.ccg index 343de175..75bbea6a 100644 --- a/gio/src/drive.ccg +++ b/gio/src/drive.ccg @@ -23,6 +23,8 @@ #include <glibmm/exceptionhandler.h> #include "slot_async.h" +using StartStopType = Gio::Drive::StartStopType; + namespace Gio { @@ -163,7 +165,7 @@ Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsync void Drive::start(const Glib::RefPtr<MountOperation>& mount_operation, - const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, DriveStartFlags flags) + const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, StartFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -176,7 +178,7 @@ Drive::start(const Glib::RefPtr<MountOperation>& mount_operation, void Drive::start(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, - DriveStartFlags flags) + StartFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter diff --git a/gio/src/drive.hg b/gio/src/drive.hg index 6faf978e..12b281cf 100644 --- a/gio/src/drive.hg +++ b/gio/src/drive.hg @@ -31,9 +31,6 @@ typedef struct _GDriveIface GDriveIface; namespace Gio { -_WRAP_ENUM(DriveStartFlags, GDriveStartFlags) -_WRAP_ENUM(DriveStartStopType, GDriveStartStopType) - /** 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. @@ -51,6 +48,9 @@ class Drive : public Glib::Interface _CLASS_INTERFACE(Drive, GDrive, G_DRIVE, GDriveIface) public: + _WRAP_ENUM(StartFlags, GDriveStartFlags) + _WRAP_ENUM(StartStopType, GDriveStartStopType) + _WRAP_METHOD(Glib::ustring get_name() const, g_drive_get_name) _WRAP_METHOD(Glib::RefPtr<Icon> get_icon(), g_drive_get_icon, refreturn) @@ -129,9 +129,9 @@ public: _WRAP_METHOD(std::vector<Glib::ustring> enumerate_identifiers() const, g_drive_enumerate_identifiers) /** @newin{2,22} */ - void start(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, DriveStartFlags flags = DriveStartFlags::NONE); + void start(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, StartFlags flags = StartFlags::NONE); /** @newin{2,22} */ - void start(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, DriveStartFlags flags = DriveStartFlags::NONE); + void start(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, StartFlags flags = StartFlags::NONE); _IGNORE(g_drive_start) _WRAP_METHOD(bool start_finish(const Glib::RefPtr<AsyncResult>& result), g_drive_start_finish, errthrow) /** @newin{2,22} */ @@ -148,7 +148,7 @@ public: /** @newin{2,22} */ _WRAP_METHOD(bool can_stop() const, g_drive_can_stop) - _WRAP_METHOD(DriveStartStopType get_start_stop_type() const, g_drive_get_start_stop_type) + _WRAP_METHOD(StartStopType get_start_stop_type() const, g_drive_get_start_stop_type) _WRAP_METHOD(Glib::ustring get_sort_key() const, g_drive_get_sort_key) diff --git a/gio/src/file.ccg b/gio/src/file.ccg index 4312c536..846ee188 100644 --- a/gio/src/file.ccg +++ b/gio/src/file.ccg @@ -1431,7 +1431,7 @@ File::measure_disk_usage_async(const SlotAsyncReady& slot_ready, void File::start_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, - const Glib::RefPtr<MountOperation>& start_operation, DriveStartFlags flags) + const Glib::RefPtr<MountOperation>& start_operation, Drive::StartFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1444,7 +1444,7 @@ File::start_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable void File::start_mountable(const SlotAsyncReady& slot, - const Glib::RefPtr<MountOperation>& start_operation, DriveStartFlags flags) + const Glib::RefPtr<MountOperation>& start_operation, Drive::StartFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter diff --git a/gio/src/file.hg b/gio/src/file.hg index 6ae3aa13..5df69723 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -1879,7 +1879,7 @@ public: * * @newin{2,24} */ - void start_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const Glib::RefPtr<MountOperation>& start_operation, DriveStartFlags flags = DriveStartFlags::NONE); + void start_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const Glib::RefPtr<MountOperation>& start_operation, Drive::StartFlags flags = Drive::StartFlags::NONE); /** Starts a file of type Mountable. * Using @a start_operation, you can request callbacks when, for instance, @@ -1898,7 +1898,7 @@ public: * * @newin{2,24} */ - void start_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<MountOperation>& start_operation, DriveStartFlags flags = DriveStartFlags::NONE); + void start_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<MountOperation>& start_operation, Drive::StartFlags flags = Drive::StartFlags::NONE); _IGNORE(g_file_start_mountable) _WRAP_METHOD(bool start_mountable_finish(const Glib::RefPtr<AsyncResult>& result), diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4 index 777cb52d..63f77d4e 100644 --- a/tools/m4/convert_gio.m4 +++ b/tools/m4/convert_gio.m4 @@ -43,8 +43,8 @@ _CONV_GIO_DBUS_ENUM(MessageType) _CONV_GIO_DBUS_ENUM(ProxyFlags) _CONV_GIO_DBUS_ENUM(SendMessageFlags) _CONV_GIO_DBUS_ENUM(ServerFlags) -_CONV_GIO_ENUM(DriveStartFlags) -_CONV_GIO_ENUM(DriveStartStopType) +_CONV_GIO_INCLASS_ENUM(Drive,StartFlags) +_CONV_GIO_INCLASS_ENUM(Drive,StartStopType) _CONV_GIO_INCLASS_ENUM(Emblem,Origin) _CONV_GIO_INCLASS_ENUM(FileAttributeInfo,Flags) _CONV_GIO_ENUM(FileAttributeStatus) |