storage_hidd
Classes
CLID_HW
| moHidd_StorageController_AddBus | moHidd_StorageController_CleanUpBus | moHidd_StorageController_EnumBuses | moHidd_StorageController_RemoveBus |
| moHidd_StorageController_SetUpBus |
moHidd_StorageController_AddBus
Synopsis
OOP_Object *OOP_DoMethod(OOP_Object *obj, struct pHidd_StorageController_AddBus *Msg);
OOP_Object *Hidd_StorageController_AddBus(OOP_Object *obj, OOP_Class *busClass,
struct TagItem *tags);
Function
Creates a bus driver object and registers it in the controller.
Inputs
obj - A Storage Controller object to operate on.
busClass - A pointer to OOP class of the bus. In order to create an object
of some previously registered public class, use
oop.library/OOP_FindClass().
tags - An optional taglist which will be passed to bus class' New() method.
Result
A pointer to bus object or NULL in case of failure.
Notes
Do not dispose the returned bus yourself, use Hidd_StorageController_RemoveBus() for it.
See also
moHidd_StorageController_CleanUpBus
Synopsis
void OOP_DoMethod(OOP_Object *obj, struct pHidd_StorageController_CleanUpBus *Msg); void Hidd_StorageController_CleanUpBus(OOP_Object *obj, OOP_Object *busObject);
Function
Performs subsystem-specific cleanup before driver object disposal. This method is intended to be used only by subclasses of CLID_HW.
Inputs
obj - A subsystem object. busObject - Device driver object.
Result
None.
Notes
In base class this method does nothing.
See also
moHidd_StorageController_EnumBuses
Synopsis
void OOP_DoMethod(OOP_Object *obj, struct pHidd_StorageController_EnumBuses *Msg); void Hidd_StorageController_EnumBuses(OOP_Object *obj, struct Hook *callback, APTR hookMsg);
Function
Enumerates all installed driver in the subsystem.
Inputs
obj - A subsystem object to query.
callback - A user-supplied hook which will be called for every driver.
hookMsg - A user-defined data to be passed to the hook.
The hook will be called with the following parameters:
AROS_UFHA(struct Hook *, hook , A0)
- A pointer to hook structure itself
AROS_UFHA(OOP_Object * , busObject, A2)
- A bus object
AROS_UFHA(APTR , message , A1)
- User-defined data
The hook should return FALSE in order to continue enumeration
or TRUE in order to stop it.
Result
None.
moHidd_StorageController_RemoveBus
Synopsis
void OOP_DoMethod(OOP_Object *obj, struct pHidd_StorageController_RemoveBus *Msg); void Hidd_StorageController_RemoveBus(OOP_Object *obj, OOP_Object *driver);
Function
Unregisters and disposes hardware bus object.
Inputs
obj - An ATA Controller object from which the bus should be removed. driver - A pointer to a bus object, returned by Hidd_StorageController_AddBus().
Result
TRUE if removal successful or FALSE upon failure.
See also
moHidd_StorageController_SetUpBus
Synopsis
void OOP_DoMethod(OOP_Object *obj, struct pHidd_StorageController_SetUpBus *Msg); void Hidd_StorageController_SetUpBus(OOP_Object *obj, OOP_Object *busObject);
Function
Performs subsystem-specific setup after driver object creation. This method is intended to be used only by subclasses of CLID_HW.
Inputs
obj - A subsystem object. busObject - Device driver object.
Result
TRUE if setup completed successfully and FALSE in case of error. If this method returns error, the driver object will be disposed and moHidd_StorageController_AddBus method will fail.
Notes
In base class this method does nothing and always returns TRUE.
See also
IID_Hidd_StorageUnit
| moHidd_StorageUnit_GetCapacity |
moHidd_StorageUnit_GetCapacity
Synopsis
BOOL HIDD_StorageUnit_GetCapacity(OOP_Object *obj,
UQUAD *blockCount, ULONG *blockSize);
Function
Returns the current capacity already known for a storage unit.
Inputs
blockCount - Storage for the number of addressable logical blocks. blockSize - Storage for the size of one logical block in bytes.
Result
TRUE if both values are available and non-zero, FALSE otherwise.
Notes
Both output pointers are required. On failure each non-NULL output is set to zero. Implementations report cached or otherwise established unit state; this query does not issue media I/O.


