sl@0: /* sl@0: * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __CDUMMYTOKENCLIENT_H__ sl@0: #define __CDUMMYTOKENCLIENT_H__ sl@0: sl@0: #include sl@0: sl@0: //! Filetokens client side representation of MCTToken, provides client-side reference counting sl@0: //! which calls server with ECloseToken request when appropriate sl@0: //! Created by CDummyTokenTypeSession as part of OpenToken call sl@0: //! Uses RFileStoreClientSession to communicate with filetokens server sl@0: sl@0: NONSHARABLE_CLASS(CDummyTokenClient) : public CBase, public MCTToken sl@0: { sl@0: public: sl@0: static MCTToken* NewL(MCTTokenType* aTokenType); sl@0: sl@0: public: // From MCTToken sl@0: virtual MCTTokenType& TokenType(); sl@0: virtual const TDesC& Label(); sl@0: virtual TCTTokenHandle Handle(); sl@0: sl@0: protected: // From MCTToken sl@0: virtual TInt& ReferenceCount(); sl@0: virtual void DoGetInterface(TUid aRequiredInterface, MCTTokenInterface*& aReturnedInterface, TRequestStatus& aStatus); sl@0: virtual TBool DoCancelGetInterface(); sl@0: virtual const TDesC& Information(TTokenInformation aRequiredInformation); sl@0: sl@0: private: sl@0: CDummyTokenClient(MCTTokenType* aTokenType); sl@0: sl@0: private: sl@0: MCTTokenType* iTokenType; sl@0: TInt iRefCount; sl@0: }; sl@0: sl@0: #endif // __CDUMMYTOKENCLIENT_H__