examples/ForumNokia/Symbian_OS_End-to-End_Sockets_API_Example/SocketTaskManager_S60/inc/TaskManagerEngineWriter.h

00001 #ifndef TASKMANAGERENGINEWRITER_H
00002 #define TASKMANAGERENGINEWRITER_H
00003 
00004 #include <in_sock.h>
00005 
00006 class CTaskManagerEngineWriter : public CActive
00007 {
00008 public: // new methods
00009 
00010         static CTaskManagerEngineWriter* NewL( RSocket& aSocket );
00011         
00012         static CTaskManagerEngineWriter* NewLC( RSocket& aSocket );
00013 
00014         ~CTaskManagerEngineWriter();
00015         
00016         void DoWriteL( const TDesC& aData );
00017         
00018 protected: // from CActive
00019 
00020         void DoCancel();
00021         
00022         void RunL();
00023         
00024 private: // private methods
00025         
00026         CTaskManagerEngineWriter( RSocket& aSocket );
00027         
00028         void ConstructL();
00029         
00030         void SendNextPacket();
00031         
00032 private: // member variables
00033 
00034         enum 
00035         {
00036                 KWriteBufferSize = 20
00037         };
00038         
00039         enum TWriterState
00040         {
00041                 EWaiting = 0,
00042                 ESending
00043         };
00044 
00045         RSocket& iSocket;
00046         
00047         // data waiting to be sent
00048         TBuf8<KWriteBufferSize> iTransferBuffer;
00049 
00050         // data being written to socket
00051         TBuf8<KWriteBufferSize> iWriteBuffer;
00052         
00053         TWriterState iState;
00054 };
00055 
00056 #endif

Generated by  doxygen 1.6.2