|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : SIPExSocketReader.h 00004 * Part of : SIPExSocketEngine 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2004-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 #ifndef __CSIPEXSOCKETREADER_H__ 00017 #define __CSIPEXSOCKETREADER_H__ 00018 00019 #include <e32base.h> 00020 00021 // FORWARD DECLARATIONS 00022 class MSIPExReaderNotifier; 00023 class RSocket; 00024 00025 /** 00026 * CSIPExSocketReader 00027 * Reads data from the connected socket. 00028 */ 00029 class CSIPExSocketReader : public CActive 00030 { 00031 public: 00032 00033 /** 00034 * NewL 00035 * Static constructor 00036 * @param aSocket The reference to the socket 00037 * @param aNotifier The reference to the reader notifier 00038 */ 00039 static CSIPExSocketReader* NewL( RSocket& aSocket, MSIPExReaderNotifier& aNotifier ); 00040 00041 /** 00042 * NewLC 00043 * Static constructor. On return the instance is left to the CleanupStack. 00044 * @param aSocket The reference to the socket 00045 * @param aNotifier The reference to the reader notifier 00046 */ 00047 static CSIPExSocketReader* NewLC( RSocket& aSocket, MSIPExReaderNotifier& aNotifier ); 00048 00049 /** 00050 * ~CSIPExSocketReader 00051 * Destructor 00052 */ 00053 ~CSIPExSocketReader(); 00054 00055 public: 00056 00057 /** 00058 * Read 00059 * Asynchronous function. 00060 * Starts the asynchronous reading. 00061 */ 00062 void Read(); 00063 00064 protected: // from CActive 00065 00066 /** 00067 * From CActive 00068 */ 00069 void DoCancel(); 00070 00071 /** 00072 * From CActive 00073 */ 00074 void RunL(); 00075 00076 private: 00077 00078 /** 00079 * CSIPExSocketReader 00080 * Constructor 00081 * @param aSocket The reference to the socket 00082 * @param aNotifier The reference to the reader notifier 00083 */ 00084 CSIPExSocketReader( RSocket& aSocket, MSIPExReaderNotifier& aNotifier ); 00085 00086 /** 00087 * ConstructL 00088 * Symbian 2nd phase constructor that might leave 00089 */ 00090 void ConstructL(); 00091 00092 private: 00093 // Member variables 00094 00095 // Ref: Reader notifier 00096 MSIPExReaderNotifier& iNotifier; 00097 00098 // Ref: Data socket 00099 RSocket& iSocket; 00100 00101 // Buffers 00102 TBuf8<1> iBuffer; 00103 TBuf8<256> iMessage; 00104 }; 00105 00106 #endif // __CSIPEXSOCKETREADER_H__ 00107 00108 // end of file
|
© Nokia 2006 |