00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef CARDGAMEBASE_H
00017 #define CARDGAMEBASE_H
00018
00019 #include <e32base.h>
00020 #include "cardgamesend.h"
00021 #include "cardgamerecv.h"
00022 #include "cardgametimer.h"
00023
00030 class CCardGameBase : public CBase
00031 {
00032 public:
00033 ~CCardGameBase();
00034 void BaseSendTo(TDesC8& aDes, TInetAddr aAddr);
00035 void BaseRecvFrom(TDes8& aDes);
00036 void BaseCancelSendTo();
00037 void BaseCancelRecvFrom();
00038 void BaseCancelAll();
00039 void StartTimer(TInt aDuration);
00040 void StopTimer();
00041
00042
00043 virtual void SendComplete(TInt aError) = 0;
00044 virtual void RecvComplete(TInetAddr aRecvAddr,TInt aError) = 0;
00045 virtual void TimerComplete() = 0;
00046
00047 protected:
00048 void ConstructL(RSocket& aSocket);
00049
00050 private:
00051
00052 CCardGameSend* iGameSender;
00053 CCardGameRecv* iGameReceiver;
00054 CCardGameTimer* iGameTimer;
00055 public:
00056 RSocket iSocket;
00057 };
00058
00059 #endif // CARDGAMEBASE_H