common/tools/ats/smoketest/graphics/wserv/src/T_DataWsGraphicAnimation.cpp
author victorp@symbian.org
Wed, 03 Feb 2010 16:06:24 +0000
changeset 872 17498133d9ad
parent 833 6ffc235847d0
permissions -rw-r--r--
adding EPL headers to smoke test
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
833
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     1
/*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
872
17498133d9ad adding EPL headers to smoke test
victorp@symbian.org
parents: 833
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
833
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
872
17498133d9ad adding EPL headers to smoke test
victorp@symbian.org
parents: 833
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
833
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     8
*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    11
*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    12
* Contributors:
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    13
*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    14
* Description:
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    15
*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    16
*/
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    17
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    18
#include "T_DataWsGraphicAnimation.h"
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    19
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    20
/*@{*/
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    21
///	Commands
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    22
_LIT(KCmdnew,					"new");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    23
_LIT(KCmdIsPaused,				"IsPaused");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    24
_LIT(KCmdIsPlaying,				"IsPlaying");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    25
_LIT(KCmdIsStopped,				"IsStopped");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    26
_LIT(KCmdIsStopping,			"IsStopping");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    27
_LIT(KCmdLoops,					"Loops");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    28
_LIT(KCmdPause,					"Pause");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    29
_LIT(KCmdPlay,					"Play");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    30
_LIT(KCmdStop,					"Stop");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    31
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    32
///	Fields
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    33
_LIT(KFldExpected,				"expected");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    34
_LIT(KFldLoop,					"loop");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    35
_LIT(KFldImmediately,			"immediately");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    36
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    37
///	Logging
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    38
_LIT(KLogError,						"Error=%d");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    39
_LIT(KLogMissingParameter,			"Missing parameter '%S'");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    40
_LIT(KLogNotExpectedValue,			"Not expected value");
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    41
/*@}*/
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    42
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    43
//////////////////////////////////////////////////////////////////////
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    44
// Construction/Destruction
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    45
//////////////////////////////////////////////////////////////////////
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    46
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    47
CT_DataWsGraphicAnimation::CT_DataWsGraphicAnimation()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    48
:	CT_DataWsGraphicMsgFixedBase()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    49
,	iWsGraphicAnimation(NULL)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    50
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    51
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    52
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    53
CT_DataWsGraphicAnimation::~CT_DataWsGraphicAnimation()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    54
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    55
	DestroyData();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    56
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    57
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    58
void CT_DataWsGraphicAnimation::DestroyData()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    59
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    60
	delete iWsGraphicAnimation;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    61
	iWsGraphicAnimation=NULL;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    62
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    63
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    64
/**
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    65
 * Return a pointer to the object that the data wraps
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    66
 *
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    67
 * @return pointer to the object that the data wraps
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    68
 */
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    69
TAny* CT_DataWsGraphicAnimation::GetObject()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    70
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    71
	return iWsGraphicAnimation;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    72
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    73
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    74
TWsGraphicMsgFixedBase* CT_DataWsGraphicAnimation::GetWsGraphicMsgFixedBase() const
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    75
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    76
	return iWsGraphicAnimation;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    77
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    78
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    79
/**
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    80
* Process a command read from the ini file
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    81
*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    82
* @param aCommand			the command to process
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    83
* @param aSection			the entry in the ini file requiring the command to be processed
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    84
* @param aAsyncErrorIndex	index of command. used for async calls
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    85
*
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    86
* @return ETrue if the command is processed
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    87
*/
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    88
TBool CT_DataWsGraphicAnimation::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    89
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    90
	TBool	ret=ETrue;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    91
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    92
	if ( aCommand==KCmdnew )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    93
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    94
		DoCmdnew();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    95
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    96
	else if ( aCommand==KCmdIsPaused )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    97
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    98
		DoCmdIsPaused(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    99
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   100
	else if ( aCommand==KCmdIsPlaying )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   101
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   102
		DoCmdIsPlaying(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   103
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   104
	else if ( aCommand==KCmdIsStopped )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   105
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   106
		DoCmdIsStopped(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   107
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   108
	else if ( aCommand==KCmdIsStopping )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   109
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   110
		DoCmdIsStopping(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   111
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   112
	else if ( aCommand==KCmdLoops )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   113
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   114
		DoCmdLoops(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   115
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   116
	else if ( aCommand==KCmdPause )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   117
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   118
		DoCmdPause();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   119
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   120
	else if ( aCommand==KCmdPlay )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   121
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   122
		DoCmdPlay(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   123
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   124
	else if ( aCommand==KCmdStop )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   125
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   126
		DoCmdStop(aSection);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   127
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   128
	else
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   129
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   130
		ret=CT_DataWsGraphicMsgFixedBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   131
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   132
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   133
	return ret;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   134
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   135
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   136
void CT_DataWsGraphicAnimation::DoCmdnew()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   137
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   138
	INFO_PRINTF1(_L("execute new"));
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   139
	DestroyData();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   140
	TRAPD(err, iWsGraphicAnimation=new (ELeave) TWsGraphicAnimation());
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   141
	if ( err!=KErrNone )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   142
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   143
		ERR_PRINTF2(KLogError, err);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   144
		SetError(err);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   145
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   146
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   147
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   148
void CT_DataWsGraphicAnimation::DoCmdIsPaused(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   149
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   150
	TBool	actual=iWsGraphicAnimation->IsPaused();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   151
	INFO_PRINTF2(_L("execute IsPaused() = %d"), actual);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   152
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   153
	TBool	expected;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   154
	if ( GetBoolFromConfig(aSection, KFldExpected, expected) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   155
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   156
		if ( expected!=actual )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   157
			{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   158
			ERR_PRINTF1(KLogNotExpectedValue);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   159
			SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   160
			}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   161
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   162
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   163
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   164
void CT_DataWsGraphicAnimation::DoCmdIsPlaying(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   165
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   166
	TBool	actual=iWsGraphicAnimation->IsPlaying();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   167
	INFO_PRINTF2(_L("execute IsPlaying() = %d"), actual);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   168
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   169
	TBool	expected;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   170
	if ( GetBoolFromConfig(aSection, KFldExpected, expected) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   171
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   172
		if ( expected!=actual )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   173
			{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   174
			ERR_PRINTF1(KLogNotExpectedValue);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   175
			SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   176
			}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   177
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   178
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   179
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   180
void CT_DataWsGraphicAnimation::DoCmdIsStopped(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   181
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   182
	TBool	actual=iWsGraphicAnimation->IsStopped();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   183
	INFO_PRINTF2(_L("execute IsStopped() = %d"), actual);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   184
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   185
	TBool	expected;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   186
	if ( GetBoolFromConfig(aSection, KFldExpected, expected) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   187
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   188
		if ( expected!=actual )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   189
			{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   190
			ERR_PRINTF1(KLogNotExpectedValue);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   191
			SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   192
			}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   193
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   194
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   195
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   196
void CT_DataWsGraphicAnimation::DoCmdIsStopping(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   197
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   198
	TBool	actual=iWsGraphicAnimation->IsStopping();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   199
	INFO_PRINTF2(_L("execute IsStopping() = %d"), actual);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   200
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   201
	TBool	expected;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   202
	if ( GetBoolFromConfig(aSection, KFldExpected, expected) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   203
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   204
		if ( expected!=actual )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   205
			{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   206
			ERR_PRINTF1(KLogNotExpectedValue);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   207
			SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   208
			}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   209
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   210
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   211
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   212
void CT_DataWsGraphicAnimation::DoCmdLoops(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   213
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   214
	TBool	actual=iWsGraphicAnimation->Loops();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   215
	INFO_PRINTF2(_L("execute Loops() = %d"), actual);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   216
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   217
	TBool	expected;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   218
	if ( GetBoolFromConfig(aSection, KFldExpected, expected) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   219
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   220
		if ( expected!=actual )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   221
			{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   222
			ERR_PRINTF1(KLogNotExpectedValue);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   223
			SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   224
			}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   225
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   226
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   227
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   228
void CT_DataWsGraphicAnimation::DoCmdPause()
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   229
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   230
	iWsGraphicAnimation->Pause();
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   231
	INFO_PRINTF1(_L("execute Pause()"));
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   232
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   233
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   234
void CT_DataWsGraphicAnimation::DoCmdPlay(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   235
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   236
	TBool	loop;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   237
	if ( !GetBoolFromConfig(aSection, KFldLoop, loop) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   238
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   239
		ERR_PRINTF2(KLogMissingParameter, &KFldLoop());
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   240
		SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   241
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   242
	else
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   243
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   244
		iWsGraphicAnimation->Play(loop);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   245
		INFO_PRINTF1(_L("execute Play(TBool)"));
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   246
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   247
	}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   248
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   249
void CT_DataWsGraphicAnimation::DoCmdStop(const TDesC& aSection)
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   250
	{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   251
	TBool	immediately;
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   252
	if ( !GetBoolFromConfig(aSection, KFldImmediately, immediately) )
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   253
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   254
		ERR_PRINTF2(KLogMissingParameter, &KFldImmediately());
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   255
		SetBlockResult(EFail);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   256
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   257
	else
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   258
		{
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   259
		iWsGraphicAnimation->Stop(immediately);
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   260
		INFO_PRINTF1(_L("execute Stop(TBool)"));
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   261
		}
6ffc235847d0 Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   262
	}