author | Simon Howkins <simonh@symbian.org> |
Wed, 27 Oct 2010 16:22:14 +0100 | |
changeset 1284 | 0b4a09013baf |
parent 872 | 17498133d9ad |
permissions | -rw-r--r-- |
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 | 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 | 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_GraphicsUtil.h" |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
19 |
#include "T_DataWsSpriteBase.h" |
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 |
/*@{*/ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
22 |
//Commands |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
23 |
_LIT(KCmdActivate, "Activate"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
24 |
_LIT(KCmdAppendMember, "AppendMember"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
25 |
_LIT(KCmdUpdateMember, "UpdateMember"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
26 |
_LIT(KCmdClose, "Close"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
27 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
28 |
// Fields |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
29 |
_LIT(KFldIndex, "index"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
30 |
_LIT(KFldOneParameter, "oneparameter"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
31 |
_LIT(KFldSpriteMember, "spritemember"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
32 |
/// Logging |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
33 |
_LIT(KLogError, "Error=%d"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
34 |
_LIT(KLogMissingParameter, "Missing parameter '%S'"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
35 |
|
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 |
_LIT(KLogActivate, "execute Activate()"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
38 |
_LIT(KLogAppendMember, "execute AppendMember(const TSpriteMember &aMemberData)"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
39 |
_LIT(KLogUpdateMember, "execute UpdateMember(TInt aIndex)"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
40 |
_LIT(KLogUpdateMember2, "execute UpdateMember(TInt aIndex, const TSpriteMember &aMemberData)"); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
41 |
_LIT(KLogClose, "execute Close()"); |
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 |
////////////////////////////////////////////////////////////////////// |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
45 |
// Construction/Destruction |
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 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
48 |
CT_DataWsSpriteBase::CT_DataWsSpriteBase():CDataWrapperBase() |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
49 |
{ |
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 |
MWsClientClass* CT_DataWsSpriteBase::GetClientClass() const |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
53 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
54 |
return GetWsSpriteBase(); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
55 |
} |
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 |
* Process a command read from the ini file |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
58 |
* |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
59 |
* @param aCommand the command to process |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
60 |
* @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
|
61 |
* @param aAsyncErrorIndex index of command. used for async calls |
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 |
* @return ETrue if the command is processed |
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 |
TBool CT_DataWsSpriteBase::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/) |
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 |
TBool ret = ETrue; |
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 |
if ( aCommand==KCmdActivate ) |
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 |
DoCmdActivate(); |
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 |
else if ( aCommand==KCmdAppendMember ) |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
74 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
75 |
DoCmdAppendMemberL(aSection); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
76 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
77 |
else if ( aCommand==KCmdUpdateMember ) |
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 |
DoCmdUpdateMemberL(aSection); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
80 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
81 |
else if ( aCommand==KCmdClose ) |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
82 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
83 |
DoCmdClose(); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
84 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
85 |
else |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
86 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
87 |
ret=EFalse; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
88 |
} |
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 |
return ret; |
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 |
|
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 |
* Process Activate command |
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 |
* @param: None |
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 |
* @return: None |
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 |
void CT_DataWsSpriteBase::DoCmdActivate() |
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 |
// Execute command and log parameters |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
103 |
INFO_PRINTF1(KLogActivate); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
104 |
TInt nErr=GetWsSpriteBase()->Activate(); |
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 |
if(nErr!=KErrNone) |
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 |
ERR_PRINTF2(KLogError, nErr); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
109 |
SetError(nErr); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
110 |
} |
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 |
// No command return value and output parameter to display and check |
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 |
|
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 |
* Process AppendMember command |
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 |
* @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
|
119 |
* |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
120 |
* @return: None |
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 |
void CT_DataWsSpriteBase::DoCmdAppendMemberL(const TDesC& 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 |
// Execute command and log parameters |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
125 |
INFO_PRINTF1(KLogAppendMember); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
126 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
127 |
//Init TSpriteMember |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
128 |
TSpriteMember spriteMember; |
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 |
if ( !CT_GraphicsUtil::GetSpriteMemberL(*this, aSection, KFldSpriteMember, spriteMember) ) |
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 |
ERR_PRINTF2(KLogMissingParameter, &KFldSpriteMember); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
133 |
SetBlockResult(EFail); |
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 |
TInt returnCode=GetWsSpriteBase()->AppendMember(spriteMember); |
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 |
if(KErrNone!=returnCode) |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
139 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
140 |
ERR_PRINTF2(KLogError, returnCode); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
141 |
SetError(returnCode); |
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 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
144 |
// No command return value and output parameter to display and check |
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 |
* Process UpdateMember command |
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 |
* @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
|
151 |
* |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
152 |
* @return: None |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
153 |
*/ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
154 |
void CT_DataWsSpriteBase::DoCmdUpdateMemberL(const TDesC& aSection) |
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 |
TBool dataOk=ETrue; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
157 |
//get update index |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
158 |
TInt datIndex; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
159 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
160 |
if ( !GetIntFromConfig(aSection, KFldIndex, datIndex) ) |
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 |
dataOk=EFalse; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
163 |
ERR_PRINTF2(KLogMissingParameter, &KFldIndex); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
164 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
165 |
//get if one parameter |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
166 |
TBool bOneParameter=TRUE; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
167 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
168 |
if ( !GetBoolFromConfig(aSection, KFldOneParameter, bOneParameter) ) |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
169 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
170 |
dataOk=EFalse; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
171 |
ERR_PRINTF2(KLogMissingParameter, &KFldOneParameter); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
172 |
} |
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 |
//Init new TSpriteMember |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
175 |
TSpriteMember spriteMember; |
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 |
if ( !CT_GraphicsUtil::GetSpriteMemberL(*this, aSection, KFldSpriteMember, spriteMember) ) |
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 |
if(!bOneParameter) |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
180 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
181 |
dataOk=EFalse; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
182 |
ERR_PRINTF2(KLogMissingParameter, &KFldSpriteMember); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
183 |
SetBlockResult(EFail); |
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 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
186 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
187 |
if(dataOk) |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
188 |
{ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
189 |
TInt returnCode=KErrNone; |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
190 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
191 |
if(bOneParameter) |
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 |
INFO_PRINTF1(KLogUpdateMember); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
194 |
GetWsSpriteBase()->UpdateMember(datIndex); |
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 |
else |
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 |
INFO_PRINTF1(KLogUpdateMember2); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
199 |
returnCode=GetWsSpriteBase()->UpdateMember(datIndex,spriteMember); |
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 |
|
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
202 |
if(returnCode!=KErrNone) |
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 |
ERR_PRINTF2(KLogError, returnCode); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
205 |
SetError(returnCode); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
206 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
207 |
} |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
208 |
// No command return value and output parameter to display and check |
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 |
* Process Close command |
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 |
* @param: None |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
215 |
* |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
216 |
* @return: None |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
217 |
*/ |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
218 |
void CT_DataWsSpriteBase::DoCmdClose() |
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 |
// Execute command and log parameters |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
221 |
INFO_PRINTF1(KLogClose); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
222 |
GetWsSpriteBase()->Close(); |
6ffc235847d0
Added smoke test for Graphics
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
223 |
} |