diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/timerentry_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/timerentry_8h-source.html Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,79 @@ + +
+00001 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +00002 // All rights reserved. +00003 // This component and the accompanying materials are made available +00004 // under the terms of "Eclipse Public License v1.0" +00005 // which accompanies this distribution, and is available +00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". +00007 // +00008 // Initial Contributors: +00009 // Nokia Corporation - initial contribution. +00010 // +00011 // Contributors: +00012 // +00013 // Description: +00014 // Contains definitions of the TTimerEntry and the CTimerEntry classes. +00015 // It also defines the KMaxEntry variable. +00016 // +00017 +00018 +00019 +00023 #ifndef __TIMERENTRY_H__ +00024 #define __TIMERENTRY_H__ +00025 +00026 #include "deltaque.h" +00027 +00028 const TUint KWaitTime = 2; +00029 const TInt KMaxTimeToWait = 5; +00030 const TUint KInterval = 1000000; +00031 +00036 class TTimerEntry +00037 { +00038 public: +00042 TDeltaQueLink iLink; +00043 }; +00044 +00048 const TInt KMaxEntry = 5; +00049 +00064 class CTimerEntry : public CTimer +00065 { +00066 private: +00070 enum TOp{ +00075 EInsert, +00080 ERemove +00081 }; +00082 public: +00083 static CTimerEntry* NewL(CConsoleBase* aConsole); +00084 ~CTimerEntry(); +00085 TBool AddToQueueL(TInt aInterval); +00086 void ArbitratorL(); +00087 TBool RemoveFromQueue(); +00088 void RunL(); +00089 void DoCancel(); +00090 void IssueRequest(); +00091 void PrintQue(); +00092 private: +00093 CTimerEntry(CConsoleBase* aConsole); +00094 void ConstructL(); +00095 private: +00099 TDeltaQue<TTimerEntry> iQueue; +00103 TDblQueIter<TTimerEntry> iIterator; +00107 TInt iCount; +00111 TOp iOp; +00115 CConsoleBase* iConsole; +00121 TBool iWaitFlag; +00122 }; +00123 +00124 #endif +00125 +