|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ResultReturns the following result codes:
CompatibilityImplemented only if the Expansion Manager Feature Set is present. See Also
|
-> slotRefNum | Slot number. |
<- infoP | Pointer to ExpCardInfoType structure. |
Returns one of the following result codes:
errNone | No error |
expErrCardNotPresent | There is no card present in the specified slot. |
expErrInvalidSlotRefNum | The slot number is invalid. |
expErrSlotDeallocated | The slot number is within the valid range but has been deallocated. |
This function returns information about a card, including whether the card supports secondary storage or is strictly read-only, by filling in the ExpCardInfoType structure's fields.
Implemented only if the Expansion Manager Feature Set is present.
ExpCardGetSerialPort, ExpCardPresent, ExpSlotEnumerate
Determines if a card is present in the given slot.
Err ExpCardPresent(UInt16 slotRefNum)
-> slotRefNum | Slot number. |
Returns the following result codes:
errNone | A card is present in the specified slot. |
expErrCardNotPresent | There is no card present in the specified slot. |
expErrInvalidSlotRefNum | The specified slot number is not valid. |
expErrSlotDeallocated | The specified slot number is within the valid range but has been deallocated. |
The Expansion Manager passes the call through to the appropriate slot driver.
Implemented only if the Expansion Manager Feature Set is present.
Installs and initializes a slot driver shared library into the system table.
Err ExpSlotDriverInstall (UInt32 dbCreator, UInt16 *slotLibRefNumP)
-> dbCreator | Database creator code of the slot driver library to be installed. |
-> slotLibRefNumP | Pointer to variable for returning the library reference number (on failure, sysInvalidRefNum is returned in this variable). |
Returns errNone if the slot driver is installed correctly. Because this function uses SysLibInstall to install the slot driver shared library, ExpSlotDriverInstall may return any of the error codes that SysLibInstall returns, including sysErrLibNotFound, sysErrNoFreeRAM, and sysErrNoFreeLibSlots. It may also return any error code returned by SlotOpen, the implementation of which is specific to a given device manufacturer.
This function is not typically called by applications but can be used to load additional slot drivers after the device has booted. It is called internally by the Expansion Manager to install a slot driver shared library into the library table and initialize it for use. Once installed, the slotLibRefNum can be used by other functions to refer to the library.
Implemented only if the Expansion Manager Feature Set is present.
ExpSlotDriverRemove, ExpSlotLibFind
Closes and remove a slot driver shared library from the system table.
Err ExpSlotDriverRemove (UInt16 slotLibRefNum)
-> slotLibRefNum | Slot driver shared library reference number. |
This function is not typically called by applications but can be used to unload slot drivers associated with external slots. It is called internally by the Expansion Manager to remove the shared library from the system table, and, if appropriate, release the slot allocated to the given slotLibRefNum. Prior to removing the slot driver, it unmounts any volumes associated with the slot.
Implemented only if the Expansion Manager Feature Set is present.
ExpSlotDriverInstall, ExpSlotLibFind, SysLibRemove
Iterates through valid slot numbers.
Err ExpSlotEnumerate(UInt16 *slotRefNumP, UInt32 *slotIteratorP)
<- slotRefNumP | Reference number of the currently-enumerated slot. |
-> slotIteratorP | Pointer to the index of the last entry enumerated. For the first iteration, initialize this parameter to the constant expIteratorStart. Upon return this references the next entry in the directory. If this is the last entry, this parameter is set to expIteratorStop. |
Returns one of the following result codes:
errNone | The slot reference number indicated by slotRefNumP is valid. |
expErrEnumerationEmpty | There are no slots left to enumerate. slotRefNumP is set to the slot number of the currently enumerated slot or invalidSlotRefNum if there are no slots. |
This function iterates through the device's slots. The first time this function is called, set *slotIteratorP to expIteratorStart to find the initial slot. Once set this value is changed with each subsequent call to this function until it reaches the maximum number of slots, at which point ExpSlotEnumerate sets *slotIteratorP to expIteratorStop.
The following is an example of how ExpSlotEnumerate should be used:
UInt16 slotRefNum; UInt32 slotIterator = expIteratorStart; while (slotIterator != expIteratorStop) { if ((err = ExpSlotEnumerate(&slotRefNum, &slotIterator)) == errNone) { // do something with the slotRefNum else { // handle error (by breaking out of the // loop, most likely } }
Implemented only if the Expansion Manager Feature Set is present.
ExpCardInfo, ExpCardPresent, ExpSlotDriverRemove
Retrieves the slot driver library reference number for the driver that controls the specified slot.
Err ExpSlotLibFind(UInt16 slotRefNum, UInt16 *slotLibRefNum)
-> slotRefNum | Slot number. |
<- slotLibRefNum | Pointer to the reference number for the slot driver library allocated to the given slot. |
Returns the following result codes:
errNone | No error. |
expErrInvalidSlotRefNum | The slot number is invalid. |
expErrSlotDeallocated | The slot number is within the valid range but has been deallocated. |
This function returns the reference number to the slot driver library loaded for the given slotRefNum. This function is used when making calls directly to the slot driver library.
Implemented only if the Expansion Manager Feature Set is present.
ExpSlotDriverInstall, ExpSlotDriverRemove
|