usbclasses/usbphoneasmodem/classcontroller/inc/usbmscfileclasscontroller.h
changeset 0 1e05558e2206
child 2 468cfcb53fd1
equal deleted inserted replaced
-1:000000000000 0:1e05558e2206
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // 
       
    15 // 
       
    16 
       
    17  
       
    18 /** 
       
    19  @file
       
    20  @internalTechnology
       
    21  Adheres to the UsbMan USB Class API and talks to mass storage file system
       
    22  */
       
    23 
       
    24 #ifndef USBMSCLASSCONTROLLER_H
       
    25 #define USBMSCLASSCONTROLLER_H
       
    26 
       
    27 #include <e32std.h>
       
    28 #include <CUsbClassControllerPlugIn.h>
       
    29 #include "usbmscfile.h"
       
    30 
       
    31 class MUsbClassControllerNotify;
       
    32 
       
    33 const TInt KMsStartupPriority = 3;
       
    34 
       
    35 	
       
    36 /**
       
    37  The CUsbMscFileClassController class
       
    38  Implements the USB Class Controller API 
       
    39  */
       
    40 NONSHARABLE_CLASS(CUsbMscFileClassController) : public CUsbClassControllerPlugIn
       
    41 	{
       
    42 
       
    43 public: 
       
    44 	static CUsbMscFileClassController* NewL(MUsbClassControllerNotify& aOwner);
       
    45 	~CUsbMscFileClassController();
       
    46 
       
    47 private: 
       
    48 	// Functions derived from CActive.
       
    49 	virtual void RunL();
       
    50 	virtual void DoCancel();
       
    51 	virtual TInt RunError(TInt aError);
       
    52 
       
    53 private: 
       
    54 	// Functions derived from CUsbClassControllerBase
       
    55 	virtual void Start(TRequestStatus& aStatus);
       
    56 	virtual void Stop(TRequestStatus& aStatus);
       
    57 
       
    58 	virtual void GetDescriptorInfo(TUsbDescriptor& aDescriptorInfo) const;
       
    59 
       
    60 private:
       
    61 	CUsbMscFileClassController(MUsbClassControllerNotify& aOwner);
       
    62 	void ConstructL();
       
    63 
       
    64 private:
       
    65 
       
    66     void ReadMassStorageConfigL();
       
    67     void ConfigItem(const TPtrC& source, TDes& target, TInt maxLength);
       
    68     void SetupUnitsL();
       
    69 
       
    70 private:
       
    71     RUsbMscFile iMscFile;
       
    72 	TMassStorageConfig iMsConfig;
       
    73 	};
       
    74 
       
    75 #endif //USBMSCLASSCONTROLLER_H