sdkcreationmw/sdkruntimes/scard/src/SdkCardLauncher.h
author rajpuroh
Mon, 08 Mar 2010 12:09:11 +0530
changeset 0 b26acd06ea60
permissions -rw-r--r--
First Contribution of SDK components

/*
* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


#ifndef _SDK_CARDREADERLAUNCHER_H_
#define _SDK_CARDREADERLAUNCHER_H_

#include <emulator.h>
#include <winscard.h>
#include "ScardReaderLauncher.h"

/**
 * Generates Scard related notifications.
 */
class CSdkCardReader;
class SdkScardLauncher : public MScardReaderLauncher, public CBase
{
private:
    MScardNotifyObserver* iObserver;
    SCARDCONTEXT iServiceContext;
    TText* iReaderNames;
    RPointerArray<CSdkCardReader> iReaders;

public:
    SdkScardLauncher();
    virtual ~SdkScardLauncher();

    inline SCARDCONTEXT ServiceContext() const;
    void NotifyCardEvent(TScardServiceStatus aEvent, CSdkCardReader* aReader);

    // MScardReaderLauncher
    virtual void ConstructL(MScardReaderService* aReaderService);
    virtual MScardReader* CreateReaderL(TReaderID aReaderID);
    virtual void DeleteReader(TReaderID aReaderID);
};

inline SCARDCONTEXT SdkScardLauncher::ServiceContext() const 
    { return iServiceContext; }
    
#endif // _SDK_CARDREADERLAUNCHER_H_