From db8d98835f9e5acd61407ab5e95d54dc055b707b Mon Sep 17 00:00:00 2001 From: ehouse Date: Tue, 1 Mar 2005 01:10:30 +0000 Subject: [PATCH] add a bunch of ivars and methods toward actually sending something. --- xwords4/symbian/inc/symssock.h | 36 +++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/xwords4/symbian/inc/symssock.h b/xwords4/symbian/inc/symssock.h index 112af5a9e..44c581800 100644 --- a/xwords4/symbian/inc/symssock.h +++ b/xwords4/symbian/inc/symssock.h @@ -24,25 +24,51 @@ #ifndef XWFEATURE_STANDALONE_ONLY -#include +#include +#include #include "comms.h" +const TInt KMaxMsgLen = 512; + class CSendSocket : public CActive { public: - static CSendSocket* NewL(); + static CSendSocket* NewL(); ~CSendSocket(); - TBool SendL( XP_U8* aBuf, XP_U16 aLen, CommsAddrRec* aAddr ); + TBool SendL( const XP_U8* aBuf, XP_U16 aLen, const CommsAddrRec* aAddr ); + + void ConnectL(); + void ConnectL( TUint32 aIpAddr ); + + void Disconnect(); protected: - void RunL(); - void DoCancel(); + void RunL(); /* from CActive */ + void DoCancel(); /* from CActive */ private: CSendSocket(); void ConstructL(); + void DoActualSend(); + enum TSSockState { ENotConnected + ,ELookingUp + ,EConnecting + ,EConnected + ,ESending + }; + + TSSockState iSSockState; + RSocket iSendSocket; + RSocketServ iSocketServer; + RHostResolver iResolver; + TInetAddr iAddress; + TBuf8 iSendBuf; + CommsAddrRec iCurAddr; + TNameEntry iNameEntry; + TNameRecord iNameRecord; + TBool iAddrSet; }; #endif