Mass Storage Function Driver Overview

The Mass Storage Device Function Driver enables the loading of mass storage functions.

Purpose

The Mass Storage Function Driver is a Symbian implementation of the Function Driver for mass storage devices. Licensees can use the Mass Storage Function Driver without modification or they can customise its policy plug-in to specify which drive letter to map to and to provide details of errors to report to users.

Required background

You need to understand the following:

An understanding of the following is useful but not essential:

Key concepts and terms

The component has the following key concepts:

FD – Function Driver

A driver for USB peripherals that are attached to a Symbian platform device, usually made up of a Function Driver Controller (FDC) and a Function Driver Implementation (FDI).

FDC – Function Driver Controller

Part of a Function Driver. The FDC is a plug-in to the Function Driver Framework (FDF).

FDI – Function Driver Implementation

Part of a Function Driver. The FDI of a Mass Storage Function Driver is made up of an MSMM, an MSC and a policy plug-in.

MS FDC – Mass Storage Function Driver Controller

The Mass Storage Function Driver Controller for the mass storage Function Driver. This is the mass storage plug-in to the Function Driver Framework (FDF).

MSMM – Mass Storage Mount Manager

Part of the FDI for mass storage Function Drivers.

FDF Functions

The services offered by a USB device.

Architecture

The Mass Storage Function Driver is made up of the Mass Storage Function Driver Controller (MS FDC), the Mass Storage Mount Manager (MSMM) and the Mass Storage Controller (MSC). The Mass Storage Mount Manager and the Mass Storage Controller together make up the Function Driver Implementation.

The MS FDC receives information from the FDF of a newly attached or detached Mass Storage interface. The MS FDC passes this information to the MSMM. Once the MS FDC has passed this information to the MSMM successfully, it is not concerned with the success or failure of the processing of a device event. The MS FDC is ready for the next incoming device event.

The MSMM checks the capability and secure ID of the client process. It prevents more than one client connecting to it. So if the MS FDC has connected to the MSMM, no other client will be able to connect until the process has been completed.

The MSMM registers the interface to the MSC. It tries to mounts the logical unit to a drive representing USB Mass Storage logical units. It gets valid drive letters from the MSMM policy plug-in module. Later, when the device is detached, the MSMM dismounts the logical units and deregisters the interface.

The MSMM policy plug-in is a standard ECom plug-in. It can do the following:

  • Specify drive letters that newly available USB Mass Storage logical units can map to

  • Save the latest mount operation information in a persistent way

  • Send error notifications to the extended error notifier of the MSMM

  • Provide the suspension policy to the MSMM (the MSMM will propagate it to the MSC).

Licensees can use the Mass Storage Function Driver in one of the following ways:

  • As it is delivered, without a policy plug-in

  • By writing their own policy plug-in (and providing an accompanying policy TXT file) to use with the Mass Storage Function Driver.

Symbian provides a reference policy plug-in, which licensees can adapt.

API summary

CMsmmPolicypluginBase APIs

API Description

CMsmmPolicypluginBase::RetrieveDriveLetterL()

Called when the MSMM retrieves a drive letter to mount a logical unit on it.

CMsmmPolicypluginBase::CancelRetrieveDriveLetter()

Called to cancel an outstanding drive letter retrieval request.

CMsmmPolicypluginBase::SaveLatestMountInfoL()

Called when the MSMM saves mount operation information to the policy plug-in.

CMsmmPolicypluginBase::CancelSaveLatestMountInfo()

Called to cancel an outstanding save mount information request.

CMsmmPolicypluginBase::SendErrorNotificationL()

Called when the MSMM sends an error notification to policy plug-in.

CMsmmPolicypluginBase:: GetSuspensionPolicy()

Called when the MSMM needs a suspension policy to be passed to the MSC interface.

Typical uses

The main use of the Mass Storage Function Driver component is to write policy plug-ins for Mass Storage Function Drivers.