examples/S60CppExamples/ClientServerSync/server/inc/timeserver.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : timeserver.h
00004 *  Part of     : CSSync
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 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 __TIMESERVER_H__
00018 #define __TIMESERVER_H__
00019 
00020 // INCLUDE FILES
00021 #include <e32base.h>
00022 #include "SyncServer.pan"
00023 
00024 // CLASS DECLARATION
00030 class CTimeServer : public CServer2
00031     {
00032     public : // Constructors and destructors
00033 
00039         static CTimeServer* NewL();
00040 
00046         static CTimeServer* NewLC();
00047 
00048     public: // New functions
00049 
00056         static TInt ThreadFunction( TAny* aNone );
00057 
00062         void IncrementSessions();
00063 
00069         void DecrementSessions();
00070 
00071     protected: // Functions from base classes
00072 
00079         TInt RunError( TInt aError );
00080 
00081     private: // Constructors and destructors
00082 
00088         CTimeServer( TInt aPriority );
00089 
00094         void ConstructL();
00095 
00096     private: // New methods
00097 
00104         static void PanicClient( const RMessage2& aMessage,
00105                                  TTimeServPanic aReason );
00106 
00112         static void PanicServer( TTimeServPanic aReason );
00113 
00118         static void ThreadFunctionL();
00119 
00120     private: // Functions from base classes
00121 
00129         CSession2* NewSessionL( const TVersion& aVersion, 
00130                                 const RMessage2& aMessage ) const;
00131 
00132     private: // Data
00133 
00137         TInt iSessionCount;
00138     };
00139 
00140 
00141 #endif // __TIMESERVER_H__
00142 
00143 
00144 // End of File

Generated by  doxygen 1.6.2