os/security/cryptoservices/filebasedcertificateandkeystores/test/ttestplugin/cdummytokenclient.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/filebasedcertificateandkeystores/test/ttestplugin/cdummytokenclient.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,53 @@
     1.4 +/*
     1.5 +* Copyright (c) 2006-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 +#ifndef __CDUMMYTOKENCLIENT_H__
    1.23 +#define	__CDUMMYTOKENCLIENT_H__
    1.24 +
    1.25 +#include <ct.h>
    1.26 +
    1.27 +//!	Filetokens client side representation of MCTToken, provides client-side reference counting
    1.28 +//!	which calls server with ECloseToken request when appropriate
    1.29 +//! Created by CDummyTokenTypeSession as part of OpenToken call
    1.30 +//! Uses RFileStoreClientSession to communicate with filetokens server
    1.31 +
    1.32 +NONSHARABLE_CLASS(CDummyTokenClient) : public CBase, public MCTToken
    1.33 +{
    1.34 +public:
    1.35 +	static MCTToken* NewL(MCTTokenType* aTokenType);
    1.36 +
    1.37 +public:	//	From MCTToken
    1.38 +	virtual MCTTokenType& TokenType();
    1.39 +	virtual const TDesC& Label();
    1.40 +	virtual TCTTokenHandle Handle();
    1.41 +
    1.42 +protected:	//	From MCTToken
    1.43 +	virtual TInt& ReferenceCount();
    1.44 +	virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus);
    1.45 +	virtual TBool DoCancelGetInterface();
    1.46 +	virtual const TDesC& Information(TTokenInformation aRequiredInformation);
    1.47 +
    1.48 +private:
    1.49 +	CDummyTokenClient(MCTTokenType* aTokenType);
    1.50 +
    1.51 +private:
    1.52 +	MCTTokenType* iTokenType;
    1.53 +	TInt iRefCount;
    1.54 +};
    1.55 +
    1.56 +#endif // __CDUMMYTOKENCLIENT_H__