usbclasses/usbphoneasmodem/classcontroller/inc/usbmscfileclasscontroller.h
changeset 34 7858bc6ead78
parent 31 dfdd8240f7c8
child 35 9d8b04ca6939
equal deleted inserted replaced
31:dfdd8240f7c8 34:7858bc6ead78
     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: Adheres to the UsbMan USB Class API and talks to mass storage file system
       
    14 // 
       
    15 // 
       
    16 
       
    17 #ifndef USBMSCLASSCONTROLLER_H
       
    18 #define USBMSCLASSCONTROLLER_H
       
    19 
       
    20 #include <e32std.h>
       
    21 #include <cusbclasscontrollerplugin.h>
       
    22 #include "usbmscfile.h"
       
    23 
       
    24 class MUsbClassControllerNotify;
       
    25 
       
    26 const TInt KMsStartupPriority = 3;
       
    27 
       
    28 	
       
    29 /**
       
    30  The CUsbMscFileClassController class
       
    31  Implements the USB Class Controller API 
       
    32  */
       
    33 NONSHARABLE_CLASS(CUsbMscFileClassController) : public CUsbClassControllerPlugIn
       
    34 	{
       
    35 
       
    36 public: 
       
    37 	static CUsbMscFileClassController* NewL(MUsbClassControllerNotify& aOwner);
       
    38 	~CUsbMscFileClassController();
       
    39 
       
    40 private: 
       
    41 	// Functions derived from CActive.
       
    42 	virtual void RunL();
       
    43 	virtual void DoCancel();
       
    44 	virtual TInt RunError(TInt aError);
       
    45 
       
    46 private: 
       
    47 	// Functions derived from CUsbClassControllerBase
       
    48 	virtual void Start(TRequestStatus& aStatus);
       
    49 	virtual void Stop(TRequestStatus& aStatus);
       
    50 
       
    51 	virtual void GetDescriptorInfo(TUsbDescriptor& aDescriptorInfo) const;
       
    52 
       
    53 private:
       
    54 	CUsbMscFileClassController(MUsbClassControllerNotify& aOwner);
       
    55 	void ConstructL();
       
    56 
       
    57 private:
       
    58 
       
    59     void ReadMassStorageConfigL();
       
    60     void ConfigItem(const TPtrC& source, TDes& target, TInt maxLength);
       
    61     void SetupUnitsL();
       
    62 
       
    63 private:
       
    64     RUsbMscFile iMscFile;
       
    65 	TMassStorageConfig iMsConfig;
       
    66 	};
       
    67 
       
    68 #endif //USBMSCLASSCONTROLLER_H