OSDN Git Service

classify : fix DB id undefined.
[rec10/rec10-git.git] / b25-remote / CasClient.h
1 // CasClient.h: CCasClient クラスのインターフェイス
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #pragma once
6
7 #include "W2L.h"
8 #include "BCasCard.h"
9 #include "SmartSock.h"
10
11
12 class CCasClient : private CBcasCard
13 {
14 public:
15         class ICasClientHandler
16         {
17         public:
18                 virtual void OnCasClientEvent(CCasClient *pClient, const DWORD dwEventID, PVOID pParam) = 0;
19         };
20
21         enum
22         {
23                 EID_CONNECTED,          // クライアント接続
24                 EID_DISCONNECTED        // クライアント切断
25         };
26
27         CCasClient(ICasClientHandler *pEventHandler, CSmartSock *pSocket);
28         ~CCasClient(void);
29
30         void CloseClient(void);
31
32 protected:
33         void ClientThread(void);
34         static void* ClientThreadRaw(LPVOID pParam);
35
36         void SendEvent(const DWORD dwEventID, PVOID pParam = NULL);
37
38         CSmartSock *m_pSocket;
39         ICasClientHandler *m_pEventHandler;
40         pthread_t m_hClientThread;
41 };