From e2077e8d4c021bf7c79b4d1e93719e3475cda347 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 16 Feb 2003 18:03:59 +0000 Subject: [PATCH] Minor changes. Moved the functionality for getting a messenger targeting the DiskDeviceManager in the registrar into the private support files. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2722 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/storage/DiskDevice.h | 14 ++++++++------ headers/private/storage/DiskDevicePrivate.h | 6 +++++- headers/private/storage/Session.h | 1 + 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/headers/private/storage/DiskDevice.h b/headers/private/storage/DiskDevice.h index 44a390348f..5ad4b949f6 100644 --- a/headers/private/storage/DiskDevice.h +++ b/headers/private/storage/DiskDevice.h @@ -7,6 +7,7 @@ #define _DISK_DEVICE_H #include +#include #include class BPartition; @@ -28,10 +29,10 @@ public: int32 CountPartitions() const; const char *Path() const; - void GetName(BString *name, bool includeBusID = true, - bool includeLUN = false) const; - void GetName(char *name, bool includeBusID = true, - bool includeLUN = false) const; + status_t GetName(BString *name, bool includeBusID = true, + bool includeLUN = false) const; + status_t GetName(char *name, bool includeBusID = true, + bool includeLUN = false) const; bool IsReadOnly() const; bool IsRemovable() const; @@ -41,10 +42,10 @@ public: int32 UniqueID() const; - status_t Eject(); + status_t Eject(bool update = false); status_t LowLevelFormat(); // TODO: remove? - status_t Update(); + status_t Update(bool *updated = NULL); BSession *VisitEachSession(BDiskDeviceVisitor *visitor); BPartition *VisitEachPartition(BDiskDeviceVisitor *visitor); @@ -58,6 +59,7 @@ private: BDiskDevice &operator=(const BDiskDevice &); status_t _Unarchive(BMessage *archive); + status_t _Update(BMessage *archive); bool _AddSession(BSession *session); diff --git a/headers/private/storage/DiskDevicePrivate.h b/headers/private/storage/DiskDevicePrivate.h index 982be864da..bf3616a638 100644 --- a/headers/private/storage/DiskDevicePrivate.h +++ b/headers/private/storage/DiskDevicePrivate.h @@ -9,6 +9,8 @@ #include #include +class BMessenger; + namespace BPrivate { // PartitionFilter @@ -45,11 +47,13 @@ private: int32 fID; }; +status_t get_disk_device_messenger(BMessenger *messenger); + } // namespace BPrivate using BPrivate::PartitionFilter; using BPrivate::PartitionFilterVisitor; using BPrivate::IDFinderVisitor; - +using BPrivate::get_disk_device_messenger; #endif // _DISK_DEVICE_PRIVATE_H diff --git a/headers/private/storage/Session.h b/headers/private/storage/Session.h index 79f59b4b99..1290d66fa8 100644 --- a/headers/private/storage/Session.h +++ b/headers/private/storage/Session.h @@ -63,6 +63,7 @@ private: void _Unset(); status_t _Unarchive(BMessage *archive); + status_t _Update(BMessage *archive); void _SetDevice(BDiskDevice *device);