00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TIMESERVER_H__
00018 #define __TIMESERVER_H__
00019
00020
00021 #include <e32base.h>
00022 #include "SyncServer.pan"
00023
00024
00030 class CTimeServer : public CServer2
00031 {
00032 public :
00033
00039 static CTimeServer* NewL();
00040
00046 static CTimeServer* NewLC();
00047
00048 public:
00049
00056 static TInt ThreadFunction( TAny* aNone );
00057
00062 void IncrementSessions();
00063
00069 void DecrementSessions();
00070
00071 protected:
00072
00079 TInt RunError( TInt aError );
00080
00081 private:
00082
00088 CTimeServer( TInt aPriority );
00089
00094 void ConstructL();
00095
00096 private:
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:
00121
00129 CSession2* NewSessionL( const TVersion& aVersion,
00130 const RMessage2& aMessage ) const;
00131
00132 private:
00133
00137 TInt iSessionCount;
00138 };
00139
00140
00141 #endif // __TIMESERVER_H__
00142
00143
00144