usbmgmt/usbmgr/usbman/server/INC/usbmancenrepmanager.h
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
equal deleted inserted replaced
15:f92a4f87e424 16:012cc2ee6408
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 /**
       
    19  @file
       
    20 */
       
    21 
       
    22 #ifndef USBMANCENREPMANAGER_H
       
    23 #define USBMANCENREPMANAGER_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 class CRepository;
       
    28 class CPersonality;
       
    29 class TUsbDeviceDescriptor;
       
    30 class CUsbDevice;
       
    31 
       
    32 /** Helper class for tasks related to central repository. It reads settings from
       
    33  *  appropriate cenrep keys */
       
    34 NONSHARABLE_CLASS( CUsbManCenRepManager ) : public CBase
       
    35 {
       
    36 	public:
       
    37 
       
    38         /** Two-phased constructor. */
       
    39         static CUsbManCenRepManager* NewL(CUsbDevice& aUsbDevice);
       
    40 
       
    41         /** Destructor. */
       
    42         virtual ~CUsbManCenRepManager();
       
    43         
       
    44         void ReadPersonalitiesL(RPointerArray<CPersonality>& aPersonalities);
       
    45 
       
    46         void ReadDeviceConfigurationL(CUsbDevice::TUsbDeviceConfiguration& aDeviceConfig);
       
    47 
       
    48 	private:
       
    49 		CUsbManCenRepManager(CUsbDevice& aUsbDevice);
       
    50 		
       
    51 		void ConstructL();
       
    52 		
       
    53         void CheckSignatureL();
       
    54 		
       
    55 		void ReadConfigurationsForPersonalityL(TInt aPersonalityId, CPersonality& aPersonality);
       
    56 
       
    57 		HBufC* ReadStringKeyLC( TUint32 aKeyId );
       
    58 	    TInt   ReadKeyL ( TUint32 aKeyId );
       
    59 
       
    60         TBool IsClassConfigurableL(TUint aClassId, TInt& aFeatureId);
       
    61 		TBool IsFeatureSupportedL(TInt aFeatureId);
       
    62 
       
    63 	private:
       
    64 	    /** Own repository instance */
       
    65 		CRepository* 			iRepository;
       
    66         /**reference to CUsbDevice*/
       
    67         CUsbDevice& iUsbDevice;
       
    68         /*the USB Configuratiron signature*/
       
    69         TInt iSignature;
       
    70 };
       
    71 
       
    72 #endif /*USBMANCENREPMANAGER_H*/