examples/SDKExamples/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 and/or its subsidiary(-ies).
00010 *  All rights reserved.
00011 *  This component and the accompanying materials are made available
00012 *  under the terms of "Eclipse Public License v1.0"
00013 *  which accompanies this distribution, and is available
00014 *  at the URL "http://www.eclipse.org/legal/epl-v10.html".
00015 * ==============================================================================
00016 */
00017 
00018 
00019 #ifndef __CTIMESESSION_H__
00020 #define __CTIMESESSION_H__
00021 
00022 // INCLUDE FILES
00023 #include <e32base.h>
00024 
00025 // FORWARD DECLARATIONS
00026 class CTimeServer;
00027 
00028 // CLASS DECLARATION
00033 class CTimeServerSession : public CSession2
00034     {
00035     public: // Constructors and destructors
00036 
00043         static CTimeServerSession* NewL( CTimeServer& aServer );
00044 
00051         static CTimeServerSession* NewLC( CTimeServer& aServer );
00052 
00057         virtual ~CTimeServerSession();
00058 
00059     public: // New functions
00060 
00066         void SendTimeToClient();
00067 
00068     public: // Functions from base classes
00069 
00076         void ServiceL( const RMessage2& aMessage );
00077 
00078     private: // Constructors and destructors
00079 
00085         CTimeServerSession( CTimeServer& aServer );
00086 
00091         void ConstructL();
00092 
00093     private: // New methods
00094 
00101         void PanicClient( const RMessagePtr2& aMessage, 
00102                           TInt aPanic ) const;
00103 
00110         void RequestTimeL( const RMessage2& aMessage );
00111 
00112     private: // Data
00113 
00117         TBool iWaitingForTick;
00118 
00122         RMessage2 iMessage;
00123 
00127         CTimeServer& iServer;
00128     };
00129 
00130 #endif // __CTIMESESSION_H__
00131 
00132 
00133 // End of File

Generated by  doxygen 1.6.2