examples/S60CppExamples/ClientServerAsync/server/inc/timesession.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : timesession.h
00004 *  Part of     : CSAsync
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 
00017 #ifndef __CTIMESESSION_H__
00018 #define __CTIMESESSION_H__
00019 
00020 // INCLUDE FILES
00021 #include <e32base.h>
00022 
00023 // FORWARD DECLARATIONS
00024 class CTimeServer;
00025 
00026 // CLASS DECLARATION
00031 class CTimeServerSession : public CSession2
00032     {
00033     public: // Constructors and destructors
00034 
00041         static CTimeServerSession* NewL( CTimeServer& aServer );
00042 
00049         static CTimeServerSession* NewLC( CTimeServer& aServer );
00050 
00055         virtual ~CTimeServerSession();
00056 
00057     public: // New functions
00058 
00064         void SendTimeToClient();
00065 
00066     public: // Functions from base classes
00067 
00074         void ServiceL( const RMessage2& aMessage );
00075 
00076     private: // Constructors and destructors
00077 
00083         CTimeServerSession( CTimeServer& aServer );
00084 
00089         void ConstructL();
00090 
00091     private: // New methods
00092 
00099         void PanicClient( const RMessagePtr2& aMessage, 
00100                           TInt aPanic ) const;
00101 
00108         void RequestTimeL( const RMessage2& aMessage );
00109 
00110     private: // Data
00111 
00115         TBool iWaitingForTick;
00116 
00120         RMessage2 iMessage;
00121 
00125         CTimeServer& iServer;
00126     };
00127 
00128 #endif // __CTIMESESSION_H__
00129 
00130 
00131 // End of File

Generated by  doxygen 1.6.2