//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

Module Name:  

Abstract:

Platform independent CPCCard Client Managment functions

Notes: 
--*/
#ifndef __PCCLIENT_H_
#define __PCCLIENT_H_

#include <CRefCon.h>

#define NUM_CLIENTS 0x10

class CCardClient;
class CCardClient : public CRefObject, public CLockObject
{
public:
            CCardClient( CLIENT_CALLBACK CallBackFn,
                         PCARD_REGISTER_PARMS pParms );
            ~CCardClient();
    STATUS  EventNotification( UINT32 uEvent,
                               CARD_SOCKET_HANDLE hSock,
                               UINT32 Parm1 = 0,
                               UINT32 Parm2 = 0 );
    CARD_REGISTER_PARMS GetRegisterParam()
    {
        return m_Parms;
    };
private:
    const CLIENT_CALLBACK       m_CallBackFn;
    CARD_REGISTER_PARMS         m_Parms;
    static CARD_REGISTER_PARMS  defaultCardRegisterParms;
};

class CClientContainer : public CStaticContainer <CCardClient, NUM_CLIENTS>
{
public:
    static CClientContainer*    g_pClientContainer;
    static STATUS               EventNotification( DWORD dwInterfaceType,
                                                   UINT32 uEvent,
                                                   CARD_SOCKET_HANDLE hSock,
                                                   UINT32 Parm1,
                                                   UINT32 Parm2 );
};

#endif

