examples/Base/ArraysAndLists/linkedlist/deltaque/inc/timerentry.h

Go to the documentation of this file.
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 

Generated by  doxygen 1.6.2