os/security/cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/client/thwtokenclient.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2009 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 the License "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 * This class inherits from class MCTToken and implements all the pure 
    16 * virtual methods exposed by MCTToken. This provides the 
    17 * MCTTokenInterface and also provides reference counting.
    18 *
    19 */
    20 
    21 
    22 /**
    23  * @file
    24  * @internalComponent
    25  * @released
    26  */
    27 #ifndef CHARDWARETOKENCLIENT_H
    28 #define	CHARDWARETOKENCLIENT_H
    29 
    30 #include <ct.h>
    31 
    32 NONSHARABLE_CLASS(CHardwareTokenClient) : public CBase, public MCTToken
    33 {
    34 public:
    35 	static MCTToken* NewL(MCTTokenType* aTokenType);
    36 
    37 public:	//	From MCTToken
    38 	virtual MCTTokenType& TokenType();
    39 	virtual const TDesC& Label();
    40 	virtual TCTTokenHandle Handle();
    41 
    42 protected:	//	From MCTToken
    43 	virtual TInt& ReferenceCount();
    44 	virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus);
    45 	virtual TBool DoCancelGetInterface();
    46 	virtual const TDesC& Information(TTokenInformation aRequiredInformation);
    47 
    48 private:
    49 	CHardwareTokenClient(MCTTokenType* aTokenType);
    50 
    51 private:
    52 	MCTTokenType* iTokenType;
    53 	TInt iRefCount;
    54 };
    55 
    56 #endif // CHARDWARETOKENCLIENT_H