os/security/cryptoservices/certificateandkeymgmt/tadditionalstores/test1certstoretoken.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 1998-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 *
    16 */
    17 
    18 
    19 #ifndef __TEST1CERTSTORETOKEN_H__
    20 #define __TEST1CERTSTORETOKEN_H__
    21 
    22 #include <e32base.h>
    23 #include <ct.h>
    24 #include "Test1certstoretokentype.h"
    25 
    26 class CTest1CertStore;
    27 
    28 class CTest1CertStoreToken : public CBase, public MCTToken
    29 	{
    30 	friend class CTest1CertStore;
    31 
    32 public:
    33 	static CTest1CertStoreToken* New(CTest1CertStoreTokenType::TTokenId aTokenId, 
    34 		CTest1CertStoreTokenType& aFileCertStoreTokenType);
    35 	virtual ~CTest1CertStoreToken();
    36 
    37 public:	// from MCTToken
    38 	virtual MCTTokenType& TokenType();
    39 	virtual const TDesC& Label();
    40 	virtual TCTTokenHandle Handle();
    41 //	virtual TCTTokenObjectHandle Handle(MCTTokenObject& aTokenObject);
    42 protected:	// from MCTToken
    43 	virtual void DoRelease();
    44 	virtual TInt& ReferenceCount();
    45 	virtual void DoGetInterface(TUid aRequiredInterface, 
    46 		MCTTokenInterface*& aReturnedInterface,	TRequestStatus& aStatus);
    47 	virtual TBool DoCancelGetInterface();
    48 	const TDesC& Information(TTokenInformation);
    49 private:
    50 	CTest1CertStoreToken(CTest1CertStoreTokenType::TTokenId aTokenId,
    51 		CTest1CertStoreTokenType& aFileCertStoreTokenType);
    52 
    53 private:
    54 	CTest1CertStoreTokenType& iTokenType;
    55 	TInt iRefCount;
    56 
    57 	CTest1CertStoreTokenType::TTokenId iTokenId;
    58 
    59 	TInt iRefCountInterface;
    60 	TInt iRefCountInterface2;
    61 
    62 	CTest1CertStore* iFileCertStore;
    63 	TFileMode iFileMode;
    64 	};
    65 
    66 #endif