Beginning of Disk Device API:

* Made all headers parsable. Also some smaller changes.
* Added empty source files for new classes.
* Changed obsolete implementations of existing classes, so that we
  now have basic functionality for BDiskDevice[Roster] and BPartition.
  Iterating through disk devices works and the data we get doesn't look
  too bad for the beginning.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3883 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-07-06 23:11:10 +00:00
parent c0455c33b8
commit 5c7270efd7
17 changed files with 748 additions and 1295 deletions
+12 -11
View File
@@ -8,17 +8,17 @@
#include <image.h>
#include <DiskDeviceVisitor.h>
#include <DiskDeviceDefs.h>
#include <Messenger.h>
#include <SupportDefs.h>
class BDirectory;
class BDiskDevice;
class BDiskDeviceJob;
class BDiskDeviceVisitor;
class BDiskScannerPartitionAddOn;
class BDiskSystem;
class BPartition;
class BSession;
namespace BPrivate {
class AddOnImage;
@@ -98,10 +98,10 @@ public:
status_t GetNextActiveJob(BDiskDeviceJob *job);
status_t RewindActiveJobs();
partition_id RegisterDeviceFile(const char *filename);
partition_id RegisterFileDevice(const char *filename);
// publishes: /dev/disk/virtual/files/<disk device ID>/raw
status_t UnregisterDeviceFile(const char *filename);
status_t UnregisterDeviceFile(partition_id device);
status_t UnregisterFileDevice(const char *filename);
status_t UnregisterFileDevice(partition_id device);
// TODO: Add the respective syscalls. Also for Get{Device,Partition}ForPath()
bool VisitEachDevice(BDiskDeviceVisitor *visitor,
@@ -138,9 +138,11 @@ public:
uint32 eventMask = B_DEVICE_REQUEST_ALL);
status_t StartWatchingJob(BDiskDeviceJob *job, BMessenger target,
uint32 eventMask = B_DEVICE_REQUEST_JOB_COMPLETE_PROGRESS);
// TODO: Maybe better a BDiskDeviceJob::{Start,Stop}Watching()?
status_t StopWatching(BMessenger target);
private:
#if 0
status_t _GetObjectWithID(const char *fieldName, partition_id id,
BDiskDevice *device) const;
@@ -159,14 +161,13 @@ private:
static status_t _LoadPartitionAddOn(const char *partitioningSystem,
BPrivate::AddOnImage *image,
BDiskScannerPartitionAddOn **addOn);
#endif // 0
private:
BMessenger fManager;
int32 fCookie;
BDirectory *fPartitionAddOnDir;
BDirectory *fFSAddOnDir;
int32 fPartitionAddOnDirIndex;
int32 fFSAddOnDirIndex;
// BDirectory *fPartitionAddOnDir;
// BDirectory *fFSAddOnDir;
// int32 fPartitionAddOnDirIndex;
// int32 fFSAddOnDirIndex;
};
#endif // _DISK_DEVICE_ROSTER_H