BDiskDeviceParameterEditor, BDiskScannerParameterEditor, and PartitioningDialog confusion

James Urquhart <[email protected]> Thu, 2 Aug 2007 11:29:24 +0100
Newsgroups gmane.os.openbeos.storage
Message-ID <[email protected]>
Hey there,

I recently fixed up the DriveSetup preferences app a bit ( patch  
located on the trac at http://dev.haiku-os.org/ticket/1347  ), but  
came a bit stuck when i got to shelling out the Partition &  
Initialisation code.

Looking through the Haiku storage kit, i first noticed that  
BPartition exposes code which allows me to obtain a  
BDiskDeviceParameterEditor, via any of four functions:

status_t BPartition::GetParameterEditor(BDiskDeviceParameterEditor  
**editor)
status_t BPartition::GetContentParameterEditor 
(BDiskDeviceParameterEditor **editor)
status_t BPartition::GetInitializationParameterEditor(const char  
*system, BDiskDeviceParameterEditor **editor) const
status_t BPartition::GetChildCreationParameterEditor(const char  
*system,	BDiskDeviceParameterEditor **editor) const

Sad to say, i am left clueless as to which one of these functions i  
should use for which circumstance - i thought the original DriveSetup  
only had parameter editor's for partitioning and initialising file  
systems?

This confusion is further compounded by the fact that nobody seems to  
have implemented BDiskDeviceParameterEditor. Yikes!

Looking a bit further, i found this rather interesting  
PartitioningDialog class, which seemed to require a  
BDiskScannerParameterEditor. "Great!" i thought, "Maybe i can use  
this to at least have a partitioning dialog?". Sadly though, it seems  
the only way i can get an instance of a BDiskScannerParameterEditor  
is by invoking a non-existent (or rather, commented out and not  
implemented) BDiskScannerPartitionAddOn::CreateEditor function, which  
even references a BSession class, which like the  
BDiskScannerParameterEditor i cannot find anywhere.

So to summarise, there seems to be two possible ways i can modify  
partition's or initialise file systems, non of which are really  
implemented.

Anyone have any thoughts or suggestions on this rather dreadful  
situation?

Regards,

James