genericopenlibs/posixrealtimeextensions/test/testtimer/inc/ttimerthread.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name        : ttimerthread.h
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 #ifndef __TTIMERTHREAD__
       
    21 #define __TTIMERTHREAD__
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <time.h>
       
    25 #include <signal.h>
       
    26 #include <test/testexecutestepbase.h>
       
    27 
       
    28 class TTimerTestThreadParams
       
    29     {
       
    30 public:
       
    31     TTimerTestThreadParams(CTestStep& aTestStep)
       
    32     : iTestStep(aTestStep),
       
    33       iTestResult(ETrue)
       
    34     {
       
    35         
       
    36         
       
    37     }
       
    38     ~TTimerTestThreadParams()
       
    39      {
       
    40      
       
    41      }
       
    42     public:
       
    43         CTestStep&          iTestStep;
       
    44         TBool               iTestResult;
       
    45     };
       
    46 class CTimerTestThread:public CBase
       
    47     {
       
    48     public:
       
    49         
       
    50       static CTimerTestThread* NewL(TTimerTestThreadParams& aParam);
       
    51       ~CTimerTestThread();
       
    52       CTimerTestThread(TTimerTestThreadParams& aParam);
       
    53       static TInt OEEntry(TAny* aData);
       
    54       static void OEMainL(TTimerTestThreadParams& aParams);
       
    55     private:
       
    56       void doOperation();
       
    57       TBool compareTimeSpec(struct itimerspec timeSpec1, struct itimerspec timeSpec2);
       
    58     private:
       
    59      CTestStep&                   iParentStep;
       
    60      TTimerTestThreadParams&          iParams;
       
    61         
       
    62     };
       
    63 
       
    64 #endif //__TTIMERTHREAD__