--- a/creator/src/creator_impselement.cpp Wed Sep 15 12:13:45 2010 +0300
+++ b/creator/src/creator_impselement.cpp Wed Oct 13 14:32:52 2010 +0300
@@ -45,110 +45,6 @@
iIsCommandElement = ETrue;
}
-void CCreatorImpsServerElement::AsyncExecuteCommandL()
- {
- const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);
- TInt entryAmount = 1;
- if( amountAttr )
- {
- entryAmount = ConvertStrToIntL(amountAttr->Value());
- }
- // Get 'fields' element
- CCreatorScriptElement* fieldsElement = FindSubElement(KFields);
- if( fieldsElement && fieldsElement->SubElements().Count() > 0 )
- {
- // Get sub-elements
- const RPointerArray<CCreatorScriptElement>& fields = fieldsElement->SubElements();
- // Create note entries, the amount of entries is defined by entryAmount:
- if( iLoopIndex < entryAmount )
- {
- CIMPSParameters* param = new (ELeave) CIMPSParameters;
- CleanupStack::PushL(param);
-
- for( TInt i = 0; i < fields.Count(); ++i )
- {
- CCreatorScriptElement* field = fields[i];
- TPtrC elemName = field->Name();
- TPtrC elemContent = field->Content();
- const CCreatorScriptAttribute* randomAttr = fields[i]->FindAttributeByName(KRandomLength);
- TBool useRandom = EFalse;
- if( randomAttr || elemContent.Length() == 0 )
- {
- useRandom = ETrue;
- }
-
- if( elemName == KName )
- {
- if( useRandom )
- {
- param->SetRandomNameL(*iEngine);
- }
- else
- {
- SetContentToTextParamL(param->iServerName, elemContent);
- }
- }
- if( elemName == KUrl )
- {
- if( useRandom )
- {
- param->SetRandomUrlL(*iEngine);
- }
- else
- {
- SetContentToTextParamL(param->iServerURL, elemContent);
- }
- }
- if( elemName == KUsername )
- {
- if( useRandom )
- {
- param->SetRandomUsernameL(*iEngine);
- }
- else
- {
- SetContentToTextParamL(param->iServerUsername, elemContent);
- }
- }
- if( elemName == KPassword )
- {
- if( useRandom )
- {
- param->SetRandomPasswordL(*iEngine);
- }
- else
- {
- SetContentToTextParamL(param->iServerPassword, elemContent);
- }
- }
- if( elemName == KConnectionMethodName )
- {
- if( useRandom || CompareIgnoreCase(elemContent, creatorimps::KDefault) == 0 )
- {
- param->SetDefaultAccessPointL();
- }
- else
- {
- SetContentToTextParamL(param->iServerAccessPointName, elemContent);
- }
- }
- }
- iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryIMPSServers, param);
- CleanupStack::Pop(); // param
- StartNextLoop();
- }
- else
- {
- AsyncCommandFinished();
- }
- }
- else
- {
- iEngine->AppendToCommandArrayL(ECmdCreateMiscEntryIMPSServers, 0, entryAmount);
- AsyncCommandFinished();
- }
- }
-
void CCreatorImpsServerElement::ExecuteCommandL()
{
const CCreatorScriptAttribute* amountAttr = FindAttributeByName(KAmount);