--- a/webservices/idwsfplugin/group/senidwsfplugin.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/idwsfplugin/group/senidwsfplugin.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -35,7 +35,8 @@
UID 0x10009D8D 0x101F972F
#endif
-paged
+PAGEDDATA
+PAGEDCODE
//For enabling bytepair compression for code paging
#ifdef EKA2
--- a/webservices/wsconnection/src/rsenserviceconnection.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsconnection/src/rsenserviceconnection.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -103,7 +103,8 @@
void CSenConnAgentSync::Start()
{
- SetActive();
+ if(!IsActive())
+ SetActive();
}
RSenServiceConnection::RSenServiceConnection(RFileLogger* aLog)
@@ -498,7 +499,8 @@
iFirst = resHandler;
CActiveScheduler::Add(resHandler);
- resHandler->SetActive();
+ if(!resHandler->IsActive())
+ resHandler->SetActive();
resHandler->iStatus = KRequestPending;
TIpcArgs args(&resHandler->iProgressData, resHandler->iSoapOrCid);
--- a/webservices/wsconnection/src/senregistrationtimer.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsconnection/src/senregistrationtimer.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -74,7 +74,8 @@
if (!IsActive())
{
iTimer.After( iStatus, interval );
- SetActive();
+ if(!IsActive())
+ SetActive();
}
}
--- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -45,9 +45,9 @@
#include "senservicemanagerdefines.h"
#include "SenBaseAttribute.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
#include "senconnagentserver.h"
#include "senxmldebug.h"
#include "senatomentry.h"
@@ -192,7 +192,7 @@
void CSenServiceConnectionImpl::ConstructL(MSenServiceDescription& aSD)
{
-
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::ConstructL(aSD)");
CSenElement& sdAsElement = ((CSenXmlServiceDescription&)aSD).AsElement();
// Check if this is an internal service connection:
@@ -247,7 +247,8 @@
#ifndef RD_SEN_SC_PROXY_ENABLED_BY_DEFAULT
ConnectL();
// #else // ConnectL occurs on "proxy" / factory -level
-#endif
+#endif
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::ConstructL(aSD) Completed");
}
@@ -343,12 +344,14 @@
void CSenServiceConnectionImpl::SetConsumer( MSenServiceConsumer& aConsumer, MSenExtendedConsumerInterface* apExtConsumer )
{
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::SetConsumer");
iObserver = &aConsumer;
ipExtendedConsumerInterface = apExtConsumer;
}
void CSenServiceConnectionImpl::Consumer( MSenServiceConsumer*& aConsumer, MSenExtendedConsumerInterface*& apExtConsumer )
{
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::Consumer");
aConsumer = iObserver;
apExtConsumer = ipExtendedConsumerInterface;
}
@@ -451,6 +454,7 @@
{
iChunkMap->Reset();
delete iChunkMap;
+ iChunkMap = NULL;
}
delete iInBuf;
@@ -478,6 +482,7 @@
TPtrC CSenServiceConnectionImpl::SessionID()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SessionID()")));
if(ipSessionId)
{
return *ipSessionId;
@@ -616,6 +621,7 @@
TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"SubmitL - ESenInternalError");
retVal = KErrSenInternal;
}
+ break;
default:
{
TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"SubmitL - default");
@@ -644,6 +650,7 @@
TInt CSenServiceConnectionImpl::ResponseFromChunk(CSenChunk& aClientOp,
HBufC8*& aResponseTo)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ResponseFromChunk()")));
TInt leaveCode(KErrNone); // handle OOM case:
// Read response message, SOAP fault OR error
TPtrC8 response;
@@ -659,7 +666,7 @@
// OOM occured
retVal = leaveCode;
}
-
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ResponseFromChunk() Completed")));
return retVal;
}
@@ -875,7 +882,7 @@
}
else if (!IsActive())
{
- SetActive();
+ SetActive();
iStatus = KRequestPending;
}
TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::CheckConnection Completed")));
@@ -916,7 +923,7 @@
TInt appendRetVal(KErrNone);
appendRetVal = ChunkMapL().Append( pTxnId, apClientOp );
- TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- ChunkMapL().Append(%d, %d) returned: %d"), *pTxnId, apClientOp->Chunk().Handle(), appendRetVal));
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- ChunkMapL().Append(%d, %d) returned: %d"), *pTxnId, apClientOp->Chunk().Handle(), appendRetVal));
if( appendRetVal == KErrNone )
{
TMessage msg;
@@ -1301,11 +1308,12 @@
TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("MSenServiceConsumer::HandleErrorL leaved: %d"), leaveCode ));
}
}
-
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::InitializeL() Completed")));
}
TPtrC CSenServiceConnectionImpl::NextChunkName()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NextChunkName()")));
if(ipChunkName)
{
iChunkNameNumber++;
@@ -1332,6 +1340,7 @@
}
else
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NextChunkName() returns KNullDesC()")));
return KNullDesC();
}
}
@@ -1934,6 +1943,7 @@
break ;
}
}
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::HandleMessageFromChildAOL Completed");
}
// Helper function, which delivers response to Service Consumer
@@ -1976,7 +1986,7 @@
if( statusCode == KErrNone )
{
// STANDARD, "OK" RESPONSE
- TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- response, (%d bytes):"), response.Length()));
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- response, (%d bytes):"), response.Length()));
TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMaxLogLevel ,(response));
TRAPD( err, iObserver->HandleMessageL( response ); )
if(err)
@@ -1991,8 +2001,8 @@
TInt error = statusCode;
// SOAP FAULT
- TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- SOAP fault (%d bytes):"), response.Length()));
- TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMaxLogLevel ,(response));
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- SOAP fault (%d bytes):"), response.Length()));
+ TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,(response));
if ( error == KErrSenSoapFault && !iInitialized ) // China DC
{
@@ -2024,6 +2034,7 @@
CleanupStack::PopAndDestroy( pMessage );
}
iTransactionIdKnown = EFalse;
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::DeliverResponseL Completed");
}
void CSenServiceConnectionImpl::DoCancel()
@@ -2290,6 +2301,7 @@
const TDesC8& CSenServiceConnectionImpl::LocalName() const
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::LocalName()")));
if(iFragment)
return iFragment->LocalName();
else
@@ -2298,6 +2310,7 @@
const TDesC8& CSenServiceConnectionImpl::NsUri() const
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NsUri()")));
if(iFragment)
return iFragment->NsUri();
else
@@ -2306,6 +2319,7 @@
const TDesC8& CSenServiceConnectionImpl::NsPrefix() const
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NsPrefix()")));
if(iFragment)
return iFragment->NsPrefix();
else
@@ -2314,6 +2328,7 @@
void CSenServiceConnectionImpl::WriteAsXMLToL(RWriteStream& aWriteStream)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::WriteAsXMLToL()")));
if(iFragment)
{
iFragment->WriteAsXMLToL(aWriteStream);
@@ -2322,6 +2337,7 @@
HBufC* CSenServiceConnectionImpl::AsXmlUnicodeL()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsXmlUnicodeL()")));
if(iFragment)
{
return iFragment->AsXmlUnicodeL();
@@ -2334,6 +2350,7 @@
HBufC8* CSenServiceConnectionImpl::AsXmlL()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsXmlL()")));
if(iFragment)
{
return iFragment->AsXmlL();
@@ -2384,6 +2401,7 @@
TBool CSenServiceConnectionImpl::ConsistsOfL(MSenFragment& aCandidate)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ConsistsOfL()")));
if (iFragment)
{
return iFragment->ConsistsOfL(aCandidate);
@@ -2424,6 +2442,7 @@
TInt CSenServiceConnectionImpl::TxnId()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::TxnId()")));
if( iTransactionIdKnown )
{
if( iTxnId>KErrNone )
@@ -2481,6 +2500,7 @@
TInt CSenServiceConnectionImpl::CancelTransaction(TInt aTransactionID)
{
+ TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::CancelTransaction");
TInt retVal(0);
if ( iDispatcherEnabled ) // DISPATCHER IS ENABLED
{
@@ -2492,16 +2512,19 @@
}
else
{
- TMessage message = ipSenServiceDispatcher->GetMessageFromQueue(aTransactionID);
- CSenAsyncOperation* pAsyncOp = message.iSenAsyncOperation;
- if (pAsyncOp)
- {
- TInt idx = AsyncOpsArrayL().Find(pAsyncOp);
- if (idx >= 0)
- {
- AsyncOpsArrayL().Remove(idx);
- }
- pAsyncOp->iActive = NULL;
+ TMessage message = ipSenServiceDispatcher->GetMessageFromQueue(aTransactionID);
+ CSenAsyncOperation* pAsyncOp = message.iSenAsyncOperation;
+ if (pAsyncOp)
+ {
+ TInt idx(-1);
+ TRAP( retVal,
+ idx = AsyncOpsArrayL().Find(pAsyncOp);
+ if (idx >= 0)
+ {
+ AsyncOpsArrayL().Remove(idx);
+ }
+ );
+ pAsyncOp->iActive = NULL;
pAsyncOp->Cancel();
delete pAsyncOp;
@@ -2511,6 +2534,7 @@
TRAP(retVal, DeliverResponseL(KErrSenCancelled,NULL));
if( retVal != KErrNone)
{
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), retVal ));
return retVal;
}
}
@@ -2519,6 +2543,7 @@
{
iConnection.CancelRequest(aTransactionID);
}
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), KErrNone ));
return KErrNone;
}
@@ -2554,6 +2579,7 @@
RChunkMap& CSenServiceConnectionImpl::ChunkMapL()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ChunkMapL()")));
if(!iChunkMap)
{
iChunkMap = new (ELeave) RChunkMap(ETrue, ETrue);
@@ -2563,6 +2589,7 @@
RPointerArray<CSenAsyncOperation>& CSenServiceConnectionImpl::AsyncOpsArrayL() //codescannerwarnings
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsyncOpsArrayL()")));
if(!iAsyncOpsArray)
{
iAsyncOpsArray = new (ELeave) RPointerArray<CSenAsyncOperation>;
@@ -2833,6 +2860,7 @@
CSenSoapEnvelope& aMessage,
const TDesC8& aProperties) //codescannerwarnings
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AssignPropertiesToChunkL()")));
TInt retVal(KErrNone);
if ( aMessage.SoapAction2().Length() > 0 )
@@ -2869,7 +2897,7 @@
}
delete pSoapMsg;
}
-
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignPropertiesToChunkL returns [%d]" ), retVal ));
return retVal;
}
@@ -2998,7 +3026,7 @@
CleanupStack::PopAndDestroy(pSerializer);
CleanupStack::PopAndDestroy(&buffer);
CleanupStack::PopAndDestroy(pPropsAsXml);
-
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignMessageToChunkL returns [%d]" ), retVal ));
return retVal;
}
@@ -3006,6 +3034,7 @@
// plus multiple BLOBs PER ONE MESSAGE AND multiple simultaneous transfers
TInt CSenServiceConnectionImpl::MoveBinaryContainersToServer( CSenConnectionChunk& aOperation, RArray<TXmlEngDataContainer>& aList )
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveBinaryContainersToServer()")));
TInt retVal(KErrNone);
TPtrC8 cid8;
@@ -3100,12 +3129,14 @@
}
}
}
- }
+ }
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::MoveBinaryContainersToServer returns [%d]" ), retVal ));
return retVal;
}
TInt CSenServiceConnectionImpl::MoveFileChunkHandleToServer(CSenConnectionChunk& aOperation)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveFileChunkHandleToServer()")));
TInt retVal(KErrNone);
retVal = iConnection.SendFileHandle(aOperation,iSharedFileHandle);
return retVal;
@@ -3170,6 +3201,7 @@
TInt CSenServiceConnectionImpl::SendL( MSenMessage& aMessage )
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveFileChunkHandleToServer(aMessage)")));
if ( aMessage.IsSafeToCast( MSenMessage::ESoapEnvelope2 ) )
{
CSenSoapEnvelope2& message = (CSenSoapEnvelope2&)aMessage;
@@ -3269,6 +3301,7 @@
TInt CSenServiceConnectionImpl::SubmitL( MSenMessage& aMessage,
CSenSoapEnvelope2*& aResponseTo )
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SubmitL(aMessage, aResponseTo)")));
if ( aMessage.IsSafeToCast( MSenMessage::ESoapEnvelope2) )
{
CSenSoapEnvelope2& message = (CSenSoapEnvelope2&)aMessage;
@@ -3440,6 +3473,7 @@
void CSenServiceConnectionImpl::MigrateToPrefferedCarrierL(TBool &aUserChoice)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL()")));
if (iMobiltyObserver)
{
User::LeaveIfError(iConnection.MigrateToPrefferedCarrierL(aUserChoice));
@@ -3448,10 +3482,12 @@
{
User::Leave(KErrNotFound);
}
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL() Completed")));
}
void CSenServiceConnectionImpl::NewCarrierAcceptedL(TBool &aUserChoice)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL()")));
if (iMobiltyObserver)
{
User::LeaveIfError(iConnection.NewCarrierAcceptedL(aUserChoice));
@@ -3459,7 +3495,8 @@
else
{
User::Leave(KErrNotFound);
- }
+ }
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL() Completed")));
}
#endif
@@ -3468,6 +3505,7 @@
TBool aIncoming, const TDesC8& aMessage, const TDesC8& aCid,
TInt aProgress)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SendProgressToHostlet()")));
TBool isSoap = (aMessage != KNullDesC8);
TPtrC8 ptr;
if (isSoap)
@@ -3500,6 +3538,7 @@
TLSLOG_FORMAT(( iTlsLogStatusChannel, KSenServiceConnectionStatusLogLevel, _L("Fatal(!) -- CSenServiceConnectionImpl::DeliverStatus(): MSenServiceConsumer::SetStatus - leaves with %d"), leaveCode));
leaveCode = KErrNone;
}
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DeliverStatus() Completed")));
}
@@ -3564,7 +3603,8 @@
}
TInt CSenServiceConnectionImpl::SearchIdentityProviderL( CSenIdentityProvider*& apIdentityProvider, const TDesC8& aProviderId )
- {
+ {
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SearchIdentityProviderL()")));
TInt retVal(KErrNone);
CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkName());
@@ -3603,7 +3643,7 @@
}
}
CleanupStack::PopAndDestroy(pSenChunk);
-
+ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::SearchIdentityProviderL returns [%d]" ), retVal ));
return retVal;
}
@@ -3654,6 +3694,7 @@
TBool CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()")));
#ifdef __ENABLE_ALR__
if((ipAuthProvider || iFilesObserver || iMobiltyObserver || ipCoBrandingObserver) && iConnectionAgentCallbackInitialized)
#else
@@ -3754,6 +3795,7 @@
void CSenServiceConnectionImpl::DataTrafficDetails(TSenDataTrafficDetails& aDetails,
TSenDataTrafficOperations& aOperations)
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DataTrafficDetails()")));
iConnection.DataTrafficDetails(aDetails, aOperations);
}
@@ -3782,6 +3824,7 @@
TInt CSenServiceConnectionImpl::PendingTrasanctionsCount()
{
+ TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::PendingTrasanctionsCount()")));
return iAsyncOpsArray->Count();
}
@@ -3822,7 +3865,8 @@
sizeof(TInt),
sizeof(TInt));
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
#ifdef EKA2
iActive->AsyncOpsArrayL().AppendL(this); //codescannerwarnings
@@ -3918,7 +3962,8 @@
CActiveScheduler::Add(this);
// Initial subscription
iConnectionStatusProperty.Subscribe(iStatus);
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
}
@@ -3942,7 +3987,8 @@
TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenConnectionStatusObserver::RunL" );
iConnectionStatusProperty.Subscribe(iStatus);
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
TInt propertyValue(KErrNotFound);
@@ -4020,7 +4066,8 @@
CActiveScheduler::Add(this);
// Initial subscription
iFileProgressProperty.Subscribe(iStatus);
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
}
@@ -4042,7 +4089,8 @@
{
// Resubscribe before processing new value to prevent missing updates(!):
iFileProgressProperty.Subscribe(iStatus);
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenFileProgressObserver::RunL" );
--- a/webservices/wsconnection/src/senservicedispatcher.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsconnection/src/senservicedispatcher.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -156,7 +156,9 @@
for(;;)
{
+ TLSLOG_L(KSenDispatcherLogChannel, KSenDispatcherLogLevel, "CSenServiceDispatcher::ExecuteL Before User::WaitForAnyRequest()");
User::WaitForAnyRequest();
+ TLSLOG_L(KSenDispatcherLogChannel, KSenDispatcherLogLevel, "CSenServiceDispatcher::ExecuteL After User::WaitForAnyRequest()");
//If iDispatchMessages = FALSE then stop dispacthing messages.
//Is called from the destructor and thread will end in cleaner way
@@ -312,6 +314,7 @@
}
TBool CSenServiceDispatcher::RemoveFromQueue(TInt aTransactionID)
{
+ TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::RemoveFromQueue - VrtlTxnID (%d)"), aTransactionID));
//This method gets called from two places 1)main thread from
//CancelTransaction(aTransactionID) method and 2)child thread from
//ExecuteL method once message has been dispacthed.
@@ -368,6 +371,7 @@
TInt CSenServiceDispatcher::AddToTheTransMap(TInt* pVrtlaTxnId,TInt* pActlTxnId)
{
+ TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::AddToTheTransMap - VrtlTxnID [%d], ActlTxnId [%d]"), pVrtlaTxnId, pActlTxnId));
TInt returnValue = KErrNone;
//Wait on transaction map critical section if it is locked, and then add to
//the map.
@@ -382,6 +386,7 @@
TInt CSenServiceDispatcher::RemoveFromTransMap(TInt* pVrtlaTxnId)
{
+ TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::RemoveFromTransMap - VrtlTxnID [%d]"), pVrtlaTxnId));
TInt returnValue = KErrNone;
//Is called from the main thread after we recieve the response.
returnValue = TransactionMap().Find(*pVrtlaTxnId);
@@ -396,6 +401,7 @@
TInt CSenServiceDispatcher::UpdateTransMap(TInt* pVrtlaTxnId,TInt* pActlTxnId)
{
+ TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::UpdateTransMap - VrtlTxnID [%d], ActlTxnId [%d]"), pVrtlaTxnId, pActlTxnId));
TInt returnValue = KErrNone;
//Is called from the main thread from HandleMessageChildAOL method.
//Typically gets called when ESenReAuthAndResendNeeded and ESenResendNeeded
--- a/webservices/wscore/group/sencore.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/group/sencore.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -85,7 +85,6 @@
SYSTEMINCLUDE /epoc32/include/libc
MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
LIBRARY ecom.lib
LIBRARY euser.lib
@@ -93,13 +92,15 @@
LIBRARY estor.lib
LIBRARY flogger.lib
LIBRARY bafl.lib
-LIBRARY imut.lib // imcvcodc.h - base64 encode and decode
+LIBRARY inetprotutil.lib // for base64 encoding
LIBRARY sysutil.lib // sysutil.h
LIBRARY etel.lib etelmm.lib // IMSI retrieving
#ifdef __ENABLE_ALR__
LIBRARY esock.lib //MOBILITY
LIBRARY commdb.lib //MOBILITY
LIBRARY netmeta.lib
+LIBRARY platformver.lib //extendedconnpref.h
+LIBRARY extendedconnpref.lib //extendedconnpref.h
#endif
#ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
LIBRARY senlogger.lib // for TLS based logging
--- a/webservices/wscore/inc/sencoreservicemanager.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/inc/sencoreservicemanager.h Thu Jul 22 16:44:27 2010 +0100
@@ -32,10 +32,9 @@
#include <e32base.h>
#include <badesca.h>
#include <f32file.h>
-#include <imcvcodc.h> // for base64 codec
#include <flogger.h>
#include <etelmm.h>
-
+#include <tconvbase64.h>
#include <SenXmlReader.h>
#include "senservicemanagerdefines.h"
@@ -412,7 +411,7 @@
// New functions
MSIF* Framework(const TDesC8& aFrameworkID);
- TImCodecB64& Base64Codec();
+ TBase64& Base64Codec();
// RPointerArray<HBufC8>& ActiveHostletEndpointsL();
@@ -436,7 +435,7 @@
TInt iConnectionCount;
CSenGuidGen* iGuidGenerator; // owned
CSenXmlReader* iReader; // owned
- TImCodecB64 iBase64Codec;
+ TBase64 iBase64Codec;
RStringPool iStringPool; // owned
// RPointerArray<HBufC8>* ipActiveHostletEndpoints; // owned
--- a/webservices/wscore/inc/senmobilityobserver.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/inc/senmobilityobserver.h Thu Jul 22 16:44:27 2010 +0100
@@ -22,13 +22,10 @@
#define M_SEN_MOBILITY_OBSERVER_H
// INCLUDES
-#include <flogger.h>
#include <e32std.h>
#include <in_sock.h>
#include <es_enum.h>
-#include <CommDbConnPref.h>
#include <comms-infras/cs_mobility_apiext.h>
-#include <connpref.h>
#include "SenXmlReader.h"
#include "MSenTransport.h"
#include "SenWSDescription.h"
@@ -76,7 +73,6 @@
TUint32 GetActiveIap() ;
HBufC8* GetNewIapAsTransportPropertyL() ;
TUint32 GetActiveSnap() ;
- void SetDialogPref(TBool aDialogPref) ;
TInt OpenConnectionL(TDesC8& aAppTransportProperties,
MSenTransport &aTransport,
CSenWSDescription& aInitializer,
@@ -92,6 +88,9 @@
TInt StartConnection(TUint32& aId, TBool aIsSnapId) ;
TInt OpenSocketSever() ;
void RefreshAvailabilityL() ;
+ TInt SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP);
+ TBool IsOCCImplementedSDK();
+ TInt GetS60PlatformVersion(TUint& aMajor, TUint& aMinor);
/**
* By default Symbian OS constructor is private.
@@ -104,10 +103,9 @@
TUint32 iIapId;
TUint32 iNewIapId;
TUint32 iSnapId;
- TCommDbConnPref iPrefs;
- TConnSnapPref iSNAPPrefs;
- CSenXmlReader &iReader ;
- private: // Data
+ CSenXmlReader &iReader ;
+ TBool iOCCenabled;
+ private: // Data
};
#endif /*M_SEN_MOBILITY_OBSERVER_H */
--- a/webservices/wscore/src/senclientsession.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/src/senclientsession.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -37,7 +37,7 @@
#include <SenXmlUtils.h>
#include <SenXmlProperties.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include <defaultcaps.hrh>
#include "senclientsession.h"
@@ -59,9 +59,9 @@
#include "SenSoapEnvelope2.h"
#include "sensoapmessagedom2.h"
-#include "xmlengchunkcontainer.h"
-#include "xmlengfilecontainer.h"
-#include "xmlengdeserializer.h"
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengdeserializer.h>
#include "SenParser.h"
#include "seninternalcredential.h"
#include "senservercontext.h"
@@ -168,7 +168,8 @@
iFirst = resHandler;
CActiveScheduler::Add(resHandler);
- resHandler->SetActive();
+ if(!resHandler->IsActive())
+ resHandler->SetActive();
resHandler->iStatus = KRequestPending;
TIpcArgs args(&resHandler->iProgressData, resHandler->iSoapOrCid);
@@ -224,6 +225,7 @@
CSenMessageResourceHandler* tmp = resHandler;
resHandler = resHandler->iNext;
delete tmp;
+ tmp = NULL;
}
RSessionBase::Close();
}
@@ -260,6 +262,7 @@
SendReceive(ESenCliServPrefferedCarrierAvailable, args, caSync->iStatus);
retVal = caSync->iStatus.Int();
delete caSync;
+ caSync = NULL;
}
return retVal;
@@ -279,6 +282,7 @@
SendReceive(ESenCliServNewCarrierActive, args, caSync->iStatus);
retVal = caSync->iStatus.Int();
delete caSync;
+ caSync = NULL;
}
return retVal;
}
@@ -294,6 +298,7 @@
SendReceive(ESenCliServMobilityError, args, caSync->iStatus);
retVal = caSync->iStatus.Int();
delete caSync;
+ caSync = NULL;
}
return retVal;
}
@@ -328,6 +333,7 @@
asWait.Start();
retVal = caSync->iStatus.Int();
delete caSync;
+ caSync = NULL;
}
return retVal;
}
@@ -356,7 +362,8 @@
void CSenConnAgentSync::Start()
{
- SetActive();
+ if(!IsActive())
+ SetActive();
}
CSenClientSession* CSenClientSession::NewL(MSenServiceManager& aServer, CSenServerContext& aCtx)
@@ -991,6 +998,7 @@
{
CSLOG_L(iConnectionID,KMinLogLevel ,"ESenServGetIdentityProviders");
IdentityProviders(aMessage);
+ CSLOG_L(iConnectionID,KMinLogLevel ,"ESenServGetIdentityProviders Completed");
break;
}
default:
@@ -1500,7 +1508,7 @@
const TDesC8& aRequest,
CSenAtomEntry& aAtomEntry)
{
- CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL");
+ CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry)");
CSenParser* pParser = CSenParser::NewLC();
pParser->EnableFeature(EReportNamespaceMapping);
pParser->ParseL(aRequest, aAtomEntry);
@@ -1551,13 +1559,14 @@
}
CleanupStack::PopAndDestroy(pParser);
+ CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry) Completed");
return KErrNone;
}
TInt CSenClientSession::ParseMessageL(TInt aTransactionId,
const TDesC8& aRequest,
CSenSoapEnvelope2& aSoapEnvelope)
{
- CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL");
+ CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope)");
CSenParser* pParser = CSenParser::NewLC();
pParser->EnableFeature(EReportNamespaceMapping);
pParser->ParseL(aRequest, aSoapEnvelope);
@@ -1651,7 +1660,7 @@
}
}
CleanupStack::PopAndDestroy(pParser);
-
+ CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope) Completed");
return retVal;
}
@@ -1943,7 +1952,7 @@
CleanupStack::PushL( pErrorMsg );
}
aSenChunk.ChunkHeader().SetContextId(transactionId); // temporary
- CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId));
+ CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId));
}
else
{
@@ -3739,6 +3748,7 @@
}
void CSenClientSession::AddCredentialL( const RMessage2& aMessage )
{
+ CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL()")));
TInt retVal(KErrNone);
CSenChunk* pSenChunk = NULL;
@@ -3851,14 +3861,27 @@
iManager.AddCredentialL(pIdP, pCredential, retVal);
RWSDescriptionArray aMatches;
- iManager.ServiceDescriptionsL(aMatches,*pSD);
- CleanupClosePushL(aMatches);
-
- for(TInt i = 0; i < aMatches.Count(); i++)
- {
- ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential);
- }
-
+ iManager.ServiceDescriptionsL(aMatches,*pSD);
+ CleanupClosePushL(aMatches);
+
+ for(TInt i = 0; i < aMatches.Count(); i++)
+ {
+ if(((CSenWebServiceSession*)aMatches[i]) && pCredential)
+ {
+ CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SD Type is = %d"), aMatches[i]->DescriptionClassType()));
+ if( aMatches[i]->HasSuperClass( MSenServiceDescription::EServiceSession ) )
+ {
+ CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Calling AddCredentialObserverL()")));
+ ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential);
+ CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Completed AddCredentialObserverL()")));
+ }
+ else
+ {
+ CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - SD is not the session object !!! ")));
+ }
+ }
+ }
+
CleanupStack::PopAndDestroy(&aMatches);
CleanupStack::Pop(pCredential);
@@ -3873,6 +3896,7 @@
CleanupStack::PopAndDestroy(pSenChunk);
aMessage.Complete(retVal);
+ CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() Completed")));
}
void CSenClientSession::CredentialsL( const RMessage2& aMessage )
@@ -4243,6 +4267,7 @@
TInt cancelledTxnId(*pTxnId);
txnIds.Remove(i);
delete pTxnId;
+ pTxnId = NULL;
CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- Now processing txn with id %d"), cancelledTxnId));
@@ -5544,6 +5569,7 @@
const RPointerArray<CSenIdentityProvider> pIdps = ((MSenCoreServiceManager&)iManager).IdentityProvidersL();
const TInt count = pIdps.Count();
+ CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("- TOTAL IDP Found: %d"), count));
// Calculate required heap allocation size:
TInt size(0);
@@ -5658,11 +5684,12 @@
}
CSLOG_L(iConnectionID,KMaxLogLevel ,"- Requested descriptions:");
CSLOG_ALL(iConnectionID,KMaxLogLevel ,(*pIdPrs));
+ CSLOG_L(iConnectionID,KMinLogLevel ,"CSenClientSession::IdentityProviders completed");
}
#ifdef _SENDEBUG
else
{
- CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- AllocDescToRMsgL failed: %d"), retVal));
+ CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("- AllocDescToRMsgL failed: %d"), retVal));
}
#endif // _SENDEBUG
--- a/webservices/wscore/src/sencoreservicemanager.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/src/sencoreservicemanager.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -379,7 +379,7 @@
error = additions;
additions = 0;
}
- CSLOG_FORMAT((aConsumer.ConnectionId(), KNormalLogLevel , _L8(" - Just added %d service description(s)."), additions));
+ CSLOG_FORMAT((aConsumer.ConnectionId(), KMinLogLevel , _L8(" - Just added %d service description(s)."), additions));
if ( error )
{
retVal = error;
@@ -973,9 +973,8 @@
}
// private getter, which always initializes the base64codec
-TImCodecB64& CSenCoreServiceManager::Base64Codec()
+TBase64& CSenCoreServiceManager::Base64Codec()
{
- iBase64Codec.Initialise();
return iBase64Codec;
}
--- a/webservices/wscore/src/senmobilityobserver.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/src/senmobilityobserver.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -18,14 +18,17 @@
// INCLUDE FILES
-
+#include <connpref.h>
+#include <commdbconnpref.h>
#include "senmobilityobserver.h"
-#include <SenTransportProperties.h>
-#include "SenWSPattern.h"
-#include "MSenProperties.h"
-#include "SenLayeredTransportProperties.h"
-#include "SenLogger.h"
-#include "SenServiceManagerDefines.h"
+#include "sentransportproperties.h"
+#include "senwspattern.h"
+#include "msenproperties.h"
+#include "senlayeredtransportproperties.h"
+#include "senlogger.h"
+#include "senservicemanagerdefines.h"
+#include <versioninfo.h> // VersionInfo
+#include <extendedconnpref.h>
// -----------------------------------------------------------------------------
// CALRObserver::NewL
@@ -64,6 +67,7 @@
#endif
User::LeaveIfError( iSocketServer.Connect());
TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "CALRObserver::ConstructL()");
+ IsOCCImplementedSDK();
}
// -----------------------------------------------------------------------------
@@ -76,7 +80,8 @@
iIapId(0),
iNewIapId(0),
iSnapId(0),
- iReader(aReader)
+ iReader(aReader),
+ iOCCenabled(EFalse)
{
CActiveScheduler::Add( this );
}
@@ -139,8 +144,59 @@
//RunL status error: " ) );
User::Leave(iStatus.Int()) ;
}
- }
-
+ }
+
+// On return, aMajor and aMinor contain the version information
+TBool CALRObserver::IsOCCImplementedSDK()
+ {
+ TBool occ = EFalse;
+ // Obtain the version number
+ TUint major;
+ TUint minor;
+ TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("CSenHttpChannelImpl::IsOCCImplementedSDK()")));
+ TInt ret = GetS60PlatformVersion(major, minor);
+ if (ret == KErrNone)
+ {
+ if(major == 5 && minor == 2)
+ {
+ occ = ETrue;
+ iOCCenabled = ETrue;
+ TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("---- IsOCCImplementedSDK() returns TRUE")));
+ }
+ else
+ {
+ TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("---- IsOCCImplementedSDK() returns False")));
+ }
+ }
+ return occ;
+ }
+
+// On return, aMajor and aMinor contain the version information
+TInt CALRObserver::GetS60PlatformVersion(TUint& aMajor, TUint& aMinor)
+ {
+ TInt ret = KErrNone;
+ // Connect to the file server session
+ RFs fsSession;
+ TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("CSenHttpChannelImpl::GetS60PlatformVersion()")));
+ ret = fsSession.Connect();
+ if(ret == KErrNone)
+ {
+ CleanupClosePushL(fsSession); // Obtain the version numberTUint major;
+ VersionInfo::TPlatformVersion platformVersion;
+ TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "--- GetS60PlatformVersion getting Version info");
+ ret = VersionInfo::GetVersion(platformVersion, fsSession);
+ CleanupStack::PopAndDestroy(); // fsSession
+ if (ret == KErrNone)
+ {
+ aMajor = platformVersion.iMajorVersion;
+ aMinor = platformVersion.iMinorVersion;
+ TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("--- GetS60PlatformVersion Version: Major [%d], Minor[%d]"), aMajor, aMinor));
+ }
+ }
+ TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("--- GetS60PlatformVersion returns [%d]"), ret));
+ return ret;
+ }
+
// -----------------------------------------------------------------------------
// CALRObserver::RunError
// -----------------------------------------------------------------------------
@@ -362,7 +418,7 @@
TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get SNAPID from pTransportProperties ");
TInt error = pTransportProperties->SnapIdL(id) ;
- if(error || id >= (TUint)KErrNotFound) //
+ if(error || id >= (TUint)KErrNotFound) //SNAP not found
{
TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get IAPID from pTransportProperties ");
error = pTransportProperties->IapIdL(id);
@@ -372,7 +428,7 @@
isSnap = ETrue ;
}
- if(error || id >= (TUint)KErrNotFound)
+ if(error || id >= (TUint)KErrNotFound) //IAP also not found
{
//Application Did not provide IAP ID through transport properties
//Now we need to check consumer and provider policy of service description
@@ -384,7 +440,7 @@
CSenWSPattern* pConsumerPolicy = (CSenWSPattern*)&aInitializer;
TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get SNAPID from pConsumerPolicy ");
error = pConsumerPolicy->ConsumerSnapId( id );
- if(error || id >= (TUint)KErrNotFound)
+ if(error || id >= (TUint)KErrNotFound) //SNAP not found
{
TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get IAPID from pConsumerPolicy ");
error = pConsumerPolicy->ConsumerIapId( id );
@@ -444,6 +500,11 @@
{
//check with first Snapid
isStartConnectionRequired = ETrue ;
+ if(iOCCenabled != EFalse)
+ {
+ isSnap = ETrue; //We must start with SNAP for OCC
+ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- isSnap Modified for OCC Support ");
+ }
TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- StartConnection required as (iIapId == 0 && iSnapId == 0) openId = %d, isSnap = %d, iIapId = %d and iSnapId = %d "), openId, isSnap, iIapId, iSnapId));
}
else if(isSnap != EFalse && openId != iSnapId)
@@ -494,6 +555,146 @@
TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::OpenConnectionL returnd %d "), error));
return error ;
}
+
+TInt CALRObserver::SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP)
+ {
+ /*
+ * Single click connectivity feature has been implemented by CSock (RConnection class).
+ * According to this client no need to set the IAP ID.
+ * Automatically RConnection will use the suitable IAP
+ */
+ TInt retVal = KErrNone;
+ TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("CSenHttpChannelImpl called with ID [%d]"), aId));
+
+ if (iOCCenabled == EFalse)
+ {
+ if(aSNAP != EFalse && aId)
+ {
+ TConnSnapPref SNAPPrefs;
+ iSnapId = aId ;
+ SNAPPrefs.SetSnap( aId );
+ // Start connecting with Snap
+ retVal = iConnection.Start(SNAPPrefs);
+ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP");
+ }
+ else //default is iap
+ {
+ if( aId )
+ {
+ TCommDbConnPref iapPrefs ;
+ iapPrefs.SetIapId( aId );
+ iapPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
+ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE");
+ //iapPrefs.SetDialogPreference( ECommDbDialogPrefPrompt );
+ // Start connecting with IAP
+ retVal = iConnection.Start(iapPrefs);
+ TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId));
+ }
+ else
+ {
+ if (iIapId != 0)
+ {
+ //OpenSocketSever is already called for this iIapId When multiple
+ //sendL are calld for the same IAPId StartConnection may be called
+ //unintentionaly and may create crash
+ //strange case StartConnection must not be called in this case
+ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection StartConnection must not be called as aId == 0 and iIapId != 0");
+ }
+ else
+ {
+ //Using Default Connection
+ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection started Using Default Connection");
+ retVal = iConnection.Start();
+ }
+ }
+ }
+ }
+ else
+ {
+ if (aSNAP == EFalse)
+ {
+ /* If IAP id is zero, it is interpreted as
+ * client's request for not requesting any specific IAP.
+ * Default value is 0.
+ *
+ * If IAP id is set, SNAP id shall be zero.
+ * If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+ * If IAP id is set, Connection selection dialog shall be disabled.
+ * If IAP id is set, bearer set shall be EExtendedConnBearerUnknown.
+ * If IAP id is set, forced roaming is disabled automatically.
+ * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+ * selection dialog shall be enabled.
+ */
+
+ TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC with IAP Settings");
+ TConnPrefList prefList;
+ TExtendedConnPref extPrefs;
+ //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+ //TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC Silent Connection");
+ //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+ extPrefs.SetIapId(aId);
+ extPrefs.SetSnapId(0);
+ prefList.AppendL(&extPrefs);
+ retVal = aConnection.Start(prefList);
+ if(retVal == KErrNone)
+ {
+ iIapId = aId;
+ }
+ else
+ {
+ TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("IAP ->Start retVal [%d]"), retVal));
+ }
+ }
+ else
+ {
+ /**
+ * Sets SNAP id. If SNAP id is zero, it is interpreted as
+ * client's request for not requesting any specific SNAP.
+ * Default value is 0.
+ *
+ * If SNAP id is set, IAP id shall be zero.
+ * If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+ * If SNAP id is set, Connection selection dialog shall be disabled.
+ * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+ * selection dialog shall be enabled.
+ */
+ TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC with SNAP Settings");
+ TConnPrefList prefList;
+ TExtendedConnPref extPrefs;
+ //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+ //TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC Silent Connection");
+ //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+ if(aId == 0)
+ {
+ TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting SnapPurpose Internet");
+ if(aDialogPref) //If it fails because of unavailibility of access points
+ {
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+ extPrefs.SetConnSelectionDialog(ETrue);
+ }
+ else
+ {
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+ //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ }
+ }
+ else
+ {
+ extPrefs.SetSnapId(aId);
+ extPrefs.SetIapId(0);
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+ extPrefs.SetConnSelectionDialog(EFalse);
+ }
+ prefList.AppendL(&extPrefs);
+ retVal = aConnection.Start(prefList);
+ }
+ }
+
+ return retVal;
+ }
+
// -----------------------------------------------------------------------------
// CALRObserver::StartConnection
// -----------------------------------------------------------------------------
@@ -529,45 +730,13 @@
TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection closed as new SNAPID for the same connection");
}
}
- errRet = OpenSocketSever();
+
+ errRet = OpenSocketSever();
+
if (!errRet)
{
- if(aIsSnapId != EFalse && aId)
- {
- iSnapId = aId ;
- iSNAPPrefs.SetSnap( aId );
- // Start connecting with Snap
- errRet = iConnection.Start(iSNAPPrefs);
- TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP");
- }
- else //default is iap
- {
- if( aId )
- {
- iPrefs.SetIapId( aId );
- SetDialogPref(EFalse) ;
- // Start connecting with IAP
- errRet = iConnection.Start(iPrefs);
- TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId));
- }
- else
- {
- if (iIapId != 0)
- {
- //OpenSocketSever is already called for this iIapId When multiple
- //sendL are calld for the same IAPId StartConnection may be called
- //unintentionaly and may create crash
- //strange case StartConnection must not be called in this case
- TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection StartConnection must not be called as aId == 0 and iIapId != 0");
- }
- else
- {
- //Using Default Connection
- TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection started Using Default Connection");
- errRet = iConnection.Start();
- }
- }
- }
+ errRet = SetID(aId, EFalse, iConnection, iSocketServer, aIsSnapId);
+
if (errRet == KErrNone)
{
//iConnection.GetIntSetting( _L( "IAP\\Id" ), aId );
@@ -586,20 +755,6 @@
return errRet;
}
-void CALRObserver::SetDialogPref(TBool aDialogPref)
- {
- if (aDialogPref == EFalse)
- {
- TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE");
- iPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
- }
- else
- {
- TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel ,"- CALRObserver::SetDialogPref is TRUE");
- iPrefs.SetDialogPreference( ECommDbDialogPrefPrompt );
- }
- }
-
// -----------------------------------------------------------------------------
// CALRObserver::RefreshAvailability
// -----------------------------------------------------------------------------
--- a/webservices/wscore/src/senxmldao.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscore/src/senxmldao.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -1253,7 +1253,7 @@
}
}
}
- TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KNormalLogLevel, _L8(" - total of %d matches found."),
+ TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" - total of %d matches found."),
aMatches.Count()));
return retVal; // last error from Append() is returned atm
@@ -1604,7 +1604,7 @@
// This method needs to be wrapped inside critical section
// NOTE: do *NOT* file log before this line(!):
- TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,"CSenXMLDAO::LookupHostletForL:");
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenXMLDAO::LookupHostletForL:");
TLSLOG(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,(aReqThreadId));
TLSLOG(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,(aReqConsumerId));
@@ -1624,7 +1624,7 @@
{
if(pHostlet->Endpoint()==aHostletEndpoint)
{
- TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- Matching sharable hostlet found from cache: 0x%X"), &pHostlet));
+ TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- Matching sharable hostlet found from cache: 0x%X"), &pHostlet));
return *pHostlet;
}
}
@@ -1652,11 +1652,11 @@
// Next line is critical; when count goes to zero,
// provider can be de-allocated from memory!
pLookupInfo->IncrementLookupCount();
- TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- A non-threadsafe, unsharable local provider (hostlet) was found: 0x%X - lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount()));
+ TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- A non-threadsafe, unsharable local provider (hostlet) was found: 0x%X - lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount()));
if(pHostlet->Reinitializable())
{
pHostlet->ReinitL();
- TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,"- Provider was also reinitialized.");
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"- Provider was also reinitialized.");
}
return *pHostlet;
}
@@ -1693,7 +1693,7 @@
append = iSharableProviders.Append(pHostlet);
if(append==KErrNone)
{
- TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- Loaded new sharable hostlet instance: 0x%X"), &pHostlet));
+ TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- Loaded new sharable hostlet instance: 0x%X"), &pHostlet));
CleanupStack::Pop(); // pHostlet
}
else
@@ -1740,6 +1740,7 @@
}
}
User::LeaveIfError(append); // KErrNoMemory
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenXMLDAO::LookupHostletForL: Completed");
return *pHostlet;
}
--- a/webservices/wscredentialmanager/src/sencredentialmanager.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscredentialmanager/src/sencredentialmanager.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -47,7 +47,7 @@
#include "senwebservicesession.h"
#include <SenServiceConnection.h> // KErrSenNoPermission ( -30315 )
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include <SenCredential.h>
#include <SenXmlUtils.h>
@@ -1336,6 +1336,7 @@
RSenCredentialPtr CSenCredentialManager::CredentialL( TInt aInternalCredentialId,
TInt& aErrorTo )
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenCredentialManager::CredentialL()");
TInt count = iCredentialArray.Count();
for (TInt i=0; i<count; i++)
{
@@ -1391,7 +1392,8 @@
return iCredentialArray[i];
}
}
- aErrorTo = KErrNotFound;
+ aErrorTo = KErrNotFound;
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenCredentialManager::CredentialL() Completed");
return RSenCredentialPtr();
}
--- a/webservices/wscredentialmanager/src/seninternalcredential.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wscredentialmanager/src/seninternalcredential.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -42,7 +42,7 @@
//#include "Attribute.h"
#endif
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
using namespace Xml;
namespace
--- a/webservices/wsdescription/src/sencredential2.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsdescription/src/sencredential2.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -279,7 +279,10 @@
EXPORT_C CSenCredential2::~CSenCredential2()
{
- delete iId;
+ if(iId)
+ {
+ delete iId;
+ }
}
EXPORT_C void CSenCredential2::SetIdL(const TDesC8& aNewId)
--- a/webservices/wsdescription/src/senservicepolicy.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsdescription/src/senservicepolicy.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -16,12 +16,6 @@
*/
-
-
-
-
-
-
// INCLUDE FILES
#include <e32std.h>
#include <s32strm.h>
@@ -159,7 +153,8 @@
}
}
}
- delete copy;
+ delete copy;
+ copy = NULL;
return retVal;
}
--- a/webservices/wsdescription/src/servicepolicy.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsdescription/src/servicepolicy.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -787,8 +787,6 @@
return EFalse;
}
- return EFalse;
-
}
HBufC8* CServicePolicy::ClientPolicyValue(const TDesC8& aKey)
{
--- a/webservices/wsfragment/inc/wslibxml2utils.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsfragment/inc/wslibxml2utils.h Thu Jul 22 16:44:27 2010 +0100
@@ -26,7 +26,7 @@
#define WS_LIBXML2_UTILS_H_INCLUDED
#include <e32base.h>
-#include "xmlengelement.h"
+#include <xml/dom/xmlengelement.h>
class WsXmlUtils
{
--- a/webservices/wsfragment/src/rsendocument.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsfragment/src/rsendocument.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -21,8 +21,8 @@
#include "RSenDocument.h"
-#include <xmlengxestd.h>
-#include <xmlengdomimplementation.h>
+#include <xml/utils/xmlengxestd.h>
+#include <xml/dom/xmlengdomimplementation.h>
LOCAL_C void CleanupRSenDocument(TAny* aDocumentData)
{
@@ -59,12 +59,17 @@
RXmlEngDocument doc;
doc.OpenL(domImpl);
RSenDocument document;
+ CleanupClosePushL(document);
+ document.ipData = NULL;
+ document.iInternal = NULL;
document.ipData = new (ELeave) TSenDocumentData;
document.iInternal =
(reinterpret_cast<RSenDocument*>(const_cast<RXmlEngDocument*>(&doc)))->iInternal;
document.ipData->iInternal = document.iInternal;
+ document.ipData->ipOpenDocuments = NULL;
document.ipData->ipOpenDocuments = new (ELeave) TInt(1);
document.ipData->iDomImpl = domImpl;
+ CleanupStack::Pop();
TCleanupItem cleanup(CleanupRSenDocument, document.ipData);
CleanupStack::PushL(cleanup);
return document;
@@ -89,12 +94,17 @@
RXmlEngDocument doc;
doc.OpenL(domImpl, aInternal);
RSenDocument document;
+ CleanupClosePushL(document);
+ document.ipData = NULL;
+ document.iInternal = NULL;
document.ipData = new (ELeave) TSenDocumentData;
document.iInternal =
(reinterpret_cast<RSenDocument*>(const_cast<RXmlEngDocument*>(&doc)))->iInternal;
document.ipData->iInternal = document.iInternal;
+ document.ipData->ipOpenDocuments = NULL;
document.ipData->ipOpenDocuments = new (ELeave) TInt(1);
document.ipData->iDomImpl = domImpl;
+ CleanupStack::Pop();
TCleanupItem cleanup(CleanupRSenDocument, document.ipData);
CleanupStack::PushL(cleanup);
return document;
@@ -108,26 +118,28 @@
EXPORT_C void RSenDocument::Close()
{
- *ipData->ipOpenDocuments = *ipData->ipOpenDocuments - 1;
- if ( !*ipData->ipOpenDocuments )
- {
- RXmlEngDOMImplementation domImpl = ipData->iDomImpl;
- iInternal = ipData->iInternal;
- delete ipData->ipOpenDocuments;
- delete ipData;
- RXmlEngDocument::Close();
- domImpl.Close();
- TBool* pDisabled = (TBool*)Dll::Tls();
- if ( !pDisabled )
- {
- XmlEngineCleanup();
- }
- }
- else
- {
- iInternal = NULL;
- }
-
+ if(ipData && ipData->ipOpenDocuments)
+ {
+ *ipData->ipOpenDocuments = *ipData->ipOpenDocuments - 1;
+ if ( !*ipData->ipOpenDocuments )
+ {
+ RXmlEngDOMImplementation domImpl = ipData->iDomImpl;
+ iInternal = ipData->iInternal;
+ delete ipData->ipOpenDocuments;
+ delete ipData;
+ RXmlEngDocument::Close();
+ domImpl.Close();
+ TBool* pDisabled = (TBool*)Dll::Tls();
+ if ( !pDisabled )
+ {
+ XmlEngineCleanup();
+ }
+ }
+ else
+ {
+ iInternal = NULL;
+ }
+ }
}
EXPORT_C void RSenDocument::Destroy()
--- a/webservices/wsfragment/src/sendomfragmentbase.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsfragment/src/sendomfragmentbase.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -24,7 +24,7 @@
// INCLUDE FILES
#include "SenDomFragmentBase.h"
-#include <xmlengserializationoptions.h> // needed for TSerializationOptions
+#include <xml/dom/xmlengserializationoptions.h> // needed for TSerializationOptions
EXPORT_C CSenDomFragmentBase* CSenDomFragmentBase::NewL()
--- a/webservices/wsfragment/src/senfragmentbase.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsfragment/src/senfragmentbase.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -34,9 +34,9 @@
#include <xml/attribute.h> // needed for RAttributeArray
#include <xml/parserfeature.h> // for TParserFeature enumeration
-#include <xmlengserializationoptions.h> // for TSerializationOptions
-#include <xmlengbinarycontainer.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengserializationoptions.h> // for TSerializationOptions
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnodelist.h>
typedef unsigned char xmlChar; // from "libxml/Libxml2_xmlstring.h"
--- a/webservices/wsfragment/src/wslibxml2utils.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsfragment/src/wslibxml2utils.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -24,10 +24,10 @@
#include "wslibxml2utils.h"
-#include <libxml2_globals.h>
-#include <xmlengelement.h>
-#include <xmlengerrors.h>
-#include <xmlengxestd.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+#include <xml/dom/xmlengelement.h>
+#include <xml/dom/xmlengerrors.h>
+#include <xml/utils/xmlengxestd.h>
#define INTERNAL_NODEPTR(aNodeObject) (*reinterpret_cast<xmlNodePtr*>(&(aNodeObject)))
#define INTERNAL_NSPTR(aNsDefObject) (*reinterpret_cast<xmlNsPtr*>(&(aNsDefObject)))
--- a/webservices/wsframework/group/senframework.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/group/senframework.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -88,7 +88,6 @@
SYSTEMINCLUDE ../../inc
SYSTEMINCLUDE /epoc32/include/libc
MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
// System libs
LIBRARY euser.lib
@@ -96,7 +95,8 @@
LIBRARY estor.lib
LIBRARY ecom.lib
LIBRARY efsrv.lib
-LIBRARY imut.lib
+LIBRARY inetprotutil.lib // for base64 encoding
+
#ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
// Serene libs
--- a/webservices/wsframework/inc/senmtomutils.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/inc/senmtomutils.h Thu Jul 22 16:44:27 2010 +0100
@@ -22,16 +22,16 @@
#define SEN_MTOM_UTILS_H
#include <e32math.h>
-#include <imcvcodc.h>
+
#include <SenSoapEnvelope2.h>
#include <RSenDocument.h>
-#include <xmlengserializer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengbinarycontainer.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnodelist.h>
// CONSTANTS
_LIT(KMtomNoRequestSoapEnvelopePanicText, "NULL MTOM request soap envelope");
--- a/webservices/wsframework/inc/senmultipartutils.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/inc/senmultipartutils.h Thu Jul 22 16:44:27 2010 +0100
@@ -32,11 +32,11 @@
#include "senatomentry.h"
#include <RSenDocument.h>
-#include <xmlengserializer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengbinarycontainer.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnodelist.h>
// CONSTANTS
_LIT(KMultiPartNoRequestMessagePanicText, "NULL MultiPart request message");
--- a/webservices/wsframework/inc/senwebservicesession.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/inc/senwebservicesession.h Thu Jul 22 16:44:27 2010 +0100
@@ -293,6 +293,7 @@
// Data, which also subclasses can access
TTime iValidUntil;
+ TTime iMaxTime;
RSenCredentialPtr iCredentialPtr;
HBufC8* iTransportCue;
--- a/webservices/wsframework/src/saslmechanism.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/src/saslmechanism.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -124,6 +124,11 @@
EXPORT_C void CSaslMechanism::SetTransforms(
RPointerArray<CSenPasswordTransform> aList)
{
+ //deallocate the original objects and the array itself which were owned
+ if(iTransforms.Count())
+ {
+ iTransforms.ResetAndDestroy();
+ }
iTransforms = aList;
}
--- a/webservices/wsframework/src/sencontextitem.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/src/sencontextitem.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -107,6 +107,7 @@
ipData = NULL;
}
}
+ break;
case ECSenWSDescription:
{
CSenWSDescription* p = (CSenWSDescription*) ipData;
--- a/webservices/wsframework/src/senmessagecontext.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/src/senmessagecontext.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -397,6 +397,7 @@
CSenContextItem* pItem = MessageToItem( apMessage, aOwned, leaveCode );
if( leaveCode != KErrNone )
{
+ delete pItem;
return leaveCode;
}
@@ -415,6 +416,7 @@
CSenContextItem* pItem = MessageToItem( apMessage, aOwned, leaveCode );
if( leaveCode != KErrNone )
{
+ delete pItem;
return leaveCode;
}
--- a/webservices/wsframework/src/senservicesession.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/src/senservicesession.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -50,10 +50,12 @@
iFramework(aFramework),
ipTransport(NULL)
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel ,"CSenServiceSession::CSenServiceSession()");
}
EXPORT_C CSenServiceSession::~CSenServiceSession()
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel ,"CSenServiceSession::~CSenServiceSession()");
// The REMOTE consumers are also sessions which are
// owned by XMLDAO or ClientSession
iConsumerList.Reset();
@@ -562,6 +564,7 @@
{
if(!(thisFrameworkId.Length()>0 && patternFrameworkId == thisFrameworkId))
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenServiceSession::Matches() - Framework Id not same returning EFalse");
return EFalse;
}
}
--- a/webservices/wsframework/src/sensyncrequester.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/src/sensyncrequester.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -148,7 +148,11 @@
MSenProperties* /*aResponseTransportProperties*/)
{
// NONE of the errors between transport and session are handled in this level:
- delete apError;
+ if(apError)
+ {
+ delete apError;
+ apError = NULL;
+ }
return aErrorCode; // simply bounce the error back to the caller
}
@@ -176,7 +180,8 @@
}
// Now stop the SYNC wait in the SubmitL, so that the main thread
// of the Serene Core Active Scheduler can continue it's execution
- iSchedulerWait.AsyncStop();
+ if(iSchedulerWait.IsStarted())
+ iSchedulerWait.AsyncStop();
return aTxnId;
}
@@ -195,7 +200,8 @@
}
// Now stop the SYNC wait in the SubmitL, so that the main thread
// of the Serene Core Active Scheduler can continue it's execution
- iSchedulerWait.AsyncStop();
+ if(iSchedulerWait.IsStarted())
+ iSchedulerWait.AsyncStop();
return aTxnId;
}
--- a/webservices/wsframework/src/senwebservicesession.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsframework/src/senwebservicesession.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -39,7 +39,7 @@
#include "senservicepolicy.h"
#include "seninternalcredential.h"
#include "sensaxutils.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include <SenIdentityProvider.h>
#include "senlogger.h"
#include <SenXmlConstants.h>
@@ -91,18 +91,20 @@
EXPORT_C void CSenWebServiceSession::ConstructL()
{
-
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::ConstructL()"));
// Sets the local name to "ServiceDescription"
// and initiates the inner ipElement
CSenServiceSession::BaseConstructL();
// Init member variables
iClientServerInterval = 0;
iValidUntil = Time::NullTTime();
+ iMaxTime = Time::NullTTime();;
iFrameworkId = iFramework.Id().AllocL();
}
EXPORT_C CSenWebServiceSession::~CSenWebServiceSession()
{
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::~CSenWebServiceSession()"));
delete iSecurity;
delete iContract;
delete iEndpoint;
@@ -631,6 +633,7 @@
MSenRemoteServiceConsumer& aConsumer,
MSenProperties* aResponseTransportProperties )
{
+ CSLOG_FORMAT((aConsumer.ConnectionId() , KMinLogLevel, _L8("CSenWebServiceSession::SendErrorToConsumerL - aErrorCode [%d]"), aErrorCode));
CleanupStack::PushL(apError);
TInt retVal(KErrNone);
@@ -1551,9 +1554,12 @@
}
else
{
- const TTime& MAX_TIME = Time::MaxTTime();
- return MAX_TIME; // if no expiration was set, the session is
+ //const TTime& MAX_TIME = Time::MaxTTime();
+ //return MAX_TIME; // if no expiration was set, the session is
// valid forever(!)
+ iMaxTime = Time::MaxTTime();
+ return iMaxTime;
+
}
}
@@ -2120,6 +2126,7 @@
EXPORT_C TInt CSenWebServiceSession::AddCredentialObserverL(CSenInternalCredential& aCredential)
{
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::AddCredentialObserverL()"));
TInt error(KErrNone);
RSenCredentialPtr credentialPtr =
((MSenServiceManager&)iFramework.Manager()).CredentialL(
@@ -2151,7 +2158,7 @@
}
CredentialChanged(MSenCredentialObserver::EAdded, NULL);
SetStatusL();
-
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::AddCredentialObserverL() Completed"));
return KErrNone;
}
--- a/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -763,8 +763,8 @@
iTxnIdBuffer.Set(reinterpret_cast<TUint8*>(&iTxnId),
sizeof(TInt),
sizeof(TInt));
-
- SetActive();
+ if(!IsActive())
+ SetActive();
#ifdef EKA2
iActive->AsyncOpsArrayL().AppendL(this);
#else
@@ -939,7 +939,8 @@
CActiveScheduler::Add(this);
// Initial subscription
iFileProgressProperty.Subscribe(iStatus);
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
}
@@ -961,7 +962,8 @@
{
// Resubscribe before processing new value to prevent missing updates(!):
iFileProgressProperty.Subscribe( iStatus );
- SetActive();
+ if(!IsActive())
+ SetActive();
iStatus = KRequestPending;
TLSLOG_L( KSenHostletConnectionLogChannelBase + iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenFileProgressObserver::RunL" );
--- a/webservices/wshostletconnection/src/senregistrationtimer.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshostletconnection/src/senregistrationtimer.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -74,7 +74,8 @@
if (!IsActive())
{
iTimer.After( iStatus, interval );
- SetActive();
+ if(!IsActive())
+ SetActive();
}
}
--- a/webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -115,6 +115,11 @@
LIBRARY HttpFilterCommon.lib
LIBRARY netmeta.lib
+#ifndef __ENABLE_ALR__
+LIBRARY platformver.lib //extendedconnpref.h
+LIBRARY extendedconnpref.lib //extendedconnpref.h
+#endif
+
#ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
// WSF libraries:
LIBRARY SenServDesc.lib
--- a/webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h Thu Jul 22 16:44:27 2010 +0100
@@ -158,7 +158,9 @@
virtual void EnableTimeOutL(TInt aTxnId, TInt aTimeOutSec) = 0;
virtual void DisableTimeOutL(TInt aTxnId) = 0;
virtual TInt32 UsedIap() = 0;
-
+ virtual void ResetIapId() = 0;
+ virtual void ResetUsedIapId() = 0;
+ virtual void SetExplicitIapDefined(TBool aExplicitIapDefined) = 0;
};
#endif // SEN_HTTP_CHANNEL_H
--- a/webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h Thu Jul 22 16:44:27 2010 +0100
@@ -107,7 +107,7 @@
TInt CancelTransaction(const TInt aTxnId);
void CancelAllTransactions();
- void SetExplicitIapDefined(TBool aExplicitIapDefined);
+ virtual void SetExplicitIapDefined(TBool aExplicitIapDefined);
/*
* Getter for currently effective IAP ID
* @param aIapId will be assigned to hold
@@ -131,6 +131,8 @@
void EnableTimeOutL(TInt aTxnId, TInt aTimeOutSec);
void DisableTimeOutL(TInt aTxnId);
virtual TInt32 UsedIap();
+ virtual void ResetIapId();
+ virtual void ResetUsedIapId();
protected:
CSenHttpChannelImpl(MSenIdentityManager& aManager);
@@ -160,8 +162,10 @@
private:
// New functions
-
-
+
+ TInt SetID(TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP = EFalse);
+ TInt GetS60PlatformVersion(TUint& aMajor, TUint& aMinor);
+ TBool IsOCCImplementedSDK();
TPtrC8 SoapActionL(MSenElement& aSoapEnvelope);
TInt SubmitRequestL(MSenResponseObserver& aObserver,
const TDesC8& aUri,
@@ -210,6 +214,9 @@
TBool iHasHttpContentType;
SenMultiPartUtils::TMultiPartContentType iMultiPartContentType; // content type of MultiPart response
RHTTPTransaction iHttpTransaction ;
+#ifndef __ENABLE_ALR__
+ TBool iOCCenabled ;
+#endif
};
#endif //SEN_HTTP_CHANNEL_IMPL_H
--- a/webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h Thu Jul 22 16:44:27 2010 +0100
@@ -303,6 +303,7 @@
//RFileLogger iLogger;
TInt iStatusCode; // containts latest error or zero
TSenDataTrafficDetails iDetails;
+ TBool iIsConnectionFailed;
};
#endif // SEN_HTTP_CHANNEL_TRANSPORT_PLUGIN_H
--- a/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -16,25 +16,16 @@
*/
-
-
-
-
-
-
-
-
-
#include <uri8.h>
#include <es_sock.h>
#include <in_sock.h>
#include <http.h>
#include "sendebug.h" // filelogging and debugging MACROS
-#include <SenServiceConnection.h> // KErrSenNoHttpResponseBody
-#include <SenElement.h>
-#include <SenXmlUtils.h>
-#include <SenHttpTransportProperties.h>
+#include "SenServiceConnection.h" // KErrSenNoHttpResponseBody
+#include "SenElement.h"
+#include "SenXmlUtils.h"
+#include "SenHttpTransportProperties.h"
#include "senhttpchannelimpl.h"
#include "senhttpeventhandler.h"
#include "sentxnstate.h"
@@ -47,10 +38,15 @@
#include "senhttpchanneltransportplugin.h"
//For HTTPProxyFilter
-#include <HttpFilterProxyInterface.h>
-#include <HttpFilterAcceptHeaderInterface.h>
-#include <HttpFilterCommonStringsExt.h>
-#include <DeflateFilterInterface.h>
+#include <httpfilterproxyinterface.h>
+#include <httpfilteracceptheaderinterface.h>
+#include <httpfiltercommonstringsext.h>
+#include <deflatefilterinterface.h>
+
+#ifndef __ENABLE_ALR__
+#include <versioninfo.h> // VersionInfo
+#include <extendedconnpref.h>
+#endif
// CONSTANTS
namespace
@@ -85,7 +81,11 @@
iProxyHostPort(NULL),
iXopResponse(EFalse),
iHasHttpContentType(ETrue)
+#ifndef __ENABLE_ALR__
+ , iOCCenabled(EFalse)
+#endif
{
+// IsOCCImplementedSDK();
}
CSenHttpChannelImpl* CSenHttpChannelImpl::NewL(MSenIdentityManager& aManager)
@@ -120,41 +120,94 @@
return pNew;
}
+#ifndef __ENABLE_ALR__
+// On return, aMajor and aMinor contain the version information
+TInt CSenHttpChannelImpl::GetS60PlatformVersion(TUint& aMajor, TUint& aMinor)
+ {
+ TInt ret = KErrNone;
+ // Connect to the file server session
+ RFs fsSession;
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::GetS60PlatformVersion()")));
+ ret = fsSession.Connect();
+ if(ret == KErrNone)
+ {
+ CleanupClosePushL(fsSession); // Obtain the version numberTUint major;
+ VersionInfo::TPlatformVersion platformVersion;
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "--- GetS60PlatformVersion getting Version info");
+ ret = VersionInfo::GetVersion(platformVersion, fsSession);
+ CleanupStack::PopAndDestroy(); // fsSession
+ if (ret == KErrNone)
+ {
+ aMajor = platformVersion.iMajorVersion;
+ aMinor = platformVersion.iMinorVersion;
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- GetS60PlatformVersion Version: Major [%d], Minor[%d]"), aMajor, aMinor));
+ }
+ }
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- GetS60PlatformVersion returns [%d]"), ret));
+ return ret;
+ }
+
+// On return, aMajor and aMinor contain the version information
+TBool CSenHttpChannelImpl::IsOCCImplementedSDK()
+ {
+ TBool occ = EFalse;
+ // Obtain the version number
+ TUint major;
+ TUint minor;
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::IsOCCImplementedSDK()")));
+ TInt ret = GetS60PlatformVersion(major, minor);
+ if (ret == KErrNone)
+ {
+ if(major == 5 && minor == 2)
+ {
+ occ = ETrue;
+ iOCCenabled = ETrue;
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("---- IsOCCImplementedSDK() returns TRUE")));
+ }
+ else
+ {
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("---- IsOCCImplementedSDK() returns False")));
+ }
+ }
+ return occ;
+ }
+#endif
+
// Ask IAP from user
void CSenHttpChannelImpl::ConstructL()
{
- // Open connection to the file logger server
- TLSLOG_OPEN(KSenHttpChannelLogChannelBase, KSenHttpChannelLogLevel, KSenHttpChannelLogDir, KSenHttpChannelLogFile);
- TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL - Log file opened")));
-
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL()")));
+
// Open the RHTTPSession
- TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("- Opening HTTP/TCP session.")));
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Opening HTTP/TCP session.")));
iSess.OpenL();
// Store the string pool for this HTTP session
iStringPool = iSess.StringPool();
-
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Calling InstallAuthenticationL()")));
// Install this class as the callback for authentication requests
InstallAuthenticationL( iSess );
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Completed InstallAuthenticationL()")));
//Install Proxy Filter
iDeflateFilter = EFalse;
#ifdef EKA2
//#ifndef _DEBUG
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing HTTPProxyFilter for EKA2 build.")));
CHttpFilterProxyInterface::InstallFilterL( iSess );
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPProxyFilter installed for EKA2 build.")));
iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetLanguageTable());
iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetTable());
-
- CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess);
- TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPProxyFilter installed for EKA2 build.");
- TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPAcceptFilter installed for EKA2 build.");
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing HTTPAcceptProxyFilter for EKA2 build.")));
+ //CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess); //There is issue with installing this filter. so disabling it temporarly
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPAcceptProxyFilter installed for EKA2 build.")));
//#else
// LOG_WRITE_L("HTTPProxyFilter is NOT in use with EKA2 debug builds.");
//#endif
#else // __INSTALL_HTTP_PROXY_FILTER__ is not defined by macro in .mmp
- TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPProxyFilter is NOT in use with EKA1.");
- TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPAcceptProxyFilter is NOT in use with EKA1.");
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"HTTPProxyFilter is NOT in use with EKA1.");
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"HTTPAcceptProxyFilter is NOT in use with EKA1.");
#endif // __INSTALL_HTTP_PROXY_FILTER__
iTransObs = CSenHttpEventHandler::NewL(this);//, &iLog);
@@ -162,10 +215,15 @@
new (ELeave) CArrayPtrFlat<CSenTxnState>(KMinimumArrayGranularity);
iBasicConnectionTries = 0;
+
+#ifndef __ENABLE_ALR__
+ IsOCCImplementedSDK();
+#endif
#ifdef _SENDEBUG
ListFilters();
#endif // _SENDEBUG
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() Completed")));
}
// Forces preselected IAP to be used!
@@ -183,10 +241,14 @@
// Use local variable (new RSocketServer each time; handle is given to RHTTPSession via RConnectionInfo..)
// RSocketServ server; // with "anon" (local) socket servers, should we keep array of open ones in case of pending txns?
// SetIapPrefsL(aIapId, iConnection, server);
-
- const TInt result = SetIapPrefsL(aIapId, ETrue, iConnection, iSockServ);
- User::LeaveIfError( result );
-
+#ifndef __ENABLE_ALR__
+ IsOCCImplementedSDK();
+#endif
+ if(aIapId > 0)
+ {
+ const TInt result = SetIapPrefsL(aIapId, ETrue, iConnection, iSockServ);
+ User::LeaveIfError( result );
+ }
}
CSenHttpChannelImpl::~CSenHttpChannelImpl()
@@ -223,137 +285,55 @@
iConnection.Close();
iSockServ.Close();
-
- // Close the log file and the connection to the server.
- TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("Log file closed.")));
- TLSLOG_CLOSE(KSenHttpChannelLogChannelBase);
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::~CSenHttpChannelImpl() Completed");
}
-// This function expects that RConnection has been connected
-// and that RConnection has already been opened!
-/*
-void CSenHttpChannelImpl::SetIapPrefsL(TUint32 aIapId,
- RConnection& aConnection,
- RSocketServ& aSocketServer)
- {
+TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer )
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetIapPrefsL , aIapId (%d)"), aIapId));
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetIapPrefsL , iIapId (%d)"), iIapId));
+
// Check whether IAP ID is not equal with the one that is currently in effect:
- if(iExplicitIapDefined && iIapId == aIapId )
+ if(iExplicitIapDefined || iIapId == aIapId && iIapId > 0)
{
- return; // nothing to do
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id is same as currently in effect");
+ return KErrNone;
}
-
- LOG_WRITEFORMAT((_L8("- SetIapPrefsL: Re-setting IAP ID (%d)"), aIapId));
+ else
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id different with the currently in effect");
+ }
+
// Check if socket server (connection) is already open..
if( iExplicitIapDefined )
{
// Socket server opened once before for some other IAP
- LOG_WRITE_L("- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
aConnection.Stop();
}
else
{
- aConnection.Stop(); // prompted from user
- iSess.DisconnectL();
- iSess.ConnectL();
-
- // Connect to a socket server
- LOG_WRITE_L("- SetIapPrefsL: Connecting to new socket server");
- User::LeaveIfError(aSocketServer.Connect());
-
- // Open new connection
- LOG_WRITE_L("- SetIapPrefsL: Opening new RConnection using the socket server.");
- User::LeaveIfError(aConnection.Open(aSocketServer));
+ if(aConnection.SubSessionHandle())
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
+ aConnection.Stop();
+ }
+ else
+ {
+ // Connect to a socket server
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Connecting to new socket server");
+ User::LeaveIfError( aSocketServer.Connect() );
+
+ // Open new connection
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Opening new RConnection using the socket server.");
+ User::LeaveIfError( aConnection.Open(aSocketServer) );
+ }
}
- // Set the IAP selection preferences (IAP ID, do not prompt)
- TCommDbConnPref pref;
- pref.SetIapId( aIapId );
-
- TCommDbDialogPref dialogPref;
- dialogPref = ECommDbDialogPrefDoNotPrompt;
- pref.SetDialogPreference(dialogPref);
-
- // Start the connection with the new preferences
- LOG_WRITE_L("- SetIapPrefsL: Calling RConnection::Start with new IAP prefs");
- aConnection.Start(pref);
-
- // Get the connection "handle" from the HTTP session
- RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
-
- // Attach socket server
- connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketServ,
- RHTTPSession::GetTable()),
- THTTPHdrVal(aSocketServer.Handle()));
-
- // Attach connection
- TInt connPtr = REINTERPRET_CAST(TInt, &aConnection);
- connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketConnection,
- RHTTPSession::GetTable()),
- THTTPHdrVal(connPtr));
-
- // Remember the IAP id that is being set; there is
- // no direct API to query effective IAP ID from CommsDB.
- iExplicitIapDefined = ETrue;
- iIapId = aIapId;
- }
-*/
-
-
-/*
-void CSenHttpChannelImpl::SetupConnectionWithIapPrefsL( TUint32 aIapId,
- RConnection& aConnection,
- RSocketServ& aSocketServer )
- {
- // Check whether IAP ID is not equal with the one that is currently in effect:
- if(iExplicitIapDefined && iIapId == aIapId )
- {
- return; // nothing to do
- }
-
- LOG_WRITEFORMAT((_L8("- SetIapPrefsL, IAP ID (%d)"), aIapId));
-
- // Check if socket server (connection) is already open..
- if( iExplicitIapDefined )
- {
- // Socket server opened once before for some other IAP
- LOG_WRITE_L("- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
- aConnection.Stop();
- }
- else
- {
- // Connect to a socket server
- LOG_WRITE_L("- SetIapPrefsL: Connecting to new socket server");
- User::LeaveIfError( aSocketServer.Connect() );
-
- // Open new connection
- LOG_WRITE_L("- SetIapPrefsL: Opening new RConnection using the socket server.");
- User::LeaveIfError( aConnection.Open(aSocketServer) );
- }
-
- // Set the IAP selection preferences (IAP ID, do not prompt)
- TCommDbConnPref pref;
- pref.SetIapId( aIapId );
-
- TCommDbDialogPref dialogPref;
- dialogPref = ECommDbDialogPrefDoNotPrompt;
- pref.SetDialogPreference(dialogPref);
-
- // Start the connection with the new preferences
- LOG_WRITE_L("- SetIapPrefsL: Calling RConnection::Start with new IAP prefs");
- aConnection.Start(pref);
- }
-
-
-void CSenHttpChannelImpl::AttachSocketServerAndConnectionWithHttpSession( TUint32 aIapId,
- RConnection& aConnection,
- RSocketServ& aSocketServer )
- {
- if(iExplicitIapDefined && iIapId == aIapId )
- {
- return; // nothing to do
- }
-
+ // Set the IAP selection preferences (IAP ID, do not prompt)
+ TInt retVal = SetID(aIapId, aDialogPref, aConnection, aSocketServer);
+
// Get the connection "handle" from the HTTP session
RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
@@ -366,134 +346,198 @@
TInt connPtr = REINTERPRET_CAST(TInt, &aConnection);
connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketConnection,
RHTTPSession::GetTable()),
- THTTPHdrVal(connPtr));
-
- // Remember the IAP id that is being set, because *at the moment*,
- // there is NO direct API to query effective IAP ID from CommsDB.
- iExplicitIapDefined = ETrue;
- iIapId = aIapId;
- }
-
-
-void CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, RConnection& aConnection, RSocketServ& aSocketServer )
- {
- SetupConnectionWithIapPrefsL( aIapId, aConnection, aSocketServer );
- AttachSocketServerAndConnectionWithHttpSession( aIapId, aConnection, aSocketServer );
- }
-*/
-
-
-TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer )
- {
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KNormalLogLevel, _L8("- SetIapPrefsL, IAP ID (%d)"), aIapId));
-
- // Check whether IAP ID is not equal with the one that is currently in effect:
- if(iExplicitIapDefined && iIapId == aIapId )
- {
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id is same as currently in effect");
- return KErrNone;
- }
- else
- {
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id different with the currently in effect");
- }
-
-
- // Check if socket server (connection) is already open..
- if( iExplicitIapDefined )
- {
- // Socket server opened once before for some other IAP
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
- aConnection.Stop();
- }
- else
- {
- // Connect to a socket server
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Connecting to new socket server");
- User::LeaveIfError( aSocketServer.Connect() );
-
- // Open new connection
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Opening new RConnection using the socket server.");
- User::LeaveIfError( aConnection.Open(aSocketServer) );
- }
-
- // Set the IAP selection preferences (IAP ID, do not prompt)
- /*
- *Single click connectivity feature has been implemented by CSock (RConnection class).
- *According to this client no need to set the IAP ID.
- *Automatically RConnection will use the suitable IAP
- */
-
-
- TCommDbConnPref pref;
- #ifndef __SINGLE_CLICK_CONNECTIVITY_ENABLED__
- pref.SetIapId( aIapId );
- #else
- pref.SetIapId( 0 ); //By default IAP ID is "0". IAP selection will take care by RConnection
- #endif //__SINGLE_CLICK_CONNECTIVITY_ENABLED__
- TCommDbDialogPref dialogPref;
-
- if (aDialogPref)
- {
- dialogPref = ECommDbDialogPrefDoNotPrompt;
- }
- else
- {
- dialogPref = ECommDbDialogPrefPrompt;
- }
- pref.SetDialogPreference(dialogPref);
-
- // Start the connection with the new preferences
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Calling RConnection::Start with new IAP prefs");
-
- TInt retVal =aConnection.Start(pref);
-
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection->Start retVal [%d]"), retVal));
-
- // Get the connection "handle" from the HTTP session
- RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
-
- // Attach socket server
- connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketServ,
- RHTTPSession::GetTable()),
- THTTPHdrVal(aSocketServer.Handle()));
-
- // Attach connection
- TInt connPtr = REINTERPRET_CAST(TInt, &aConnection);
- connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketConnection,
- RHTTPSession::GetTable()),
- THTTPHdrVal(connPtr));
-
- // Remember the IAP id that is being set, because *at the moment*,
- // there is NO direct API to query effective IAP ID from CommsDB.
- if (!retVal)
- {
- #ifdef __SINGLE_CLICK_CONNECTIVITY_ENABLED__
- //Since we are using by default setIapId "0".
- //There won't be any explicitly defined Iap Id
- iExplicitIapDefined = EFalse;
- iIapId = 0;
- #else
- iExplicitIapDefined = ETrue;
- iIapId = aIapId;
- #endif //__SINGLE_CLICK_CONNECTIVITY_ENABLED__
- }
+ THTTPHdrVal(connPtr));
return retVal;
}
+
+TInt CSenHttpChannelImpl::SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP)
+{
+ /*
+ * Single click connectivity feature has been implemented by CSock (RConnection class).
+ * According to this client no need to set the IAP ID.
+ * Automatically RConnection will use the suitable IAP
+ */
+ TInt retVal = KErrNone;
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl called with ID [%d]"), aId));
+
+#ifndef __ENABLE_ALR__
+ if (iOCCenabled == EFalse)
+ {
+#endif
+ if (aSNAP == EFalse)
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- SetIAPID");
+ TCommDbConnPref pref;
+ pref.SetIapId( aId );
+ TCommDbDialogPref dialogPref;
+ if (aDialogPref)
+ {
+ dialogPref = ECommDbDialogPrefDoNotPrompt;
+ }
+ else
+ {
+ dialogPref = ECommDbDialogPrefPrompt;
+ }
+ pref.SetDialogPreference(dialogPref);
+ retVal = aConnection.Start(pref);
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection->Start retVal [%d]"), retVal));
+ }
+ else
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- SetSNAPID");
+ // Set the SNAP selection preferences (SNAP ID)
+ TConnSnapPref pref;
+ pref.SetSnap(aId);
+ // Start the connection with the new preferences
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Calling RConnection::Start with new SNAP prefs");
+ TInt retVal = aConnection.Start(pref);
+ }
+#ifndef __ENABLE_ALR__
+ }
+ else
+ {
+ if (aSNAP == EFalse)
+ {
+ /* If IAP id is zero, it is interpreted as
+ * client's request for not requesting any specific IAP.
+ * Default value is 0.
+ *
+ * If IAP id is set, SNAP id shall be zero.
+ * If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+ * If IAP id is set, Connection selection dialog shall be disabled.
+ * If IAP id is set, bearer set shall be EExtendedConnBearerUnknown.
+ * If IAP id is set, forced roaming is disabled automatically.
+ * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+ * selection dialog shall be enabled.
+ */
+
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC with IAP Settings");
+ TConnPrefList prefList;
+ TExtendedConnPref extPrefs;
+ //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+ //TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC Silent Connection");
+ //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+ if(aId != 0)
+ {
+ extPrefs.SetIapId(aId);
+ extPrefs.SetSnapId(0);
+ }
+ else
+ {
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+ extPrefs.SetConnSelectionDialog(ETrue);
+ }
+ prefList.AppendL(&extPrefs);
+ retVal = aConnection.Start(prefList);
+ if(retVal == KErrNone)
+ {
+ if(aId == 0)
+ {
+ aConnection.GetIntSetting( _L("IAP\\Id"), iIapId);
+ TName name;
+ retVal = aConnection.Name(name);
+ if(retVal == KErrNone)
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP Name [%S]"), &name));
+ }
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("GetIntSetting returned IAP [%d]"), iIapId));
+ }
+ else
+ {
+ iIapId = aId;
+ }
+ }
+ else
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP ->Start retVal [%d]"), retVal));
+ }
+ }
+ else
+ {
+ /**
+ * Sets SNAP id. If SNAP id is zero, it is interpreted as
+ * client's request for not requesting any specific SNAP.
+ * Default value is 0.
+ *
+ * If SNAP id is set, IAP id shall be zero.
+ * If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+ * If SNAP id is set, Connection selection dialog shall be disabled.
+ * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+ * selection dialog shall be enabled.
+ */
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC with SNAP Settings");
+ TConnPrefList prefList;
+ TExtendedConnPref extPrefs;
+ //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+ //TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC Silent Connection");
+ //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+ if(aId == 0)
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting SnapPurpose Internet");
+ if(aDialogPref) //If it fails because of unavailibility of access points
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Fails because of unavailibility of access points");
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+ extPrefs.SetConnSelectionDialog(ETrue);
+ }
+ else
+ {
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+ //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ }
+ }
+ else
+ {
+ extPrefs.SetSnapId(aId);
+ extPrefs.SetIapId(0);
+ extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+ extPrefs.SetConnSelectionDialog(EFalse);
+ }
+ prefList.AppendL(&extPrefs);
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "SetID: RConnection Start");
+ retVal = aConnection.Start(prefList);
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection Start retval[%d]"), retVal));
+ if(retVal == KErrNone)
+ {
+ aConnection.GetIntSetting( _L("IAP\\Id"), iIapId);
+ TName name;
+ retVal = aConnection.Name(name);
+ if(retVal == KErrNone)
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP Name [%S]"), &name));
+ }
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("GetIntSetting returned IAP [%d]"), iIapId));
+ }
+ else
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("SNAP ->Start retVal [%d]"), retVal));
+ }
+ }
+ }
+#endif
+ if (!retVal && !aSNAP)
+ {
+ iExplicitIapDefined = ETrue;
+ }
+ return retVal;
+}
+
TInt CSenHttpChannelImpl::SetSnapPrefsL( TUint32 aSnapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer )
{
TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- CSenHttpChannelImpl::SetSnapPrefsL, SNAP ID (%d)"), aSnapId));
// Check whether SNAP ID is not equal with the one that is currently in effect:
- if(iExplicitIapDefined && iSnapId == aSnapId )
+ if(iExplicitIapDefined && iSnapId == aSnapId)
{
TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is same as currently in effect");
return KErrNone;
}
- else
- {
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is different with currently in effect");
- }
-
+ else
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is different with currently in effect");
+ }
+
// Check if socket server (connection) is already open..
if( iExplicitIapDefined )
{
@@ -503,22 +547,27 @@
}
else
{
- // Connect to a socket server
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Connecting to new socket server");
- User::LeaveIfError( aSocketServer.Connect() );
-
- // Open new connection
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Opening new RConnection using the socket server.");
- User::LeaveIfError( aConnection.Open(aSocketServer) );
+ if(aConnection.SubSessionHandle())
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
+ aConnection.Stop();
+ }
+ else
+ {
+ // Connect to a socket server
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Connecting to new socket server");
+ User::LeaveIfError( aSocketServer.Connect() );
+
+ // Open new connection
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Opening new RConnection using the socket server.");
+ User::LeaveIfError( aConnection.Open(aSocketServer) );
+ }
}
- // Set the SNAP selection preferences (SNAP ID)
- TConnSnapPref pref;
- pref.SetSnap(aSnapId);
+
+ // Set the SNAP selection preferences (SNAP ID, do not prompt)
+ TInt retVal = SetID(aSnapId, aDialogPref, aConnection, aSocketServer, ETrue);
- // Start the connection with the new preferences
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Calling RConnection::Start with new SNAP prefs");
- TInt retVal = aConnection.Start(pref);
TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetSnapPrefsL, RConnection::Start returned: (%d)"), retVal));
// Get the connection "handle" from the HTTP session
@@ -539,7 +588,7 @@
// there is NO direct API to query effective SNAP ID from CommsDB.
if (!retVal)
{
- iExplicitIapDefined = ETrue;
+ //iExplicitIapDefined = ETrue;
iSnapId = aSnapId;
}
return retVal;
@@ -669,42 +718,64 @@
RStringF method;
TPtrC8 deflate;
// Set IAP preferences, if such exist in properties (and not already in effect):
- TUint32 iapId(KErrNone);
- TBool doNotPrompt(ETrue);
+ TUint32 id(KErrNone);
+ TBool prompt(ETrue);
- TInt retVal = aProps.IAPDialogL( doNotPrompt );
+ TInt retVal = aProps.IAPDialogL( prompt );
if ( retVal != KErrNone )
{
// by default, do not prompt (even if property does not exist!)
// => only if property is set, and has value "FALSE", show PROMPT
- doNotPrompt = ETrue;
+ prompt = ETrue;
}
-
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL - iIapId [%d]"), iIapId));
+#ifndef __ENABLE_ALR__
+ TInt propRetVal = aProps.IapIdL(id);
// Independent of dialog preference (property's existance), if IAP was predefined, it must be set
- if(((aProps.IapIdL(iapId)) == KErrNone))
+ if(propRetVal == KErrNone)
{
- retVal = SetIapPrefsL(iapId, doNotPrompt, iConnection, iSockServ);
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL SetIapPrefs - id [%d]"), id));
+ retVal = SetIapPrefsL(id, prompt, iConnection, iSockServ);
}
- else if(((aProps.SnapIdL(iapId)) == KErrNone))
+ else if(iIapId > 0)
{
- retVal = SetSnapPrefsL(iapId, doNotPrompt, iConnection, iSockServ);
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL SetIapPrefs - iIapId [%d]"), iIapId));
+ retVal = SetIapPrefsL(iIapId, prompt, iConnection, iSockServ);
+ }
+ else if(((aProps.SnapIdL(id)) == KErrNone))
+ {
+ retVal = SetSnapPrefsL(id, prompt, iConnection, iSockServ);
}
else//to better control RConnection, we have to call Start by ourselve
{
retVal = SetSnapPrefsL(0, EFalse, iConnection, iSockServ);
if(retVal == KErrNotFound)
{
- retVal = SetIapPrefsL(0, EFalse, iConnection, iSockServ);
+ if(iOCCenabled == EFalse)
+ {
+ retVal = SetIapPrefsL(0, EFalse, iConnection, iSockServ);
+ }
+ else
+ {
+ retVal = SetSnapPrefsL(0, prompt, iConnection, iSockServ);
+ }
}
}
TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Set Snap/IAP prefs retVal [%d]"), retVal));
User::LeaveIfError(retVal);
TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::InvokeHttpMethodL After User::Leave");
- TInt ret=iConnection.GetIntSetting(_L("IAP\\Id"), iUsedIapId);
+ //TInt ret= iConnection.GetIntSetting(_L("IAP\\Id"), iUsedIapId);
+ iUsedIapId = iIapId;
// Check transport properties
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP/SNAP %d"), id));
+#else
+ retVal = SetIapPrefsL(id, prompt, iConnection, iSockServ);
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP/SNAP %d"), id));
+ iUsedIapId = id;
+#endif
+
CSenLayeredHttpTransportProperties::TSenHttpMethod httpMethod;
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP %d"), iapId));
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("DONT PROMPT %d"), doNotPrompt));
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("PROMPT %d"), prompt));
TInt retValHttpMethod = aProps.HttpMethodL(httpMethod);
@@ -1014,11 +1085,13 @@
// It is MANDATORY, that at least one Accept header TOKEN exists:
if ( tokens.Count()==0 )
{
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::AddRequestHeadersL Default Token")));
TPtrC8* pDefaultToken = new (ELeave) TPtrC8( KSenHttpChannelAcceptHeaderDefault );
TInt error = tokens.Append( pDefaultToken );
if ( error )
{
delete pDefaultToken;
+ pDefaultToken = NULL;
}
}
// Http headers
@@ -1050,8 +1123,7 @@
}
TPtrC8 value = property->Value();
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- Adding HTTP HEADER, name: (%S), value: (%S)"),
- &name, &value));
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- Adding HTTP HEADER, name: (%S), value: (%S)"), &name, &value));
// Open stringpool strings
RStringF headerName = iStringPool.OpenFStringL(name);
@@ -1064,8 +1136,7 @@
// Check if the header field value already exists
TBool fieldValueExists = EFalse;
TInt fieldCount = aHeaders.FieldPartsL(headerName);
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S > field count: %d"), &name,
- fieldCount));
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S > field count: %d"), &name, fieldCount));
for(TInt j=0; j<fieldCount; j++)
{
@@ -1087,8 +1158,7 @@
if(!fieldValueExists)
{
aHeaders.SetFieldL(headerName, headerFieldVal);
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S: %S > added"),
- &name, &value));
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S: %S > added"),&name, &value));
}
// Close stringpool strings
@@ -1143,8 +1213,7 @@
{
#ifdef _SENDEBUG
const TDesC8& hValStr = hVal.StrF().DesC();
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Accept: %S"),
- &hValStr));
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Accept: %S"), &hValStr));
#endif // _SENDEBUG
if(hVal == headerFieldVal)
{
@@ -1558,6 +1627,7 @@
void CSenHttpChannelImpl::HandleRunErrorL(RHTTPTransaction aTransaction,
TInt aError)
{
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMaxLogLevel,"CSenHttpChannelImpl::HandleRunErrorL()");
TInt txnId = aTransaction.Id();
TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::HandleRunErrorL( %d ): %d"),txnId, aError));
CSenTxnState* pTxnState = FindTxnState(txnId);
@@ -1568,6 +1638,7 @@
pTxnState->ResponseErrorL(aError);
DeleteTxnState(txnId);
aTransaction.Close();
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMaxLogLevel,"CSenHttpChannelImpl::HandleRunErrorL() Completed");
}
void CSenHttpChannelImpl::HandleRedirectRequiresConfirmationL(
@@ -1875,19 +1946,25 @@
TBool CSenHttpChannelImpl::EffectiveIapId( TUint32 &aIapId )
{
- TInt handle = iConnection.SubSessionHandle();
+ /*
+ TInt handle = iConnection.SubSessionHandle();
if (handle>0)
- {
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): Current RConnection's subsession handle(%d)"), handle ));
TUint connEnum(0);
TInt err = iConnection.EnumerateConnections(connEnum);
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId - EnumerateConnections retVal [%d]"), err ));
if (!err && !connEnum)
{
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::EffectiveIapId returns");
return EFalse;
}
- }
-
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): Current RConnection's subsession handle(%d)"), iIapId ));
-#ifdef _SENDEBUG
+ }
+ else
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," -> RConnection has not been initialized.");
+ }
+ */
if( iExplicitIapDefined )
{
TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8(" - IAP ID is known: %d"), iIapId ));
@@ -1896,31 +1973,26 @@
{
TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," - IAP ID is not known.");
}
-
- if( handle < KErrNone )
- {
- TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," -> RConnection has not been initialized.");
- }
-#endif // _SENDEBUG
-
- if( handle && !iExplicitIapDefined )
- {
+
+ if(/* handle && */!iExplicitIapDefined )
+ {
// Eventhough IAP was not explicitely set (through Serene API), this
// code can check what IAP end-user provided via IAP selection dialog:
TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::EffectiveIapId: about to call RConnection::GetIntSetting()");
- _LIT( KIapIdKey, "IAP\\Id" );
- iConnection.GetIntSetting( KIapIdKey, iIapId);
- if ( iIapId > 0 )
- {
- TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): end-user provided IAP(%d)"), iIapId ));
- // Treat the end-user selection as "explicit" definition as well(!):
- iExplicitIapDefined = ETrue;
- }
- }
- if( iExplicitIapDefined )
- {
- aIapId = iIapId;
- }
+ //_LIT( KIapIdKey, "IAP\\Id" );
+ //iConnection.GetIntSetting( KIapIdKey, iIapId);
+ if ( iIapId > 0 )
+ {
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("---- GetIntSetting(): retuens IAP(%d)"), iIapId ));
+ // Treat the end-user selection as "explicit" definition as well(!):
+ iExplicitIapDefined = ETrue;
+ }
+ }
+ if( iExplicitIapDefined )
+ {
+ aIapId = iIapId;
+ }
+ TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId() returns(%d)"), iExplicitIapDefined ));
return iExplicitIapDefined;
}
@@ -1941,6 +2013,17 @@
{
return iUsedIapId;
}
+
+void CSenHttpChannelImpl::ResetIapId()
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::ResetIapId()");
+ iIapId = 0; //Reset to Zero in case of errors to enable other IAP
+ }
+
+void CSenHttpChannelImpl::ResetUsedIapId()
+ {
+ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::ResetUsedIapId()");
+ iUsedIapId = 0; //Reset to Zero in case of errors to enable other IAP
+ }
+
// END OF FILE
-
-
--- a/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -26,7 +26,7 @@
// INCLUDE FILES
-#include <SenServiceConnection.h>
+#include "SenServiceConnection.h"
#include "senhttpchanneltransportplugin.h"
#include "senhttpchannelimpl.h"
#include "senhttpsyncrequester.h"
@@ -48,9 +48,9 @@
#include "senservicesession.h"
#include "senlogger.h"
#include "senclientsession.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
@@ -104,7 +104,8 @@
iProperties(NULL),
iConsumerMap(EFalse, ETrue),
iSessionMap(EFalse, EFalse), // iConsumerMap deletes the txnIds (using same "new reserved" TInt here!)
- iStatusCode(0)
+ iStatusCode(0),
+ iIsConnectionFailed(EFalse)
{
}
@@ -115,12 +116,19 @@
iSessionMap.Reset();
delete iHttpChannel;
+ iHttpChannel = NULL;
delete iRequester;
+ iRequester = NULL;
delete iProperties;
+ iProperties = NULL;
delete ipCtx;
ipCtx = NULL;
+ // Close the log file and the connection to the server.
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("SenHttpChannel - Log file closed.")));
+ TLSLOG_CLOSE(KSenHttpChannelLogChannelBase);
+
TLSLOG(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,(_L("Got last data chunk.")));
TLSLOG_CLOSE(KSenHttpChannelObserverLogChannelBase);
}
@@ -132,6 +140,10 @@
TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ConstructL(): log file opened.");
TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ConstructL - Version 2 [2006-05-09]");
+ // Open connection to the file logger server
+ TLSLOG_OPEN(KSenHttpChannelLogChannelBase, KSenHttpChannelLogLevel, KSenHttpChannelLogDir, KSenHttpChannelLogFile);
+ TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("SenHttpChannel - Log file opened")));
+
if( ipCtx )
{
// Attempt to find pre-defined IAP ID from transport context
@@ -452,10 +464,26 @@
// Method to catch async error responses from httpchannel
void CSenHttpChannelTransportPlugin::ResponseErrorL(TInt aRequestId, TInt aErrorCode, HBufC8* apErrorBody,CSenHttpTransportProperties* aHttpProperties)
{
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("CSenHttpChannelTransportPlugin::ResponseErrorL() - aErrorCode [%d]"), aErrorCode));
CleanupStack::PushL(apErrorBody);
- iHttpChannel->DisableTimeOutL(aRequestId);
+ if( (aErrorCode < KErrNone) && (apErrorBody == NULL) || aErrorCode == KErrAbort)
+ {
+ TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResponseErrorL() Set iIsConnectionFailed True");
+ iHttpChannel->ResetIapId();
+ iHttpChannel->ResetUsedIapId();
+ iHttpChannel->SetExplicitIapDefined(EFalse);
+ iIsConnectionFailed = ETrue;
+ TUint32 zeroIap = 0;
+ TBuf8<128> buf;
+ buf.AppendFormat(_L8("%u"), zeroIap);
+ LayeredPropertiesL().SetPropertyL(KIapIdLocalName, buf); //Reset the layered properties in case of wrong IAP
+ }
+ else
+ {
+ iHttpChannel->SetExplicitIapDefined(ETrue);
+ }
+ iHttpChannel->DisableTimeOutL(aRequestId);
#ifdef _SENDEBUG
- TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResponseErrorL:");
TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- Request's txnID: %d"), aRequestId));
if ( apErrorBody )
{
@@ -555,11 +583,12 @@
// ALWAYS HANDLE IAP ID FIRST, SINCE IT *CAN RESET* HTTPCHANNEL!
TUint32 iapId(KErrNone);
-
retVal = LayeredPropertiesL().IapIdL(iapId);
- if(retVal==KErrNone)
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- CSenHttpChannelTransportPlugin::ApplyPropertiesL() - iapId [%d]"), iapId));
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- LayeredPropertiesL() retVal [%d]"), retVal));
+ if(iIsConnectionFailed)
{
- TInt resetPerformed = ResetHttpChannelByIapIdL(iapId);
+ TInt resetPerformed = ResetHttpChannelByIapIdL(0); //Incase of connection error set Iap ID 0
#ifdef _SENDEBUG
if(resetPerformed == KErrNone)
{
@@ -567,6 +596,16 @@
}
#endif // _SENDEBUG
}
+ else if(retVal==KErrNone)
+ {
+ TInt resetPerformed = ResetHttpChannelByIapIdL(iapId);
+#ifdef _SENDEBUG
+ if(resetPerformed == KErrNone)
+ {
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- IAP re-set performed: (%d)"), 0));
+ }
+#endif // _SENDEBUG
+ }
// Handle ProxyHost and ProxyPort
TPtrC8 proxyHost;
@@ -608,6 +647,7 @@
TInt CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL(TUint32 aIapId)
{
+ TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL()");
TUint32 effectiveIapId(KErrNone);
TBool explicitIapIdDefined(EFalse);
if(iHttpChannel)
@@ -616,15 +656,16 @@
}
TInt retVal(KErrNone);
- if(!explicitIapIdDefined || explicitIapIdDefined && effectiveIapId != aIapId)
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- explicitIapIdDefined[%d], effectiveIapId[%d], aIapId[%d]"), explicitIapIdDefined, effectiveIapId, aIapId));
+ if(!explicitIapIdDefined || (explicitIapIdDefined && (effectiveIapId != aIapId) ) || iIsConnectionFailed)
{
TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResetHttpChannel():");
-
+ iIsConnectionFailed = EFalse;
delete iHttpChannel;
iHttpChannel = NULL;
delete iRequester;
iRequester = NULL;
- TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- New IAP ID: %d"), aIapId));
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- New IAP ID: %d"), aIapId));
CSenHttpChannel* pHttpChannel = CSenHttpChannelImpl::NewL(iServiceManager, aIapId);
CleanupStack::PushL(pHttpChannel);
@@ -640,6 +681,7 @@
{
retVal = KErrAlreadyExists;
}
+ TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL() - returns [%d]"), retVal));
return retVal;
}
--- a/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -90,7 +90,7 @@
{
delete iContentType;
delete iContent;
- if (!isStopped)
+ if (!isStopped && iSchedulerWait.IsStarted())
{
iSchedulerWait.AsyncStop();
}
@@ -104,7 +104,10 @@
if (!isStopped)
{
iStatusCode = KErrTimedOut;
- iSchedulerWait.AsyncStop();
+ if (iSchedulerWait.IsStarted())
+ {
+ iSchedulerWait.AsyncStop();
+ }
}
isStopped = ETrue;
}
@@ -112,8 +115,11 @@
{
if (!isStopped)
{
- iStatusCode = aError;
- iSchedulerWait.AsyncStop();
+ iStatusCode = aError;
+ if (iSchedulerWait.IsStarted())
+ {
+ iSchedulerWait.AsyncStop();
+ }
}
isStopped = ETrue;
return aError;
@@ -182,7 +188,7 @@
{
iContent = apContent; // transfers ownership of content into _this_ class
iContentType = ((HBufC8*)aContentType)->AllocL();
- if (!isStopped)
+ if (!isStopped && iSchedulerWait.IsStarted())
{
iSchedulerWait.AsyncStop();
}
--- a/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -163,10 +163,10 @@
TInt CSenTxnState::Cancel()
{
- if (iTimeOut)
- iTimeOut->Cancel();
- ipTransaction.Cancel();
- return KErrNone;
+ if (iTimeOut)
+ iTimeOut->Cancel();
+ ipTransaction.Cancel();
+ return KErrNone;
}
void CSenTxnState::SetSession(RHTTPSession aSession)
{
--- a/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -83,7 +83,8 @@
TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"..calling IdentityManager.ReloadSenSecurityMechanismsL");
iOwner.ReloadSenSecurityMechanismsL();
iEcomSession.NotifyOnChange(iStatus);
- SetActive();
+ if(!IsActive())
+ SetActive();
}
}
TInt CSenSenSecurityMechanismObserver::RunError(TInt /* aError */)
@@ -100,7 +101,8 @@
void CSenSenSecurityMechanismObserver::Start()
{
- SetActive();
+ if(!IsActive())
+ SetActive();
iEcomSession.NotifyOnChange(iStatus);
}
--- a/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -249,7 +249,8 @@
if(!pRequest->IsActive())
{
TLSLOG_L(KSenLocalTransportLogChannelBase,KNormalLogLevel,"- Activating request / async call to the provider.");
- pRequest->SetActive();
+ if(!pRequest->IsActive())
+ pRequest->SetActive();
}
pRequest->iStatus = KRequestPending;
TRequestStatus* status = &pRequest->iStatus;
@@ -426,7 +427,8 @@
}
iStatus = KRequestPending;
- SetActive();
+ if(!IsActive())
+ SetActive();
}
const TThreadId CSenLocalRequest::OwnerThreadId() const
--- a/webservices/wslogger/group/senlogger.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wslogger/group/senlogger.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -56,7 +56,6 @@
SYSTEMINCLUDE ../../inc
MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
LIBRARY euser.lib
LIBRARY flogger.lib
--- a/webservices/wslogger/src/senlogger.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wslogger/src/senlogger.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -25,10 +25,8 @@
#include "senlogger.h"
-//#include <flogger.h>
#include <f32file.h>
#include <s32file.h>
-#include <versit.h>
namespace
{
@@ -49,7 +47,6 @@
EXPORT_C TInt CSenLogger::CreateL(TInt aChannel, TInt aLevel, const TDesC& aLogDir, const TDesC& aLogFileName, TFileLoggingMode aMode)
{
TInt index(KErrNotFound);
- // CSenLogger* pSenLogger = (CSenLogger*)Dll::Tls();
CSenLogger* pSenLogger = NULL;
TWsTls* tls = (TWsTls*)Dll::Tls();
if( !tls )
@@ -65,12 +62,11 @@
pSenLogger = new (ELeave) CSenLogger();
if ( pSenLogger )
{
- // Dll::SetTls(pSenLogger);
tls->iLogger = pSenLogger;
pSenLogger->iCount = 0;
//reading the configuration file for the logging levels!!!
- /*the file has the following format
+ /*the file has the following format (IN ANSI)
* ==============================================================================
* LogChannel LogLevel
1000 0
@@ -92,74 +88,56 @@
RFs fs;
res=fs.Connect();
if(res==KErrNone)
+ {
+ RFileReadStream readStream;
+ res=readStream.Open(fs, KPath, EFileRead|EFileStreamText);
+ if(res == KErrNone)
{
-
- RFileReadStream readStream;
- res=readStream.Open(fs,KPath,EFileRead|EFileStreamText);
- if(res==KErrNone)
- {
- TInt error;
- TBool result;
- TInt retVal;
-
- CLineReader *readLine = CLineReader::NewL(readStream);
- CleanupStack::PushL(readLine);
-
- do
- {
- result=readLine->ReadLineL(0,error);
-
- if(result==CLineReader::ELineHasContent)
- {
-
- TInt *key = new (ELeave) TInt;
-
-
- TLex8 lexBuf(readLine->iBufPtr);
- retVal = lexBuf.Val(*key);
-
- if(retVal!=0)
- {
- delete key;
-
- continue;
- }
- else
- {
- TInt *value = new (ELeave) TInt;
-
-
- lexBuf.SkipSpace();
- retVal=lexBuf.Val(*value);
- if(retVal==0)
- {
- retVal = pSenLogger->iMap.Append(key,value);
- if(retVal != KErrNone)
- {
- delete key;
- delete value;
-
- }
-
- }
- else
- {
- delete key;
- delete value;
-
- }
-
- }
- }
-
- }while(error!=KErrEof);
-
- CleanupStack::PopAndDestroy(readLine);
- readStream.Close();
- }
-
- fs.Close();
- }
+ TInt error;
+ TInt retVal;
+ do
+ {
+ TBuf8<128> readLineBuf;
+ TRAP(error, readStream.ReadL(readLineBuf, (TChar)'\n'));
+ if(error == KErrNone)
+ {
+ TInt32 length(0);
+ length = readLineBuf.Length() ;
+ TInt *key = new (ELeave) TInt;
+ TLex8 lexBuf(readLineBuf);
+ retVal = lexBuf.Val(*key);
+
+ if(retVal!=0)
+ {
+ delete key;
+ continue;
+ }
+ else
+ {
+ TInt *value = new (ELeave) TInt;
+ lexBuf.SkipSpace();
+ retVal=lexBuf.Val(*value);
+ if(retVal==0)
+ {
+ retVal = pSenLogger->iMap.Append(key,value);
+ if(retVal != KErrNone)
+ {
+ delete key;
+ delete value;
+ }
+ }
+ else
+ {
+ delete key;
+ delete value;
+ }
+ }
+ }
+ }while(error == KErrNone);
+ readStream.Close();
+ }
+ fs.Close();
+ }
}
else
{
--- a/webservices/wsmanager/src/rsenservicemanager.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmanager/src/rsenservicemanager.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -272,7 +272,7 @@
TInt RSenServiceManager::IdentityProvidersL(CSenChunk& aSenChunk)
{
- TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::IdentityProvidersL");
+ TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::IdentityProvidersL()");
TIpcArgs args;
aSenChunk.ChunkToArgs(args, 0);
@@ -284,7 +284,7 @@
TInt RSenServiceManager::ServiceDescriptionsByPatternL(CSenChunk& aSenChunk)
{
- TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+ TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::ServiceDescriptionsByPatternL()");
TIpcArgs args;
aSenChunk.ChunkToArgs(args, 0);
@@ -296,7 +296,7 @@
TInt RSenServiceManager::CredentialsL(CSenChunk& aSenChunk)
{
- TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+ TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::CredentialsL");
TIpcArgs args;
aSenChunk.ChunkToArgs(args, 0);
@@ -308,7 +308,7 @@
TInt RSenServiceManager::AddCredentialL(CSenChunk& aSenChunk)
{
- TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+ TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::AddCredentialL()");
TIpcArgs args;
aSenChunk.ChunkToArgs(args, 0);
@@ -320,7 +320,7 @@
TInt RSenServiceManager::RemoveCredentialsL(CSenChunk& aSenChunk)
{
- TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+ TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::RemoveCredentialsL()");
TIpcArgs args;
aSenChunk.ChunkToArgs(args, 0);
--- a/webservices/wsmanager/src/senservicemanagerimpl.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmanager/src/senservicemanagerimpl.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -180,6 +180,7 @@
*/
TPtrC CSenServiceManagerImpl::NextChunkNameL() //Codescannerwarnings
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::NextChunkNameL");
if(ipChunkName)
{
iChunkNameNumber++;
@@ -204,7 +205,6 @@
pos = chunkname.Find(KDash);
}
TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KNormalLogLevel , _L("CSenServiceManagerImpl::NextChunkNameL(): %S"), &chunkname));
-
return chunkname;
}
else
@@ -219,6 +219,7 @@
TInt CSenServiceManagerImpl::ServiceDescriptionsL(const TDesC8& aUri,
RServiceDescriptionArray& aList)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList)");
TInt retVal(KErrNone);
TPtrC8 descriptions;
@@ -242,12 +243,14 @@
}
}
CleanupStack::PopAndDestroy(pSenChunk); // Close chunk
+ TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList) returns [%d]"), retVal));
return retVal;
}
TInt CSenServiceManagerImpl::ServiceDescriptionsL(MSenServiceDescription& aSD,
RServiceDescriptionArray& aList)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList)");
TInt retVal(KErrNone);
HBufC8* pPattern = aSD.AsXmlL();
@@ -278,12 +281,13 @@
// In any case, destroy the pattern as XML buffer:
CleanupStack::PopAndDestroy(); // pPattern
-
+ TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList) returns [%d]"), retVal));
return retVal;
}
TInt CSenServiceManagerImpl::RegisterServiceDescriptionL(MSenServiceDescription& aSD)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD)");
// do not register if both endpoint and contract are
// missing
if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0)
@@ -323,7 +327,7 @@
// now register the XML string (descriptor) to WSF Symbian server:
TInt retVal(iConnection.RegisterServiceDescription(ptr));
CleanupStack::PopAndDestroy(); // pAsXml
-
+ TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD) returns [%d]"), retVal));
return retVal;
}
}
@@ -331,6 +335,7 @@
TInt CSenServiceManagerImpl::UnregisterServiceDescriptionL(
MSenServiceDescription& aSD)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD)");
// do not unregister if both endpoint and contract are
// missing
if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0)
@@ -371,6 +376,7 @@
TPtr8 ptr = pAsXml->Des();
TInt retVal(iConnection.UnregisterServiceDescription(ptr));
CleanupStack::PopAndDestroy(); // pAsXml
+ TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD) returns [%d]"), retVal));
return retVal;
}
}
@@ -378,16 +384,20 @@
TInt CSenServiceManagerImpl::RegisterIdentityProviderL(
CSenIdentityProvider& aProvider)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider)");
HBufC8* provider = aProvider.AsXmlL();
TPtr8 ptr = provider->Des();
TInt retVal = iConnection.RegisterIdentityProvider(ptr);
delete provider;
+ provider = NULL;
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider) Completed");
return retVal;
}
TInt CSenServiceManagerImpl::UnregisterIdentityProviderL(
CSenIdentityProvider& aProvider)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterIdentityProviderL(aProvider)");
HBufC8* provider = aProvider.AsXmlL();
TPtr8 ptr = provider->Des();
TInt retVal(iConnection.UnregisterIdentityProvider(ptr));
@@ -398,6 +408,7 @@
TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID,
const TDesC8& aProviderID)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AssociateServiceL(aServiceID, aProviderID)");
if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0)
{
return KErrArgument;
@@ -411,6 +422,7 @@
TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID,
const TDesC8& aProviderID)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::DissociateServiceL(aServiceID, aProviderID)");
if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0)
{
return KErrArgument;
@@ -668,6 +680,7 @@
RCredentialArray& aCredentials,
RCredentialPropertiesArray& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
@@ -685,6 +698,7 @@
RCredentialArray& aCredentials,
RCredentialPropertiesArray& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aIdP, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
TPtrC8 credentials;
@@ -734,6 +748,7 @@
RCredentialArray& aCredentials,
RCredentialPropertiesArray& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aUserName, aPassword, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
TPtrC8 credentials;
@@ -780,6 +795,7 @@
RCredentialArray& aCredentials,
RCredentialPropertiesArray& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
TPtrC8 credentials;
@@ -870,6 +886,7 @@
RCredentialArray& aCredentials,
RCredentialPropertiesArray& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aIdP, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
TPtrC8 credentials;
@@ -916,6 +933,7 @@
RCredentialArray& aCredentials,
RCredentialPropertiesArray& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aUserName, aPassword, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
TPtrC8 credentials;
@@ -963,6 +981,7 @@
const CSenIdentityProvider& aIdP,
const CSenCredential2& aCredential)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials)");
TInt retVal(KErrNone);
if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL)
@@ -1004,6 +1023,7 @@
const CSenIdentityProvider& aIdP,
const CSenCredential2& aCredential)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials)");
CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
pServDesc->SetEndPointL(aEndpoint);
@@ -1019,6 +1039,7 @@
const CSenCredential2& aCredential,
const CSenXmlProperties& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials, aCredentialProperties)");
TInt retVal(KErrNone);
if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL )
@@ -1067,6 +1088,7 @@
const CSenCredential2& aCredential,
const CSenXmlProperties& aCredentialProperties)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials, aCredentialProperties)");
CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
pServDesc->SetEndPointL(aEndpoint);
@@ -1079,10 +1101,12 @@
TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp)");
TInt retVal(KErrNone);
if(&aIdP == NULL)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns KErrArgument");
return KErrArgument;
}
@@ -1104,12 +1128,13 @@
CleanupStack::PopAndDestroy(pIdPAsXml);
+ TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns [%d]"), retVal));
return retVal;
-
}
TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern,
const CSenIdentityProvider& aIdP)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aIdP)");
TInt retVal(KErrNone);
if(&aPattern == NULL || &aIdP == NULL)
@@ -1146,6 +1171,7 @@
const TDesC8& aUserName,
const TDesC8& aPassword)
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aUserName, aPassword)");
CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName);
pIdP->SetUserInfoL(aUserName, aUserName, aPassword);
@@ -1159,6 +1185,7 @@
TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList )
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::IdentityProvidersL(aList)");
TInt retVal(KErrNone);
TPtrC8 descriptions;
@@ -1173,6 +1200,7 @@
if(retVal == KErrNone)
{
retVal = ExtractIdentiyProvidersL(descriptions, aList);
+ TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("-ExtractIdentiyProvidersL returned [%d]"), retVal));
}
}
}
@@ -1182,7 +1210,7 @@
TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs,
RIdentityProviderArray& aList)
{
- TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL");
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL(aIdPs, aList)");
TInt retVal(KErrNotFound);
@@ -1276,10 +1304,15 @@
}
} // END OF: if idp.Length() > 0
+ else
+ {
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL aIdPs(aIdPs, aList) aIdPs = 0 length");
+ }
return retVal;
}
TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID )
{
+ TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::InterfaceByUid(aUID)");
if ( aUID == KSenInterfaceUidInternalServiceManager )
{
TLSLOG_FORMAT(( KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::InterfaceByUid(%d) == KSenInterfaceUidInternalServiceManager" ), aUID.iUid ));
--- a/webservices/wsmessages/src/senatomentry.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/senatomentry.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -27,7 +27,7 @@
#include <badesca.h>
#include <SenDomFragmentBase.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include "senatomentry.h"
--- a/webservices/wsmessages/src/senatomfeed.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/senatomfeed.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -25,7 +25,7 @@
#include <badesca.h>
#include <SenDomFragmentBase.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include "senatomfeed.h"
#include "senatomentry.h"
@@ -113,7 +113,7 @@
//from table
for (TInt aIndex = 0; aIndex < iEntries.Count(); aIndex++ )
{
- const TDesC8& tmp = iEntries[aIndex]->IdTag();//delete this
+ // const TDesC8& tmp = iEntries[aIndex]->IdTag();//delete this
if(aEntryId.Compare(iEntries[aIndex]->IdTag())==0)
{
delete iEntries[aIndex];
--- a/webservices/wsmessages/src/senatommessage.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/senatommessage.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -32,7 +32,7 @@
#include "sendebug.h"
#include "senlogger.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
CSenAtomMessage::CSenAtomMessage()
//:iTitle(NULL), iId(NULL), iUpdated(NULL), iPublished(NULL)
--- a/webservices/wsmessages/src/sensoapenvelope2.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/sensoapenvelope2.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -27,7 +27,7 @@
#include <SenXmlUtils.h>
#include <SenDomFragmentBase.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include "SenSoapEnvelope2.h"
@@ -188,7 +188,8 @@
: ipBodyFragment(NULL),
ipHeaderFragment(NULL),
ipSoapAction(NULL),
- iFault(EFalse)
+ iFault(EFalse),
+ iTransactionId(KErrNotFound)
{
}
--- a/webservices/wsmessages/src/sensoapfault2.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/sensoapfault2.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -95,7 +95,7 @@
#include "SenSoapFault2.h"
#include "SenSoapEnvelope2.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
EXPORT_C CSenSoapFault2* CSenSoapFault2::NewL(
const TDesC8& aNsUri,
--- a/webservices/wsmessages/src/sensoapmessage2.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/sensoapmessage2.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -23,7 +23,7 @@
// INCLUDE FILES
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include <badesca.h>
#include <SenXmlReader.h>
#include <s32mem.h>
--- a/webservices/wsmessages/src/sensoapmessagedom2.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/sensoapmessagedom2.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -27,7 +27,7 @@
#include <SenXmlReader.h>
#include <s32mem.h>
#include <utf.h>
-#include <xmlengbinarycontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
#include "SenWsSecurityHeader2.h"
#include "sensoapmessagedom2.h"
--- a/webservices/wsmessages/src/senwssecurityheader2.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsmessages/src/senwssecurityheader2.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -24,7 +24,7 @@
// INCLUDE FILES
#include <SenIdentityProvider.h>
-#include <xmlengbinarycontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
#include "SenWsSecurityHeader2.h"
#include "sendebug.h"
--- a/webservices/wsnotifierplugins/group/sennotifierplugin.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsnotifierplugins/group/sennotifierplugin.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -118,7 +118,7 @@
SYSTEMINCLUDE ../../inc
SYSTEMINCLUDE /epoc32/include/libc
-SYSTEMINCLUDE /epoc32/include/uikon
+//SYSTEMINCLUDE /epoc32/include/uikon
SYSTEMINCLUDE /epoc32/include/ecom
LIBRARY avkon.lib
--- a/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -348,7 +348,8 @@
iStatus = KRequestPending;
TRequestStatus* status = &iStatus;
- SetActive();
+ if(!IsActive())
+ SetActive();
User::RequestComplete(status, KErrNone);
DOLOG(_L("[ CSenNotPluginDlgImpl::StartL(aBuffer, aReturnVal, aMessage): Done ]"));
--- a/webservices/wsoviplugin/inc/wsovicons.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/inc/wsovicons.h Thu Jul 22 16:44:27 2010 +0100
@@ -164,6 +164,7 @@
_LIT8(KTTL,"TTL");
_LIT8(KTokenCreationTime,"TokenCreationTime");
+ _LIT8(KTokenValidUntilTime,"TokenValidUntil");
_LIT8( KTokenSecret, "TokenSecret");
_LIT8( KToken, "Token");
_LIT8(KOnlySharing, "OnlySharing");
@@ -191,16 +192,18 @@
_LIT8(KTokenCreationResponseLocalName, "tokenCreationResponse");
_LIT8(KTokenSecretLocalName, "tokenSecret");
_LIT8(KTTLLocalName, "ttl");
+ _LIT8(KExpiresLocalName, "expires");
_LIT8(KTokenInfoLocalName,"tokenInfo");
_LIT8(KErrorNode, "error");
_LIT8(KErrorCode, "errorCode");
_LIT8(KErrorText, "errorText");
_LIT8(KErrorCodeInvalidAccessToken, "invalidAccessToken");
_LIT8(KErrorCodeUnauthorized, "notAuthorized");
-
_LIT8(KUserInfoLocalName,"userInfo");
_LIT8(KUserNameLocalName,"username");
-
+ _LIT8( KMobileUsed1, "Mobile number" );
+ _LIT8( KMobileUsed2, "already used today" );
+ _LIT8(KEmailUsed, "You have already a Nokia account associated with this mobile number or email address.");
}
#endif // CONSPLUGIN_H
--- a/webservices/wsoviplugin/inc/wsoviservicesession.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/inc/wsoviservicesession.h Thu Jul 22 16:44:27 2010 +0100
@@ -32,9 +32,9 @@
#include "wsoviplugin.h"
#include "senwebservicesession.h"
#include "wsovisessionconsumer.h"
-#include <xmlengfilecontainer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengelement.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengelement.h>
class CWSOviCredentialObserver;
class CSenHttpTransportProperties;
@@ -50,6 +50,9 @@
_LIT8(KTokenCreationTimeTag, "<TokenCreationTime>");
_LIT8(KTokenCreationTimeEndTag, "</TokenCreationTime>");
_LIT8(KTokenCreationTimeLocalName, "TokenCreationTime");
+ _LIT8(KTokenValidUntilTimeTag, "<ValidUntil>");
+ _LIT8(KTokenValidUntilTimeEndTag, "</ValidUntil>");
+ _LIT8(KTokenValidUntilTimeLocalName, "ValidUntil");
_LIT8(KTTLTag, "<TTL>");
_LIT8(KTTLEndTag, "</TTL>");
_LIT8(KTTLLocalName, "TTL");
--- a/webservices/wsoviplugin/inc/wsovitokencreationresponse.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/inc/wsovitokencreationresponse.h Thu Jul 22 16:44:27 2010 +0100
@@ -74,6 +74,12 @@
TPtrC8 TTL();
/**
+* Getter for validUntil
+* @return validUntil
+*/
+TPtrC8 ValidUntil();
+
+/**
* Getter for username
* @return username
*/
@@ -104,7 +110,7 @@
HBufC8* iTTL;
HBufC8* iUsername;
TBool iIsTokenUpdate;
-
+ HBufC8* iValidUntil;
};
#endif /*WSOVITOKENCREATIONRESPONSE_H_*/
--- a/webservices/wsoviplugin/src/wsovihandlercontext.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsovihandlercontext.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -153,7 +153,10 @@
{
if (aKey == HandlerContextKey::KSIF())
{
- iWSOviPlugin = (CWSOviPlugin*)aValue;
+ if(aValue)
+ {
+ iWSOviPlugin = (CWSOviPlugin*)aValue;
+ }
return KErrNone;
}
else if (aKey == HandlerContextKey::KLogger())
--- a/webservices/wsoviplugin/src/wsovioauthclient.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsovioauthclient.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -40,6 +40,7 @@
#include "wsovitokencreationresponse.h"
#include "sencryptoutils.h"
#include "wsoviutils.h"
+#include <SenDateUtils.h>
namespace
{
@@ -100,7 +101,7 @@
//
CWSOviOAuthClient::~CWSOviOAuthClient()
{
- TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::~CWSOviTrustClient");
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::~CWSOviOAuthClient");
delete iAuthSession;
delete iBody;
}
@@ -530,7 +531,22 @@
else
{
iWSOviServiceSession->SetTrustAnchorL(iIdentityProvider->ProviderID());
- TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::ValidateL - set ctx basing on response");
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::ValidateL - set ctx basing on response");
+
+ TPtrC8 validUntil = responseFragment->ValidUntil();
+ if (validUntil.Length())
+ {
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,validUntil);
+ User::LeaveIfError(iWSOviServiceSession->SessionContext()->Update(WSOviContextKeys::KTokenValidUntilTime,validUntil));
+ }
+ else
+ {
+ TTime tmpValidUntil = Time::MaxTTime();
+ TBuf8<SenDateUtils::KXmlDateTimeMaxLength> pValidUntil;
+ SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil);
+ User::LeaveIfError(iWSOviServiceSession->SessionContext()->Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil));
+ }
+
retVal = iWSOviServiceSession->SessionContext()->SetTokenKeysL(token);
if (retVal)
{
@@ -719,6 +735,10 @@
void CWSOviOAuthClient::CreateBodyL(const TDesC8& aXmlNs, const TDesC8& aUsername, const TDesC8& aPassword, const TDesC8& aCreated)
{
+ if(aPassword == KNullDesC8())
+ {
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviOAuthClient::CreateBodyL() - aPassword == KNullDesC8")));
+ }
delete iBody;
iBody = NULL;
HBufC8* nonce = SenCryptoUtils::GetRandomNonceL();
--- a/webservices/wsoviplugin/src/wsoviplugin.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsoviplugin.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -76,12 +76,13 @@
//
CWSOviPlugin::~CWSOviPlugin()
{
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin()")));
iMsgHandlers.ResetAndDestroy();
iSessionHandlers.ResetAndDestroy();
iHandlerContexts.ResetAndDestroy();
iVersions.Reset();
iIMSI.Close();
- TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin()")));
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin() Completed")));
}
// ---------------------------------------------------------------------------
@@ -90,7 +91,7 @@
//
void CWSOviPlugin::ConstructL()
{
- TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::ConstructL")));
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::ConstructL()")));
BaseConstructL(KFrameworkXMLNS, KFrameworkLocalName);
//load default setup of handlers
@@ -102,6 +103,7 @@
AddHandlerL(KSecurityValue, KNullDesC8, SenHandler::EMessageHandler);
AddHandlerL(KEncoderValue, KNullDesC8, SenHandler::EMessageHandler);
AddHandlerL(KServiceUpdateValue, KNullDesC8, SenHandler::ESessionHandler);
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::ConstructL() Completed")));
}
//========================================================
--- a/webservices/wsoviplugin/src/wsoviregisterhandler.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsoviregisterhandler.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -51,15 +51,18 @@
// Destructor
CWSOviRegisterHandler::~CWSOviRegisterHandler()
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::~CWSOviRegisterHandler()");
}
// Second phase construction.
void CWSOviRegisterHandler::ConstructL()
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::ConstructL()");
}
TInt CWSOviRegisterHandler::InvokeL(MSenSessionContext& aCtx)
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::InvokeL()");
MSenServiceDescription& pServiceDescription = *(MSenServiceDescription*)aCtx.GetSenWSDescriptionL(WSOviContextKeys::KServiceDescription());
const TDesC8* action = aCtx.GetDesC8L(WSOviContextKeys::KRegisterAction());
TInt result(KErrNone);
@@ -148,6 +151,7 @@
TInt CWSOviRegisterHandler::UnregisterServiceDescriptionL(
MSenServiceDescription& aServiceDescription)
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::UnregisterServiceDescriptionL()");
TInt retval(KErrNone);
CWSOviServiceSession *pSession = NULL;
TPtrC8 contract = aServiceDescription.Contract();
@@ -268,13 +272,13 @@
if(aServiceDescription->DescriptionClassType() ==
MSenServiceDescription::EOviOAuthClient)
{
- TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviRegisterHandler::CWSOviRegisterHandler - This ServiceDescription is already an NAUTH Client")));
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviRegisterHandler::UnRegisterAuthClientL - This ServiceDescription is already an NAUTH Client")));
pAuthClient = (CWSOviOAuthClient*)aServiceDescription;
retval = iHandlerContext.GetSenCoreServiceManager()->RemoveServiceDescriptionL(*pAuthClient);
}
else
{
-
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviRegisterHandler::UnRegisterAuthClientL - This ServiceDescription is not NAUTH Client")));
pSession = CWSOviServiceSession::NewLC(*(CSIF*)iHandlerContext.GetAnyL(HandlerContextKey::KSIF()));
retval = pSession->InitializeFromL(*aServiceDescription);
if(retval != KErrNone)
--- a/webservices/wsoviplugin/src/wsoviservicesession.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsoviservicesession.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -30,7 +30,7 @@
#include "sendebug.h"
#include "senwspattern.h"
#include "SenXmlUtils.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include <SenHttpTransportProperties.h>
#include <SenIdentityProvider.h>
#include "wsovicredentialobserver.h"
@@ -63,6 +63,7 @@
CWSOviServiceSession::~CWSOviServiceSession()
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::~CWSOviServiceSession()");
delete iSessionContext;
delete iProviderID;
delete iTrustAnchor;
@@ -90,6 +91,7 @@
void CWSOviServiceSession::ConstructL()
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::ConstructL()");
CSenWebServiceSession::ConstructL();
iTokenObs = CWSOviCredentialObserver::NewL(this,iFramework.Manager().Log());
}
@@ -263,8 +265,9 @@
TPtrC8 thisProviderID = ProviderID();
if(patternProviderID.Length()>0)
{
- if(!(thisProviderID.Length()>0 && patternProviderID == thisProviderID))
+ if( !(thisProviderID.Length()>0 && patternProviderID == thisProviderID) )
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::Matches() - Provider Id not same returning EFalse");
return EFalse;
}
}
@@ -550,12 +553,27 @@
const TDesC8* message = iOutContext->GetDesC8L(WSOviContextKeys::KMessageBody);
if (message)
{
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Request"));
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+ TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMaxLogLevel , *message);
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+
retVal = transport.SubmitL(Endpoint(), *message, *utfTP, aResponse, aConsumer);
}
else
{
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Request"));
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+ TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMaxLogLevel , aMessage);
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+
retVal = transport.SubmitL(Endpoint(), aMessage, *utfTP, aResponse, aConsumer);
- }
+ }
+
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Response"));
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+ TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMaxLogLevel , *aResponse);
+ TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
MSenProperties& prop = transport.PropertiesL();
((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, retVal, aResponse, &prop );
@@ -588,6 +606,7 @@
void CWSOviServiceSession::AdaptEndpointL(TBool aToOrginal)
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL");
TPtrC8 oldEndpoint = Endpoint();
if (aToOrginal)
{
@@ -633,11 +652,16 @@
+oldEndpoint.Length());
TPtr8 ptrNewEp = newEp->Des();
ptrNewEp.Append(oldEndpoint);
- ptrNewEp.Append(suffixEndpoint);
+ TInt retVal = oldEndpoint.Find(suffixEndpoint);
+ if(retVal == KErrNotFound)
+ {
+ ptrNewEp.Append(suffixEndpoint);
+ }
SetEndPointL(*newEp);
CleanupStack::PopAndDestroy(newEp);
}
}
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL Completed");
}
CSenIdentityProvider* CWSOviServiceSession::IdentityProviderFromCoreL(
const TDesC8& aProviderID)
@@ -695,11 +719,12 @@
MSenRemoteServiceConsumer& aConsumer,
MSenProperties* aResponseTransportProperties)
{
+ TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMinLogLevel,"CWSOviServiceSession::SendToConsumerL()");
((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, KErrNone, aMessage, aResponseTransportProperties);
- TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMinLogLevel,"CWSOviServiceSession::ParseMessageL(CSenSoapMessage& )");
iRenewCounter = 0;
iRetryCounter = 0;
- return aConsumer.HandleMessageL( aMessage, aTxnId, aResponseTransportProperties );
+ TInt retVal = aConsumer.HandleMessageL( aMessage, aTxnId, aResponseTransportProperties );
+ return retVal;
}
TInt CWSOviServiceSession::SendErrorToConsumerL( const TInt aErrorCode,
@@ -709,7 +734,7 @@
MSenProperties* aResponseTransportProperties )
{
TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMinLogLevel,"CWSOviServiceSession::SendErrorToConsumerL");
- TLSLOG_FORMAT((KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KNormalLogLevel , _L8("- ErrorCode: %d"), aErrorCode ));
+ TLSLOG_FORMAT((KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel , _L8("- ErrorCode: %d"), aErrorCode ));
((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, aErrorCode, apError, aResponseTransportProperties);
TInt answer = CanHandleErrorL();
if (answer)
@@ -841,6 +866,11 @@
{
User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenCreationTime, pElement->Content()));
}
+ pElement = xmlSdAsElement.Element(WSOviSession::KTokenValidUntilTimeLocalName);
+ if(pElement)
+ {
+ User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenValidUntilTime, pElement->Content()));
+ }
pElement = xmlSdAsElement.Element(WSOviSession::KTTLLocalName);
if(pElement)
{
@@ -877,6 +907,11 @@
{
User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenCreationTime, value));
}
+ retVal = properties.PropertyL(WSOviSession::KTokenValidUntilTimeLocalName, value);
+ if ( retVal == KErrNone )
+ {
+ User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenValidUntilTime, value));
+ }
retVal = properties.PropertyL(WSOviSession::KTTLLocalName, value);
if ( retVal == KErrNone )
{
@@ -914,7 +949,12 @@
if ( pValue )
{
properties.SetPropertyL(WSOviSession::KTokenCreationTimeLocalName(), *pValue);
- }
+ }
+ pValue = iSessionContext->GetDesC8L(WSOviContextKeys::KTokenValidUntilTime);
+ if ( pValue )
+ {
+ properties.SetPropertyL(WSOviSession::KTokenValidUntilTimeLocalName(), *pValue);
+ }
pValue = iSessionContext->GetDesC8L(WSOviContextKeys::KTTL);
if ( pValue )
{
@@ -961,6 +1001,13 @@
aWriteStream.WriteL(*value);
aWriteStream.WriteL(WSOviSession::KTokenCreationTimeEndTag);
}
+ value = iSessionContext->GetDesC8L(WSOviContextKeys::KTokenValidUntilTime);
+ if (value)
+ {
+ aWriteStream.WriteL(WSOviSession::KTokenValidUntilTimeTag);
+ aWriteStream.WriteL(*value);
+ aWriteStream.WriteL(WSOviSession::KTokenValidUntilTimeEndTag);
+ }
value = iSessionContext->GetDesC8L(WSOviContextKeys::KTTL);
if (value)
{
@@ -1157,6 +1204,7 @@
TInt CWSOviServiceSession::ShareTokenWithL( CWSOviServiceSession* aWSOviSessionDst)
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::ShareTokenWithL()");
TInt error(KErrNone);
if ( !HasSecurity() )
{
@@ -1176,22 +1224,27 @@
}
else
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::ShareTokenWithL() returning KErrNotFound");
return KErrNotFound;
}
}
void CWSOviServiceSession::AddCredentialL( const TDesC8& aSecurity, TTime aValidUntil )
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aSecurity, aValidUntil)");
iValidUntil = aValidUntil;
SetSecurityL(aSecurity);
SetStatusL();
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aSecurity, aValidUntil) Completed");
}
void CWSOviServiceSession::AddCredentialL(RSenCredentialPtr aCredentialPtr, TTime aValidUntil)
{
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aCredentialPtr, aValidUntil)");
iValidUntil = aValidUntil;
SetCredentialPtrL(aCredentialPtr); // Share same Credential between multiple Sessions //codescannerwarnings
SetStatusL();
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aCredentialPtr, aValidUntil) Completed");
}
TBool CWSOviServiceSession::AmIHostletSession()
@@ -1358,6 +1411,7 @@
{
iSessionContext->Remove(WSOviContextKeys::KToken);
iSessionContext->Remove(WSOviContextKeys::KTokenCreationTime);
+ iSessionContext->Remove(WSOviContextKeys::KTokenValidUntilTime);
iSessionContext->Remove(WSOviContextKeys::KTTL);
iSessionContext->Remove(WSOviContextKeys::KTokenSecret);
}
--- a/webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -32,6 +32,8 @@
#include <httpstd.h>
#include <SenHttpTransportProperties.h>
#include "senlayeredhttptransportproperties.h"
+#include <SenDateUtils.h>
+
using namespace OAuth;
@@ -139,7 +141,17 @@
{
pCtx.Add(WSOviContextKeys::KServiceSession, *(MSenRemoteServiceSession*)remoteServiceSession);
}
- pCtx.Update(WSOviContextKeys::KReAuthNeeded, ETrue);
+ if( ! errFragment->Text().Compare(WSOviResponse::KEmailUsed()) ||
+ (errFragment->Text().Compare(WSOviResponse::KMobileUsed1)!= KErrNotFound &&
+ errFragment->Text().Compare(WSOviResponse::KMobileUsed2) != KErrNotFound )
+ )
+ {
+ pCtx.Update(WSOviContextKeys::KRetryNeeded, EFalse);
+ }
+ else
+ {
+ pCtx.Update(WSOviContextKeys::KReAuthNeeded, ETrue);
+ }
oviServiceSession->ClearCredentialL();
oviServiceSession->SetStatusL();//in order to compute state
}
@@ -206,6 +218,20 @@
}
else
{
+ TPtrC8 validUntil = responseFragment->ValidUntil();
+ if (validUntil.Length())
+ {
+ TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,validUntil);
+ User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,validUntil));
+ }
+ else
+ {
+ TTime tmpValidUntil = Time::MaxTTime();
+ TBuf8<SenDateUtils::KXmlDateTimeMaxLength> pValidUntil;
+ SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil);
+ User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil));
+ }
+
pCtx.SetTokenKeysL(token);
}
}
--- a/webservices/wsoviplugin/src/wsovisessioncontext.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsovisessioncontext.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -379,6 +379,12 @@
error = aWSOviSessionCtxDst->Update(KTokenCreationTime, *desc);
if (error) return error;
}
+ desc = GetDesC8L(KTokenValidUntilTime);
+ if (desc)
+ {
+ error = aWSOviSessionCtxDst->Update(KTokenValidUntilTime, *desc);
+ if (error) return error;
+ }
desc = GetDesC8L(KTTL);
if (desc)
{
--- a/webservices/wsoviplugin/src/wsovitokencreationresponse.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsoviplugin/src/wsovitokencreationresponse.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -45,8 +45,7 @@
// Second phase construction.
void CWSOviTokenCreationResponse::ConstructL()
{
- CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0),
- KTokenCreationResponseLocalName);
+ CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0), KTokenCreationResponseLocalName);
}
void CWSOviTokenCreationResponse::StartElementL(const TDesC8& /*aNsUri*/,
@@ -78,14 +77,18 @@
{
iState = KStateSave;
}
- else if (aLocalName == KTokenLocalName)
- {
- iState = KStateSave;
- }
- else if (aLocalName == KTTLLocalName)
- {
- iState = KStateSave;
- }
+ else if (aLocalName == KTokenLocalName)
+ {
+ iState = KStateSave;
+ }
+ else if (aLocalName == KTTLLocalName)
+ {
+ iState = KStateSave;
+ }
+ else if (aLocalName == KExpiresLocalName)
+ {
+ iState = KStateSave;
+ }
break;
}
case KStateParsingUserInfo:
@@ -154,6 +157,21 @@
ResetContentL();
iState = KStateParsingTokenInfo;
}
+ else if (aLocalName == KExpiresLocalName)
+ {
+ if(iValidUntil)
+ {
+ delete iValidUntil;
+ iValidUntil = NULL;
+ }
+ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"WSOviTokenCreationResponse::expires parsing");
+ TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("iValidUntil : %S"), &content));
+
+ iValidUntil = content.AllocL();
+
+ ResetContentL();
+ iState = KStateParsingTokenInfo;
+ }
else if ( aLocalName == KUserNameLocalName)
{
if (iUsername)
@@ -202,6 +220,7 @@
delete iTokenSecret;
delete iTTL;
delete iUsername;
+ delete iValidUntil;
}
TPtrC8 CWSOviTokenCreationResponse::Token()
@@ -240,6 +259,18 @@
}
}
+TPtrC8 CWSOviTokenCreationResponse::ValidUntil()
+ {
+ if (iValidUntil)
+ {
+ return *iValidUntil;
+ }
+ else
+ {
+ return KNullDesC8();
+ }
+ }
+
TPtrC8 CWSOviTokenCreationResponse::Username()
{
if (iUsername)
--- a/webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -25,7 +25,7 @@
#include "wsstarmessageutils.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
CSenElement* CWSStarMessageUtils::GetMarkedElementL(CSenElement& aParent,
const TDesC8& aValue, TBool aAttribute)
--- a/webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h Thu Jul 22 16:44:27 2010 +0100
@@ -35,9 +35,9 @@
#include "wsstarplugin.h"
#include "senwebservicesession.h"
#include "wsstarsessionconsumer.h"
-#include <xmlengfilecontainer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengelement.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengelement.h>
#include "sensoapmessagedom2.h"
class CWSStarCredentialObserver;
--- a/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -754,7 +754,7 @@
TInt count = iMsgHandlers.Count();
for(TInt i=0;i<count; i++)
{
- if (iMsgHandlers[i]->Name() == aCue)
+ if( iMsgHandlers[i] && (iMsgHandlers[i]->Name() == aCue) )
{
delete iMsgHandlers[i];
iMsgHandlers.Remove(i);
@@ -764,7 +764,7 @@
count = iSessionHandlers.Count();
for(TInt i=0;i<count; i++)
{
- if (iSessionHandlers[i]->Name() == aCue)
+ if( iSessionHandlers[i] && (iSessionHandlers[i]->Name() == aCue) )
{
delete iSessionHandlers[i];
iSessionHandlers.Remove(i);
@@ -789,13 +789,15 @@
{
CWSStarPolicyHandler* policyHandler = (CWSStarPolicyHandler*)Handler(WSStarConfig::KPolicyValue);
pSessionValidateCtx = CWSStarSessionContext::NewLC(Manager().XMLReader(), &aPattern, policyHandler);
- pSessionValidateCtx->Add(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
+ if(pSessionValidateCtx)
+ pSessionValidateCtx->Add(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
((CWSStarServiceSession*)aRemoteServiceSession)->SetSessionContext(pSessionValidateCtx);
CleanupStack::Pop(pSessionValidateCtx);
}
else
{
- pSessionValidateCtx->Update(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
+ if(pSessionValidateCtx)
+ pSessionValidateCtx->Update(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
}
TInt error(KErrNone);
TRAPD(errorL, error = pSTShandler->InvokeL(*pSessionValidateCtx));
@@ -841,9 +843,7 @@
aErrorMessage = pNotOwnedErrorMsg->AllocL();
}
}
-
-
-
+
if (cberrorL!=KErrNone)
{
TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSStarPlugin::ProcessOutboundValidationL() !!!!leave from validate handler")));
@@ -1051,7 +1051,8 @@
CSenGuidGen* pGuidGenerator = CSenGuidGen::NewLC();
delete iDeviceId;
iDeviceId = NULL;
- iDeviceId = pGuidGenerator->GetRandomGuid8LC();
+ if(pGuidGenerator)
+ iDeviceId = pGuidGenerator->GetRandomGuid8LC();
TPtr8 deviceIdDes = iDeviceId->Des();
deviceIdDes.LowerCase();
CleanupStack::Pop(iDeviceId);
--- a/webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -33,7 +33,7 @@
#include "sencryptoutils.h"
#include "senwspattern.h"
#include "SenXmlUtils.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
#include <SenIdentityProvider.h>
#include "wsstarcredentialobserver.h"
--- a/webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -40,7 +40,7 @@
//#include "Attribute.h"
#endif
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
using namespace Xml;
using namespace SenWSInternalPolicy;
namespace
--- a/webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -46,7 +46,7 @@
#include <SenServiceConnection.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
using namespace WSPolicy;
using namespace SenWSInternalPolicy;
namespace
--- a/webservices/wsstar/wsstarpolicy/src/wspolicy.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsstar/wsstarpolicy/src/wspolicy.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -25,7 +25,7 @@
// INCLUDE FILES
#include "wspolicy.h"
#include <f32file.h>
-#include <xmlengdom.h>
+#include <xml/dom/xmlengdom.h>
#include <SenXmlUtils.h>
#include "senguidgen.h"
#include "SenXmlElement.h"
--- a/webservices/wsutils/group/senutils.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsutils/group/senutils.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -79,10 +79,7 @@
USERINCLUDE ../../wsdescription/inc // removes <SenXmlServiceDescription.h> warning..
USERINCLUDE ../../wsxml/inc //senxmldebug.h
-//SYSTEMINCLUDE ../../wsServiceDescription/inc // removes <SenXmlServiceDescription.h> warning..
-
MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
LIBRARY euser.lib
LIBRARY hash.lib
@@ -90,7 +87,8 @@
LIBRARY efsrv.lib // TVolumeInfo => hostid for CMD5 based UUID (URN) generation
LIBRARY flogger.lib
LIBRARY bafl.lib // RStringbase
-LIBRARY imut.lib // for base64 encoding
+LIBRARY inetprotutil.lib // for base64 encoding
+
// WSF libraries
#ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
LIBRARY SenLogger.lib // for TLS based logging
--- a/webservices/wsutils/src/sencryptoutils.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsutils/src/sencryptoutils.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -22,16 +22,13 @@
-
-
+#include <e32math.h>
+#include <tconvbase64.h>
#include "sencryptoutils.h"
-#include <imcvcodc.h>
#include "senguidgen.h"
-#include <e32math.h>
-#include <SenDomFragment.h>
-#include <SenNameSpace.h>
+#include "SenDomFragment.h"
+#include "SenNameSpace.h"
#include "SenWsSecurityHeader.h"
-//#include "senxmldebug.h"
namespace
{
@@ -90,57 +87,46 @@
{
return NULL;
}
-
- TInt remainder = aData.Length() % KToBase64CoefficientNominative;
- TInt length = aData.Length() * KToBase64CoefficientNumerator;
- length /= KToBase64CoefficientNominative;
- if (remainder)
- {
- length++;
- length += KToBase64CoefficientNominative - remainder;
- }
-
- HBufC8* buffer = HBufC8::NewLC(length);
-
-
- TImCodecB64 base64Codec;
- base64Codec.Initialise();
- TPtr8 des = buffer->Des(); // don't blame me, it's the compiler's fault
- base64Codec.Encode(aData, des);
-
- CleanupStack::Pop(buffer);
+ TInt length = aData.Length();
+ TInt destLen = (length + 1 ) * 2;
+ HBufC8* buffer = HBufC8::NewMaxL(destLen);
+ TInt test = buffer->Des().Length();
+ TPtr8 encodedPtr(buffer->Des());
+ TBase64 base64Codec;
+ TInt error = base64Codec.Encode(aData, encodedPtr);
+ if(error > 1) //There is a problem in encoding always returns 1
+ {
+ delete buffer;
+ buffer = NULL;
+ }
+ else
+ {
+ //Successful encoding
+ }
return buffer;
}
EXPORT_C HBufC8* SenCryptoUtils::DecodeBase64L(const TDesC8& aData)
{
- const TUint8 KBase64Fill = '=';
-
- TInt length = aData.Length();
- if (aData[length-1] == KBase64Fill)
- {
- length--;
- if (aData[length-2] == KBase64Fill)
- {
- length--;
- }
- }
- length *= KToBase64CoefficientNominative;
- length /= KToBase64CoefficientNumerator;
- if (length <= 0)
- {
- return NULL;
- }
-
- HBufC8* buffer = HBufC8::NewLC(length);
-
- TImCodecB64 base64Codec;
- base64Codec.Initialise();
- TPtr8 des = buffer->Des(); // don't blame me, it's the compiler's fault
-
- base64Codec.Decode(aData, des);
-
- CleanupStack::Pop(buffer);
+ TInt data_len = aData.Length();
+ HBufC8* buffer = NULL;
+ if (data_len > 0)
+ {
+ buffer = aData.AllocL();
+ buffer->Des().Zero(); //added
+ TPtr8 des( buffer->Des() );
+ TBase64 base64Codec;
+// if (base64Codec.Decode(aData,des) != EFalse)
+// {
+// //Successful decoding
+// }
+// else
+// {
+// delete buffer;
+// buffer = NULL;
+// }
+ base64Codec.Decode(aData, des);
+ }
return buffer;
}
--- a/webservices/wsutils/src/senpropertieselement.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsutils/src/senpropertieselement.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -332,9 +332,10 @@
{
CSenNamespace* pNamespace = sourceNamespaces[i];
CSenNamespace* pNewNamespace =
- CSenNamespace::NewL(pNamespace->Prefix(),pNamespace->URI());
-
+ CSenNamespace::NewL(pNamespace->Prefix(),pNamespace->URI());
+ CleanupStack::PushL(pNewNamespace);
CSenXmlElement::AddNamespaceL(*pNewNamespace, EFalse);
+ CleanupStack::Pop();
}
}
--- a/webservices/wsutils/src/senxmlproperties.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsutils/src/senxmlproperties.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -339,8 +339,14 @@
CSenXmlProperties::~CSenXmlProperties()
{
- delete ipReader;
- delete ipFragment;
+ if(ipReader)
+ {
+ delete ipReader;
+ }
+ if(ipFragment)
+ {
+ delete ipFragment;
+ }
}
void CSenXmlProperties::BaseConstructL(const TDesC8& aLocalname,
@@ -348,7 +354,7 @@
CSenXmlReader* aParser)
{
ipFragment = CSenPropertiesFragment::NewL(aLocalname);
- if ( aParser && aXml != KNullDesC8 )
+ if ( aParser && &aXml && (aXml != KNullDesC8()) )
{
// Do parsing
ipFragment->ParseWithL(*aParser);
--- a/webservices/wsxml/src/senxmlelement.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/webservices/wsxml/src/senxmlelement.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -1232,13 +1232,14 @@
if (pNamespace == NULL) // does not exist
{
CSenNamespace* pNewNamespace =
- CSenNamespace::NewL(aNewNamespace.Prefix(), aNewNamespace.URI());
-
+ CSenNamespace::NewL(aNewNamespace.Prefix(), aNewNamespace.URI());
+ CleanupStack::PushL(pNewNamespace);
// allocate array if not already reserved
if(!ipNamespaces)
{
ipNamespaces = new (ELeave) RPointerArray<CSenNamespace>;
}
+ CleanupStack::Pop();
ipNamespaces->Append(pNewNamespace);
pNamespace = pNewNamespace;
}
@@ -1254,12 +1255,14 @@
{
if ( aUri.Length() > 0)
{
- pNamespace = CSenNamespace::NewL(aPrefix, aUri);
+ pNamespace = CSenNamespace::NewL(aPrefix, aUri);
+ CleanupStack::PushL(pNamespace);
// allocate array if not already reserved
if(!ipNamespaces)
{
ipNamespaces = new (ELeave) RPointerArray<CSenNamespace>;
}
+ CleanupStack::Pop();
ipNamespaces->Append(pNamespace);
}
}
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_c.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -20,4 +20,4 @@
ATSINTERFACE.EXE -testmodule HostletConnectionBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_HostConn.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_HostConn.txt
\ No newline at end of file
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_z.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -21,4 +21,4 @@
ATSINTERFACE.EXE -testmodule HostletConnectionBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_HostConn.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_HostConn.txt
\ No newline at end of file
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/50_asp_hostconn.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices hostlet"},(0x20015A25),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\HostletConnectionBCTest.dll"-"!:\sys\bin\HostletConnectionBCTest.dll"
-"\Epoc32\winscw\c\testhc_c.bat"-"!:\testHC.bat"
-"\Epoc32\winscw\c\testframework\testframework_hostlet.ini"-"!:\testframework\testframework_hostlet.ini"
\ No newline at end of file
Binary file websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/50_asp_hostconn.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/52_websrv_hostconn.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices hostlet"},(0x20015A25),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\HostletConnectionBCTest.dll"-"!:\sys\bin\HostletConnectionBCTest.dll"
+"\Epoc32\winscw\c\testhc_c.bat"-"!:\testHC.bat"
+"\Epoc32\winscw\c\testframework\testframework_hostlet.ini"-"!:\testframework\testframework_hostlet.ini"
\ No newline at end of file
Binary file websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/52_websrv_hostconn.sis has changed
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -2821,7 +2821,6 @@
// is KSenConnectionStatusReady
LOCAL_ASSERT( ipConsumer->iConnectionStatus == KSenConnectionStatusCreateFailed);
-/*
// Check that NO HandleErrorL callback was received:
LOCAL_ASSERT( ipConsumer->iErrorCode == KErrNone );
--- a/websrv_pub/hostlet_connection_api/tsrc/hostconnTester/group/hostconnTester.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/hostlet_connection_api/tsrc/hostconnTester/group/hostconnTester.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -33,7 +33,6 @@
//USERINCLUDE ../inc
-//SYSTEMINCLUDE /epoc32/include
SYSTEMINCLUDE /Epoc32/include/libc
MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
--- a/websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -44,9 +44,9 @@
#include <SenDateUtils.h>
#include <SenTransportProperties.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
#include <e32base.h> // for CActive
#include <aknnotewrappers.h>
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -70,7 +70,6 @@
LIBRARY eikctl.lib
LIBRARY egul.lib
LIBRARY fbscli.lib
-LIBRARY PBKENG.LIB
LIBRARY cntmodel.lib
LIBRARY aknskins.lib //for skin sbackground
LIBRARY gdi.lib
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_c.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -20,4 +20,4 @@
ATSINTERFACE.EXE -testmodule CSenServiceConnectionBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_ServiceConnection.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_ServiceConnection.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_z.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -21,4 +21,4 @@
ATSINTERFACE.EXE -testmodule CSenServiceConnectionBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_ServiceConnection.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_ServiceConnection.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h Thu Jul 22 16:44:27 2010 +0100
@@ -68,7 +68,7 @@
//MSENFRAGMENT
- CSenElement& AsElement() ;
+// CSenElement& AsElement() ;
CSenElement* ExtractElement() ;
void SetReader(CSenXmlReader& aReader) ;
CSenXmlReader* Reader() ;
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/50_asp_connection.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Connection"},(0x20016BAA),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\CSenServiceConnectionBCTest.dll"-"!:\sys\bin\CSenServiceConnectionBCTest.dll"
-"\Epoc32\winscw\c\testSC_c.bat"-"!:\testSC.bat"
-"\Epoc32\winscw\c\testframework\testframework_connection.ini"-"!:\testframework\testframework_connection.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/50_asp_connection.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/52_websrv_connection.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,37 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Connection"},(0x20016BAA),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\CSenServiceConnectionBCTest.dll"-"!:\sys\bin\CSenServiceConnectionBCTest.dll"
+"\Epoc32\winscw\c\testSC_c.bat"-"!:\testSC.bat"
+"\Epoc32\winscw\c\testframework\testframework_connection.ini"-"!:\testframework\testframework_connection.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/52_websrv_connection.sis has changed
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -176,7 +176,7 @@
}
MSenMessage* CTestConnection::Response()
{
- TInt retval(0);
+ //TInt retval(0);
// TRAP(retval, iConn->Response());
return NULL;
}
@@ -205,13 +205,12 @@
//MSenFragment
-CSenElement& CTestConnection::AsElement()
+/*CSenElement& CTestConnection::AsElement()
{
-
-}
+}*/
CSenElement* CTestConnection::ExtractElement()
{
-
+ return NULL;
}
void CTestConnection::SetReader(CSenXmlReader& aReader)
{
@@ -219,7 +218,7 @@
}
CSenXmlReader* CTestConnection::Reader()
{
-
+ return NULL;
}
void CTestConnection::ParseL(const TDesC8& aBuf)
{
@@ -227,7 +226,7 @@
}
TInt CTestConnection::BuildFrom(const TDesC8& aBuf)
{
-
+ return NULL;
}
void CTestConnection::DelegateParsingL(MSenFragment& aDelegate)
{
@@ -277,17 +276,17 @@
const TDesC8& CTestConnection::LocalName() const
{
-
+ return KNullDesC8();
}
const TDesC8& CTestConnection::NsUri() const
{
-
+ return KNullDesC8();
}
const TDesC8& CTestConnection::NsPrefix() const
{
-
+ return KNullDesC8();
}
void CTestConnection::WriteAsXMLToL(RWriteStream& aWriteStream)
@@ -297,16 +296,16 @@
HBufC* CTestConnection::AsXmlUnicodeL()
{
-
+ return NULL;
}
HBufC8* CTestConnection::AsXmlL()
{
-
+ return NULL;
}
TBool CTestConnection::ConsistsOfL(MSenFragment& aCandidate)
{
-
+ return NULL;
}
//CACTIVE
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -46,9 +46,9 @@
//#include <SenVtcpTransportProperties.h>
#include "testproperty.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-//#include <XmlEngSerializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+//#include <xml/dom/xmlengserializer.h>
#include <e32base.h> // for CActive
#include <aknnotewrappers.h>
@@ -83,11 +83,11 @@
_LIT8(KTestPassword, "012345678901234");
#elif VALIMO_ADDRESSBOOK_SERVICE
// Addressbook service hosted inside Nokia intra by ASP / testing team
- _LIT8(KWSPContract, "urn:nokia:test:addrbook:2004-09");
+// _LIT8(KWSPContract, "urn:nokia:test:addrbook:2004-09");
_LIT8(KAuthServEndpoint, "http://10.21.32.110/tfs/IDPSSO_IDWSF10");
- _LIT8(KASProviderID, "provider01");
- _LIT8(KTestAuthzID, "john");
- _LIT8(KTestPassword, "password");
+// _LIT8(KASProviderID, "provider01");
+// _LIT8(KTestAuthzID, "john");
+// _LIT8(KTestPassword, "password");
#elif SYSOPENDIGIA_ADDRESSBOOK_SERVICE
_LIT8(KWSPContract, "urn:nokia:test:addrbook:2004-09");
_LIT8(KAuthServEndpoint, "http://ys01liw022.partner.yomi.com:9080/tfs/IDPSSO_IDWSF");
@@ -104,8 +104,8 @@
#endif // FN_ADDRESSBOOK_SERVICE
- _LIT8(KASContract, "urn:liberty:as:2004-04");
- _LIT8(KHttpsEndPoint, "https://10.21.32.110/sereneHardCoded/WS_WSI_R9980_001" );
+// _LIT8(KASContract, "urn:liberty:as:2004-04");
+// _LIT8(KHttpsEndPoint, "https://10.21.32.110/sereneHardCoded/WS_WSI_R9980_001" );
_LIT8(KWSIFrameworkID, "WS-I");
_LIT8(KIDWSFFrameworkID, "ID-WSF");
@@ -133,21 +133,21 @@
// ARMv5
_LIT(KIAPName, "Internet");
#endif
- _LIT8(KLoggerFileNameProperty, "HttpLoggerFileName");
-
- _LIT(KFileToRead, "c:\\Logs\\LoggingHttpFilter\\httptrace.xml");
- _LIT8(KFileName, "httptrace.xml");
-
- _LIT8(KHTTPMethodGet, "GET");
- _LIT8(KHTTPMethodPost, "POST");
+// _LIT8(KLoggerFileNameProperty, "HttpLoggerFileName");
+
+// _LIT(KFileToRead, "c:\\Logs\\LoggingHttpFilter\\httptrace.xml");
+// _LIT8(KFileName, "httptrace.xml");
+
+// _LIT8(KHTTPMethodGet, "GET");
+// _LIT8(KHTTPMethodPost, "POST");
// const TBool MultipleSimultanousRHttpSessionsSupported = EFalse;
// If IAP changes all previously sent messages will be canceled.
//_LIT8(KProxyHost, "esprx00.nokia.com");
- _LIT8(KProxyHost, "172.19.160.50"); // IP address to: bsprx01.americas.nokia.com
- const TInt KProxyPort = 8080;
+// _LIT8(KProxyHost, "172.19.160.50"); // IP address to: bsprx01.americas.nokia.com
+// const TInt KProxyPort = 8080;
//MSN Constants :
//---------------
@@ -155,7 +155,7 @@
_LIT8(KPassportPass, "M1nkk1s");
_LIT8(KStsEndpoint, "https://login.live.com/rst2.srf");
- _LIT8(KMSNProxy, "tcp.mws.mobile.live.com");
+// _LIT8(KMSNProxy, "tcp.mws.mobile.live.com");
//_LIT8(KMetadataEndpoint, "http://10.132.11.31/WSStar/secpolicy/secpol.xml");
_LIT8(KMetadataEndpoint, "https://http.mws.mobile.live.com/2006/10/MWP2007_02/SecurityPolicy/Default.aspx");
@@ -597,6 +597,7 @@
CleanupStack::PopAndDestroy(pattern);
CleanupStack::PopAndDestroy(manager);
+ return error;
}
TInt CSenServiceConnectionBCTest::RegisterSTSInvalidPasswordL()
@@ -630,6 +631,7 @@
CleanupStack::PopAndDestroy(pattern);
CleanupStack::PopAndDestroy(manager);
+ return error;
}
TInt CSenServiceConnectionBCTest::UnregisterSTSL()
@@ -663,6 +665,7 @@
CleanupStack::PopAndDestroy(pattern);
CleanupStack::PopAndDestroy(manager);
+ return error;
}
TInt CSenServiceConnectionBCTest::SetPolicyL( CSenXmlServiceDescription* pServDesc,
@@ -677,11 +680,13 @@
if(pValue==KNullDesC8())
{
- clientPolicy->AddElementL(pName);
+ TRAPD(err, clientPolicy->AddElementL(pName));
+ return err;
}
else
{
- clientPolicy->AddElementL(pName).SetContentL(pValue);
+ TRAPD(err1, clientPolicy->AddElementL(pName).SetContentL(pValue));
+ return err1;
}
}
@@ -701,6 +706,7 @@
// create connection
iServiceConnection = CSenServiceConnection::NewL(*this, *pServiceDesc, *this);
CleanupStack::PopAndDestroy(pServiceDesc);
+ return KErrNone;
}
TInt CSenServiceConnectionBCTest::CreateConnectionToMessengerServiceWithoutCallbackL()
@@ -720,6 +726,7 @@
// create connection
iServiceConnection = CSenServiceConnection::NewL(*this, *pServiceDesc);
CleanupStack::PopAndDestroy(pServiceDesc);
+ return KErrNone;
}
TInt CSenServiceConnectionBCTest::AddDeviceOptionsHeader2L(CSenSoapMessage2& aMessage)
@@ -748,6 +755,8 @@
TXmlEngElement child1_3_2 = child1_3.AddNewElementSameNsL(_L8("Version"));
child1_3_2.AddTextL(_L8("NO_Version"));
+
+ return KErrNone;
}
TInt CSenServiceConnectionBCTest::AddApplicationHeader2L(CSenSoapMessage2& aMessage)
@@ -764,12 +773,15 @@
TXmlEngElement child2 = application.AddNewElementSameNsL(_L8("Version"));
child2.AddTextL(_L8("NO_VERSION"));
+
+ return KErrNone;
}
TInt CSenServiceConnectionBCTest::StartActiveScheduler(TInt aNumberOfPendingOps)
{
iNumberOfPendingOps = aNumberOfPendingOps;
CActiveScheduler::Start();
+ return KErrNone;
}
TInt CSenServiceConnectionBCTest::StopActiveScheduler()
@@ -779,6 +791,7 @@
{
CActiveScheduler::Stop();
}
+ return KErrNone;
}
const CSenIdentityProvider* CSenServiceConnectionBCTest::IdentityProviderL() const
@@ -824,8 +837,8 @@
TSenDataTrafficDetails details;
TSenDataTrafficOperations operations;
iServiceConnection->DataTrafficDetails(details,operations);
- TInt BytesSent = details.iTotalBytesSent;
- TInt BytesRecieved = details.iTotalBytesRecieved;
+ //TInt BytesSent = details.iTotalBytesSent;
+ //TInt BytesRecieved = details.iTotalBytesRecieved;
}
StopActiveScheduler();
@@ -1672,7 +1685,10 @@
User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\WS_IPCImpBigRequest"), EFileStream|EFileRead);
-
+ if(retVal != KErrNone)
+ {
+ return retVal;
+ }
CleanupClosePushL(iRFileHandle);
TInt transactionIdOrError = iServiceConnection->SendL(iRFileHandle);
//LOCAL_ASSERT(transactionIdOrError2 > KErrNone);
@@ -1710,7 +1726,11 @@
User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\WS_IPCImpBigRequest"), EFileStream|EFileRead);
-
+ if(retVal != KErrNone)
+ {
+ return retVal;
+ }
+
CleanupClosePushL(iRFileHandle);
HBufC8 *pMsgBuf = NULL;// Buffer to get response
TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf);
@@ -1752,7 +1772,11 @@
User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\testPic9.jpg"), EFileStream|EFileRead);
-
+ if(retVal != KErrNone)
+ {
+ return retVal;
+ }
+
CleanupClosePushL(iRFileHandle);
HBufC8 *pMsgBuf = NULL;// Buffer to get response
TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf);
@@ -1797,7 +1821,7 @@
TInt CSenServiceConnectionBCTest::UT_CSenServiceConnection_SubmitL_RFileL( TTestResult& aResult )
{
SetupL() ;
- TInt retVal(KErrNone);
+ //TInt retVal(KErrNone);
iSenXmlServiceDescription = CSenXmlServiceDescription::NewL();
iSenXmlServiceDescription->SetFrameworkIdL(KIDWSFFrameworkID);
iSenXmlServiceDescription->SetEndPointL(KAddressBookServiceId);
@@ -1812,6 +1836,11 @@
User::LeaveIfError(this->iFsSessionHandle.Connect());//anil
User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
err = iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\Test.txt"), EFileStream|EFileRead);
+ if(err != KErrNone)
+ {
+ return err;
+ }
+
CleanupClosePushL(iRFileHandle);
HBufC8 *pMsgBuf = NULL;
TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf);
@@ -1844,7 +1873,7 @@
TInt CSenServiceConnectionBCTest::UT_CSenServiceConnection_SendL_RFileL( TTestResult& aResult )
{
SetupL() ;
- TInt retVal(KErrNone);
+ //TInt retVal(KErrNone);
iSenXmlServiceDescription = CSenXmlServiceDescription::NewL();
iSenXmlServiceDescription->SetFrameworkIdL(KIDWSFFrameworkID);
iSenXmlServiceDescription->SetEndPointL(KAddressBookServiceId);
@@ -1870,6 +1899,11 @@
User::LeaveIfError(this->iFsSessionHandle.Connect());//anil
User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
err = iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\Test.txt"), EFileStream|EFileRead);
+ if(err != KErrNone)
+ {
+ return err;
+ }
+
CleanupClosePushL(iRFileHandle);
TInt transactionIdOrError = iServiceConnection->SendL(iRFileHandle);
if (transactionIdOrError == KErrNone)
@@ -6546,7 +6580,7 @@
TInt CSenServiceConnectionBCTest::Response( TTestResult& aResult ) {
TInt res;
CTestConnection* pTest = CTestConnection::NewL();
- MSenMessage* pMsg;
+ //MSenMessage* pMsg = NULL;
TRAP(res, pTest->Response());
// CleanupStack::Pop(pTest);
delete pTest;
@@ -6888,7 +6922,7 @@
iLog->Log(_L("CoBrand->start"));
SetupL();
- TInt retVal(0);
+// TInt retVal(0);
iCoBrandingCallbackOption = ETrue;
_LIT8(KFramework, "WS-STAR");
@@ -6933,6 +6967,11 @@
SetPolicyL(pSmSd, KPassportExtensions, KNullDesC8);
iLog->Log(_L("CSenXmlServiceDescription* pSmSd = CSenXmlServiceDescription::NewLC()"));
TInt error = manager->RegisterServiceDescriptionL( *pSmSd);
+ if(error != KErrNone)
+ {
+ return error;
+ }
+
iLog->Log(_L("manager->RegisterServiceDescriptionL( *pSmSd);"));
CSenXmlServiceDescription* pScSd = CSenServicePattern::NewLC();
@@ -7000,7 +7039,7 @@
iHostletConsumerOption = ETrue;
- TInt retVal(KErrNone);
+ //TInt retVal(KErrNone);
_LIT8(KReq,"<ab:Query xmlns:ab=\"urn:nokia:test:addrbook:2004-09\">Some Query</ab:Query>");
_LIT8(KEndPoint, "http://10.21.32.110/sereneHardCoded/WS_CM_001_001");
@@ -7033,12 +7072,14 @@
Teardown();
iLog->Log(_L("HostletConsumer->End"));
+ return ret;
}
void CSenServiceConnectionBCTest::SetConnectionId( TInt aConnectionId )
{
TInt connectonId = 0;
connectonId = aConnectionId;
+ iLog->Log(_L("Connection Id is %d"),connectonId);
}
TInt CSenServiceConnectionBCTest::DataTrafficDetailsL(TTestResult& aResult)
@@ -7048,7 +7089,7 @@
iGetDataTrafficDetails = ETrue;
- TInt retVal(KErrNone);
+ //TInt retVal(KErrNone);
_LIT8(KReq,"<ab:Query xmlns:ab=\"urn:nokia:test:addrbook:2004-09\">Some Query</ab:Query>");
_LIT8(KEndPoint, "http://10.21.32.110/sereneHardCoded/WS_CM_001_001");
@@ -7081,4 +7122,5 @@
Teardown();
iLog->Log(_L("HostletConsumer->End"));
+ return ret;
}
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -52,4 +52,6 @@
}
void CTestConsumer::SetStatus(const TInt aStatus)
{
- }
\ No newline at end of file
+ }
+
+
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -46,4 +46,6 @@
void CTestFileObserver::TransferProgress(TInt aTxnId , TBool aIncoming , const TDesC8& aMessage,
const TDesC8& aCid , TInt aProgress )
{
- }
\ No newline at end of file
+ }
+
+
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -61,4 +61,4 @@
{
return NULL;
}
-
\ No newline at end of file
+
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_c.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -20,4 +20,4 @@
ATSINTERFACE.EXE -testmodule SenUtilsBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_SenUtils.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenUtils.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_z.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -21,4 +21,4 @@
ATSINTERFACE.EXE -testmodule SenUtilsBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_SenUtils.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenUtils.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/50_asp_senutils.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Utils"},(0x20016BAB),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\SenUtilsBCTest.dll"-"!:\sys\bin\SenUtilsBCTest.dll"
-"\Epoc32\winscw\c\testSU_c.bat"-"!:\testSU.bat"
-"\Epoc32\winscw\c\testframework\testframework_senutils.ini"-"!:\testframework\testframework_senutils.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/50_asp_senutils.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/52_websrv_senutils.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Utils"},(0x20016BAB),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenUtilsBCTest.dll"-"!:\sys\bin\SenUtilsBCTest.dll"
+"\Epoc32\winscw\c\testSU_c.bat"-"!:\testSU.bat"
+"\Epoc32\winscw\c\testframework\testframework_senutils.ini"-"!:\testframework\testframework_senutils.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/52_websrv_senutils.sis has changed
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -335,7 +335,7 @@
_LIT8(KBody,"ComarchBody");
TPtrC8 result = env->SetBodyL(KBody);
- _LIT16(KRef2, "ComarchBody");
+// _LIT16(KRef2, "ComarchBody");
TPtrC16 result16(reinterpret_cast<const TUint16*>(result.Ptr()),(result.Size()/2));
RDebug::Print( _L( "WSModTester: body [%S]"),&result16);
/*EUNIT_ASSERT_EQUALS(result, KBody);*/
@@ -586,8 +586,8 @@
{
SetupL();
- _LIT8(KHeaderElementName, "HeaderElement");
- _LIT8(KHeaderContent, "HeaderContent");
+// _LIT8(KHeaderElementName, "HeaderElement");
+// _LIT8(KHeaderContent, "HeaderContent");
CSenSoapEnvelope* pEnvelope = CSenSoapEnvelope::NewL();
@@ -675,14 +675,14 @@
<sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
</S:Body>\
</S:Envelope>");
- _LIT8(KBodyAsString, "\
+/* _LIT8(KBodyAsString, "\
<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sa=\"urn:liberty:sa:2004-04\">\
<sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
-</S:Body>");
+</S:Body>");*/
- _LIT8(KEmptyBodyAsString, "<S:Body/>");
+ //_LIT8(KEmptyBodyAsString, "<S:Body/>");
- _LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
+ // _LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
CSenParser* pParser = CSenParser::NewLC();
CSenSoapEnvelope* pEnvelope = CSenSoapEnvelope::NewL();
pEnvelope->SetReader( *iXmlReader );
@@ -997,14 +997,14 @@
<sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
</S:Body>\
</S:Envelope>");
- _LIT8(KBodyAsString, "\
+/* _LIT8(KBodyAsString, "\
<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sa=\"urn:liberty:sa:2004-04\">\
<sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
</S:Body>");
+*/
+ // _LIT8(KEmptyBodyAsString, "<S:Body/>");
- _LIT8(KEmptyBodyAsString, "<S:Body/>");
-
- _LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
+ //_LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
CSenParser* pParser = CSenParser::NewLC();
CSenSoapMessage* pMessage = CSenSoapMessage::NewL();
pMessage->SetReader( *iXmlReader );
@@ -1615,7 +1615,7 @@
if(err != KErrUnderflow) return err;
//garbage year
- _LIT8(KIn15, "xxxx-02-28T13:20:65Z");
+// _LIT8(KIn15, "xxxx-02-28T13:20:65Z");
//EUNIT_ASSERT_LEAVE
//ASSERT(SenDateUtils::FromXmlDateTimeL(KIn15));
@@ -1980,12 +1980,17 @@
Flag=1;
else
Flag=0;
- if(!( Flag )) KErrArgument;
- CleanupStack::PopAndDestroy(pXmlElement);
+ if(!( Flag ))
+ {
+ CleanupStack::PopAndDestroy(pXmlElement);
+ CleanupStack::PopAndDestroy(pElement);
+ return KErrArgument;
+ }
+ CleanupStack::PopAndDestroy(pXmlElement);
CleanupStack::PopAndDestroy(pElement);
- Teardown();
- return KErrNone;
- }
+ Teardown();
+ return KErrNone;
+}
TInt CSenUtilsBCTest::SenTransportProperties_AsUtf8LL(TTestResult& aResult )
@@ -2021,7 +2026,7 @@
TInt CSenUtilsBCTest::SenTransportProperties_PropertyLL(TTestResult& aResult )
{
SetupL();
- _LIT8(KValue,"Value");
+ //_LIT8(KValue,"Value");
TPtrC8 ValuePtr;
TPtrC8 ValuePtr1;
CSenTransportProperties* pElement= CSenTransportProperties::NewL();
@@ -2617,7 +2622,7 @@
TInt CSenUtilsBCTest::SenTransportProperties_MaxTimeToLiveLL(TTestResult& aResult )
{
TTestResult Result;
- SenTransportProperties_SetMaxTimeToLiveLL( Result);
+ return SenTransportProperties_SetMaxTimeToLiveLL( Result);
}
TInt CSenUtilsBCTest::SenTransportProperties_SetMinTimeToLiveLL(TTestResult& aResult )
@@ -2706,7 +2711,7 @@
TInt CSenUtilsBCTest::SenTransportProperties_CloneL(TTestResult& aResult )
{
SetupL();
- TBool Flag;
+ TBool Flag = 0;
TInt var;
CSenTransportProperties* pElement= CSenTransportProperties::NewL();
CleanupStack::PushL(pElement);
@@ -2714,9 +2719,13 @@
pClone = (CSenTransportProperties*)pElement->Clone(var);
if(pClone != NULL)
Flag = 1;
- if(!(Flag)) return KErrArgument;
-
- delete pClone;
+ if(!(Flag))
+ {
+ delete pClone;
+ CleanupStack::PopAndDestroy(pElement);
+ return KErrArgument;
+ }
+ delete pClone;
CleanupStack::PopAndDestroy(pElement);
Teardown();
@@ -2744,8 +2753,12 @@
if(retVal != EFalse)
Flag = 1;
else
+ {
+ CleanupStack::PopAndDestroy(pElement);
return KErrArgument;
-
+ }
+ //TO resolve RVCT4.0 warning
+ if (Flag);
CleanupStack::PopAndDestroy(pElement);
Teardown();
@@ -2757,20 +2770,24 @@
TInt CSenUtilsBCTest::SenTransportProperties_CloneLL(TTestResult& aResult )
{
SetupL();
- TBool Flag;
+ TBool Flag = 0;
CSenTransportProperties* pElement= CSenTransportProperties::NewL();
CleanupStack::PushL(pElement);
CSenTransportProperties* pClone = NULL;
- pClone = (CSenTransportProperties*)pElement->CloneL();
- if(pClone != NULL)
- Flag = 1;
- if(!(Flag)) return KErrArgument;
-
+ pClone = (CSenTransportProperties*)pElement->CloneL();
+ if(pClone != NULL)
+ Flag = 1;
+ if(!(Flag))
+ {
+ delete pClone;
+ CleanupStack::PopAndDestroy(pElement);
+ return KErrArgument;
+ }
delete pClone;
- CleanupStack::PopAndDestroy(pElement);
+ CleanupStack::PopAndDestroy(pElement);
- Teardown();
- return KErrNone;
+ Teardown();
+ return KErrNone;
}
@@ -2792,7 +2809,7 @@
TInt CSenUtilsBCTest::SenTransportProperties_MinTimeToLiveLL(TTestResult& aResult )
{
TTestResult Result;
- SenTransportProperties_SetMinTimeToLiveLL(Result);
+ return SenTransportProperties_SetMinTimeToLiveLL(Result);
}
TInt CSenUtilsBCTest::SenHttpTransportProperties_NewLL(TTestResult& aResult)
--- a/websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -46,9 +46,9 @@
//#include <SenVtcpTransportProperties.h>
#include "testproperty.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-//#include <XmlEngSerializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+//#include <xml/dom/XmlEngSerializer.h>
#include <e32base.h> // for CActive
#include <aknnotewrappers.h>
--- a/websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -47,9 +47,9 @@
#include <senvtcptransportproperties.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
#include <e32base.h> // for CActive
#include <aknnotewrappers.h>
--- a/websrv_pub/web_service_connection_api/tsrc/senutilsTestCases/group/senutilsTestCases.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_connection_api/tsrc/senutilsTestCases/group/senutilsTestCases.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -55,7 +55,6 @@
//RESOURCE resource_file2
MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include
SYSTEMINCLUDE /epoc32/include/xml
SYSTEMINCLUDE /epoc32/include/libc
Binary file websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/50_ASP_WSDescription.SIS has changed
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/50_ASP_WSDescription.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Description"},(0x10282CAB),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\SenServDescBCTest.dll"-"!:\sys\bin\SenServDescBCTest.dll"
-"\Epoc32\winscw\c\testSD_c.bat"-"!:\testSD.bat"
-"\Epoc32\winscw\c\testframework\testframework_senservdesc.ini"-"!:\testframework\testframework_senservdesc.ini"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/52_websrv_wsdescription.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Description"},(0x10282CAB),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenServDescBCTest.dll"-"!:\sys\bin\SenServDescBCTest.dll"
+"\Epoc32\winscw\c\testSD_c.bat"-"!:\testSD.bat"
+"\Epoc32\winscw\c\testframework\testframework_senservdesc.ini"-"!:\testframework\testframework_senservdesc.ini"
Binary file websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/52_websrv_wsdescription.sis has changed
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_c.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -19,5 +19,5 @@
md e:\BCTest\Results
ATSINTERFACE.EXE -testmodule SenServDescBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSDescription.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSDescription.txt
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_z.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -19,5 +19,5 @@
md e:\BCTest\Results
ATSINTERFACE.EXE -testmodule SenServDescBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSDescription.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSDescription.txt
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -1190,7 +1190,7 @@
idProvider->SetUserInfoL(KText, KNullDesC8, KNullDesC8);
//checking xml
- _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AuthzID>text</AuthzID></IdentityProvider>");
+// _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AuthzID>text</AuthzID></IdentityProvider>");
TPtr16 ptr = ConvertToPtr16LC(*idProvider);
TInt posId(-1);
@@ -1221,7 +1221,7 @@
idProvider->SetUserInfoL(KNullDesC8, KText, KNullDesC8);
//checking xml
- _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AdvisoryAuthnID>text</AdvisoryAuthnID></IdentityProvider>");
+// _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AdvisoryAuthnID>text</AdvisoryAuthnID></IdentityProvider>");
// TL(ConvertToPtr16LC(*idProvider) == KRef);
@@ -1269,7 +1269,7 @@
idProvider->SetUserInfoL(KNullDesC8, KNullDesC8, KText2);
idProvider->SetUserInfoL(KNullDesC8, KNullDesC8, KText);
//checking xml
- _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><Password>text</Password></IdentityProvider>");
+// _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><Password>text</Password></IdentityProvider>");
//TL(ConvertToPtr16LC(*idProvider) == KRef);
//CleanupStack::PopAndDestroy();//Ptr
@@ -1334,7 +1334,7 @@
__ASSERT_ALWAYS_NO_LEAVE(idProvider->SetProviderID(KText2));
__ASSERT_ALWAYS_NO_LEAVE(idProvider->SetProviderID(KText));
//checking xml
- _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ProviderID>text</ProviderID></IdentityProvider>");
+// _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ProviderID>text</ProviderID></IdentityProvider>");
//TL(ConvertToPtr16LC(*idProvider) == KRef);
TPtr16 ptr = ConvertToPtr16LC(*idProvider);
TInt posId(-1);
@@ -1357,7 +1357,7 @@
__ASSERT_ALWAYS_NO_LEAVE(idProvider->SetServiceID(KText2));
__ASSERT_ALWAYS_NO_LEAVE(idProvider->SetServiceID(KText));
//checking xml
- _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ServiceID>text</ServiceID></IdentityProvider>");
+// _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ServiceID>text</ServiceID></IdentityProvider>");
//TL(ConvertToPtr16LC(*idProvider) == KRef);
TPtr16 ptr = ConvertToPtr16LC(*idProvider);
@@ -1791,7 +1791,7 @@
if(!(pattern->AddConsumerIdentityProviderIdL(KText2) == KErrNone))return KErrArgument;
- _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
+// _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
//TL(ConvertToPtr16LC(*pattern) == KRef);
//CleanupStack::PopAndDestroy();//Ptr
@@ -2177,7 +2177,7 @@
if(!(xmlService->AddIdentityProviderIdL(ptr) == KErrNone))return KErrArgument;
- _LIT16(KRef, "<ServiceDescription><ProviderPolicy><IdentityProviderIDs><IdentityProviderID>text</IdentityProviderID><IdentityProviderID>text2</IdentityProviderID></IdentityProviderIDs></ProviderPolicy><ServicePolicy/></ServiceDescription>");
+ //_LIT16(KRef, "<ServiceDescription><ProviderPolicy><IdentityProviderIDs><IdentityProviderID>text</IdentityProviderID><IdentityProviderID>text2</IdentityProviderID></IdentityProviderIDs></ProviderPolicy><ServicePolicy/></ServiceDescription>");
//TL(ConvertToPtr16LC(*xmlService) == KRef);
//CleanupStack::PopAndDestroy();//Ptr
@@ -2356,7 +2356,7 @@
CSenXmlServiceDescription* xmlService = CSenXmlServiceDescription::NewL();
xmlService ->SetContractL(KText);
//checking xml
- _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text</Contract></ServiceDescription>");
+// _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text</Contract></ServiceDescription>");
//TL(ConvertToPtr16LC(*xmlService) == KRef);
TPtr16 ptr = ConvertToPtr16LC(*xmlService);
@@ -2386,7 +2386,7 @@
xmlService ->SetContractL(KText2);
//checking xml
- _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text2</Contract></ServiceDescription>");
+// _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text2</Contract></ServiceDescription>");
//TL(ConvertToPtr16LC(*xmlService) == KRef2);
TL(xmlService->Contract() == KText2);
@@ -2511,7 +2511,7 @@
senFacet->SetValueL(KText2);
if(!(xmlService->SetFacetL(*senFacet) == KErrNone))return KErrArgument;
- _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Facet name=\"text\">text2</Facet></ServiceDescription>");
+// _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Facet name=\"text\">text2</Facet></ServiceDescription>");
//TPtrC16 ptrRef = KRef();
//TL(ConvertToPtr16LC(*xmlService) == ptrRef);
@@ -2621,7 +2621,7 @@
RDebug::Print( _L( "WSModTester: xmlBuffer [%S]"),&ptr);
else
RDebug::Print( _L( "WSModTester: xmlBuffer empty"));
- _LIT8(KRef, "<ServiceDescription><Endpoint>text</Endpoint><Contract>text</Contract><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
+// _LIT8(KRef, "<ServiceDescription><Endpoint>text</Endpoint><Contract>text</Contract><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
/*EUNIT_ASSERT_EQUALS(ptr, KRef);*/
//TL(ptr == KRef);
TInt posId(-1);
@@ -2950,7 +2950,7 @@
xmlService ->SetEndPointL(KText);
//checking xml
- _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text</Endpoint></ServiceDescription>");
+// _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text</Endpoint></ServiceDescription>");
//TL(ConvertToPtr16LC(*xmlService) == KRef);
TL(xmlService->Endpoint() == KText);
@@ -2978,7 +2978,7 @@
xmlService ->SetEndPointL(KText2);
//checking xml
- _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text2</Endpoint></ServiceDescription>");
+// _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text2</Endpoint></ServiceDescription>");
//TL(ConvertToPtr16LC(*xmlService) == KRef2);
TL(xmlService->Endpoint() == KText2);
--- a/websrv_pub/web_service_description_api/tsrc/senservdescTester/group/senservdescTester.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_description_api/tsrc/senservdescTester/group/senservdescTester.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -37,7 +37,6 @@
//TARGETPATH ?target_path
DEFFILE senservdescTester.def
-SYSTEMINCLUDE /epoc32/include
MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
#ifdef SBSV2
USERINCLUDE ../inc
Binary file websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/50_ASP_WSManager.SIS has changed
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/50_ASP_WSManager.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Manager"},(0x10282CAC),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\SenServiceManagerBCTest.dll"-"!:\sys\bin\SenServiceManagerBCTest.dll"
-"\Epoc32\winscw\c\testSM_c.bat"-"!:\testSM.bat"
-"\Epoc32\winscw\c\testframework\testframework_senservicemanager.ini"-"!:\testframework\testframework_senservicemanager.ini"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/52_websrv_wsmanager.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Manager"},(0x10282CAC),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenServiceManagerBCTest.dll"-"!:\sys\bin\SenServiceManagerBCTest.dll"
+"\Epoc32\winscw\c\testSM_c.bat"-"!:\testSM.bat"
+"\Epoc32\winscw\c\testframework\testframework_senservicemanager.ini"-"!:\testframework\testframework_senservicemanager.ini"
Binary file websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/52_websrv_wsmanager.sis has changed
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_c.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -19,4 +19,4 @@
md e:\BCTest\Results
ATSINTERFACE.EXE -testmodule SenServiceManagerBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSManager.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSManager.txt
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_z.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -20,4 +20,4 @@
md e:\BCTest\Results
ATSINTERFACE.EXE -testmodule SenServiceManagerBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSManager.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSManager.txt
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -914,7 +914,7 @@
LOCAL_ASSERT((iServiceManager->AssociateServiceL(KText, KNullDesC8)) == KErrArgument);
LOCAL_ASSERT((iServiceManager->AssociateServiceL(KNullDesC8, KText)) == KErrArgument);
LOCAL_ASSERT((iServiceManager->AssociateServiceL(KNullDesC8, KNullDesC8)) == KErrArgument);
- _LIT8(KPattern, "&<>");
+ //_LIT8(KPattern, "&<>");
iProvider->SetProviderID(KText);
LOCAL_ASSERT((iServiceManager->RegisterIdentityProviderL(*iProvider)) == KErrNone);
@@ -989,9 +989,8 @@
if(err != KErrNone)return err;
LOCAL_ASSERT((iServiceManager->DissociateServiceL(KText, KText)) == KErrNotFound);
- _LIT8(KPattern, "&<>");
-
- Teardown();
+// _LIT8(KPattern, "&<>");
+ Teardown();
return KErrNone;
}
--- a/websrv_pub/web_service_manager_api/tsrc/senservicemanagerTester/group/senservicemanagerTester.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_manager_api/tsrc/senservicemanagerTester/group/senservicemanagerTester.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -56,7 +56,6 @@
SOURCEPATH ../src
#endif // SBSV2
-SYSTEMINCLUDE /epoc32/include
MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
SYSTEMINCLUDE /epoc32/include/libc
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_c.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -20,4 +20,4 @@
ATSINTERFACE.EXE -testmodule NewSoapClassesBCTest
-copy C:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_NewSoapClasses.txt
\ No newline at end of file
+copy C:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_NewSoapClasses.txt
\ No newline at end of file
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_z.bat Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -21,4 +21,4 @@
ATSINTERFACE.EXE -testmodule NewSoapClassesBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_NewSoapClasses.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_NewSoapClasses.txt
\ No newline at end of file
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/50_asp_newsoapclasses.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices SoapClasses"},(0x20015A26),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\NewSoapClassesBCTest.dll"-"!:\sys\bin\NewSoapClassesBCTest.dll"
-"\Epoc32\winscw\c\testNSC_c.bat"-"!:\testNSC.bat"
-"\Epoc32\winscw\c\testframework\testframework_newsoapclasses.ini"-"!:\testframework\testframework_newsoapclasses.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/50_asp_newsoapclasses.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/52_websrv_newsoapclasses.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices SoapClasses"},(0x20015A26),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\NewSoapClassesBCTest.dll"-"!:\sys\bin\NewSoapClassesBCTest.dll"
+"\Epoc32\winscw\c\testNSC_c.bat"-"!:\testNSC.bat"
+"\Epoc32\winscw\c\testframework\testframework_newsoapclasses.ini"-"!:\testframework\testframework_newsoapclasses.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/52_websrv_newsoapclasses.sis has changed
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -376,15 +376,15 @@
HBufC8* pAsXml = pEnvelope->AsXmlL();
CleanupStack::PushL(pAsXml);
- if(!( *pAsXml == KEnvelopeString )) return KErrArgument;
-
- CleanupStack::PopAndDestroy(pAsXml);
-
+ if(!( *pAsXml == KEnvelopeString ))
+ {
+ CleanupStack::PopAndDestroy(pAsXml);
+ return KErrArgument;
+ }
+ CleanupStack::PopAndDestroy(pAsXml);
TInt var = pEnvelope->TxnId();
- TBool Flag;
-
if(var >= 0)
- if(!(Flag)) return KErrArgument;
+ return KErrArgument;
__ASSERT_ALWAYS_NO_LEAVE(delete pEnvelope);
pEnvelope = NULL;
@@ -397,18 +397,21 @@
TInt CNewSoapClassesBCTest::MT_CSenSoapEnvelope2_CloneL( TTestResult& aResult )
{
SetupL();
- TBool Flag;
+ TBool Flag = 0;
CSenSoapEnvelope2* pEnvelope = CSenSoapEnvelope2::NewL();
CleanupStack::PushL(pEnvelope);
CSenSoapEnvelope2* pClone = NULL;
pClone = (CSenSoapEnvelope2*)pEnvelope->CloneL();
if(pClone != NULL)
Flag = 1;
- if(!(Flag)) return KErrArgument;
-
- delete pClone;
+ if(!(Flag))
+ {
+ delete pClone;
CleanupStack::PopAndDestroy(pEnvelope);
-
+ return KErrArgument;
+ }
+ delete pClone;
+ CleanupStack::PopAndDestroy(pEnvelope);
Teardown();
return KErrNone;
}
@@ -574,9 +577,12 @@
HBufC8* pAsXml = pEnvelope->AsXmlL();
CleanupStack::PushL(pAsXml);
- if(!( *pAsXml == KEnvelopeString )) KErrArgument;
- CleanupStack::PopAndDestroy(pAsXml);
-
+ if(!( *pAsXml == KEnvelopeString ))
+ {
+ CleanupStack::PopAndDestroy(pAsXml);
+ return KErrArgument;
+ }
+ CleanupStack::PopAndDestroy(pAsXml);
TXmlEngElement bodyElement2 = document.CreateDocumentElementL(KBodyElementName2());
bodyElement2.AddTextL(KBodyContent2());
pEnvelope->SetBodyL(bodyElement2);
@@ -2304,7 +2310,7 @@
TInt CNewSoapClassesBCTest::MT_CSenSoapMessage2_CloneL( TTestResult& aResult )
{
SetupL();
- TBool Flag;
+ TBool Flag = 0;
CSenSoapMessage2* pSoapMessage = CSenSoapMessage2::NewL();
CleanupStack::PushL(pSoapMessage);
@@ -2312,9 +2318,14 @@
pClone = (CSenSoapMessage2*)pSoapMessage->CloneL();
if(pClone != NULL)
Flag = 1;
- if(!(Flag)) return KErrArgument;
+ if(!(Flag))
+ {
+ delete pClone;
+ CleanupStack::PopAndDestroy(pSoapMessage);
+ return KErrArgument;
+ }
delete pClone;
- CleanupStack::PopAndDestroy(pSoapMessage);
+ CleanupStack::PopAndDestroy(pSoapMessage);
Teardown();
return KErrNone;
}
@@ -3420,7 +3431,7 @@
filetext.Write(_L("CleanupStack::PopAndDestroy(1); "));
- /* // 2) Fault code in Soap 1.2
+ // 2) Fault code in Soap 1.2
// Note: SOAP 1.2 faults are structured differently to SOAP 1.1.
// In particular all fault elements are now namespace _qualified_,
// many have been renamed and fault codes are now hierarchical
@@ -3441,13 +3452,9 @@
CleanupStack::PopAndDestroy(pSoapFault2);
CleanupStack::PopAndDestroy(1); // document2
- *//*
+
Teardown();
filetext.Write(_L("Teardown"));
return KErrNone;
*/
-
-
-
- // End of File
\ No newline at end of file
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -47,11 +47,11 @@
}
MSenMessage::TClass CTestMSenMessage::Type()
{
- EMessageBase;
+ return EMessageBase;
}
MSenMessage::TDirection CTestMSenMessage::Direction()
{
- EOutbound;
+ return EOutbound;
}
TInt CTestMSenMessage::SetContext(MSenMessageContext* apNotOwnedContext)
{
--- a/websrv_pub/web_service_messaging_api/tsrc/newsoapclassesTester/group/newsoapclassesTester.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/web_service_messaging_api/tsrc/newsoapclassesTester/group/newsoapclassesTester.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -35,7 +35,6 @@
//TARGETPATH ?target_path
DEFFILE newsoapclassesTester.def
-SYSTEMINCLUDE /epoc32/include
SYSTEMINCLUDE /epoc32/include/xml
SYSTEMINCLUDE /epoc32/include/libc
APP_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/group/WSTester.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/group/WSTester.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: ?Description
+* Description: Project specification file for wstester
*
*/
@@ -27,7 +27,7 @@
#if defined(EKA2)
CAPABILITY ALL -TCB
/* Remove comments and replace 0x00000000 with correct vendor id */
-// VENDORID 0x00000000
+VENDORID VID_DEFAULT
#endif
//TARGETPATH ?target_path
@@ -56,7 +56,7 @@
LIBRARY SenUtils.lib
LIBRARY efsrv.lib
-LIBRARY imut.lib // base64 enc/dec
+LIBRARY inetprotutil.lib // for base64 encoding
LIBRARY estor.lib
LIBRARY XMLFRAMEWORK.lib
LIBRARY bafl.lib
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/inc/WSTester.h Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/inc/WSTester.h Thu Jul 22 16:44:27 2010 +0100
@@ -24,8 +24,8 @@
#include <StifLogger.h>
#include <TestScripterInternal.h>
#include <StifTestModule.h>
-#include <f32file.h>
-#include <imcvcodc.h> // for base64 codec
+#include <s32file.H>
+#include <tconvbase64.h>
#include <s32strm.h>
//Sen
@@ -484,7 +484,7 @@
//logging
CStifLogger* iLog;
//For decrypting data....
- TImCodecB64 iBase64Codec;
+ TBase64 iBase64Codec;
RFs iFsSession;
TInt iRunCase;
TInt iStarted;
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/51_WebSrv_WSXML.pkg Fri Jun 18 15:01:02 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; Languages
-; none - English only by default
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices XMLExtensions"},(0x10282C8A),1,0,0,TYPE=SA
-[0x101F7961],3,*,*,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\wstester.dll"-"!:\sys\bin\wstester.dll"
-"\Epoc32\winscw\c\TestInit.bat"-"!:\TestInit.bat"
Binary file websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/51_WebSrv_WSXML.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/52_websrv_wsxml.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,35 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices XMLExtensions"},(0x10282C8A),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\wstester.dll"-"!:\sys\bin\wstester.dll"
+"\Epoc32\winscw\c\TestInit.bat"-"!:\TestInit.bat"
Binary file websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/52_websrv_wsxml.sis has changed
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTester.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTester.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -92,7 +92,8 @@
//
void CWSTester::ConstructL()
{
- //__UHEAP_MARK;
+ // __UHEAP_MARK;
+ TestModuleIf().SetBehavior(CTestModuleIf::ETestLeaksHandles);
iLog = CStifLogger::NewL( KWSTesterLogPath,
KWSTesterLogFile,
CStifLogger::ETxt,
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -248,6 +248,11 @@
{
// Test case not passed
iLog->Log(_L("Registering identity provider 1 failed. Error: %d"), error );
+ if(error == -30321)
+ {
+ iWriter.WriteL(_L8("Registering identity provider 1 failed. End-user denies permission."));
+ iWriter.CommitL();
+ }
return error;
}
return KErrNone;
@@ -279,6 +284,11 @@
if (error != KErrNone )
{
iLog->Log(_L("Registering Service Description failed. Error: %d"), error );
+ if(error == -30321)
+ {
+ iWriter.WriteL(_L8("Registering Service Description failed.End-user denies permission"));
+ iWriter.CommitL();
+ }
return error;
}
return KErrNone;
@@ -464,7 +474,7 @@
TInt retVal = iSenServiceConnection->StartTransaction();
- iLog->Log(_L("### _S_StartTransaction -> ended###"));
+ iLog->Log(_L("### _S_StartTransaction -> ended: %d"), retVal);
return retVal;
}
@@ -474,7 +484,7 @@
TInt retVal = iSenServiceConnection->TransactionCompleted();
- iLog->Log(_L("### _S_TransactionCompleted -> ended###"));
+ iLog->Log(_L("### _S_TransactionCompleted -> ended: %d"), retVal);
return retVal;
}
@@ -811,6 +821,13 @@
iStringPool.OpenStringL(KAttribute()),
iStringPool.OpenStringL(KAttributeValue())));
+ if (err != KErrNone)
+ {
+ iLog->Log(_L("Retrieving the attribute failed. Error: %d"), err );
+ CleanupStack::PopAndDestroy();
+ return err;
+ }
+
// make a new array for all attributes including namespace (to be added)
RAttributeArray justAttributes;
@@ -837,6 +854,13 @@
iStringPool.OpenStringL(KAttribute()),
iStringPool.OpenStringL(KAttributeValue())));
+ if (err != KErrNone)
+ {
+ iLog->Log(_L("Retrieving the attribute failed. Error: %d"), err );
+ CleanupStack::PopAndDestroy();
+ return err;
+ }
+
RAttributeArray justAttributes;
justAttributes.Append(justAttribute);
@@ -2105,7 +2129,7 @@
HBufC8* pTestXml = HBufC8::NewLC( xmlDoc.Length() );
pTestXml->Des().Append(xmlDoc);
- CSenElement* newElement;
+ CSenElement* newElement = NULL;
//adding parsed document to SenElement and copy it to iElement
@@ -2255,20 +2279,20 @@
TBuf8<128> name;
name.Append(arg);
- RAttributeArray apAttrs;
+ /*RAttributeArray apAttrs;
HBufC8* newAttr;
- /*TRAPD(r, newAttr = ((CSenBaseElement*)iElement)->AllocAttrValueL(apAttrs, name) );
+ TRAPD(r, newAttr = ((CSenBaseElement*)iElement)->AllocAttrValueL(apAttrs, name) );
if (r != KErrNone) {
iLog->Log(_L("AllocAttrValueL failed. Error: %d"), r );
return r;
- }*/
+ }
if ( newAttr!= NULL ){
delete newAttr;
newAttr = NULL;
- }
+ }*/
iLog->Log(_L("******* _C_AllocAttrValue -> Ended! ********"));
return error;
@@ -2719,6 +2743,7 @@
{
iLog->Log(_L("******* SetStatus -> Started! ********"));
+ iLog->Log(_L("Status: %d"), aStatus);
switch( aStatus )
{
@@ -3005,7 +3030,7 @@
return error;
}
//AsXML "UTF8"
- HBufC8* pBuf;
+ HBufC8* pBuf = NULL;
TRAPD(rAsXml, pBuf = pDom->AsXmlL());
if (rAsXml != KErrNone)
@@ -3017,7 +3042,7 @@
iLog->Log(*pBuf);
LogResultL( *pBuf );
//AsXMLUnicode
- HBufC16* pBuf2;
+ HBufC16* pBuf2 = NULL;
TRAPD(rAsXmlUnicode, pBuf2 = pDom->AsXmlUnicodeL());
if (rAsXmlUnicode != KErrNone)
@@ -3083,7 +3108,7 @@
// close fsSession
CleanupStack::PopAndDestroy();
// Store parsed documed in file
- HBufC8* pBuf;
+ HBufC8* pBuf = NULL;
// Convert document
TRAPD(rAsXml, pBuf = pDom->AsXmlL());
if (rAsXml != KErrNone)
@@ -3253,7 +3278,6 @@
HBufC8* pResult8 = HBufC8::NewLC( source8.Length() );
TPtr8 result8 = pResult8->Des();
- iBase64Codec.Initialise();
iBase64Codec.Decode(source8 , result8);
aMessage = result8;
CleanupStack::Pop(); // pResult8
--- a/websrv_pub/xml_extensions_api/tsrc/senxmlTester/group/senxmlTester.mmp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_extensions_api/tsrc/senxmlTester/group/senxmlTester.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -61,7 +61,6 @@
//RESOURCE resource_file
//RESOURCE resource_file2
-SYSTEMINCLUDE /epoc32/include
SYSTEMINCLUDE /epoc32/include/libc
MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
LIBRARY bafl.lib
--- a/websrv_pub/xml_fragment_api/inc/RSenDocument.h Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_fragment_api/inc/RSenDocument.h Thu Jul 22 16:44:27 2010 +0100
@@ -26,8 +26,8 @@
#ifndef R_SEN_DOCUMENT
#define R_SEN_DOCUMENT
-#include <xmlengdocument.h>
-#include <xmlengdomimplementation.h>
+#include <xml/dom/xmlengdocument.h>
+#include <xml/dom/xmlengdomimplementation.h>
typedef struct
{
--- a/websrv_pub/xml_fragment_api/inc/SenFragmentBase.h Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_fragment_api/inc/SenFragmentBase.h Thu Jul 22 16:44:27 2010 +0100
@@ -32,7 +32,7 @@
#include <xml/contenthandler.h>
#include <RSenDocument.h>
#include <SenParser.h>
-#include <xmlengelement.h>
+#include <xml/dom/xmlengelement.h>
using namespace Xml;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/bwins/senfragmentbctestu.def Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,8 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCTestModuleBase@@XZ @ 1 NONAME ; class CTestModuleBase * LibEntryL(void)
+ ?SetRequirements@@YAHAAPAVCTestModuleParam@@AAK@Z @ 2 NONAME ; int SetRequirements(class CTestModuleParam * &, unsigned long &)
+ ?ContentOf@CTestDomFragmentBase@@QAE?AVTPtrC8@@ABVTDesC8@@@Z @ 3 NONAME ; class TPtrC8 CTestDomFragmentBase::ContentOf(class TDesC8 const &)
+ ?SetContentOfL@CTestDomFragmentBase@@QAE?AVTXmlEngElement@@ABVTDesC8@@0@Z @ 4 NONAME ; class TXmlEngElement CTestDomFragmentBase::SetContentOfL(class TDesC8 const &, class TDesC8 const &)
+ ?SetContentL@CTestFragmentBase@@UAEXABVTDesC8@@@Z @ 5 NONAME ; void CTestFragmentBase::SetContentL(class TDesC8 const &)
+ ?AddContentL@CTestFragmentBase@@UAEXABVTDesC8@@@Z @ 6 NONAME ; void CTestFragmentBase::AddContentL(class TDesC8 const &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/eabi/SenFragmentBCTestu.def Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,18 @@
+EXPORTS
+ _Z9LibEntryLv @ 1 NONAME
+ _Z15SetRequirementsRP16CTestModuleParamRm @ 2 NONAME
+ _ZN17CTestFragmentBase11AddContentLERK6TDesC8 @ 3 NONAME
+ _ZN17CTestFragmentBase11SetContentLERK6TDesC8 @ 4 NONAME
+ _ZN20CTestDomFragmentBase13SetContentOfLERK6TDesC8S2_ @ 5 NONAME
+ _ZN20CTestDomFragmentBase9ContentOfERK6TDesC8 @ 6 NONAME
+ _ZTI13CMainFragment @ 7 NONAME ; #<TI>#
+ _ZTI16CMainDomFragment @ 8 NONAME ; #<TI>#
+ _ZTI17CDelegateFragment @ 9 NONAME ; #<TI>#
+ _ZTI17CTestFragmentBase @ 10 NONAME ; #<TI>#
+ _ZTI20CDelegateDomFragment @ 11 NONAME ; #<TI>#
+ _ZTV13CMainFragment @ 12 NONAME ; #<VT>#
+ _ZTV16CMainDomFragment @ 13 NONAME ; #<VT>#
+ _ZTV17CDelegateFragment @ 14 NONAME ; #<VT>#
+ _ZTV17CTestFragmentBase @ 15 NONAME ; #<VT>#
+ _ZTV20CDelegateDomFragment @ 16 NONAME ; #<VT>#
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/bld.inf Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information file for senfragment
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS MARM so you can ignore this if you just build these
+DEFAULT
+
+PRJ_TESTEXPORTS
+// NOTE: If using ARS requirements all export operations should be done under this.
+// 'abld test export'
+
+PRJ_EXPORTS
+// Specify the source file followed by its destination here
+// copy will be used to copy the source file to its destination
+// If there's no destination then the source file will be copied
+// to the same name in /epoc32/include
+
+testsf_c.bat /epoc32/winscw/c/TestSF_c.bat
+testsf_z.bat /epoc32/winscw/c/TestSF_z.bat
+testframework.ini /epoc32/winscw/c/testframework/testframework_senfragment.ini
+
+/*
+/agnmodel/inc/AGMCOMON.H
+*/
+
+PRJ_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+senfragment.mmp
+
+// End of File
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/senfragment.mmp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Project specification file for senfragment
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET SenFragmentBCTest.dll
+TARGETTYPE dll
+UID 0x1000008D 0x101FB3E7
+
+#if defined(EKA2)
+CAPABILITY ALL -TCB
+/* Remove comments and replace 0x00000000 with correct vendor id */
+VENDORID VID_DEFAULT
+/* Remove comments and replace 0x00000000 with correct secure id */
+// SECUREID 0x00000000
+#endif
+
+//TARGETPATH ?target_path
+DEFFILE senfragmentbctest.def
+
+SOURCEPATH ../src
+SOURCE senfragment.cpp
+SOURCE senfragmentcases.cpp
+SOURCE mainfragment.cpp
+SOURCE delegatefragment.cpp
+SOURCE maindomfragment.cpp
+SOURCE delegatedomfragment.cpp
+SOURCE TestFragment.cpp
+
+
+//RESOURCE resource_file
+//RESOURCE resource_file2
+
+USERINCLUDE ../inc
+USERINCLUDE ../../../../../../webservices/wsfragment/inc
+
+SYSTEMINCLUDE /epoc32/include/libc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY bafl.lib
+LIBRARY charconv.lib
+LIBRARY euser.lib
+LIBRARY estor.lib
+LIBRARY efsrv.lib
+LIBRARY stiftestinterface.lib
+LIBRARY SenFragment.lib
+LIBRARY SenXml.lib
+LIBRARY SenServDesc.lib
+LIBRARY XMLFRAMEWORK.lib
+
+#if !defined( RD_SEN_BACKPORT_CHANGE_FOR_LIBXML2_UIDS_AND_WSSTAR_IMAGE_NAME_PREFIXES )
+ //LIBRARY XmlEngine.lib
+ LIBRARY XmlEngineDOM.lib
+ //LIBRARY XmlEngineUtils.lib
+#else
+ LIBRARY WsStarXmlEngine.lib
+ LIBRARY WsStarXmlEngineDOM.lib
+ LIBRARY WsStarXmlEngineUtils.lib
+#endif
+
+LANG SC
+
+// AIF ?filename// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testframework.ini Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,178 @@
+#
+# This is STIFTestFramework initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+# - Set Test Reporting mode. TestReportMode's possible values are:
+# + 'Summary': Summary of the tested test cases.
+# + 'Environment': Hardware and software info.
+# + 'TestCases': Test case report.
+# + 'FullReport': Set of all above ones.
+# + Example 'TestReportMode= Summary TestCases'
+#
+# - CreateTestReport setting controls report creation mode
+# + YES, Test report will created.
+# + NO, No Test report.
+#
+# - File path indicates the base path of the test report.
+# - File name indicates the name of the test report.
+#
+# - File format indicates the type of the test report.
+# + TXT, Test report file will be txt type, for example 'TestReport.txt'.
+# + HTML, Test report will be html type, for example 'TestReport.html'.
+#
+# - File output indicates output source of the test report.
+# + FILE, Test report logging to file.
+# + RDEBUG, Test report logging to using rdebug.
+#
+# - File Creation Mode indicates test report overwriting if file exist.
+# + OVERWRITE, Overwrites if the Test report file exist.
+# + APPEND, Continue logging after the old Test report information if
+# report exist.
+# - Sets a device reset module's dll name(Reboot).
+# + If Nokia specific reset module is not available or it is not correct one
+# StifHWResetStub module may use as a template for user specific reset
+# module.
+
+[Engine_Defaults]
+
+TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
+ 'TestCases' or 'FullReport'
+
+CreateTestReport= YES # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT # Possible values: TXT or HTML
+TestReportOutput= FILE # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= SenFragmentBCTest
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIFTestFramework logging overwrite parameters for Logger.
+# Hardware and emulator environment logging path and styles can
+# be configured from here to overwrite the Logger's implemented values.
+#
+# Settings description:
+# - Indicates option for creation log directory/directories. If log directory/directories
+# is/are not created by user they will make by software.
+# + YES, Create log directory/directories if not allready exist.
+# + NO, Log directory/directories not created. Only created one is used.
+#
+# - Overwrite emulator path setting.
+# + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
+# Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+# will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+# - Overwrite emulator's logging format.
+# + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+# + HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+# - Overwrited emulator logging output source.
+# + FILE, Logging to file(s).
+# + RDEBUG, Logging to using rdebug(s).
+#
+# - Overwrite hardware path setting (Same description as above in emulator path).
+# - Overwrite hardware's logging format(Same description as above in emulator format).
+# - Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+# - File Creation Mode indicates file overwriting if file exist.
+# + OVERWRITE, Overwrites if file(s) exist.
+# + APPEND, Continue logging after the old logging information if file(s) exist.
+#
+# - Will thread id include to the log filename.
+# + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+# + NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+# - Will time stamps include the to log file.
+# + YES, Time stamp added to each line in log file(s). Time stamp is
+# for example'12.Nov.2003 115958 LOGGING INFO'
+# + NO, No time stamp(s).
+#
+# - Will line breaks include to the log file.
+# + YES, Each logging event includes line break and next log event is in own line.
+# + NO, No line break(s).
+#
+# - Will event ranking include to the log file.
+# + YES, Event ranking number added to each line in log file(s). Ranking number
+# depends on environment's tics, for example(includes time stamp also)
+# '012 12.Nov.2003 115958 LOGGING INFO'
+# + NO, No event ranking.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+
+#CreateLogDirectories= YES # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML # Possible values: TXT or HTML
+#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML # Possible values: TXT or HTML
+#HardwareOutput= FILE # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES # Possible values: YES or NO
+#WithTimeStamp= YES # Possible values: YES or NO
+#WithLineBreak= YES # Possible values: YES or NO
+#WithEventRanking= YES # Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testsf_c.bat Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+copy c:\TestFramework\TestFramework_senfragment.ini c:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\results
+
+ATSINTERFACE.EXE -testmodule SenFragmentBCTest
+
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenFragment.txt
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testsf_z.bat Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,24 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+copy z:\TestFramework\TestFramework_senfragment.ini c:\TestFramework\TestFramework.ini
+
+md e:\BCTest
+md e:\BCTest\results
+
+ATSINTERFACE.EXE -testmodule SenFragmentBCTest
+
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenFragment.txt
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/TestFragment.h Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: senfragment header declaration
+*
+*/
+
+
+
+
+
+
+
+
+
+#ifndef TESTFRAGMENT_H
+#define TESTFRAGMENT_H
+
+#include <e32std.h>
+#include <f32file.h>
+#include "SenFragmentBase.h"
+#include "SenDomFragmentBase.h"
+
+
+
+class CTestFragmentBase :public CSenFragmentBase
+{
+public:
+ static CTestFragmentBase* NewL(const TDesC8& aLocalName);
+ IMPORT_C void SetContentL(const TDesC8& aContent);
+ IMPORT_C void AddContentL(const TDesC8& aContent);
+};
+
+
+
+class CTestDomFragmentBase :public CSenDomFragmentBase
+{
+public:
+ static CTestDomFragmentBase* NewL(const TDesC8& aLocalName);
+ IMPORT_C TXmlEngElement SetContentOfL(const TDesC8& aLocalName,
+ const TDesC8& aContent);
+ IMPORT_C TPtrC8 ContentOf(const TDesC8& aLocalName);
+
+};
+
+
+#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/delegatedomfragment.h Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: domfragment header declaration
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef DELEGATE_DOM_FRAGMENT_H
+#define DELEGATE_DOM_FRAGMENT_H
+
+// INCLUDES
+#include "SenDomFragmentBase.h"
+
+class CDelegateDomFragment : public CSenDomFragmentBase
+ {
+ public: // Constructors and destructor
+
+ static CDelegateDomFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes);
+
+ static CDelegateDomFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes);
+
+ static CDelegateDomFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent);
+
+ static CDelegateDomFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent);
+
+ static CDelegateDomFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttrs,
+ TXmlEngElement& aParent,
+ RSenDocument& aOwnerDocument);
+
+ static CDelegateDomFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttrs,
+ TXmlEngElement& aParent,
+ RSenDocument& aOwnerDocument);
+ /**
+ * Destructor.
+ */
+ virtual ~CDelegateDomFragment();
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CDelegateDomFragment();
+ };
+
+#endif // DELEGATE_DOM_FRAGMENT_H
+
+// End of File
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/delegatefragment.h Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: senfragment header declaration
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef DELEGATE_FRAGMENT_H
+#define DELEGATE_FRAGMENT_H
+
+// INCLUDES
+#include "SenFragmentBase.h"
+
+class CDelegateFragment : public CSenFragmentBase
+ {
+ public: // Constructors and destructor
+
+ static CDelegateFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes);
+
+ static CDelegateFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes);
+
+ static CDelegateFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent);
+
+ static CDelegateFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent);
+
+ /**
+ * Destructor.
+ */
+ virtual ~CDelegateFragment();
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CDelegateFragment();
+ };
+
+#endif // DELEGATE_FRAGMENT_H
+
+// End of File
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/maindomfragment.h Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: senfragment header declaration
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MAIN_DOM_FRAGMENT_H
+#define MAIN_DOM_FRAGMENT_H
+
+// INCLUDES
+#include "SenDomFragmentBase.h"
+#include "delegatedomfragment.h"
+
+// CLASS DECLARATIONS
+class CMainDomFragment : public CSenDomFragmentBase
+ {
+ public: // Constructors and destructor
+
+ static CMainDomFragment* NewL();
+ static CMainDomFragment* NewLC();
+ static CMainDomFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName);
+ static CMainDomFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName);
+ virtual ~CMainDomFragment();
+
+ CDelegateDomFragment& DelegateFragment();
+
+ protected:
+
+ /**
+ * C++ default constructor.
+ */
+ CMainDomFragment();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void BaseConstructL();
+ void BaseConstructL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName);
+
+ virtual void OnStartElementL(const RTagInfo& aElement,
+ const RAttributeArray& aAttributes,
+ TInt aErrorCode);
+
+ virtual void OnEndElementL(const RTagInfo& aElement,
+ TInt aErrorCode);
+
+ virtual void OnResumeParsingFromL(const RTagInfo& aElement, TInt aErrorCode);
+ private: // Data
+ CDelegateDomFragment* ipDelegateFragment; // Owned
+ };
+
+#endif // MAIN_DOM_FRAGMENT_H
+
+// End of File
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/mainfragment.h Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: senfragment header declaration
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MAIN_FRAGMENT_H
+#define MAIN_FRAGMENT_H
+
+// INCLUDES
+#include "SenFragmentBase.h"
+#include "delegatefragment.h"
+
+// CLASS DECLARATIONS
+class CMainFragment : public CSenFragmentBase
+ {
+ public: // Constructors and destructor
+
+ static CMainFragment* NewL();
+ static CMainFragment* NewLC();
+ static CMainFragment* NewL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName);
+ static CMainFragment* NewLC(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName);
+ virtual ~CMainFragment();
+
+ CDelegateFragment& DelegateFragment();
+
+ protected:
+
+ /**
+ * C++ default constructor.
+ */
+ CMainFragment();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void BaseConstructL();
+ void BaseConstructL(const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName);
+
+ // Functions from base classes
+
+ // From CSenBaseFragment
+ virtual void OnStartElementL(const RTagInfo& aElement,
+ const RAttributeArray& aAttributes,
+ TInt aErrorCode);
+
+ virtual void OnEndElementL(const RTagInfo& aElement,
+ TInt aErrorCode);
+
+ private: // Data
+ CDelegateFragment* ipDelegateFragment; // Owned
+ };
+
+#endif // MAIN_FRAGMENT_H
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/senfragmentbctest.h Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,612 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SenFragment test module.
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+#ifndef SENFRAGMENT_H
+#define SENFRAGMENT_H
+
+// INCLUDES
+#include <StifTestModule.h>
+#include <StifLogger.h>
+#include "TestFragment.h"
+
+#include <SenDomFragmentBase.h>
+#include <SenFragmentBase.h>
+#include <SenParser.h>
+#include <RSenDocument.h>
+//#include <XmlEngDomUtils.h>
+#include <SenBaseAttribute.h>
+#include <SenBaseElement.h>
+#include <SenBaseFragment.h>
+#include <SenDomFragment.h>
+#include <SenIdentityProvider.h>
+#include <SenNameSpace.h>
+#include <SenSoapEnvelope.h>
+#include <SenSoapFault.h>
+#include <SenSoapMessage.h>
+#include <SenWsSecurityHeader.h>
+#include <SenXmlReader.h>
+#include <SenXmlServiceDescription.h>
+//#include <SenDateFragment.h>
+//#include <SenXmlFragment.h>
+#include <SenXmlConstants.h>
+#include <f32file.h>
+//#include <S32FILE.H>
+//#include <e32std.h>
+
+#include <xml/parserfeature.h> // for TParserFeature enumeration
+//#include <XmlEngDSerializationOptions.h> // needed for TSerializationOptions
+//#include <XmlEngDBinaryContainer.h>
+#include <s32mem.h>
+
+// INCLUDES
+#include "SenFragmentBase.h"
+#include "delegatefragment.h"
+
+
+
+// FORWARD DECLARATIONS
+class CSenBaseAttribute;
+class CSenBaseFragment;
+class CSenSoapMessage;
+class CSenIdentityProvider;
+class CSenGuidGen;
+class CSenDomFragment;
+class CSenSoapFault;
+class CSenXmlServiceDescription;
+class CSenSoapEnvelope;
+class CSenWsSecurityHeader;
+class SenXmlFragment;
+class CSenBaseElement;
+class MSenElement;
+class CSenXmlReader;
+class SenDateFragment;
+class CSenNamespace;
+class CSenParser;
+class CSenDomFragmentBase;
+class RSenDocument;
+class CSenFragmentBase;
+class CTestFragmentBase;
+class CTestDomFragmentBase;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_MODULE_VERSION_MAJOR 50
+#define TEST_MODULE_VERSION_MINOR 8
+#define TEST_MODULE_VERSION_BUILD 48
+
+// Logging path
+_LIT( KSenFragmentLogPath, "\\logs\\testframework\\SenFragmentBCTest\\" );
+// Log file
+_LIT( KSenFragmentLogFile, "SenFragmentBCTest.txt" );
+
+// Function pointer related internal definitions
+// Visual studio 6.0 (__VC32__) needs different type of handling
+#ifdef __VC32__
+#define GETPTR
+#else
+#define GETPTR &
+#endif
+#define ENTRY(str,func) {_S(str), GETPTR func,0,0,0}
+#define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0}
+#define OOM_ENTRY(str,func,a,b,c) {_S(str), GETPTR func,a,b,c}
+#define OOM_FUNCENTRY(func,a,b,c) {_S(#func), GETPTR func,a,b,c}
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CSenFragmentBCTest;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+// A typedef for function that does the actual testing,
+// function is a type
+// TInt CSenFragmentBCTest::<NameOfFunction> ( TTestResult& aResult )
+typedef TInt (CSenFragmentBCTest::* TestFunction)(TTestResult&);
+
+// CLASS DECLARATION
+
+/**
+* An internal structure containing a test case name and
+* the pointer to function doing the test
+*
+* @lib ?library
+* @since ?Series60_version
+*/
+class TCaseInfoInternal
+ {
+ public:
+ const TText* iCaseName;
+ TestFunction iMethod;
+ TBool iIsOOMTest;
+ TInt iFirstMemoryAllocation;
+ TInt iLastMemoryAllocation;
+ };
+
+// CLASS DECLARATION
+
+/**
+* A structure containing a test case name and
+* the pointer to function doing the test
+*
+* @lib ?library
+* @since ?Series60_version
+*/
+class TCaseInfo
+ {
+ public:
+ TPtrC iCaseName;
+ TestFunction iMethod;
+ TBool iIsOOMTest;
+ TInt iFirstMemoryAllocation;
+ TInt iLastMemoryAllocation;
+
+ TCaseInfo( const TText* a ) : iCaseName( (TText*) a )
+ {
+ };
+
+ };
+
+
+// CLASS DECLARATION
+
+/**
+* This a SenFragment class.
+* ?other_description_lines
+*
+* @lib ?library
+* @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CSenFragmentBCTest) : public CTestModuleBase
+ {
+ public: // Constructors and destructor
+
+
+ /**
+ * Two-phased constructor.
+ */
+ static CSenFragmentBCTest* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CSenFragmentBCTest();
+
+ public: // New functions
+
+ /**
+ * ?member_description.
+ * @since ?Series60_version
+ * @param ?arg1 ?description
+ * @return ?description
+ */
+ //?type ?member_function( ?type ?arg1 );
+
+ public: // Functions from base classes
+
+ /**
+ * From CTestModuleBase InitL is used to initialize the
+ * SenFragment. It is called once for every instance of
+ * TestModuleSenFragment after its creation.
+ * @since ?Series60_version
+ * @param aIniFile Initialization file for the test module (optional)
+ * @param aFirstTime Flag is true when InitL is executed for first
+ * created instance of SenFragment.
+ * @return Symbian OS error code
+ */
+ TInt InitL( TFileName& aIniFile, TBool aFirstTime );
+
+ /**
+ * From CTestModuleBase GetTestCasesL is used to inquiry test cases
+ * from SenFragment.
+ * @since ?Series60_version
+ * @param aTestCaseFile Test case file (optional)
+ * @param aTestCases Array of TestCases returned to test framework
+ * @return Symbian OS error code
+ */
+ TInt GetTestCasesL( const TFileName& aTestCaseFile,
+ RPointerArray<TTestCaseInfo>& aTestCases );
+
+ /**
+ * From CTestModuleBase RunTestCaseL is used to run an individual
+ * test case.
+ * @since ?Series60_version
+ * @param aCaseNumber Test case number
+ * @param aTestCaseFile Test case file (optional)
+ * @param aResult Test case result returned to test framework (PASS/FAIL)
+ * @return Symbian OS error code (test case execution error, which is
+ * not reported in aResult parameter as test case failure).
+ */
+ TInt RunTestCaseL( const TInt aCaseNumber,
+ const TFileName& aTestCaseFile,
+ TTestResult& aResult );
+
+ /**
+ * From CTestModuleBase; OOMTestQueryL is used to specify is particular
+ * test case going to be executed using OOM conditions
+ * @param aTestCaseFile Test case file (optional)
+ * @param aCaseNumber Test case number (optional)
+ * @param aFailureType OOM failure type (optional)
+ * @param aFirstMemFailure The first heap memory allocation failure value (optional)
+ * @param aLastMemFailure The last heap memory allocation failure value (optional)
+ * @return TBool
+ */
+ virtual TBool OOMTestQueryL( const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */,
+ TOOMFailureType& aFailureType,
+ TInt& /* aFirstMemFailure */,
+ TInt& /* aLastMemFailure */ );
+
+ /**
+ * From CTestModuleBase; OOMTestInitializeL may be used to initialize OOM
+ * test environment
+ * @param aTestCaseFile Test case file (optional)
+ * @param aCaseNumber Test case number (optional)
+ * @return None
+ */
+ virtual void OOMTestInitializeL( const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */ );
+
+ /**
+ * From CTestModuleBase; OOMHandleWarningL
+ * @param aTestCaseFile Test case file (optional)
+ * @param aCaseNumber Test case number (optional)
+ * @param aFailNextValue FailNextValue for OOM test execution (optional)
+ * @return None
+ *
+ * User may add implementation for OOM test warning handling. Usually no
+ * implementation is required.
+ */
+ virtual void OOMHandleWarningL( const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */,
+ TInt& /* aFailNextValue */);
+
+ /**
+ * From CTestModuleBase; OOMTestFinalizeL may be used to finalize OOM
+ * test environment
+ * @param aTestCaseFile Test case file (optional)
+ * @param aCaseNumber Test case number (optional)
+ * @return None
+ *
+ */
+ virtual void OOMTestFinalizeL( const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */ );
+ /**
+ * Method used to log version of test module
+ */
+ void SendTestModuleVersion();
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CSenFragmentBCTest();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ // Prohibit copy constructor if not deriving from CBase.
+ // ?classname( const ?classname& );
+ // Prohibit assigment operator if not deriving from CBase.
+ // ?classname& operator=( const ?classname& );
+
+ /**
+ * Function returning test case name and pointer to test case function.
+ * @since ?Series60_version
+ * @param aCaseNumber test case number
+ * @return TCaseInfo
+ */
+ const TCaseInfo Case ( const TInt aCaseNumber ) const;
+
+ void SetupL();
+ void Teardown();
+
+
+ /**
+ * Actual Hardcoded test case functions are listed below.
+ */
+ TInt MT_CSenDomFragmentBase_NewLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_1L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_2L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_3L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_4L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_5L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_6L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NewL_7L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_AddAttributesLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_AsXmlLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_ContentLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NamespaceL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_ResetContentLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_LocalNameL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NsUriL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_NsPrefixL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_AsElementLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_AsDocumentLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_ExtractElementL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_AsXmlUnicodeLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_WriteAsXMLToLL(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_ConsistsOfLL(TTestResult& aResult);
+
+
+
+
+
+ TInt MT_CSenDomFragmentBase_Parsing1L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing2L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing3L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing4L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing5L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing6L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing7L(TTestResult& aResult);
+
+
+ TInt MT_CSenDomFragmentBase_Parsing8L(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_OnWriteStartElementLL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_OnWriteEndElementLL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_OnIgnorableWhiteSpaceLL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_OnSkippedEntityLL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_OnProcessingInstructionLL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_OnErrorL(TTestResult& aResult);
+
+ TInt MT_CSenDomFragmentBase_GetExtendedInterfaceL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_1L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_2L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_3L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_4L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_5L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_6L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NewL_7L(TTestResult& aResult);
+
+ TInt MT_CSenFragmentBase_SetDocumentL(TTestResult& aResult);
+
+
+
+ TInt MT_CSenFragmentBase_ContentLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NamespaceL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_ResetContentLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_LocalNameL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NsUriL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_NsPrefixL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_AsElementLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_AsDocumentLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_ExtractElementL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_AsXmlUnicodeLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_AsXmlLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_WriteAsXMLToLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_ConsistsOfLL(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_Parsing1L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_Parsing2L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_Parsing3L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_Parsing4L(TTestResult& aResult);
+
+
+ TInt MT_CSenFragmentBase_Parsing5L(TTestResult& aResult);
+
+
+ TInt MT_CSenParser_NewLL(TTestResult& aResult);
+
+
+ TInt MT_CSenParser_NewLCL(TTestResult& aResult);
+
+
+ TInt MT_CSenParser_NewL_1L(TTestResult& aResult);
+
+
+ TInt MT_CSenParser_NewLC_1L(TTestResult& aResult);
+
+
+ TInt MT_CSenParser_NewL_2L(TTestResult& aResult);
+
+
+ TInt MT_CSenParser_NewLC_2L(TTestResult& aResult);
+/*
+#if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) )
+
+ TInt MT_CSenParser_NewL_3L(TTestResult& aResult);
+ TInt MT_CSenParser_NewLC_3L(TTestResult& aResult);
+
+#endif
+*/
+
+ TInt MT_RSenDocument_NewLL(TTestResult& aResult);
+
+
+ TInt MT_RSenDocument_NewLCL(TTestResult& aResult);
+
+ TInt MT_RSenDocument_NewL_1L(TTestResult& aResult);
+
+ TInt MT_RSenDocument_NewLC_1L(TTestResult& aResult);
+
+ TInt MT_RSenDocument_CopyL(TTestResult& aResult);
+
+ TInt MT_RSenDocument_CloseL(TTestResult& aResult);
+
+ TInt MT_RSenDocument_DestroyL(TTestResult& aResult);
+
+ TInt MT_RSenDocument_ManualXmlEngineTlsAttachLL(TTestResult& aResult);
+
+ TInt MT_RSenDocument_ManualXmlEngineTlsCleanupL(TTestResult& aResult);
+
+ TInt MT_TestFragmentBase_SetContentLL(TTestResult& aResult);
+
+ TInt MT_TestFragmentBase_AddContentLL(TTestResult& aResult);
+
+ TInt MT_TestDomFragmentBase_SetContentOfLL(TTestResult& aResult);
+
+ TInt MT_TestDomFragmentBase_ContentOfL(TTestResult& aResult);
+
+
+
+ public: // Data
+ // ?one_line_short_description_of_data
+ //?data_declaration;
+
+ protected: // Data
+ // ?one_line_short_description_of_data
+ //?data_declaration;
+
+ private: // Data
+ // Pointer to test (function) to be executed
+ TestFunction iMethod;
+
+ // Pointer to logger
+ CStifLogger * iLog;
+
+ CSenXmlReader* iXmlReader;
+ // ?one_line_short_description_of_data
+ //?data_declaration;
+
+ // Reserved pointer for future extension
+ //TAny* iReserved;
+
+ public: // Friend classes
+ //?friend_class_declaration;
+ protected: // Friend classes
+ //?friend_class_declaration;
+ private: // Friend classes
+ //?friend_class_declaration;
+
+ };
+
+#endif // SENFragment_H
+
+// End of File
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/sis/52_websrv_senfragment.pkg Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none - English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Fragment"},(0x20015A27),3,0,0,TYPE=SA
+(0x101F7961),0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenFragmentBCTest.dll"-"!:\sys\bin\SenFragmentBCTest.dll"
+"\Epoc32\winscw\c\testSF_c.bat"-"!:\testSF.bat"
+"\Epoc32\winscw\c\testframework\testframework_senfragment.ini"-"!:\testframework\testframework_senfragment.ini"
\ No newline at end of file
Binary file websrv_pub/xml_fragment_api/tsrc/bc/senfragment/sis/52_websrv_senfragment.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/TestFragment.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+
+
+#include <e32std.h>
+#include <f32file.h>
+#include "TestFragment.h"
+
+
+//CSenFragmentBase//
+
+CTestFragmentBase* CTestFragmentBase::NewL(const TDesC8& aLocalName)
+{
+ return((CTestFragmentBase*)CSenFragmentBase::NewL(aLocalName));
+}
+
+EXPORT_C void CTestFragmentBase::SetContentL(const TDesC8& aContent)
+{
+ return(CSenFragmentBase::SetContentL(aContent));
+}
+
+EXPORT_C void CTestFragmentBase::AddContentL(const TDesC8& aContent)
+{
+ return(CSenFragmentBase::AddContentL(aContent));
+}
+
+
+///CSenDomFragmentBase///
+
+CTestDomFragmentBase* CTestDomFragmentBase::NewL(const TDesC8& aLocalName)
+{
+ return((CTestDomFragmentBase*)CSenDomFragmentBase::NewL(aLocalName));
+}
+
+EXPORT_C TXmlEngElement CTestDomFragmentBase::SetContentOfL(const TDesC8& aLocalName,
+ const TDesC8& aContent)
+{
+ return(CSenDomFragmentBase::SetContentOfL(aLocalName, aContent));
+}
+
+
+EXPORT_C TPtrC8 CTestDomFragmentBase::ContentOf(const TDesC8& aLocalName)
+{
+ return(CSenDomFragmentBase::ContentOf(aLocalName));
+}
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/delegatedomfragment.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+
+#include "delegatedomfragment.h"
+
+using namespace Xml;
+
+namespace
+ {
+ }
+
+CDelegateDomFragment* CDelegateDomFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes
+ )
+ {
+ CDelegateDomFragment* pNew = NewLC(aNsUri, aLocalName, aQName, aAttributes);
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CDelegateDomFragment* CDelegateDomFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes
+ )
+ {
+ CDelegateDomFragment* pNew = new (ELeave) CDelegateDomFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes);
+ return pNew;
+ }
+
+CDelegateDomFragment* CDelegateDomFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent
+ )
+ {
+ CDelegateDomFragment* pNew = NewLC(aNsUri, aLocalName,
+ aQName, aAttributes, aParent);
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CDelegateDomFragment* CDelegateDomFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent
+ )
+ {
+ CDelegateDomFragment* pNew = new (ELeave) CDelegateDomFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes, aParent);
+ return pNew;
+ }
+
+CDelegateDomFragment* CDelegateDomFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent,
+ RSenDocument& aOwnerDocument
+ )
+ {
+ CDelegateDomFragment* pNew = NewLC(aNsUri, aLocalName,
+ aQName, aAttributes,
+ aParent, aOwnerDocument);
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CDelegateDomFragment* CDelegateDomFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent,
+ RSenDocument& aOwnerDocument
+ )
+ {
+ CDelegateDomFragment* pNew = new (ELeave) CDelegateDomFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes, aParent,
+ aOwnerDocument);
+ return pNew;
+ }
+
+
+CDelegateDomFragment::CDelegateDomFragment()
+ {
+ }
+
+CDelegateDomFragment::~CDelegateDomFragment()
+ {
+ }
+
+// END OF FILE
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/delegatefragment.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+
+#include "delegatefragment.h"
+
+using namespace Xml;
+
+namespace
+ {
+ }
+
+CDelegateFragment* CDelegateFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes
+ )
+ {
+ CDelegateFragment* pNew = NewLC(aNsUri, aLocalName, aQName, aAttributes);
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CDelegateFragment* CDelegateFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes
+ )
+ {
+ CDelegateFragment* pNew = new (ELeave) CDelegateFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes);
+ return pNew;
+ }
+
+CDelegateFragment* CDelegateFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent
+ )
+ {
+ CDelegateFragment* pNew = NewLC(aNsUri, aLocalName,
+ aQName, aAttributes, aParent);
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CDelegateFragment* CDelegateFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName,
+ const RAttributeArray& aAttributes,
+ TXmlEngElement& aParent
+ )
+ {
+ CDelegateFragment* pNew = new (ELeave) CDelegateFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes, aParent);
+ return pNew;
+ }
+
+CDelegateFragment::CDelegateFragment()
+ {
+ }
+
+CDelegateFragment::~CDelegateFragment()
+ {
+ }
+
+// End of File
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/maindomfragment.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,191 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+
+#include "maindomfragment.h"
+#include "SenFragmentBase.h"
+
+namespace
+ {
+ const TInt KStateParsingDelegate = 100;
+ _LIT8(KMainFragmentXmlns, "urn:main:fragment");
+ _LIT8(KMainFragmentName, "MainFragment");
+ _LIT8(KMainFragmentQName, "mn:MainFragment");
+ _LIT8(KDelegateName, "DelegateFragment");
+ }
+
+CMainDomFragment* CMainDomFragment::NewL()
+ {
+ CMainDomFragment* pNew = NewLC();
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CMainDomFragment* CMainDomFragment::NewLC()
+ {
+ CMainDomFragment* pNew = new (ELeave) CMainDomFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL();
+ return pNew;
+ }
+
+
+CMainDomFragment* CMainDomFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName
+ )
+ {
+ CMainDomFragment* pNew = NewLC( aNsUri, aLocalName, aQName );
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CMainDomFragment* CMainDomFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName
+ )
+ {
+ CMainDomFragment* pNew = new (ELeave) CMainDomFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName);
+ return pNew;
+ }
+
+
+CMainDomFragment::CMainDomFragment()
+: ipDelegateFragment(NULL)
+ {
+ }
+
+void CMainDomFragment::BaseConstructL()
+ {
+ CSenDomFragmentBase::BaseConstructL(
+ KMainFragmentXmlns,
+ KMainFragmentName,
+ KMainFragmentQName
+ );
+ }
+
+void CMainDomFragment::BaseConstructL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName
+ )
+ {
+ CSenDomFragmentBase::BaseConstructL(aNsUri, aLocalName, aQName);
+ }
+
+CMainDomFragment::~CMainDomFragment()
+ {
+ delete ipDelegateFragment;
+ }
+
+void CMainDomFragment::OnStartElementL(const RTagInfo& aElement,
+ const RAttributeArray& aAttributes,
+ TInt aErrorCode)
+ {
+ switch (iState)
+ {
+ case KSenStateSave:
+ {
+ const TPtrC8 saxLocalName = aElement.LocalName().DesC();
+
+ if (saxLocalName == KDelegateName)
+ {
+ const TPtrC8 saxNsUri = aElement.Uri().DesC();
+ const TPtrC8 saxPrefix = aElement.Prefix().DesC();
+
+ TXmlEngElement element = AsElementL();
+ RSenDocument& document = AsDocumentL();
+
+ ipDelegateFragment = CDelegateDomFragment::NewL(
+ saxNsUri, saxLocalName,
+ saxPrefix, aAttributes,
+ element, document
+ );
+
+ iState = KStateParsingDelegate;
+
+ OnDelegateParsingL(*ipDelegateFragment);
+ }
+ else
+ {
+ CSenDomFragmentBase::OnStartElementL(aElement, aAttributes,
+ aErrorCode);
+ }
+ break;
+ }
+ default:
+ {
+ CSenDomFragmentBase::OnStartElementL(aElement, aAttributes,
+ aErrorCode);
+ break;
+ }
+ }
+ }
+
+void CMainDomFragment::OnEndElementL(const RTagInfo& aElement,
+ TInt aErrorCode)
+
+ {
+ switch(iState)
+ {
+ case KStateParsingDelegate:
+ {
+ iState = KSenStateSave;
+ break;
+ }
+
+ default:
+ {
+ CSenDomFragmentBase::OnEndElementL(aElement, aErrorCode);
+ break;
+ }
+ }
+ }
+
+void CMainDomFragment::OnResumeParsingFromL(const RTagInfo& aElement,
+ TInt aErrorCode)
+ {
+ SetContentHandler(*this);
+
+ switch (iState)
+ {
+ // no other states may be resumed(!)
+ case KStateParsingDelegate:
+ {
+ OnEndElementL(aElement, aErrorCode);
+ }
+ break;
+ }
+ }
+
+CDelegateDomFragment& CMainDomFragment::DelegateFragment()
+ {
+ return *ipDelegateFragment;
+ }
+
+// END OF FILE
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/mainfragment.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,173 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+
+
+
+
+
+#include "mainfragment.h"
+#include "SenFragmentBase.h"
+
+namespace
+ {
+ const TInt KStateParsingDelegate = 100;
+ _LIT8(KMainFragmentXmlns, "urn:main:fragment");
+ _LIT8(KMainFragmentName, "MainFragment");
+ _LIT8(KMainFragmentQName, "mn:MainFragment");
+ _LIT8(KDelegateName, "DelegateFragment");
+ }
+
+CMainFragment* CMainFragment::NewL()
+ {
+ CMainFragment* pNew = NewLC();
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CMainFragment* CMainFragment::NewLC()
+ {
+ CMainFragment* pNew = new (ELeave) CMainFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL();
+ return pNew;
+ }
+
+
+CMainFragment* CMainFragment::NewL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName
+ )
+ {
+ CMainFragment* pNew = NewLC( aNsUri, aLocalName, aQName );
+ CleanupStack::Pop(); // pNew;
+ return pNew;
+ }
+
+CMainFragment* CMainFragment::NewLC(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName
+ )
+ {
+ CMainFragment* pNew = new (ELeave) CMainFragment;
+ CleanupStack::PushL(pNew);
+ pNew->BaseConstructL(aNsUri, aLocalName, aQName);
+ return pNew;
+ }
+
+
+CMainFragment::CMainFragment()
+: ipDelegateFragment(NULL)
+ {
+ }
+
+void CMainFragment::BaseConstructL()
+ {
+ CSenFragmentBase::BaseConstructL(
+ KMainFragmentXmlns,
+ KMainFragmentName,
+ KMainFragmentQName
+ );
+ }
+
+void CMainFragment::BaseConstructL(
+ const TDesC8& aNsUri,
+ const TDesC8& aLocalName,
+ const TDesC8& aQName
+ )
+ {
+ CSenFragmentBase::BaseConstructL(aNsUri, aLocalName, aQName);
+ }
+
+CMainFragment::~CMainFragment()
+ {
+ delete ipDelegateFragment;
+ }
+
+void CMainFragment::OnStartElementL(const RTagInfo& aElement,
+ const RAttributeArray& aAttributes,
+ TInt aErrorCode)
+ {
+ switch (iState)
+ {
+ case KSenStateSave:
+ {
+ const TPtrC8 saxLocalName = aElement.LocalName().DesC();
+
+ if (saxLocalName == KDelegateName)
+ {
+ const TPtrC8 saxNsUri = aElement.Uri().DesC();
+ const TPtrC8 saxPrefix = aElement.Prefix().DesC();
+
+ TXmlEngElement element = AsElementL();
+
+ ipDelegateFragment = CDelegateFragment::NewL(
+ saxNsUri, saxLocalName,
+ saxPrefix, aAttributes
+ );
+
+ iState = KStateParsingDelegate;
+
+ OnDelegateParsingL(*ipDelegateFragment);
+ }
+ else
+ {
+ CSenFragmentBase::OnStartElementL(aElement, aAttributes,
+ aErrorCode);
+ }
+ break;
+ }
+ default:
+ {
+ CSenFragmentBase::OnStartElementL(aElement, aAttributes,
+ aErrorCode);
+ break;
+ }
+ }
+ }
+
+void CMainFragment::OnEndElementL(const RTagInfo& aElement,
+ TInt aErrorCode)
+
+ {
+ switch(iState)
+ {
+ case KStateParsingDelegate:
+ {
+ iState = KSenStateSave;
+ break;
+ }
+
+ default:
+ {
+ CSenFragmentBase::OnEndElementL(aElement, aErrorCode);
+ break;
+ }
+ }
+ }
+
+CDelegateFragment& CMainFragment::DelegateFragment()
+ {
+ return *ipDelegateFragment;
+ }
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/senfragment.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,414 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SenFragment class member functions
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <StifTestInterface.h>
+#include "senfragmentbctest.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+// ?value_n: ?description_line1
+// ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+ ?arg_type arg, // ?description
+ ?arg_type arg) // ?description
+ {
+
+ ?code // ?comment
+
+ // ?comment
+ ?code
+ }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::CSenFragmentBCTest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CSenFragmentBCTest::CSenFragmentBCTest()
+ {
+
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::ConstructL
+// Symbian 2nd phase constructor can leave.
+//
+// Note: If OOM test case uses STIF Logger, then STIF Logger must be created
+// with static buffer size parameter (aStaticBufferSize). Otherwise Logger
+// allocates memory from heap and therefore causes error situations with OOM
+// testing. For more information about STIF Logger construction, see STIF Users
+// Guide.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::ConstructL()
+ {
+ iLog = CStifLogger::NewL( KSenFragmentLogPath,
+ KSenFragmentLogFile);
+
+ // Sample how to use logging
+ _LIT( KLogStart, "SenFragment logging starts!" );
+ iLog->Log( KLogStart );
+
+ // if ( iXmlReader ){
+ // delete iXmlReader;
+ //}
+ //iXmlReader = CSenXmlReader::NewL();
+
+ }
+//-----------------------------------------------------------------------------
+// CSenFragmentBCTest::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::SendTestModuleVersion()
+ {
+ TVersion moduleVersion;
+ moduleVersion.iMajor = TEST_MODULE_VERSION_MAJOR;
+ moduleVersion.iMinor = TEST_MODULE_VERSION_MINOR;
+ moduleVersion.iBuild = TEST_MODULE_VERSION_BUILD;
+
+ TFileName moduleName;
+ moduleName = _L("SenFragmentBCTest.dll");
+
+
+ TBool newVersionOfMethod = ETrue;
+ CTestModuleIf &test=TestModuleIf();
+ test.SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+ test.SetBehavior(CTestModuleIf::ETestLeaksHandles);
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CSenFragmentBCTest* CSenFragmentBCTest::NewL()
+ {
+ CSenFragmentBCTest* self = new (ELeave) CSenFragmentBCTest;
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+
+ }
+
+// Destructor
+CSenFragmentBCTest::~CSenFragmentBCTest()
+ {
+ if (iLog) delete iLog;
+ //if ( iXmlReader)
+ //{
+ //delete iXmlReader;
+ // iXmlReader = NULL;
+ // }
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::InitL
+// InitL is used to initialize the Test Module.
+// -----------------------------------------------------------------------------
+//
+TInt CSenFragmentBCTest::InitL(
+ TFileName& /*aIniFile*/,
+ TBool /*aFirstTime*/ )
+ {
+ return KErrNone;
+
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::GetTestCasesL
+// GetTestCases is used to inquire test cases from the Test Module. Test
+// cases are stored to array of test cases. The Test Framework will be
+// the owner of the data in the RPointerArray after GetTestCases return
+// and it does the memory deallocation.
+// -----------------------------------------------------------------------------
+//
+TInt CSenFragmentBCTest::GetTestCasesL(
+ const TFileName& /*aConfig*/,
+ RPointerArray<TTestCaseInfo>& aTestCases )
+ {
+
+ // Loop through all test cases and create new
+ // TTestCaseInfo items and append items to aTestCase array
+ for( TInt i = 0; Case(i).iMethod != NULL; i++ )
+ {
+
+ // Allocate new TTestCaseInfo from heap for a testcase definition.
+ TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo();
+
+ // PushL TTestCaseInfo to CleanupStack.
+ CleanupStack::PushL( newCase );
+
+ // Set number for the testcase.
+ // When the testcase is run, this comes as a parameter to RunTestCaseL.
+ newCase->iCaseNumber = i;
+
+ // Set title for the test case. This is shown in UI to user.
+ newCase->iTitle.Copy( Case(i).iCaseName );
+
+ // Append TTestCaseInfo to the testcase array. After appended
+ // successfully the TTestCaseInfo object is owned (and freed)
+ // by the TestServer.
+ User::LeaveIfError(aTestCases.Append ( newCase ) );
+
+ // Pop TTestCaseInfo from the CleanupStack.
+ CleanupStack::Pop( newCase );
+
+ }
+
+ return KErrNone;
+
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::RunTestCaseL
+// RunTestCaseL is used to run an individual test case specified
+// by aTestCase. Test cases that can be run may be requested from
+// Test Module by GetTestCases method before calling RunTestCase.
+// -----------------------------------------------------------------------------
+//
+TInt CSenFragmentBCTest::RunTestCaseL(
+ const TInt aCaseNumber,
+ const TFileName& /*aConfig*/,
+ TTestResult& aResult )
+ {
+ SendTestModuleVersion();
+ // Return value
+ TInt execStatus = KErrNone;
+
+ // Get the pointer to test case function
+ TCaseInfo tmp = Case ( aCaseNumber );
+ iLog->Log( _L("-------------------------------------------------------------"));
+ _LIT( KLogStartTC, "Starting testcase [%S]" );
+ iLog->Log( KLogStartTC, &tmp.iCaseName);
+
+ // Check that case number was valid
+ if ( tmp.iMethod != NULL )
+ {
+ // Valid case was found, call it via function pointer
+ iMethod = tmp.iMethod;
+ execStatus = ( this->*iMethod )( aResult );
+ }
+ else
+ {
+ // Valid case was not found, return error.
+ execStatus = KErrNotFound;
+ }
+
+ // Return case execution status (not the result of the case execution)
+ return execStatus;
+
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMTestQueryL
+// Used to check if a particular test case should be run in OOM conditions and
+// which memory allocations should fail.
+// -----------------------------------------------------------------------------
+//
+TBool CSenFragmentBCTest::OOMTestQueryL(
+ const TFileName& /* aTestCaseFile */,
+ const TInt aCaseNumber,
+ TOOMFailureType& /* aFailureType */,
+ TInt& aFirstMemFailure,
+ TInt& aLastMemFailure )
+ {
+ _LIT( KLogOOMTestQueryL, "CSenFragmentBCTest::OOMTestQueryL" );
+ iLog->Log( KLogOOMTestQueryL );
+
+ aFirstMemFailure = Case( aCaseNumber ).iFirstMemoryAllocation;
+ aLastMemFailure = Case( aCaseNumber ).iLastMemoryAllocation;
+
+ return Case( aCaseNumber ).iIsOOMTest;
+
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMTestInitializeL
+// Used to perform the test environment setup for a particular OOM test case.
+// Test Modules may use the initialization file to read parameters for Test
+// Module initialization but they can also have their own configure file or
+// some other routine to initialize themselves.
+//
+// NOTE: User may add implementation for OOM test environment initialization.
+// Usually no implementation is required.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::OOMTestInitializeL(
+ const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */ )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMHandleWarningL
+// In some cases the heap memory allocation should be skipped, either due to
+// problems in the OS code or components used by the code being tested, or even
+// inside the tested components which are implemented this way on purpose (by
+// design), so it is important to give the tester a way to bypass allocation
+// failures.
+//
+// NOTE: User may add implementation for OOM test warning handling. Usually no
+// implementation is required.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::OOMHandleWarningL(
+ const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */,
+ TInt& /* aFailNextValue */ )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMTestFinalizeL
+// Used to perform the test environment cleanup for a particular OOM test case.
+//
+// NOTE: User may add implementation for OOM test environment finalization.
+// Usually no implementation is required.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::OOMTestFinalizeL(
+ const TFileName& /* aTestCaseFile */,
+ const TInt /* aCaseNumber */ )
+ {
+ }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point
+// Returns: CTestModuleBase*: Pointer to Test Module object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CTestModuleBase* LibEntryL()
+ {
+ return CSenFragmentBCTest::NewL();
+
+ }
+
+// -----------------------------------------------------------------------------
+// SetRequirements handles test module parameters(implements evolution
+// version 1 for test module's heap and stack sizes configuring).
+// Returns: TInt: Symbian error code.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SetRequirements( CTestModuleParam*& /*aTestModuleParam*/,
+ TUint32& /*aParameterValid*/ )
+ {
+
+ /* --------------------------------- NOTE ---------------------------------
+ USER PANICS occurs in test thread creation when:
+ 1) "The panic occurs when the value of the stack size is negative."
+ 2) "The panic occurs if the minimum heap size specified is less
+ than KMinHeapSize".
+ KMinHeapSize: "Functions that require a new heap to be allocated will
+ either panic, or will reset the required heap size to this value if
+ a smaller heap size is specified".
+ 3) "The panic occurs if the minimum heap size specified is greater than
+ the maximum size to which the heap can grow".
+ Other:
+ 1) Make sure that your hardware or Symbian OS is supporting given sizes.
+ e.g. Hardware might support only sizes that are divisible by four.
+ ------------------------------- NOTE end ------------------------------- */
+
+ // Normally STIF uses default heap and stack sizes for test thread, see:
+ // KTestThreadMinHeap, KTestThreadMinHeap and KStackSize.
+ // If needed heap and stack sizes can be configured here by user. Remove
+ // comments and define sizes.
+
+/*
+ aParameterValid = KStifTestModuleParameterChanged;
+
+ CTestModuleParamVer01* param = CTestModuleParamVer01::NewL();
+ // Stack size
+ param->iTestThreadStackSize= 16384; // 16K stack
+ // Heap sizes
+ param->iTestThreadMinHeap = 4096; // 4K heap min
+ param->iTestThreadMaxHeap = 1048576;// 1M heap max
+
+ aTestModuleParam = param;
+*/
+ return KErrNone;
+
+ }
+
+// -----------------------------------------------------------------------------
+// E32Dll is a DLL entry point function
+// Returns: KErrNone: No error
+// -----------------------------------------------------------------------------
+//
+#ifndef EKA2 // Hide Dll entry point to EKA2
+GLDEF_C TInt E32Dll(
+ TDllReason /*aReason*/) // Reason
+ {
+ return(KErrNone);
+
+ }
+#endif // EKA2
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/senfragmentcases.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -0,0 +1,2932 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+// INCLUDE FILES
+#include <StifTestModule.h>
+#include <e32math.h>
+#include <libc/assert.h>
+#include <e32panic.h>
+#include "senfragmentbctest.h"
+#include "maindomfragment.h"
+#include "mainfragment.h"
+#include "TestFragment.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::Case
+// Returns a test case by number.
+//
+// This function contains an array of all available test cases
+// i.e pair of case name and test function. If case specified by parameter
+// aCaseNumber is found from array, then that item is returned.
+//
+// The reason for this rather complicated function is to specify all the
+// test cases only in one place. It is not necessary to understand how
+// function pointers to class member functions works when adding new test
+// cases. See function body for instructions how to add new test case.
+// -----------------------------------------------------------------------------
+//
+const TCaseInfo CSenFragmentBCTest::Case (
+ const TInt aCaseNumber ) const
+ {
+
+ /**
+ * To add new test cases, implement new test case function and add new
+ * line to KCases array specify the name of the case and the function
+ * doing the test case
+ * In practice, do following
+ * 1) Make copy of existing test case function and change its name
+ * and functionality. Note that the function must be added to
+ * SenFragment.cpp file and to SenFragment.h
+ * header file.
+ *
+ * 2) Add entry to following KCases array either by using:
+ *
+ * 2.1: FUNCENTRY or ENTRY macro
+ * ENTRY macro takes two parameters: test case name and test case
+ * function name.
+ *
+ * FUNCENTRY macro takes only test case function name as a parameter and
+ * uses that as a test case name and test case function name.
+ *
+ * Or
+ *
+ * 2.2: OOM_FUNCENTRY or OOM_ENTRY macro. Note that these macros are used
+ * only with OOM (Out-Of-Memory) testing!
+ *
+ * OOM_ENTRY macro takes five parameters: test case name, test case
+ * function name, TBool which specifies is method supposed to be run using
+ * OOM conditions, TInt value for first heap memory allocation failure and
+ * TInt value for last heap memory allocation failure.
+ *
+ * OOM_FUNCENTRY macro takes test case function name as a parameter and uses
+ * that as a test case name, TBool which specifies is method supposed to be
+ * run using OOM conditions, TInt value for first heap memory allocation
+ * failure and TInt value for last heap memory allocation failure.
+ */
+
+ static TCaseInfoInternal const KCases[] =
+ {
+
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewLL ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_1L ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_2L ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_3L ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_4L ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_5L ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_6L ),
+ ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_7L ),
+ ENTRY( "AddAttributesL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AddAttributesLL ),
+ ENTRY( "AsXmlL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlLL ),
+ ENTRY( "ContentL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentLL ),
+ ENTRY( "Namespace - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NamespaceL ),
+ ENTRY( "ResetContentL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ResetContentLL ),
+ ENTRY( "LocalName - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_LocalNameL ),
+ ENTRY( "NsUri - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NsUriL ),
+ ENTRY( "NsPrefix - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NsPrefixL ),
+ ENTRY( "AsElementL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsElementLL ),
+ ENTRY( "AsDocumentL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsDocumentLL ),
+ ENTRY( "ExtractElement - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ExtractElementL ),
+ ENTRY( "AsXmlUnicodeL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlUnicodeLL ),
+ ENTRY( "WriteAsXMLToL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_WriteAsXMLToLL ),
+ ENTRY( "ConsistsOfL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ConsistsOfLL ),
+ ENTRY( "Parsing1 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing1L ),
+ ENTRY( "Parsing2 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing2L ),
+ ENTRY( "Parsing3 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing3L ),
+ ENTRY( "Parsing4 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing4L ),
+ ENTRY( "Parsing5 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing5L ),
+ ENTRY( "Parsing6 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing6L ),
+ ENTRY( "Parsing7 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing7L ),
+ ENTRY( "Parsing8 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing8L ),
+ //ENTRY( "SetContentOfL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_SetContentOfLL ),
+ //ENTRY( "ContentOf - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentOfL ),
+ ENTRY( "OnWriteStartElementL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteStartElementLL ),
+ ENTRY( "OnWriteEndElementL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteEndElementLL ),
+ ENTRY( "OnIgnorableWhiteSpaceL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnIgnorableWhiteSpaceLL ),
+ ENTRY( "OnSkippedEntityL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnSkippedEntityLL ),
+ ENTRY( "OnProcessingInstructionL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnProcessingInstructionLL ),
+ ENTRY( "OnError - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnErrorL ),
+ ENTRY( "GetExtendedInterface - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_GetExtendedInterfaceL ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewLL ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_2L ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_3L ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_4L ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_5L ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_6L ),
+ ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_7L ),
+ ENTRY( "SetDocument - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_SetDocumentL ),
+
+ ENTRY( "ContentL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ContentLL ),
+ ENTRY( "Namespace - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NamespaceL ),
+ ENTRY( "ResetContentL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ResetContentLL ),
+ ENTRY( "LocalName - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_LocalNameL ),
+ ENTRY( "NsUri - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NsUriL ),
+ ENTRY( "NsPrefix - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NsPrefixL ),
+ ENTRY( "AsElementL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsElementLL ),
+ ENTRY( "AsDocumentL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsDocumentLL ),
+ ENTRY( "ExtractElement - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ExtractElementL ),
+ ENTRY( "AsXmlUnicodeL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlUnicodeLL ),
+ ENTRY( "AsXmlL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlLL ),
+ ENTRY( "WriteAsXMLToL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_WriteAsXMLToLL ),
+ ENTRY( "ConsistsOfL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ConsistsOfLL ),
+ ENTRY( "Parsing1 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing1L ),
+ ENTRY( "Parsing2 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing2L ),
+ ENTRY( "Parsing3 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing3L ),
+ ENTRY( "Parsing4 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing4L ),
+ ENTRY( "Parsing5 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing5L ),
+ ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLL ),
+ ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLCL ),
+ ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewL_1L ),
+ ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLC_1L ),
+ ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewL_2L ),
+ ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLC_2L ),
+// ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewL_3L ),
+// ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLC_3L ),
+ ENTRY( "NewL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewLL ),
+ ENTRY( "NewLC - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewLCL ),
+ ENTRY( "NewL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewL_1L ),
+ ENTRY( "NewLC - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewLC_1L ),
+ ENTRY( "Copy - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_CopyL ),
+ ENTRY( "Close - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_CloseL ),
+ ENTRY( "Destroy - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_DestroyL ),
+ ENTRY( "Destroy - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_DestroyL ),
+
+ ENTRY( "ManualXmlEngineTlsAttachL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsAttachLL ),
+ ENTRY( "ManualXmlEngineTlsAttachL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsCleanupL ),
+ ENTRY( "SetContentL - TestFragmentBase", CSenFragmentBCTest::MT_TestFragmentBase_SetContentLL ),
+ ENTRY( "AddContentL - TestFragmentBase", CSenFragmentBCTest::MT_TestFragmentBase_AddContentLL ),
+ ENTRY( "SetContentOfL - TestDomFragmentBase", CSenFragmentBCTest::MT_TestDomFragmentBase_SetContentOfLL ),
+ //ENTRY( "ContentOf - TestDomFragmentBase", CSenFragmentBCTest::MT_TestDomFragmentBase_ContentOfL ),
+
+ // Example how to use OOM functionality
+ //OOM_ENTRY( "Loop test with OOM", CSenFragmentBCTest::LoopTest, ETrue, 2, 3),
+ //OOM_FUNCENTRY( CSenFragmentBCTest::PrintTest, ETrue, 1, 3 ),
+ };
+
+ // Verify that case number is valid
+ if( (TUint) aCaseNumber >= sizeof( KCases ) /
+ sizeof( TCaseInfoInternal ) )
+ {
+ // Invalid case, construct empty object
+ TCaseInfo null( (const TText*) L"" );
+ null.iMethod = NULL;
+ null.iIsOOMTest = EFalse;
+ null.iFirstMemoryAllocation = 0;
+ null.iLastMemoryAllocation = 0;
+ return null;
+ }
+
+ // Construct TCaseInfo object and return it
+ TCaseInfo tmp ( KCases[ aCaseNumber ].iCaseName );
+ tmp.iMethod = KCases[ aCaseNumber ].iMethod;
+ tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
+ tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
+ tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
+ return tmp;
+
+ }
+
+void CSenFragmentBCTest::SetupL( ){
+ if ( iXmlReader ){
+ delete iXmlReader;
+ iXmlReader = NULL;
+ }
+ iXmlReader = CSenXmlReader::NewL();
+}
+
+void CSenFragmentBCTest::Teardown( ){
+ if ( iXmlReader){
+ delete iXmlReader;
+ iXmlReader = NULL;
+ }
+}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL();
+ TL(pFragment != (CSenDomFragmentBase*)NULL);
+ __ASSERT_ALWAYS_NO_LEAVE(delete pFragment);
+ pFragment = NULL;
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_1L(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+ element.SetEscapedTextL(_L8("<Element/>"));
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(element);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ // Test that when CSenDomFragmentBase is serialized '<' and '>' characters
+ // are encoded (as all basic entities in content should be).
+ if(!( *pAsXml == _L8("<Test><Element/></Test>") ))return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::Pop(1);
+ //CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_2L(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_3L(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"));
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_4L(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_5L(TTestResult& aResult)
+ {
+ SetupL();
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open( nsUriRString, nsPrefixRString, localNameRString,
+ valueRString );
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"),
+ attrArray);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_6L(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString);
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"),
+ attrArray,
+ parentElement);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+ RBuf8 buffer;
+ parentElement.OuterXmlL(buffer);
+
+ if(!( buffer == _L8("<Parent><t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+ buffer.Close();
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_7L(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString);
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8(""),
+ attrArray,
+ parentElement,
+ document);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+ RBuf8 buffer;
+ parentElement.OuterXmlL(buffer);
+
+ if(!( buffer == _L8("<Parent><Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+ buffer.Close();
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AddAttributesLL(TTestResult& aResult)
+ {
+ SetupL();
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString);
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(4); // nsUriRString, nsPrefixRString, localNameRString,
+ // valueRString
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+
+ pFragment->AddAttributesL(attrArray);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+
+ CleanupStack::PopAndDestroy(pFragment);
+
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlLL(TTestResult& aResult)
+ {
+ SetupL();
+ // Test serialization of Dom tree which has two child elements
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+ element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") ) ) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+ element.SetEscapedTextL(_L8("<Element/>"));
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(element);
+ CleanupStack::PushL(pFragment);
+
+ TPtrC8 content = pFragment->ContentL();
+ if(!( content == _L8("<Element/>") ) ) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NamespaceL(TTestResult& aResult)
+ {
+ SetupL();
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(stringPool.OpenStringL(_L8("nsuri")),
+ stringPool.OpenStringL(_L8("pr")),
+ stringPool.OpenStringL(_L8("LocalName")),
+ stringPool.OpenStringL(_L8("Value")) );
+ // attribute took copies of all RStrings
+ // => All RStrings can be destroyed
+ CleanupStack::PopAndDestroy(4); // nsUriRString, nsPrefixRString, localNameRString,
+ // valueRString
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"),
+ attrArray);
+ CleanupStack::PushL(pFragment);
+
+ TXmlEngNamespace ns = pFragment->Namespace(_L8("pr"));
+ if(!( ns.Uri() == _L8("nsuri") ) ) return KErrArgument;
+
+ TXmlEngNamespace ns2 = pFragment->Namespace(_L8("x"));
+ if(!( ns2.IsNull() ) ) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(); // attribute
+ CleanupStack::PopAndDestroy(); // attrArray
+ CleanupStack::PopAndDestroy(); // stringPool
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ResetContentLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+ element.SetEscapedTextL(_L8("Content"));
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(element);
+ CleanupStack::PushL(pFragment);
+
+ // Test that CSenFragmentBase has content before reset
+ TPtrC8 content = pFragment->ContentL();
+ if(!( content == _L8("Content") )) return KErrArgument;
+
+ pFragment->ResetContentL();
+
+ // Test that CSenFragmentBase has no content after reset
+ TPtrC8 content2 = pFragment->ContentL();
+ if(!( content2 == KNullDesC8 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_LocalNameL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TPtrC8 localName = pFragment->LocalName();
+ if(!( localName == _L8("Test") ) ) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NsUriL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TPtrC8 localName = pFragment->NsUri();
+ if(!( localName == _L8("NsUri") ) ) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NsPrefixL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TPtrC8 localName = pFragment->NsPrefix();
+ if(!( localName == _L8("t") ) ) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsElementLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+ RBuf8 buffer;
+ CleanupClosePushL(buffer);
+ element.OuterXmlL(buffer);
+ // Serialized element should contain all the Fragment data as XML.
+ if(!( buffer == _L8("<t:Test xmlns:t=\"NsUri\"/>") ) ) return KErrArgument;
+ CleanupStack::PopAndDestroy(&buffer);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsDocumentLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ RSenDocument document = pFragment->AsDocumentL();
+ TXmlEngElement element = document.DocumentElement();
+
+ TXmlEngSerializationOptions options;
+ // Omit following declarations from the beginning of XML Document:
+ // <?xml version=\"1.0\...
+ // encoding="..."
+ // standalone="..."
+ // ?>
+ options.iOptions = options.iOptions |
+ TXmlEngSerializationOptions::KOptionOmitXMLDeclaration;
+ RBuf8 asXml;
+ document.SaveL(asXml, element, options);
+ CleanupClosePushL(asXml);
+
+ // Serialized document should contain all the Fragment data as XML.
+ if(!( asXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") ) ) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(&asXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ExtractElementL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->ExtractElement();
+ if(!( element.Name() == _L8("Test") )) return KErrArgument;
+ element.Remove();
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlUnicodeLL(TTestResult& aResult)
+ {
+ SetupL();
+ // Test serialization of Dom tree which has two child elements
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+ element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+
+ HBufC* pAsXml = pFragment->AsXmlUnicodeL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_WriteAsXMLToLL(TTestResult& aResult)
+ {
+ SetupL();
+ // Test serialization of Dom tree which has two child elements
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+ element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+
+ CBufFlat* pBuf = CBufFlat::NewL(200);
+ CleanupStack::PushL(pBuf);
+ RBufWriteStream bufWs(*pBuf);
+ CleanupClosePushL(bufWs);
+ pFragment->WriteAsXMLToL(bufWs);
+
+
+ if(!( pBuf->Ptr(0) == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(&bufWs);
+ CleanupStack::PopAndDestroy(pBuf);
+
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ConsistsOfLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement elementchild1 = element.AddNewElementL(_L8("DirectChild"));
+ elementchild1.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+
+ //TDomUtils domUtils1;
+ //domUtils1.XmlEngRenameElementL(elementchild1, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+
+ TXmlEngElement elementchild2 = element.AddNewElementL(_L8("DirectChild"));
+ elementchild2.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils2;
+ //domUtils2.XmlEngRenameElementL(elementchild2, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ elementchild2.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+ CSenDomFragmentBase* pFragment2 = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment2);
+ TXmlEngElement element2 = pFragment2->AsElementL();
+
+ TXmlEngElement elementchild22 = element2.AddNewElementL(_L8("DirectChild"));
+ elementchild22.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils22;
+ //domUtils22.XmlEngRenameElementL(elementchild22, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ elementchild22.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+ // ConsistOfL should return ETrue because
+ // root elements of both fragments match and the only element
+ // of pFragment2 = elementchild22 is exactly the same element as
+ // elementchild2.
+ if(!( pFragment->ConsistsOfL(*pFragment2) )) return KErrArgument;
+
+ // ConsistOfL should return EFalse because
+ // Even though root elements of both fragments match
+ // there is extra element (= elementchild1) in pFragment.
+ //
+ // elementchild1 (of pFragment) can not be found from pFragment2
+ // and because of that pFragment2 does not consist of pFragment.
+ if(!( !pFragment2->ConsistsOfL(*pFragment) )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment2);
+
+ CSenDomFragmentBase* pFragment3 = CSenDomFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment3);
+ TXmlEngElement element3 = pFragment3->AsElementL();
+
+ TXmlEngElement elementchild32 = element3.AddNewElementL(_L8("DirectChild"));
+ elementchild32.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils32;
+ //domUtils32.XmlEngRenameElementL(elementchild32, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ elementchild32.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+ elementchild32.SetEscapedTextL(_L8("Text"));
+
+ // ConsistOfL should return EFalse because
+ // elementchild32 has content ("Text") which doesn't match
+ // to any child element of pFragment.
+ if(!( !pFragment->ConsistsOfL(*pFragment3) )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment3);
+
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing1L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 z=\"value4\">Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+ // will be moved to all child elements (Element1, Element2, Element3 and
+ // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+ // the way CParser works <=> Namespaces are reported when namespaces are used
+ // for the first time.
+ _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nasurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\" z=\"value4\">Content2</Element2>\
+<Element3 xmlns=\"nsuri\">Content3</Element3>\
+<Element4 xmlns=\"nsuri\"/></a:Test>");
+
+ // When EReportNamespaceMapping is enabled all the namespace declarations
+ // are reported in exactly the same element as they are defined in parsed
+ // XML document.
+ // Note: The Order of namespace declarations in root element tag may change.
+ // Namespace declaration for root tag is created when fragment is created
+ // and because of that namespace declaration for root tag will be the first.
+ // In this particular case namespace declaration for prefix "a" will be
+ // the first namespace declaration because it is declared when
+ // CSenDomFragmentBase is created.
+ _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 z=\"value4\">Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+/*
+ pParser->EnableFeature(EReportNamespaceMapping);
+ //tma
+ pParser->DisableFeature(EReportNamespaceMapping);
+ TBool fEneabled(EFalse);
+ fEneabled = pParser->IsFeatureEnabled(EReportNamespaceMapping);
+ EUNIT_ASSERT( fEneabled == EFalse);
+ pParser->EnableFeature(EReportNamespaceMapping);
+ //tma
+*/
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ CSenDomFragmentBase* pFragment2 = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment2);
+
+ pParser->ParseL(KInputString, *pFragment2);
+
+ HBufC8* pAsXml2 = pFragment2->AsXmlL();
+ CleanupStack::PushL(pAsXml2);
+
+ if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml2);
+ CleanupStack::PopAndDestroy(pFragment2);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing2L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase which uses
+ // delegation.
+ _LIT8(KInputString, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment>DelegateContent</DelegateFragment>\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+
+ // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+ // will be moved to all child elements (Element1, Element2, Element3 and
+ // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+ // the way CParser works <=> Namespaces are reported when namespaces are used
+ // for the first time.
+ _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>\
+<Element1 xmlns=\"nsuri\" x=\"value4\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\">Content2</Element2></a:Test>");
+
+ // When EReportNamespaceMapping is enabled all the namespace declarations
+ // are reported in exactly the same element as they are defined in parsed
+ // XML document.
+ // Note: The Order of namespace declarations in root element tag may change.
+ // Namespace declaration for root tag is created when fragment is created
+ // and because of that namespace declaration for root tag will be the first.
+ _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment>DelegateContent</DelegateFragment>\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CMainDomFragment* pFragment = CMainDomFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+
+ CDelegateDomFragment& delegate = pFragment->DelegateFragment();
+ HBufC8* pDelegateAsXml = delegate.AsXmlL();
+ CleanupStack::PushL(pDelegateAsXml);
+ // Note: When EReportNamespaceMapping is _NOT_ enabled namespace declaration
+ // is added to delegate even though that namespace declaration was
+ // originally declared (but not used) in root element of parsed document.
+ if(!( *pDelegateAsXml ==
+ _L8("<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pDelegateAsXml);
+
+ CleanupStack::PopAndDestroy(pFragment);
+
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ CMainDomFragment* pFragment2 = CMainDomFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment2);
+
+ pParser->ParseL(KInputString, *pFragment2);
+
+ HBufC8* pAsXml2 = pFragment2->AsXmlL();
+ CleanupStack::PushL(pAsXml2);
+ if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml2);
+
+ CDelegateDomFragment& delegate2 = pFragment2->DelegateFragment();
+ HBufC8* pDelegateAsXml2 = delegate2.AsXmlL();
+ CleanupStack::PushL(pDelegateAsXml2);
+ if(!( *pDelegateAsXml2 ==
+ _L8("<DelegateFragment>DelegateContent</DelegateFragment>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pDelegateAsXml2);
+
+ CleanupStack::PopAndDestroy(pFragment2);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing3L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // In this test same namespaceuri is defined as default namespace in
+ // root element and 'c' prefixed namespace in Element2.
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<x:Element2 xmlns:x=\"nsuri\">Content2</x:Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ // Namespace declaration for prefix 'x' (and namespaceuri "nsuri")
+ // disappears from Element2 after parsing because default namespace
+ // declaration already declares namespace for uri "nsuri".
+ // => Double declaration for namespaceuri "nsuri" is not needed.
+ _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing4L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // In this test nested elements (which have same name) are tested.
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ _LIT8(KInputString2, "<Nested xmlns=\"nsuri\">\
+<Nested attr=\"attrvalue\"><Nested><Nested>Content</Nested></Nested></Nested>\
+</Nested>");
+
+ // Only namespace declaration order changes for output.
+ _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+
+ pFragment = CSenDomFragmentBase::NewL(_L8("nsuri"),_L8("Nested"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString2, *pFragment);
+
+ pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KInputString2 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing5L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // In this test nulling of default namespace is tested.
+/*
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns="" xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1 >Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+*/
+
+/*
+ // Only namespace declaration order changes for output.
+ _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+*/
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ /*CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ EUNIT_ASSERT( *pAsXml == KOutputString );
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);*/
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing6L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // when constructor CSenDomFragmentBase::NewL() is used.
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 z=\"value4\">Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+ // will be moved to all child elements (Element1, Element2, Element3 and
+ // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+ // the way CParser works <=> Namespaces are reported when namespaces are used
+ // for the first time.
+ _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nasurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\" z=\"value4\">Content2</Element2>\
+<Element3 xmlns=\"nsuri\">Content3</Element3>\
+<Element4 xmlns=\"nsuri\"/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL();
+ CleanupStack::PushL(pFragment);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing7L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // when constructor CSenDomFragmentBase::NewL() is used.
+ _LIT8(KInputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<S:Header>\
+<wsa:MessageID>URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To>http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+ // Note: If EReportNamespaceMapping is not enabled output will be following:
+ // (Namespace declaration for prefix "wsa" jumps from root element to
+ // elements (MessageID, To, Action and EndpointReference) which actually
+ // use above mentioned prefix. <=> Root element Envelope does not use
+ // "wsa" prefix.)
+ _LIT8(KOutputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<S:Header>\
+<wsa:MessageID xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+ CSenParser* parser = CSenParser::NewLC();
+ //create a CSenDomFragment
+ CSenFragmentBase* pBase = CSenDomFragmentBase::NewL();
+ CleanupStack::PushL(pBase);
+ //do the parsing
+ parser->ParseL(KInputString, *pBase);
+
+ HBufC8* pAsXml = pBase->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pBase);
+
+ pBase = CSenDomFragmentBase::NewL();
+ CleanupStack::PushL(pBase);
+ //Enable NamespaceMapping to ensure that namespace declarations will
+ //remain in exactly the same place as in original XML document
+ parser->EnableFeature(EReportNamespaceMapping);
+ //do the parsing
+ parser->ParseL(KInputString, *pBase);
+
+ pAsXml = pBase->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KInputString )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+
+ CleanupStack::PopAndDestroy(pBase);
+ CleanupStack::PopAndDestroy(parser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing8L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // when constructor CSenDomFragmentBase::NewL() is used.
+ _LIT8(KInputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<S:Header>\
+<wsa:MessageID>URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To>http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+ // Note: If EReportNamespaceMapping is not enabled output will be following:
+ // (Namespace declaration for prefix "wsa" jumps from root element to
+ // elements (MessageID, To, Action and EndpointReference) which actually
+ // use above mentioned prefix. <=> Root element Envelope does not use
+ // "wsa" prefix.)
+ _LIT8(KOutputString1, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+ _LIT8(KOutputString2, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+ CSenParser* parser = CSenParser::NewLC();
+ //create a CSenDomFragment
+ CSenFragmentBase* pBase = CSenDomFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+ _L8("Body"),
+ _L8("S"));
+ CleanupStack::PushL(pBase);
+ //do the parsing
+ parser->ParseL(KInputString, *pBase);
+
+ HBufC8* pAsXml = pBase->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pBase);
+
+ pBase = CSenDomFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+ _L8("Body"),
+ _L8("S"));
+ CleanupStack::PushL(pBase);
+ //Enable NamespaceMapping to ensure that namespace declarations will
+ //remain in exactly the same place as in original XML document
+ parser->EnableFeature(EReportNamespaceMapping);
+ //do the parsing
+ parser->ParseL(KInputString, *pBase);
+
+ pAsXml = pBase->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString2 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+
+ CleanupStack::PopAndDestroy(pBase);
+ CleanupStack::PopAndDestroy(parser);
+ Teardown();
+ return KErrNone;
+ }
+/*
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_SetContentOfLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->SetContentOfL(_L8("name"), _L8("content"));
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentOfL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->ContentOf(_L8("name"));
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+*/
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteStartElementLL(TTestResult& aResult)
+ {
+ SetupL();
+ RTagInfo info;
+ RAttributeArray array;
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->OnWriteStartElementL(info, array);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteEndElementLL(TTestResult& aResult)
+ {
+ SetupL();
+ RTagInfo info;
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->OnWriteEndElementL(info);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnIgnorableWhiteSpaceLL(TTestResult& aResult)
+ {
+ SetupL();
+ TInt var = 0;
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->OnIgnorableWhiteSpaceL(_L8("test"), var);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnSkippedEntityLL(TTestResult& aResult)
+ {
+ SetupL();
+ RString str;
+ TInt var = 0;
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->OnSkippedEntityL(str, var);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnProcessingInstructionLL(TTestResult& aResult)
+ {
+ SetupL();
+ TInt var = 0;
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->OnProcessingInstructionL(_L8("test"), _L8("test"), var);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnErrorL(TTestResult& aResult)
+ {
+ SetupL();
+ TInt var = 0;
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->OnError(var);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_GetExtendedInterfaceL(TTestResult& aResult)
+ {
+ SetupL();
+ const TInt32 var = 0;
+
+ CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ pFragment->GetExtendedInterface(var);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+ _LIT8(KElement, "<Element/>");
+ element.SetTextNoEncL(KElement);
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(element);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ // Test that when CSenFragmentBase is serialized '<' and '>' characters
+ // are NOT encoded => The content of CSenFragmentBase can include
+ // XML elements
+ if(!( *pAsXml == _L8("<Test><Element/></Test>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_1L(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_2L(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"));
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_3L(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_4L(TTestResult& aResult)
+ {
+ SetupL();
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString );
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"),
+ attrArray);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_5L(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString);
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"),
+ attrArray,
+ parentElement);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+ RBuf8 buffer;
+ parentElement.OuterXmlL(buffer);
+
+ if(!( buffer == _L8("<Parent><t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+ buffer.Close();
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_6L(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString);
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8(""),
+ attrArray,
+ parentElement,
+ document);
+ CleanupStack::PushL(pFragment);
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+ RBuf8 buffer;
+ parentElement.OuterXmlL(buffer);
+
+ if(!( buffer == _L8("<Parent><Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+ buffer.Close();
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_7L(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+ valueRString);
+ // attribute took ownership of all RStrings
+ // => All RStrings can be pop from CleanupStack
+ CleanupStack::Pop(&valueRString);
+ CleanupStack::Pop(&localNameRString);
+ CleanupStack::Pop(&nsPrefixRString);
+ CleanupStack::Pop(&nsUriRString);
+
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8(""),
+ attrArray,
+ parentElement,
+ document);
+ CleanupStack::PushL(pFragment);
+
+ RSenDocument doc = pFragment->AsDocumentL();
+ TXmlEngElement el = pFragment->AsElementL();
+ CSenFragmentBase* pFragment2 = CSenFragmentBase::NewL(el, doc);
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PushL(pFragment2);
+
+ HBufC8* pAsXml = pFragment2->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+ RBuf8 buffer;
+ parentElement.OuterXmlL(buffer);
+
+ if(!( buffer == _L8("<Parent><Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+ buffer.Close();
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment2);
+ CleanupStack::PopAndDestroy(&attrArray);
+ CleanupStack::PopAndDestroy(&attribute);
+ CleanupStack::PopAndDestroy(&stringPool);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+
+ }
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_SetDocumentL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document ;
+ document = RSenDocument::NewL();
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+
+ pFragment->SetDocument(document);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ContentLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+ element.SetEscapedTextL(_L8("<Element/>"));
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(element);
+ CleanupStack::PushL(pFragment);
+
+ TPtrC8 content = pFragment->ContentL();
+ if(!( content == _L8("<Element/>") )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NamespaceL(TTestResult& aResult)
+ {
+ SetupL();
+ RStringPool stringPool;
+ stringPool.OpenL();
+ CleanupClosePushL(stringPool);
+
+ RString nsUriRString = stringPool.OpenStringL(_L8("nsuri"));
+ CleanupClosePushL(nsUriRString);
+ RString nsPrefixRString = stringPool.OpenStringL(_L8("pr"));
+ CleanupClosePushL(nsPrefixRString);
+ RString localNameRString = stringPool.OpenStringL(_L8("LocalName"));
+ CleanupClosePushL(localNameRString);
+ RString valueRString = stringPool.OpenStringL(_L8("Value"));
+ CleanupClosePushL(valueRString);
+
+ RAttribute attribute;
+ attribute.Open(stringPool.OpenStringL(_L8("nsuri")),
+ stringPool.OpenStringL(_L8("pr")),
+ stringPool.OpenStringL(_L8("LocalName")),
+ stringPool.OpenStringL(_L8("Value")) );
+ // attribute took copies of all RStrings
+ // => All RStrings can be destroyed
+ CleanupStack::PopAndDestroy(4); // nsUriRString, nsPrefixRString, localNameRString,
+ // valueRString
+ CleanupClosePushL(attribute);
+
+ RAttributeArray attrArray;
+ // append the namespace attribute (declaration)
+ attrArray.AppendL(attribute);
+ CleanupClosePushL(attrArray);
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"),
+ attrArray);
+ CleanupStack::PushL(pFragment);
+
+ TXmlEngNamespace ns = pFragment->Namespace(_L8("pr"));
+ if(!( ns.Uri() == _L8("nsuri") )) return KErrArgument;
+
+ TXmlEngNamespace ns2 = pFragment->Namespace(_L8("x"));
+ if(!( ns2.IsUndefined() )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(); // attribute
+ CleanupStack::PopAndDestroy(); // attrArray
+ CleanupStack::PopAndDestroy(); // stringPool
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ResetContentLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ CleanupClosePushL(document);
+ TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+ element.SetEscapedTextL(_L8("Content"));
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(element);
+ CleanupStack::PushL(pFragment);
+
+ // Test that CSenFragmentBase has content before reset
+ TPtrC8 content = pFragment->ContentL();
+ if(!( content == _L8("Content") )) return KErrArgument;
+
+ pFragment->ResetContentL();
+
+ // Test that CSenFragmentBase has no content after reset
+ TPtrC8 content2 = pFragment->ContentL();
+ if(!( content2 == KNullDesC8 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(&document);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_LocalNameL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TPtrC8 localName = pFragment->LocalName();
+ if(!( localName == _L8("Test") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NsUriL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TPtrC8 localName = pFragment->NsUri();
+ if(!( localName == _L8("NsUri") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NsPrefixL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TPtrC8 localName = pFragment->NsPrefix();
+ if(!( localName == _L8("t") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsElementLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+ RBuf8 buffer;
+ CleanupClosePushL(buffer);
+ element.OuterXmlL(buffer);
+ // Serialized element should contain all the Fragment data as XML.
+ if(!( buffer == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(&buffer);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsDocumentLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ RSenDocument document = pFragment->AsDocumentL();
+ TXmlEngElement element = document.DocumentElement();
+
+ TXmlEngSerializationOptions options;
+ // Omit following declarations from the beginning of XML Document:
+ // <?xml version=\"1.0\...
+ // encoding="..."
+ // standalone="..."
+ // ?>
+ options.iOptions = options.iOptions |
+ TXmlEngSerializationOptions::KOptionOmitXMLDeclaration;
+ RBuf8 asXml;
+ document.SaveL(asXml, element, options);
+ CleanupClosePushL(asXml);
+
+ // Serialized document should contain all the Fragment data as XML.
+ if(!( asXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(&asXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ExtractElementL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+ _L8("Test"),
+ _L8("t"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->ExtractElement();
+ if(!( element.Name() == _L8("Test") )) return KErrArgument;
+ element.Remove();
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlUnicodeLL(TTestResult& aResult)
+ {
+ SetupL();
+ // Test serialization of Dom tree which has two child elements
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+ element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+
+ HBufC* pAsXml = pFragment->AsXmlUnicodeL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlLL(TTestResult& aResult)
+ {
+ SetupL();
+ // Test serialization of Dom tree which has two child elements
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+ element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_WriteAsXMLToLL(TTestResult& aResult)
+ {
+ SetupL();
+ // Test serialization of Dom tree which has two child elements
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+ element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+
+ CBufFlat* pBuf = CBufFlat::NewL(200);
+ CleanupStack::PushL(pBuf);
+ RBufWriteStream bufWs(*pBuf);
+ CleanupClosePushL(bufWs);
+ pFragment->WriteAsXMLToL(bufWs);
+
+
+ if(!( pBuf->Ptr(0) == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(&bufWs);
+ CleanupStack::PopAndDestroy(pBuf);
+
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ConsistsOfLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ TXmlEngElement element = pFragment->AsElementL();
+
+ TXmlEngElement elementchild1 = element.AddNewElementL(_L8("DirectChild"));
+ elementchild1.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //elementchild1.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils1;
+ //domUtils1.XmlEngRenameElementL(elementchild1, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+
+ TXmlEngElement elementchild2 = element.AddNewElementL(_L8("DirectChild"));
+ elementchild2.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //elementchild2.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils2;
+ //domUtils2.XmlEngRenameElementL(elementchild2, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ elementchild2.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+ CSenFragmentBase* pFragment2 = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment2);
+ TXmlEngElement element2 = pFragment2->AsElementL();
+
+ TXmlEngElement elementchild22 = element2.AddNewElementL(_L8("DirectChild"));
+ elementchild22.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //elementchild22.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils22;
+ //domUtils22.XmlEngRenameElementL(elementchild22, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ elementchild22.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+ // ConsistOfL should return ETrue because
+ // root elements of both fragments match and the only element
+ // of pFragment2 = elementchild22 is exactly the same element as
+ // elementchild2.
+ if(!( pFragment->ConsistsOfL(*pFragment2) )) return KErrArgument;
+
+ // ConsistOfL should return EFalse because
+ // Even though root elements of both fragments match
+ // there is extra element (= elementchild1) in pFragment.
+ //
+ // elementchild1 (of pFragment) can not be found from pFragment2
+ // and because of that pFragment2 does not consist of pFragment.
+ if(!( !pFragment2->ConsistsOfL(*pFragment) )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment2);
+
+ CSenFragmentBase* pFragment3 = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment3);
+ TXmlEngElement element3 = pFragment3->AsElementL();
+
+ TXmlEngElement elementchild32 = element3.AddNewElementL(_L8("DirectChild"));
+ elementchild32.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+ //elementchild32.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ //TDomUtils domUtils32;
+ //domUtils32.XmlEngRenameElementL(elementchild32, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+ elementchild32.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+ elementchild32.SetEscapedTextL(_L8("Text"));
+
+ // ConsistOfL should return EFalse because
+ // elementchild32 has content ("Text") which doesn't match
+ // to any child element of pFragment.
+ if(!( !pFragment->ConsistsOfL(*pFragment3) )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pFragment3);
+
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing1L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenFragmentBase
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+ // will be moved to all child elements (Element1, Element2, Element3 and
+ // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+ // the way CParser works <=> Namespaces are reported when namespaces are used.
+ _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nasurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\">Content2</Element2>\
+<Element3 xmlns=\"nsuri\">Content3</Element3>\
+<Element4 xmlns=\"nsuri\"/></a:Test>");
+
+ // When EReportNamespaceMapping is enabled all the namespace declarations
+ // are reported in exactly the same element as they are defined in parsed
+ // XML document.
+ // Note: The Order of namespace declarations in root element tag may change.
+ // Namespace declaration for root tag is created when fragment is created
+ // and because of that namespace declaration for root tag will be the first.
+ // In this particular case namespace declaration for prefix "a" will be
+ // the first namespace declaration because it is declared when
+ // CSenFragmentBase is created.
+ _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+
+/*
+ //tma
+ pParser->ParseBeginL();
+
+ _LIT8(KXmlParserMimeType, "text/xml");
+ pParser->ParseBeginL(KXmlParserMimeType);
+
+ CMatchData* pMatchData = CMatchData::NewLC();
+ pMatchData->SetMimeTypeL(KXmlParserMimeType);
+ pParser->ParseBeginL(*pMatchData);
+ CleanupStack::PopAndDestroy(pMatchData);
+ //tma
+*/
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ CSenFragmentBase* pFragment2 = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment2);
+
+ pParser->ParseL(KInputString, *pFragment2);
+
+ HBufC8* pAsXml2 = pFragment2->AsXmlL();
+ CleanupStack::PushL(pAsXml2);
+
+ if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml2);
+ CleanupStack::PopAndDestroy(pFragment2);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing2L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenFragmentBase which uses
+ // delegation.
+ _LIT8(KInputString, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment>DelegateContent</DelegateFragment>\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+
+ // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+ // will be moved to all child elements (Element1, Element2, Element3 and
+ // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+ // the way CParser works <=> Namespaces are reported when namespaces are used
+ // for the first time.
+ // Note: In CSenFragmentBase case DelegateFragment won't be in
+ // content of parent fragment which did the delegation.
+ _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" x=\"value4\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\">Content2</Element2></a:Test>");
+
+ // When EReportNamespaceMapping is enabled all the namespace declarations
+ // are reported in exactly the same element as they are defined in parsed
+ // XML document.
+ // Note: The Order of namespace declarations in root element tag may change.
+ // Namespace declaration for root tag is created when fragment is created
+ // and because of that namespace declaration for root tag will be the first.
+ // Note: In CSenFragmentBase case DelegateFragment won't be in
+ // content of parent fragment which did the delegation.
+ _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CMainFragment* pFragment = CMainFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+
+ CDelegateFragment& delegate = pFragment->DelegateFragment();
+ HBufC8* pDelegateAsXml = delegate.AsXmlL();
+ CleanupStack::PushL(pDelegateAsXml);
+ if(!( *pDelegateAsXml ==
+ _L8("<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pDelegateAsXml);
+
+ CleanupStack::PopAndDestroy(pFragment);
+
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ CMainFragment* pFragment2 = CMainFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment2);
+
+ pParser->ParseL(KInputString, *pFragment2);
+
+ HBufC8* pAsXml2 = pFragment2->AsXmlL();
+ CleanupStack::PushL(pAsXml2);
+ if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml2);
+
+ CDelegateFragment& delegate2 = pFragment2->DelegateFragment();
+ HBufC8* pDelegateAsXml2 = delegate2.AsXmlL();
+ CleanupStack::PushL(pDelegateAsXml2);
+ if(!( *pDelegateAsXml2 ==
+ _L8("<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pDelegateAsXml2);
+
+ CleanupStack::PopAndDestroy(pFragment2);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing3L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenFragmentBase
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<x:Element2 xmlns:x=\"nsuri\">Content2</x:Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<x:Element2 xmlns:x=\"nsuri\">Content2</x:Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing4L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenFragmentBase
+ // In this test nested elements (which have same name) are tested.
+ _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ _LIT8(KInputString2, "<Nested xmlns=\"nsuri\">\
+<Nested attr=\"attrvalue\"><Nested><Nested>Content</Nested></Nested></Nested>\
+</Nested>");
+
+ // Only namespace declaration order changes for output.
+ // Element4 which has no content will be output with
+ // start and end tags.
+ _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+ CSenParser* pParser = CSenParser::NewLC();
+
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString, *pFragment);
+
+ HBufC8* pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+
+ pFragment = CSenFragmentBase::NewL(_L8("nsuri"),_L8("Nested"));
+ CleanupStack::PushL(pFragment);
+ pParser->EnableFeature(EReportNamespaceMapping);
+
+ pParser->ParseL(KInputString2, *pFragment);
+
+ pAsXml = pFragment->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+
+ if(!( *pAsXml == KInputString2 )) return KErrArgument;
+
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pFragment);
+
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing5L(TTestResult& aResult)
+ {
+ SetupL();
+ // Parsing of XML document to CSenDomFragmentBase
+ // when constructor CSenDomFragmentBase::NewL() is used.
+ _LIT8(KInputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<S:Header>\
+<wsa:MessageID>URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To>http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+ // Note: If EReportNamespaceMapping is not enabled output will be following:
+ // (Namespace declaration for prefix "wsa" jumps from root element to
+ // elements (MessageID, To, Action and EndpointReference) which actually
+ // use above mentioned prefix. <=> Root element Envelope does not use
+ // "wsa" prefix.)
+ _LIT8(KOutputString1, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+ _LIT8(KOutputString2, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" \
+xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+ CSenParser* parser = CSenParser::NewLC();
+ //create a CSenDomFragment
+ CSenFragmentBase* pBase = CSenFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+ _L8("Body"),
+ _L8("S"));
+ CleanupStack::PushL(pBase);
+ //do the parsing
+ parser->ParseL(KInputString, *pBase);
+
+ HBufC8* pAsXml = pBase->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+ CleanupStack::PopAndDestroy(pBase);
+
+ pBase = CSenFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+ _L8("Body"),
+ _L8("S"));
+ CleanupStack::PushL(pBase);
+ //Enable NamespaceMapping to ensure that namespace declarations will
+ //remain in exactly the same place as in original XML document
+ parser->EnableFeature(EReportNamespaceMapping);
+ //do the parsing
+ parser->ParseL(KInputString, *pBase);
+
+ pAsXml = pBase->AsXmlL();
+ CleanupStack::PushL(pAsXml);
+ if(!( *pAsXml == KOutputString2 )) return KErrArgument;
+ CleanupStack::PopAndDestroy(pAsXml);
+
+ CleanupStack::PopAndDestroy(pBase);
+ CleanupStack::PopAndDestroy(parser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenParser* pParser = CSenParser::NewL();
+ delete pParser;
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLCL(TTestResult& aResult)
+ {
+ SetupL();
+ CSenParser* pParser = CSenParser::NewLC();
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewL_1L(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KXmlParserMimeType, "text/xml");
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ CParser* pParser = CParser::NewL(KXmlParserMimeType, *pFragment);
+
+ // Ownership of the pParser is transfered to pSenParser
+ CSenParser* pSenParser = CSenParser::NewL(pParser);
+ delete pSenParser;
+
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLC_1L(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KXmlParserMimeType, "text/xml");
+ CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+ CleanupStack::PushL(pFragment);
+ CParser* pParser = CParser::NewL(KXmlParserMimeType, *pFragment);
+
+ // Ownership of the pParser is transfered to pSenParser
+ CSenParser* pSenParser = CSenParser::NewLC(pParser);
+ CleanupStack::PopAndDestroy(pSenParser);
+
+ CleanupStack::PopAndDestroy(pFragment);
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewL_2L(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KXmlParserMimeType, "text/xml");
+ CSenParser* pParser = CSenParser::NewL(KXmlParserMimeType);
+ delete pParser;
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLC_2L(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KXmlParserMimeType, "text/xml");
+ CSenParser* pParser = CSenParser::NewLC(KXmlParserMimeType);
+ CleanupStack::PopAndDestroy(pParser);
+ Teardown();
+ return KErrNone;
+ }
+/*
+#if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) )
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewL_3L(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KXmlParserMimeType, "text/xml");
+ CMatchData* pMatchData = CMatchData::NewLC();
+ pMatchData->SetMimeTypeL(KXmlParserMimeType);
+ CSenParser* pParser = CSenParser::NewL(*pMatchData);
+ delete pParser;
+ CleanupStack::PopAndDestroy(pMatchData);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLC_3L(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KXmlParserMimeType, "text/xml");
+ CMatchData* pMatchData = CMatchData::NewLC();
+ pMatchData->SetMimeTypeL(KXmlParserMimeType);
+ CSenParser* pParser = CSenParser::NewLC(*pMatchData);
+ CleanupStack::PopAndDestroy(pParser);
+ CleanupStack::PopAndDestroy(pMatchData);
+ Teardown();
+ return KErrNone;
+ }
+
+#endif
+
+*/
+TInt CSenFragmentBCTest::MT_RSenDocument_NewLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ document.Close();
+ if(!( document.IsNull() )) return KErrArgument;
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_RSenDocument_NewLCL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewLC();
+ CleanupStack::PopAndDestroy();
+
+ // Can't use IsNull() function because iInternal pointer
+ // (of document) is not NULLed. Only data for which iInternal
+ // points to is deleted.
+ //EUNIT_ASSERT( document.IsNull() );
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_NewL_1L(TTestResult& aResult)
+ {
+ SetupL();
+ // Can't test RSenDocument::NewL(void* aInternal)
+ // because there is no way to get proper aInternal
+ // using public API.
+ if(!( ETrue )) return KErrArgument;
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_NewLC_1L(TTestResult& aResult)
+ {
+ SetupL();
+ // Can't test RSenDocument::NewLC(void* aInternal)
+ // because there is no way to get proper aInternal
+ // using public API.
+ if(!( ETrue )) return KErrArgument;
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_CopyL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document1 = RSenDocument::NewL();
+ TXmlEngElement element = document1.CreateDocumentElementL(_L8("Test"));
+
+ element.AddTextL(_L8("testcontent"));
+
+ RSenDocument document2 = document1.Copy();
+
+ // Check that main elements of document1 and document2
+ // are pointing to the same "in memory node" after copying.
+ if(!( element.IsSameNode(document2.DocumentElement()) )) return KErrArgument;
+
+ // Test that document2 contains the same data as document1
+ // did contain before closing document1.
+ document1.Close();
+ RBuf8 asXml;
+ TXmlEngSerializationOptions options;
+ options.iOptions = options.iOptions |
+ TXmlEngSerializationOptions::KOptionOmitXMLDeclaration;
+ document2.SaveL(asXml, element, options);
+ CleanupClosePushL(asXml);
+ if(!( asXml == _L8("<Test>testcontent</Test>") )) return KErrArgument;
+ CleanupStack::PopAndDestroy(&asXml);
+
+ document2.Close();
+ if(!( document1.IsNull() && document2.IsNull() )) return KErrArgument;
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_CloseL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ document.Close();
+ if(!( document.IsNull() )) return KErrArgument;
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_DestroyL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ document.Destroy();
+ if(!( document.IsNull() )) return KErrArgument;
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsAttachLL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ TInt retVal = document.ManualXmlEngineTlsAttachL();
+ TL(retVal == KErrNone || retVal == KErrUnknown || retVal == KErrAlreadyExists);
+ Teardown();
+ return KErrNone;
+ }
+
+TInt CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsCleanupL(TTestResult& aResult)
+ {
+ SetupL();
+ RSenDocument document = RSenDocument::NewL();
+ TInt retVal = document.ManualXmlEngineTlsCleanup();
+ TL(retVal == KErrNone || retVal == KErrNotFound );
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_TestFragmentBase_SetContentLL(TTestResult& aResult)
+ {
+ SetupL();
+ CTestFragmentBase* pFragment = CTestFragmentBase::NewL(_L8("Test"));
+ pFragment->SetContentL(_L8("Test"));
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_TestFragmentBase_AddContentLL(TTestResult& aResult)
+ {
+ SetupL();
+ CTestFragmentBase* pFragment = CTestFragmentBase::NewL(_L8("Test"));
+ pFragment->AddContentL(_L8("Test"));
+ Teardown();
+ return KErrNone;
+ }
+
+
+TInt CSenFragmentBCTest::MT_TestDomFragmentBase_SetContentOfLL(TTestResult& aResult)
+ {
+ SetupL();
+ _LIT8(KText, "Test1");
+ CTestDomFragmentBase* pFragment = CTestDomFragmentBase::NewL(_L8("Test"));
+ pFragment->SetContentOfL(_L8("Test"), _L8("Test1"));
+ TPtrC8 ptr = pFragment->ContentOf(_L8("Test"));
+ TL(ptr == KText);
+ Teardown();
+ return KErrNone;
+ }
+/*
+TInt CSenFragmentBCTest::MT_TestDomFragmentBase_ContentOfL(TTestResult& aResult)
+ {
+ SetupL();
+ Teardown();
+ return KErrNone;
+ }
+
+*/
+
+// End of File
--- a/websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp Fri Jun 18 15:01:02 2010 +0100
+++ b/websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp Thu Jul 22 16:44:27 2010 +0100
@@ -26,17 +26,17 @@
#include <SenFragmentBase.h>
#include <SenParser.h>
#include <RSenDocument.h>
-#include <xmlengdomutils.h>
+#include <xml/dom/xmlengdomutils.h>
#if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) )
#include <xml/matchdata.h>
#endif
#include <xml/parserfeature.h> // for TParserFeature enumeration
-#include <xmlengserializationoptions.h> // needed for TSerializationOptions
-#include <xmlengbinarycontainer.h>
+#include <xml/dom/xmlengserializationoptions.h> // needed for TSerializationOptions
+#include <xml/dom/xmlengbinarycontainer.h>
#include <s32mem.h>
-#include <xmlengdom.h>
+#include <xml/dom/xmlengdom.h>
// INTERNAL INCLUDES
#include "maindomfragment.h"