messagingfw/scheduledsendmtm/test/unit/inc/t_schsendshare.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __T_SCHSENDSHARE_H__
       
    17 #define __T_SCHSENDSHARE_H__
       
    18 
       
    19 const TUid KSchSendTestMtmUid = {0x1000127e};
       
    20 _LIT(KSchSendTestDetails, "sch send test");
       
    21 
       
    22 enum
       
    23 	{
       
    24 	KErrorActionImmediately	= -50,
       
    25 	KErrorActionLater		= -51,
       
    26 	KErrorActionVariable	= -52,
       
    27 	KErrorActionFail		= -53,
       
    28 	KErrorActionConditions	= -54,
       
    29 	KErrorActionRetryFail	= -55
       
    30 	};
       
    31 
       
    32 // They don't begin with E because they aren't really enum values
       
    33 enum
       
    34 	{
       
    35 	KShortInterval= 5,
       
    36 	KLongInterval = 120,
       
    37 	KFirstInterval = 60,
       
    38 	KSecondInterval = 70,
       
    39 	KThirdInterval = 80
       
    40 	};
       
    41 	
       
    42 const TInt KPigeonErrFailFirstSend	= -101;
       
    43 
       
    44 // Each option represents a combination of settings and error action
       
    45 
       
    46 enum TSchSendTestOperation
       
    47 	{
       
    48 	ENoOperation,
       
    49 	EScheduleAllL,
       
    50 	EReScheduleAllL,
       
    51 	EDeleteScheduleL,
       
    52 	ESendScheduledL,
       
    53 	ECheckScheduleL,
       
    54 	ESetRetryImmediately,
       
    55 	ESetRetryLater,
       
    56 	ESetRetryVariable,
       
    57 	ESetNoRetry,
       
    58 	ESetNowOffPeak,
       
    59 	ESetNowNotOffPeak,
       
    60 	ESetFirstOffPeakBest,
       
    61 	ESetLastOffPeakBest,
       
    62 	ESetIncrementalHeapFailure,
       
    63 	EResetIncrementalHeapFailure,
       
    64 	ENoIncrementalHeapFailure,
       
    65 	EScheduleOpFail,
       
    66 	EOpFail,
       
    67 	EReScheduleRetryAllL,
       
    68 	EScheduleFailFirstSend
       
    69 	};
       
    70 
       
    71 
       
    72 
       
    73 class TSchSendTestProgress
       
    74 	{
       
    75 	public:
       
    76 		inline TSchSendTestProgress();
       
    77 
       
    78 		inline TSchSendTestOperation Command() const;
       
    79 		inline void SetCommand(TInt aCommand);
       
    80 
       
    81 	public:
       
    82 		TInt iError;
       
    83 		TTime iTime;
       
    84 
       
    85 	private:
       
    86 		TSchSendTestOperation iCommand;
       
    87 	};
       
    88 
       
    89 typedef TPckgBuf<TSchSendTestProgress> TSchSendTestProgressBuf;
       
    90 
       
    91 inline TSchSendTestProgress::TSchSendTestProgress()
       
    92 : iError(KErrNone), iCommand(ENoOperation)
       
    93 	{
       
    94 	iTime.HomeTime();
       
    95 	}
       
    96 
       
    97 inline TSchSendTestOperation TSchSendTestProgress::Command() const
       
    98 	{
       
    99 	return iCommand;
       
   100 	}
       
   101 
       
   102 inline void TSchSendTestProgress::SetCommand(TInt aCommand)
       
   103 	{
       
   104 	iCommand = (TSchSendTestOperation) aCommand;
       
   105 	}
       
   106 
       
   107 #endif