os/security/cryptoplugins/cryptospiplugins/test/h4drv/crypto_h4/cryptoh4.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoplugins/cryptospiplugins/test/h4drv/crypto_h4/cryptoh4.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,91 @@
     1.4 +/*
     1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @internalComponent
    1.25 + @released
    1.26 +*/
    1.27 +#ifndef __CRYPTOH4__
    1.28 +#define __CRYPTOH4__
    1.29 +#include "cryptoldd.h"
    1.30 +
    1.31 +class DCryptoPddFactory : public DPhysicalDevice
    1.32 +    {
    1.33 +public:
    1.34 +    DCryptoPddFactory();
    1.35 +	~DCryptoPddFactory();
    1.36 +    // Inherited from DPhysicalDevice
    1.37 +    virtual TInt Install();
    1.38 +    // Inherited from DPhysicalDevice
    1.39 +    virtual void GetCaps(TDes8& aDes) const;
    1.40 +    // Inherited from DPhysicalDevice
    1.41 +    virtual TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
    1.42 +    // Inherited from DPhysicalDevice
    1.43 +    virtual TInt Validate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
    1.44 +
    1.45 +	TDfcQue *DfcQue();
    1.46 +	static void DeleteDfcQFunc(TAny *any);
    1.47 +
    1.48 +public:
    1.49 +    enum TMinimumLDDVersion
    1.50 +        {
    1.51 +        EMinimumLddMajorVersion=1,
    1.52 +        EMinimumLddMinorVersion=0,
    1.53 +        EMinimumLddBuild=0 //Not used
    1.54 +        };
    1.55 +private:
    1.56 +	TBool iDfcQueInitialised;
    1.57 +	TDfcQue *iDfcQue; // Will be deleted by the deleteDfcQDfc started by our destructor
    1.58 +    };
    1.59 +
    1.60 +
    1.61 +
    1.62 +class CryptoJobRandom;
    1.63 +class CryptoJobAes;
    1.64 +class DCryptoH4Chan : public DCryptoPddChannel
    1.65 +	{
    1.66 +public:
    1.67 +	DCryptoH4Chan(DCryptoPddFactory &iCryptoPddFactory);
    1.68 +    ~DCryptoH4Chan();
    1.69 +
    1.70 +    TInt DoCreate();
    1.71 +
    1.72 +	virtual TDfcQue* DfcQue();
    1.73 +
    1.74 +    virtual void GetHwVersions(RCryptoDriver::THwVersions& aHwVersions) const;
    1.75 +
    1.76 +    virtual TInt FakeDriverSetting() const;
    1.77 +    virtual TInt SetFakeDriverSetting(TInt aFakeDriverSetting);
    1.78 +
    1.79 +	virtual CryptoJobRandom *GetJobRandom(TBool aAutoCreate = ETrue);
    1.80 +	virtual CryptoJobAes *GetJobAes(TBool aAutoCreate = ETrue);
    1.81 +
    1.82 +private:
    1.83 +	DCryptoPddFactory &iCryptoPddFactory;
    1.84 +
    1.85 +    TInt iFakeDriverSetting;
    1.86 +
    1.87 +	CryptoJobRandom *iCryptoJobRandom;
    1.88 +	CryptoJobAes *iCryptoJobAes;
    1.89 +	};
    1.90 +
    1.91 +
    1.92 +
    1.93 +
    1.94 +#endif