smsprotocols/smsstack/gsmu/src/Gsmuelem.cpp
changeset 42 3adadc800673
parent 20 244d7c5f118e
child 53 12b52b1a573e
equal deleted inserted replaced
31:8ab6687fb94c 42:3adadc800673
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 
    17 
    18 /**
    18 /**
    19  @file
    19  @file
    20 */
    20 */
    21 
    21 
       
    22 
       
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "GsmuelemTraces.h"
       
    26 #endif
       
    27 
    22 #include <gsmuelem.h>
    28 #include <gsmuelem.h>
    23 #include <gsmumsg.h>
    29 #include <gsmumsg.h>
    24 #include "Gsmumain.h"
    30 #include "Gsmumain.h"
    25 #include <gsmusar.h>
    31 #include <gsmusar.h>
    26 #include "gsmupriv.h"
    32 #include "gsmupriv.h"
   180 	} // TSmsStatus::TSmsStatus
   186 	} // TSmsStatus::TSmsStatus
   181 
   187 
   182 
   188 
   183 CSmsCommandData* CSmsCommandData::NewL(TSmsFirstOctet& aFirstOctet)
   189 CSmsCommandData* CSmsCommandData::NewL(TSmsFirstOctet& aFirstOctet)
   184 	{
   190 	{
   185 	LOGGSMU1("CSmsCommandData::NewL()");
   191 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_NEWL_1, "CSmsCommandData::NewL()");
   186 
   192 
   187 	CSmsCommandData* commanddata=new(ELeave) CSmsCommandData(aFirstOctet);
   193 	CSmsCommandData* commanddata=new(ELeave) CSmsCommandData(aFirstOctet);
   188 	CleanupStack::PushL(commanddata);
   194 	CleanupStack::PushL(commanddata);
   189 	TPtrC8 ptr;
   195 	TPtrC8 ptr;
   190 	commanddata->SetDataL(ptr);
   196 	commanddata->SetDataL(ptr);
   205  * 
   211  * 
   206  *  @return  Pointer to the newly created CSmsCommandData object.
   212  *  @return  Pointer to the newly created CSmsCommandData object.
   207  */
   213  */
   208 CSmsCommandData* CSmsCommandData::DuplicateL() const
   214 CSmsCommandData* CSmsCommandData::DuplicateL() const
   209 	{
   215 	{
   210 	LOGGSMU1("CSmsCommandData::DuplicateL()");
   216 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_DUPLICATEL_1, "CSmsCommandData::DuplicateL()");
   211 
   217 
   212 	CSmsCommandData*  smsCommandData = CSmsCommandData::NewL(iFirstOctet);
   218 	CSmsCommandData*  smsCommandData = CSmsCommandData::NewL(iFirstOctet);
   213 	CleanupStack::PushL(smsCommandData);
   219 	CleanupStack::PushL(smsCommandData);
   214 
   220 
   215 	smsCommandData->SetDataL(Data());
   221 	smsCommandData->SetDataL(Data());
   226 	} // CSmsCommandData::DuplicateL
   232 	} // CSmsCommandData::DuplicateL
   227 
   233 
   228 
   234 
   229 CSmsInformationElement& CSmsCommandData::InformationElement(TInt aIndex) const
   235 CSmsInformationElement& CSmsCommandData::InformationElement(TInt aIndex) const
   230 	{
   236 	{
   231 	LOGGSMU1("CSmsCommandData::InformationElement()");
   237 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_INFORMATIONELEMENT_1, "CSmsCommandData::InformationElement()");
   232 
   238 
   233 	CSmsInformationElement* ie=iInformationElementArray[aIndex];
   239 	CSmsInformationElement* ie=iInformationElementArray[aIndex];
   234 	return *ie;
   240 	return *ie;
   235 	} // CSmsCommandData::InformationElement
   241 	} // CSmsCommandData::InformationElement
   236 
   242 
   238 CSmsInformationElement*& CSmsCommandData::InformationElementPtr(TInt aIndex)
   244 CSmsInformationElement*& CSmsCommandData::InformationElementPtr(TInt aIndex)
   239     {
   245     {
   240     // Ignore in code coverage - not used in SMS stack and not exported
   246     // Ignore in code coverage - not used in SMS stack and not exported
   241     // but cannot be removed as impacts public header.
   247     // but cannot be removed as impacts public header.
   242     BULLSEYE_OFF    
   248     BULLSEYE_OFF    
   243     LOGGSMU1("CSmsCommandData::InformationElementPtr()");
   249     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_INFORMATIONELEMENTPTR_1, "CSmsCommandData::InformationElementPtr()");
   244     return iInformationElementArray[aIndex];
   250     return iInformationElementArray[aIndex];
   245     BULLSEYE_RESTORE
   251     BULLSEYE_RESTORE
   246     }
   252     }
   247 
   253 
   248 TBool CSmsCommandData::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,
   254 TBool CSmsCommandData::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,
   249 		TInt& aIndex) const
   255 		TInt& aIndex) const
   250 	{
   256 	{
   251 	LOGGSMU1("CSmsCommandData::InformationElementIndex()");
   257 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_INFORMATIONELEMENTINDEX_1, "CSmsCommandData::InformationElementIndex()");
   252 
   258 
   253 	TBool found=EFalse;
   259 	TBool found=EFalse;
   254 	TInt count=NumInformationElements();
   260 	TInt count=NumInformationElements();
   255 	for (TInt i=0; (!found) && (i<count); i++)
   261 	for (TInt i=0; (!found) && (i<count); i++)
   256 		if (InformationElement(i).Identifier()==aIdentifier)
   262 		if (InformationElement(i).Identifier()==aIdentifier)
   262 	} // CSmsCommandData::InformationElementIndex
   268 	} // CSmsCommandData::InformationElementIndex
   263 
   269 
   264 
   270 
   265 void CSmsCommandData::AddInformationElementL(const TSmsId aIdentifier,const TDesC8& aData)
   271 void CSmsCommandData::AddInformationElementL(const TSmsId aIdentifier,const TDesC8& aData)
   266 	{
   272 	{
   267 	LOGGSMU1("CSmsCommandData::AddInformationElementL()");
   273 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_ADDINFORMATIONELEMENTL_1, "CSmsCommandData::AddInformationElementL()");
   268 
   274 
   269 	//
   275 	//
   270 	// Currently there is no restriction on how many instances of an information element can be
   276 	// Currently there is no restriction on how many instances of an information element can be
   271 	// placed in the collection.
   277 	// placed in the collection.
   272 	// No restriction will be placed on the number of Special SMS Message Indications that can be
   278 	// No restriction will be placed on the number of Special SMS Message Indications that can be
   282 	} // CSmsCommandData::AddInformationElementL
   288 	} // CSmsCommandData::AddInformationElementL
   283 
   289 
   284 
   290 
   285 void CSmsCommandData::RemoveInformationElement(TInt aIndex)
   291 void CSmsCommandData::RemoveInformationElement(TInt aIndex)
   286 	{
   292 	{
   287 	LOGGSMU1("CSmsCommandData::RemoveInformationElement()");
   293 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_REMOVEINFORMATIONELEMENT_1, "CSmsCommandData::RemoveInformationElement()");
   288 	// Since iInformationElementArray[aIndex] is removed from iInformationElementArray, no double free issue.
   294 	// Since iInformationElementArray[aIndex] is removed from iInformationElementArray, no double free issue.
   289 	// coverity[double_free]
   295 	// coverity[double_free]
   290 	delete iInformationElementArray[aIndex];
   296 	delete iInformationElementArray[aIndex];
   291 	iInformationElementArray[aIndex] = NULL;
   297 	iInformationElementArray[aIndex] = NULL;
   292 	iInformationElementArray.Delete(aIndex);
   298 	iInformationElementArray.Delete(aIndex);
   298 	} // CSmsCommandData::RemoveInformationElement
   304 	} // CSmsCommandData::RemoveInformationElement
   299 
   305 
   300 
   306 
   301 TPtrC8 CSmsCommandData::Data() const
   307 TPtrC8 CSmsCommandData::Data() const
   302 	{
   308 	{
   303 	LOGGSMU1("CSmsCommandData::Data()");
   309 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_DATA_1, "CSmsCommandData::Data()");
   304 
   310 
   305 	TPtrC8 ptr;
   311 	TPtrC8 ptr;
   306 	ptr.Set(iBuffer->Des());
   312 	ptr.Set(iBuffer->Des());
   307 	return ptr;
   313 	return ptr;
   308 	} // CSmsCommandData::Data
   314 	} // CSmsCommandData::Data
   309 
   315 
   310 
   316 
   311 void CSmsCommandData::SetDataL(const TDesC8& aData)
   317 void CSmsCommandData::SetDataL(const TDesC8& aData)
   312 	{
   318 	{
   313 	LOGGSMU1("CSmsCommandData::SetDataL()");
   319 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_SETDATAL_1, "CSmsCommandData::SetDataL()");
   314 
   320 
   315 	TInt length=aData.Length();
   321 	TInt length=aData.Length();
   316 	__ASSERT_DEBUG(length<=KSmsMaxDataSize,Panic(KGsmuPanicCommandDataLengthTooLong));
   322 	__ASSERT_DEBUG(length<=KSmsMaxDataSize,Panic(KGsmuPanicCommandDataLengthTooLong));
   317 	HBufC8* buffer=HBufC8::NewL(length);
   323 	HBufC8* buffer=HBufC8::NewL(length);
   318 	delete iBuffer;
   324 	delete iBuffer;
   322 	} // CSmsCommandData::SetDataL
   328 	} // CSmsCommandData::SetDataL
   323 
   329 
   324 
   330 
   325 TUint8* CSmsCommandData::EncodeL(TUint8* aPtr) const
   331 TUint8* CSmsCommandData::EncodeL(TUint8* aPtr) const
   326 	{
   332 	{
   327 	LOGGSMU1("CSmsCommandData::EncodeL()");
   333 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_ENCODEL_1, "CSmsCommandData::EncodeL()");
   328 
   334 
   329 	__ASSERT_DEBUG(iBuffer->Length()<=MaxDataLength(),Panic(KGsmuPanicCommandDataBufferTooLong));
   335 	__ASSERT_DEBUG(iBuffer->Length()<=MaxDataLength(),Panic(KGsmuPanicCommandDataBufferTooLong));
   330 	TSmsOctet datalength=iBuffer->Length()+TSmsOctet(TotalHeaderLengthInUDLUnits());
   336 	TSmsOctet datalength=iBuffer->Length()+TSmsOctet(TotalHeaderLengthInUDLUnits());
   331 	aPtr=datalength.EncodeL(aPtr);
   337 	aPtr=datalength.EncodeL(aPtr);
   332 	TPtr8 ptr((TUint8*) aPtr,datalength);
   338 	TPtr8 ptr((TUint8*) aPtr,datalength);
   347 	} // CSmsCommandData::EncodeL
   353 	} // CSmsCommandData::EncodeL
   348 
   354 
   349 
   355 
   350 void CSmsCommandData::DecodeL(TGsmuLex8& aPdu)
   356 void CSmsCommandData::DecodeL(TGsmuLex8& aPdu)
   351 	{
   357 	{
   352 	LOGGSMU1("CSmsCommandData::DecodeL()");
   358 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_DECODEL_1, "CSmsCommandData::DecodeL()");
   353 
   359 
   354 	iInformationElementArray.ResetAndDestroy();
   360 	iInformationElementArray.ResetAndDestroy();
   355 	const TBool headerPresent=HeaderPresent();
   361 	const TBool headerPresent=HeaderPresent();
   356 	TSmsOctet dataLength;
   362 	TSmsOctet dataLength;
   357 	dataLength.DecodeL(aPdu);
   363 	dataLength.DecodeL(aPdu);
   415 	} // CSmsCommandData::CSmsCommandData
   421 	} // CSmsCommandData::CSmsCommandData
   416 
   422 
   417 
   423 
   418 TInt CSmsCommandData::HeaderLength() const
   424 TInt CSmsCommandData::HeaderLength() const
   419 	{
   425 	{
   420 	LOGGSMU1("CSmsCommandData::HeaderLength()");
   426 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_HEADERLENGTH_1, "CSmsCommandData::HeaderLength()");
   421 
   427 
   422 	TInt headerLength=0;
   428 	TInt headerLength=0;
   423 	for (TInt i=0; i<NumInformationElements(); i++)
   429 	for (TInt i=0; i<NumInformationElements(); i++)
   424 		headerLength+=iInformationElementArray[i]->Length();
   430 		headerLength+=iInformationElementArray[i]->Length();
   425 	return headerLength;
   431 	return headerLength;
   426 	} // CSmsCommandData::HeaderLength
   432 	} // CSmsCommandData::HeaderLength
   427 
   433 
   428 
   434 
   429 TInt CSmsCommandData::TotalHeaderLengthInUDLUnits() const
   435 TInt CSmsCommandData::TotalHeaderLengthInUDLUnits() const
   430 	{
   436 	{
   431 	LOGGSMU1("CSmsCommandData::TotalHeaderLengthInUDLUnits()");
   437 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_TOTALHEADERLENGTHINUDLUNITS_1, "CSmsCommandData::TotalHeaderLengthInUDLUnits()");
   432 
   438 
   433 	if (iInformationElementArray.Count()==0)
   439 	if (iInformationElementArray.Count()==0)
   434 		return 0;
   440 		return 0;
   435 	else
   441 	else
   436 		return (HeaderLength()+1);   // +1 stands for  UDHL
   442 		return (HeaderLength()+1);   // +1 stands for  UDHL
   437 	} // CSmsCommandData::TotalHeaderLengthInUDLUnits
   443 	} // CSmsCommandData::TotalHeaderLengthInUDLUnits
   438 
   444 
   439 
   445 
   440 TBool CSmsCommandData::HeaderPresent() const
   446 TBool CSmsCommandData::HeaderPresent() const
   441 	{
   447 	{
   442 	LOGGSMU1("CSmsCommandData::HeaderPresent()");
   448 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_HEADERPRESENT_1, "CSmsCommandData::HeaderPresent()");
   443 
   449 
   444 	return (iFirstOctet&TSmsFirstOctet::ESmsUDHIMask)==TSmsFirstOctet::ESmsUDHIHeaderPresent;
   450 	return (iFirstOctet&TSmsFirstOctet::ESmsUDHIMask)==TSmsFirstOctet::ESmsUDHIHeaderPresent;
   445 	} // CSmsCommandData::HeaderPresent
   451 	} // CSmsCommandData::HeaderPresent
   446 
   452 
   447 
   453 
   448 void CSmsCommandData::SetHeaderPresent(TBool aHeaderPresent)
   454 void CSmsCommandData::SetHeaderPresent(TBool aHeaderPresent)
   449 	{
   455 	{
   450 	LOGGSMU1("CSmsCommandData::SetHeaderPresent()");
   456 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_SETHEADERPRESENT_1, "CSmsCommandData::SetHeaderPresent()");
   451 
   457 
   452 	iFirstOctet=aHeaderPresent? (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderPresent: (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderNotPresent;
   458 	iFirstOctet=aHeaderPresent? (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderPresent: (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderNotPresent;
   453 	} // CSmsCommandData::SetHeaderPresent
   459 	} // CSmsCommandData::SetHeaderPresent
   454 
   460 
   455 
   461 
   478 	} // TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator
   484 	} // TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator
   479 
   485 
   480 
   486 
   481 void TSmsProtocolIdentifier::SetTelematicDeviceIndicator(TSmsTelematicDeviceIndicator aIndicator)
   487 void TSmsProtocolIdentifier::SetTelematicDeviceIndicator(TSmsTelematicDeviceIndicator aIndicator)
   482 	{
   488 	{
   483 	LOGGSMU1("TSmsProtocolIdentifier::SetTelematicDeviceIndicator()");
   489 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSPROTOCOLIDENTIFIER_SETTELEMATICDEVICEINDICATOR_1, "TSmsProtocolIdentifier::SetTelematicDeviceIndicator()");
   484 
   490 
   485 	__ASSERT_DEBUG(PIDType()==ESmsPIDTelematicInterworking,Panic(KGsmuPanicNoTelematicInterworking));
   491 	__ASSERT_DEBUG(PIDType()==ESmsPIDTelematicInterworking,Panic(KGsmuPanicNoTelematicInterworking));
   486 
   492 
   487 	//iValue=(TUint8) ((iValue&ESmsPIDTypeMask)|aIndicator);
   493 	//iValue=(TUint8) ((iValue&ESmsPIDTypeMask)|aIndicator);
   488 	iValue=(TUint8) ((iValue&(~EPIDTelematicDeviceIndicatorMask))|aIndicator);
   494 	iValue=(TUint8) ((iValue&(~EPIDTelematicDeviceIndicatorMask))|aIndicator);
   496 	} // TSmsProtocolIdentifier::TSmsTelematicDeviceType
   502 	} // TSmsProtocolIdentifier::TSmsTelematicDeviceType
   497 
   503 
   498 
   504 
   499 void TSmsProtocolIdentifier::SetTelematicDeviceType(TSmsTelematicDeviceType aDeviceType)
   505 void TSmsProtocolIdentifier::SetTelematicDeviceType(TSmsTelematicDeviceType aDeviceType)
   500 	{
   506 	{
   501 	LOGGSMU1("TSmsProtocolIdentifier::SetTelematicDeviceType()");
   507 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSPROTOCOLIDENTIFIER_SETTELEMATICDEVICETYPE_1, "TSmsProtocolIdentifier::SetTelematicDeviceType()");
   502 
   508 
   503 	__ASSERT_DEBUG(TelematicDeviceIndicator()==ESmsTelematicDevice,Panic(KGsmuPanicNoTelematicDevice));
   509 	__ASSERT_DEBUG(TelematicDeviceIndicator()==ESmsTelematicDevice,Panic(KGsmuPanicNoTelematicDevice));
   504 	iValue=(TUint8) ((iValue&(~ESmsTelematicDeviceTypeMask))|aDeviceType);
   510 	iValue=(TUint8) ((iValue&(~ESmsTelematicDeviceTypeMask))|aDeviceType);
   505 	} // TSmsProtocolIdentifier::SetTelematicDeviceType
   511 	} // TSmsProtocolIdentifier::SetTelematicDeviceType
   506 
   512 
   508 TInt TSmsProtocolIdentifier::ShortMessageALProtocol() const
   514 TInt TSmsProtocolIdentifier::ShortMessageALProtocol() const
   509     {
   515     {
   510     // Ignore in code coverage - not used in SMS stack and not exported
   516     // Ignore in code coverage - not used in SMS stack and not exported
   511     // but cannot be removed as impacts public header.
   517     // but cannot be removed as impacts public header.
   512     BULLSEYE_OFF    
   518     BULLSEYE_OFF    
   513     LOGGSMU1("TSmsProtocolIdentifier::ShortMessageALProtocol()");
   519     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSPROTOCOLIDENTIFIER_SHORTMESSAGEALPROTOCOL_1, "TSmsProtocolIdentifier::ShortMessageALProtocol()");
   514     
   520     
   515     __ASSERT_DEBUG(TelematicDeviceIndicator()==ESmsNoTelematicDevice,Panic(KGsmuPanicNoTelematicDevice));
   521     __ASSERT_DEBUG(TelematicDeviceIndicator()==ESmsNoTelematicDevice,Panic(KGsmuPanicNoTelematicDevice));
   516     return (TSmsShortMessageALProtocol) (iValue&ESmsShortMessageALProtocolMask);
   522     return (TSmsShortMessageALProtocol) (iValue&ESmsShortMessageALProtocolMask);
   517     BULLSEYE_RESTORE
   523     BULLSEYE_RESTORE
   518     }
   524     }
   520 void TSmsProtocolIdentifier::SetShortMessageALProtocol(TSmsShortMessageALProtocol aProtocol)
   526 void TSmsProtocolIdentifier::SetShortMessageALProtocol(TSmsShortMessageALProtocol aProtocol)
   521     {
   527     {
   522     // Ignore in code coverage - not used in SMS stack and not exported
   528     // Ignore in code coverage - not used in SMS stack and not exported
   523     // but cannot be removed as impacts public header.
   529     // but cannot be removed as impacts public header.
   524     BULLSEYE_OFF    
   530     BULLSEYE_OFF    
   525     LOGGSMU1("TSmsProtocolIdentifier::SetShortMessageALProtocol()");
   531     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSPROTOCOLIDENTIFIER_SETSHORTMESSAGEALPROTOCOL_1, "TSmsProtocolIdentifier::SetShortMessageALProtocol()");
   526     
   532     
   527     __ASSERT_DEBUG(TelematicDeviceIndicator()==ESmsNoTelematicDevice,Panic(KGsmuPanicNoTelematicDevice));
   533     __ASSERT_DEBUG(TelematicDeviceIndicator()==ESmsNoTelematicDevice,Panic(KGsmuPanicNoTelematicDevice));
   528     iValue=(TUint8) ((iValue&(~ESmsShortMessageALProtocolMask))|aProtocol);
   534     iValue=(TUint8) ((iValue&(~ESmsShortMessageALProtocolMask))|aProtocol);
   529     BULLSEYE_RESTORE
   535     BULLSEYE_RESTORE
   530     }
   536     }
   531 
   537 
   532 TInt TSmsProtocolIdentifier::ShortMessageType() const
   538 TInt TSmsProtocolIdentifier::ShortMessageType() const
   533 	{
   539 	{
   534 	LOGGSMU1("TSmsProtocolIdentifier::ShortMessageType()");
   540 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSPROTOCOLIDENTIFIER_SHORTMESSAGETYPE_1, "TSmsProtocolIdentifier::ShortMessageType()");
   535 
   541 
   536 	__ASSERT_DEBUG(PIDType()==ESmsPIDShortMessageType,Panic(KGsmuPanicNoShortMessageType));
   542 	__ASSERT_DEBUG(PIDType()==ESmsPIDShortMessageType,Panic(KGsmuPanicNoShortMessageType));
   537 	return (TSmsShortMessageType) (iValue&ESmsShortMessageTypeMask);
   543 	return (TSmsShortMessageType) (iValue&ESmsShortMessageTypeMask);
   538 	} // TSmsProtocolIdentifier::ShortMessageType
   544 	} // TSmsProtocolIdentifier::ShortMessageType
   539 
   545 
   540 
   546 
   541 void TSmsProtocolIdentifier::SetShortMessageType(TSmsShortMessageType aShortMessageType)
   547 void TSmsProtocolIdentifier::SetShortMessageType(TSmsShortMessageType aShortMessageType)
   542 	{
   548 	{
   543 	LOGGSMU1("TSmsProtocolIdentifier::SetShortMessageType()");
   549 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSPROTOCOLIDENTIFIER_SETSHORTMESSAGETYPE_1, "TSmsProtocolIdentifier::SetShortMessageType()");
   544 
   550 
   545 	__ASSERT_DEBUG(PIDType()==ESmsPIDShortMessageType,Panic(KGsmuPanicNoShortMessageType));
   551 	__ASSERT_DEBUG(PIDType()==ESmsPIDShortMessageType,Panic(KGsmuPanicNoShortMessageType));
   546 	//iValue=(TUint8) ((iValue&(~ESmsPIDTypeMask))|aShortMessageType);
   552 	//iValue=(TUint8) ((iValue&(~ESmsPIDTypeMask))|aShortMessageType);
   547 	iValue=(TUint8) ((iValue&(~ESmsShortMessageTypeMask))|aShortMessageType);
   553 	iValue=(TUint8) ((iValue&(~ESmsShortMessageTypeMask))|aShortMessageType);
   548 	} // TSmsProtocolIdentifier::SetShortMessageType
   554 	} // TSmsProtocolIdentifier::SetShortMessageType
   557 	} // CSmsDeliverReport::DecodeL
   563 	} // CSmsDeliverReport::DecodeL
   558 
   564 
   559 
   565 
   560 TBool TSmsDataCodingScheme::TextCompressed() const
   566 TBool TSmsDataCodingScheme::TextCompressed() const
   561 	{
   567 	{
   562 	LOGGSMU1("TSmsDataCodingScheme::TextCompressed()");
   568 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_TEXTCOMPRESSED_1, "TSmsDataCodingScheme::TextCompressed()");
   563 
   569 
   564 	TInt bits7to4=Bits7To4();
   570 	TInt bits7to4=Bits7To4();
   565 	return (bits7to4==ESmsDCSTextCompressedWithNoClassInfo)    || (bits7to4==ESmsDCSTextCompressedWithClassInfo)      ||
   571 	return (bits7to4==ESmsDCSTextCompressedWithNoClassInfo)    || (bits7to4==ESmsDCSTextCompressedWithClassInfo)      ||
   566            (bits7to4==ESmsDCSAutoDelNoClassInfoCompressedText) || (bits7to4==ESmsDCSAutoDelClassInfoTextCompressedText);
   572            (bits7to4==ESmsDCSAutoDelNoClassInfoCompressedText) || (bits7to4==ESmsDCSAutoDelClassInfoTextCompressedText);
   567 	} // TSmsDataCodingScheme::TextCompressed
   573 	} // TSmsDataCodingScheme::TextCompressed
   568 
   574 
   569 
   575 
   570 void TSmsDataCodingScheme::SetTextCompressed(TBool aCompressed)
   576 void TSmsDataCodingScheme::SetTextCompressed(TBool aCompressed)
   571 	{
   577 	{
   572 	LOGGSMU1("TSmsDataCodingScheme::SetTextCompressed()");
   578 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETTEXTCOMPRESSED_1, "TSmsDataCodingScheme::SetTextCompressed()");
   573 
   579 
   574 	TInt bits7to4=Bits7To4();
   580 	TInt bits7to4=Bits7To4();
   575 	if (aCompressed)
   581 	if (aCompressed)
   576 		{
   582 		{
   577 		switch (bits7to4)
   583 		switch (bits7to4)
   645 	} // TSmsDataCodingScheme::SetTextCompressed
   651 	} // TSmsDataCodingScheme::SetTextCompressed
   646 
   652 
   647 
   653 
   648 TSmsDataCodingScheme::TSmsAlphabet TSmsDataCodingScheme::Alphabet() const
   654 TSmsDataCodingScheme::TSmsAlphabet TSmsDataCodingScheme::Alphabet() const
   649 	{
   655 	{
   650 	LOGGSMU1("TSmsDataCodingScheme::TSmsAlphabet()");
   656 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_ALPHABET_1, "TSmsDataCodingScheme::TSmsAlphabet()");
   651 
   657 
   652 	TInt bits7to4=Bits7To4();
   658 	TInt bits7to4=Bits7To4();
   653 	TInt alphabet=ESmsAlphabet7Bit;
   659 	TInt alphabet=ESmsAlphabet7Bit;
   654 	switch (bits7to4)
   660 	switch (bits7to4)
   655 		{
   661 		{
   680 			{
   686 			{
   681 			alphabet=ESmsAlphabetUCS2;
   687 			alphabet=ESmsAlphabetUCS2;
   682 			break;
   688 			break;
   683 			}
   689 			}
   684 		default:
   690 		default:
   685 		    LOGGSMU1("TSmsDataCodingScheme::Alphabet() WARNING! default case has been reached");
   691 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_ALPHABET_2, "TSmsDataCodingScheme::Alphabet() WARNING! default case has been reached");
   686             break;
   692             break;
   687  		}
   693  		}
   688 	return (TSmsAlphabet) alphabet;
   694 	return (TSmsAlphabet) alphabet;
   689 	} // TSmsDataCodingScheme::TSmsAlphabet
   695 	} // TSmsDataCodingScheme::TSmsAlphabet
   690 
   696 
   691 void TSmsDataCodingScheme::SetAlphabet(TSmsAlphabet aAlphabet)
   697 void TSmsDataCodingScheme::SetAlphabet(TSmsAlphabet aAlphabet)
   692 	{
   698 	{
   693 	LOGGSMU1("TSmsDataCodingScheme::SetAlphabet()");
   699 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETALPHABET_1, "TSmsDataCodingScheme::SetAlphabet()");
   694 
   700 
   695 	TInt bits7to4=Bits7To4();
   701 	TInt bits7to4=Bits7To4();
   696 	switch (bits7to4)
   702 	switch (bits7to4)
   697 		{
   703 		{
   698 		case (ESmsDCSTextUncompressedWithNoClassInfo):
   704 		case (ESmsDCSTextUncompressedWithNoClassInfo):
   717 			}
   723 			}
   718 		case (ESmsDCSMessageWaitingIndicationDiscardMessage):
   724 		case (ESmsDCSMessageWaitingIndicationDiscardMessage):
   719 			{
   725 			{
   720             if (aAlphabet!=ESmsAlphabet7Bit)
   726             if (aAlphabet!=ESmsAlphabet7Bit)
   721                 {
   727                 {
   722                 LOGGSMU3("TSmsDataCodingScheme::SetAlphabet() WARNING! Not Supported With Discard Message  [Bits7To4=%d], [aAlphabet=%d]", bits7to4, aAlphabet);
   728                 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETALPHABET_2, "TSmsDataCodingScheme::SetAlphabet() WARNING! Not Supported With Discard Message  [Bits7To4=%d], [aAlphabet=%d]", bits7to4, aAlphabet);
   723                 }
   729                 }
   724 			break;
   730 			break;
   725 			}
   731 			}
   726 		case (ESmsDCSMessageWaitingIndication7Bit):
   732 		case (ESmsDCSMessageWaitingIndication7Bit):
   727 			{
   733 			{
   729  			    {
   735  			    {
   730 				iValue=(TUint8) (ESmsDCSMessageWaitingIndicationUCS2|(iValue&(~ESmsDCSBits7To4Mask)));
   736 				iValue=(TUint8) (ESmsDCSMessageWaitingIndicationUCS2|(iValue&(~ESmsDCSBits7To4Mask)));
   731  			    }
   737  			    }
   732  			else 
   738  			else 
   733                 {
   739                 {
   734         		LOGGSMU3("TSmsDataCodingScheme::SetAlphabet() WARNING! Not Supported With Discard Message  [Bits7To4=%d], [aAlphabet=%d]", bits7to4, aAlphabet);
   740         		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETALPHABET_3, "TSmsDataCodingScheme::SetAlphabet() WARNING! Not Supported With Discard Message  [Bits7To4=%d], [aAlphabet=%d]", bits7to4, aAlphabet);
   735 			    }	     
   741 			    }	     
   736 			break;
   742 			break;
   737 			}
   743 			}
   738 		case (ESmsDCSMessageWaitingIndicationUCS2):
   744 		case (ESmsDCSMessageWaitingIndicationUCS2):
   739 			{
   745 			{
   741 			    {
   747 			    {
   742 				iValue=(TUint8) (ESmsDCSMessageWaitingIndication7Bit|(iValue&(~ESmsDCSBits7To4Mask)));
   748 				iValue=(TUint8) (ESmsDCSMessageWaitingIndication7Bit|(iValue&(~ESmsDCSBits7To4Mask)));
   743 			    }
   749 			    }
   744 			else 
   750 			else 
   745 			    {
   751 			    {
   746 				LOGGSMU3("TSmsDataCodingScheme::SetAlphabet() WARNING! Not Supported With Discard Message  [Bits7To4=%d], [aAlphabet=%d]", bits7to4, aAlphabet);
   752 				OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETALPHABET_4, "TSmsDataCodingScheme::SetAlphabet() WARNING! Not Supported With Discard Message  [Bits7To4=%d], [aAlphabet=%d]", bits7to4, aAlphabet);
   747 			    }
   753 			    }
   748 			break;
   754 			break;
   749 			}
   755 			}
   750 		default:
   756 		default:
   751 		    LOGGSMU1("TSmsDataCodingScheme::SetAlphabet() WARNING! default case has been reached");
   757 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETALPHABET_5, "TSmsDataCodingScheme::SetAlphabet() WARNING! default case has been reached");
   752             break;
   758             break;
   753       		}
   759       		}
   754 	} // TSmsDataCodingScheme::SetAlphabet
   760 	} // TSmsDataCodingScheme::SetAlphabet
   755 
   761 
   756 
   762 
   757 TBool TSmsDataCodingScheme::Class(TSmsClass& aClass) const
   763 TBool TSmsDataCodingScheme::Class(TSmsClass& aClass) const
   758 	{
   764 	{
   759 	LOGGSMU1("TSmsDataCodingScheme::Class()");
   765 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_CLASS_1, "TSmsDataCodingScheme::Class()");
   760 
   766 
   761 	switch (Bits7To4())
   767 	switch (Bits7To4())
   762 		{
   768 		{
   763 		case (ESmsDCSTextUncompressedWithClassInfo):
   769 		case (ESmsDCSTextUncompressedWithClassInfo):
   764 		case (ESmsDCSTextCompressedWithClassInfo):
   770 		case (ESmsDCSTextCompressedWithClassInfo):
   773 	} // TSmsDataCodingScheme::Class
   779 	} // TSmsDataCodingScheme::Class
   774 
   780 
   775 
   781 
   776 void TSmsDataCodingScheme::SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass)
   782 void TSmsDataCodingScheme::SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass)
   777 	{
   783 	{
   778 	LOGGSMU1("TSmsDataCodingScheme::SetClass()");
   784 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETCLASS_1, "TSmsDataCodingScheme::SetClass()");
   779 
   785 
   780 	TInt bits7to4=Bits7To4();
   786 	TInt bits7to4=Bits7To4();
   781 	if (aClassDefined)
   787 	if (aClassDefined)
   782 		{
   788 		{
   783 		switch (bits7to4)
   789 		switch (bits7to4)
   811 				{
   817 				{
   812 				iValue=(TUint8) (iValue&(~ESmsClassMask)|aClass);
   818 				iValue=(TUint8) (iValue&(~ESmsClassMask)|aClass);
   813 				break;
   819 				break;
   814 				}
   820 				}
   815 			default:
   821 			default:
   816 		        LOGGSMU1("WARNING! default case has been reached");
   822 		        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETCLASS_2, "WARNING! default case has been reached");
   817                 break;
   823                 break;
   818 			}
   824 			}
   819 		}
   825 		}
   820 	else
   826 	else
   821 		{
   827 		{
   861 	} // TSmsDataCodingScheme::SetClass
   867 	} // TSmsDataCodingScheme::SetClass
   862 
   868 
   863 
   869 
   864 TSmsDataCodingScheme::TSmsIndicationState TSmsDataCodingScheme::IndicationState() const
   870 TSmsDataCodingScheme::TSmsIndicationState TSmsDataCodingScheme::IndicationState() const
   865 	{
   871 	{
   866 	LOGGSMU1("TSmsDataCodingScheme::IndicationState()");
   872 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_INDICATIONSTATE_1, "TSmsDataCodingScheme::IndicationState()");
   867 
   873 
   868 	TInt bits7to4=Bits7To4();
   874 	TInt bits7to4=Bits7To4();
   869 	TSmsIndicationState state=ESmsIndicationInactive;
   875 	TSmsIndicationState state=ESmsIndicationInactive;
   870 	switch (bits7to4)
   876 	switch (bits7to4)
   871 		{
   877 		{
   875 			{
   881 			{
   876 			state=(TSmsIndicationState) (iValue&ESmsIndicationStateMask);
   882 			state=(TSmsIndicationState) (iValue&ESmsIndicationStateMask);
   877 			break;
   883 			break;
   878 			}
   884 			}
   879 		default:
   885 		default:
   880 		    LOGGSMU1("WARNING! default case has been reached");
   886 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_INDICATIONSTATE_2, "WARNING! default case has been reached");
   881             break;
   887             break;
   882   		}
   888   		}
   883 	return state;
   889 	return state;
   884 	} // TSmsDataCodingScheme::TSmsIndicationState
   890 	} // TSmsDataCodingScheme::TSmsIndicationState
   885 
   891 
   886 
   892 
   887 void TSmsDataCodingScheme::SetIndicationState(TSmsIndicationState aState)
   893 void TSmsDataCodingScheme::SetIndicationState(TSmsIndicationState aState)
   888 	{
   894 	{
   889 	LOGGSMU1("TSmsDataCodingScheme::SetIndicationState()");
   895 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETINDICATIONSTATE_1, "TSmsDataCodingScheme::SetIndicationState()");
   890 
   896 
   891 	TInt bits7to4=Bits7To4();
   897 	TInt bits7to4=Bits7To4();
   892 	switch (bits7to4)
   898 	switch (bits7to4)
   893 		{
   899 		{
   894 		case (ESmsDCSMessageWaitingIndicationDiscardMessage):
   900 		case (ESmsDCSMessageWaitingIndicationDiscardMessage):
   897 			{
   903 			{
   898 			iValue=(TUint8) (aState | (iValue&(~ESmsIndicationStateMask)));
   904 			iValue=(TUint8) (aState | (iValue&(~ESmsIndicationStateMask)));
   899 			break;
   905 			break;
   900 			}
   906 			}
   901 		default:
   907 		default:
   902 		    LOGGSMU1("TSmsDataCodingScheme::SetIndicationState() WARNING! default case has been reached");
   908 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETINDICATIONSTATE_2, "TSmsDataCodingScheme::SetIndicationState() WARNING! default case has been reached");
   903             break;
   909             break;
   904   		}
   910   		}
   905 	} // TSmsDataCodingScheme::SetIndicationState
   911 	} // TSmsDataCodingScheme::SetIndicationState
   906 
   912 
   907 
   913 
   908 TSmsDataCodingScheme::TSmsIndicationType TSmsDataCodingScheme::IndicationType() const
   914 TSmsDataCodingScheme::TSmsIndicationType TSmsDataCodingScheme::IndicationType() const
   909 	{
   915 	{
   910 	LOGGSMU1("TSmsDataCodingScheme::IndicationType()");
   916 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_INDICATIONTYPE_1, "TSmsDataCodingScheme::IndicationType()");
   911 
   917 
   912 	TInt bits7to4=Bits7To4();
   918 	TInt bits7to4=Bits7To4();
   913 	TSmsIndicationType type=ESmsVoicemailMessageWaiting;
   919 	TSmsIndicationType type=ESmsVoicemailMessageWaiting;
   914 	switch (bits7to4)
   920 	switch (bits7to4)
   915 		{
   921 		{
   919 			{
   925 			{
   920 			type=(TSmsIndicationType) (iValue&ESmsIndicationTypeMask);
   926 			type=(TSmsIndicationType) (iValue&ESmsIndicationTypeMask);
   921 			break;
   927 			break;
   922 			}
   928 			}
   923 		default:
   929 		default:
   924 		    LOGGSMU1("TSmsDataCodingScheme::IndicationType() WARNING default case has been reached");
   930 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_INDICATIONTYPE_2, "TSmsDataCodingScheme::IndicationType() WARNING default case has been reached");
   925             break;
   931             break;
   926 		}
   932 		}
   927 	return type;
   933 	return type;
   928 	} // TSmsDataCodingScheme::TSmsIndicationType
   934 	} // TSmsDataCodingScheme::TSmsIndicationType
   929 
   935 
   930 
   936 
   931 void TSmsDataCodingScheme::SetIndicationType(TSmsIndicationType aType)
   937 void TSmsDataCodingScheme::SetIndicationType(TSmsIndicationType aType)
   932 	{
   938 	{
   933 	LOGGSMU1("TSmsDataCodingScheme::SetIndicationType()");
   939 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETINDICATIONTYPE_1, "TSmsDataCodingScheme::SetIndicationType()");
   934 
   940 
   935 	TInt bits7to4=Bits7To4();
   941 	TInt bits7to4=Bits7To4();
   936 	switch (bits7to4)
   942 	switch (bits7to4)
   937 		{
   943 		{
   938 		case (ESmsDCSMessageWaitingIndicationDiscardMessage):
   944 		case (ESmsDCSMessageWaitingIndicationDiscardMessage):
   941 			{
   947 			{
   942 			iValue=(TUint8) (aType | (iValue&(~ESmsIndicationTypeMask)));
   948 			iValue=(TUint8) (aType | (iValue&(~ESmsIndicationTypeMask)));
   943 			break;
   949 			break;
   944 			}
   950 			}
   945 		default:
   951 		default:
   946 		    LOGGSMU1("TSmsDataCodingScheme::SetIndicationType() WARNING! default case has been reached");
   952 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSDATACODINGSCHEME_SETINDICATIONTYPE_2, "TSmsDataCodingScheme::SetIndicationType() WARNING! default case has been reached");
   947             break;
   953             break;
   948  		}
   954  		}
   949 	} // TSmsDataCodingScheme::SetIndicationType
   955 	} // TSmsDataCodingScheme::SetIndicationType
   950 
   956 
   951 
   957 
   960  *  @return New CSmsAlphabetConverter object
   966  *  @return New CSmsAlphabetConverter object
   961  *  @capability None
   967  *  @capability None
   962  */
   968  */
   963 EXPORT_C CSmsAlphabetConverter* CSmsAlphabetConverter::NewLC(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsDataCodingScheme::TSmsAlphabet aSmsAlphabet,TBool aIsBinary)
   969 EXPORT_C CSmsAlphabetConverter* CSmsAlphabetConverter::NewLC(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsDataCodingScheme::TSmsAlphabet aSmsAlphabet,TBool aIsBinary)
   964 	{
   970 	{
   965 	LOGGSMU1("CSmsAlphabetConverter::NewLC()");
   971 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSALPHABETCONVERTER_NEWLC_1, "CSmsAlphabetConverter::NewLC()");
   966 
   972 
   967 	CSmsAlphabetConverter* converter=new (ELeave)CSmsAlphabetConverter(aCharacterSetConverter,aFs,aSmsAlphabet,aIsBinary);
   973 	CSmsAlphabetConverter* converter=new (ELeave)CSmsAlphabetConverter(aCharacterSetConverter,aFs,aSmsAlphabet,aIsBinary);
   968 	CleanupStack::PushL(converter);
   974 	CleanupStack::PushL(converter);
   969 	converter->ConstructL();
   975 	converter->ConstructL();
   970 	return converter;
   976 	return converter;
  1001 //
  1007 //
  1002 // Ensures this is a supported character set if not binary conversion
  1008 // Ensures this is a supported character set if not binary conversion
  1003 //
  1009 //
  1004 void CSmsAlphabetConverter::ConstructL()
  1010 void CSmsAlphabetConverter::ConstructL()
  1005 	{
  1011 	{
  1006 	LOGGSMU1("CSmsAlphabetConverter::ConstructL()");
  1012 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONSTRUCTL_1, "CSmsAlphabetConverter::ConstructL()");
  1007 
  1013 
  1008 
  1014 
  1009 	if (!iIsBinary)
  1015 	if (!iIsBinary)
  1010 		{
  1016 		{
  1011 		switch (iSmsAlphabet)
  1017 		switch (iSmsAlphabet)
  1033 // clients to provided efficient converted length calculation where no
  1039 // clients to provided efficient converted length calculation where no
  1034 // conversion is required.
  1040 // conversion is required.
  1035 //
  1041 //
  1036 void CSmsAlphabetConverter::ConversionPropertiesL(TSmsAlphabetConversionProperties& aConversionProperties) const
  1042 void CSmsAlphabetConverter::ConversionPropertiesL(TSmsAlphabetConversionProperties& aConversionProperties) const
  1037 	{
  1043 	{
  1038 	LOGGSMU1("CSmsAlphabetConverter::ConversionPropertiesL()");
  1044 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERSIONPROPERTIESL_1, "CSmsAlphabetConverter::ConversionPropertiesL()");
  1039 
  1045 
  1040 
  1046 
  1041 	// Set defaults
  1047 	// Set defaults
  1042 	aConversionProperties.iWidthConversion=ESmsAlphabetWidthConversionFixed;
  1048 	aConversionProperties.iWidthConversion=ESmsAlphabetWidthConversionFixed;
  1043 	aConversionProperties.iUDElementsPerNativeCharacter=1;
  1049 	aConversionProperties.iUDElementsPerNativeCharacter=1;
  1075  *  @return Converted characters
  1081  *  @return Converted characters
  1076  *  @capability None
  1082  *  @capability None
  1077  */
  1083  */
  1078 EXPORT_C TPtrC8 CSmsAlphabetConverter::ConvertFromNativeL(const TDesC& aNativeCharacters)
  1084 EXPORT_C TPtrC8 CSmsAlphabetConverter::ConvertFromNativeL(const TDesC& aNativeCharacters)
  1079 	{
  1085 	{
  1080 	LOGGSMU1("CSmsAlphabetConverter::ConvertFromNativeL()");
  1086 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSALPHABETCONVERTER_CONVERTFROMNATIVEL_1, "CSmsAlphabetConverter::ConvertFromNativeL()");
  1081 
  1087 
  1082 	TInt  numberOfUnconvertibleCharacters, numberOfDowngradedCharacters;
  1088 	TInt  numberOfUnconvertibleCharacters, numberOfDowngradedCharacters;
  1083 
  1089 
  1084 	return ConvertFromNativeL(aNativeCharacters, ESmsEncodingNone,
  1090 	return ConvertFromNativeL(aNativeCharacters, ESmsEncodingNone,
  1085 			                  numberOfUnconvertibleCharacters,
  1091 			                  numberOfUnconvertibleCharacters,
  1105 EXPORT_C TPtrC8 CSmsAlphabetConverter::ConvertFromNativeL(const TDesC& aNativeCharacters,
  1111 EXPORT_C TPtrC8 CSmsAlphabetConverter::ConvertFromNativeL(const TDesC& aNativeCharacters,
  1106                                                           TSmsEncoding aEncoding,
  1112                                                           TSmsEncoding aEncoding,
  1107                                                           TInt& aNumberOfUnconvertibleCharacters,
  1113                                                           TInt& aNumberOfUnconvertibleCharacters,
  1108 			                                              TInt& aNumberOfDowngradedCharacters)
  1114 			                                              TInt& aNumberOfDowngradedCharacters)
  1109 	{
  1115 	{
  1110 	LOGGSMU2("CSmsAlphabetConverter::ConvertFromNativeL(): aEncoding=%d", aEncoding);
  1116 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSALPHABETCONVERTER_CONVERTFROMNATIVEL1_1, "CSmsAlphabetConverter::ConvertFromNativeL(): aEncoding=%d", aEncoding);
  1111 	
  1117 	
  1112 	aNumberOfUnconvertibleCharacters = 0;
  1118 	aNumberOfUnconvertibleCharacters = 0;
  1113 	aNumberOfDowngradedCharacters    = 0;
  1119 	aNumberOfDowngradedCharacters    = 0;
  1114 
  1120 
  1115 	// Check for some shortcuts
  1121 	// Check for some shortcuts
  1298  * 
  1304  * 
  1299  *  @capability None
  1305  *  @capability None
  1300  */
  1306  */
  1301 EXPORT_C TPtrC CSmsAlphabetConverter::ConvertToNativeL(const TDesC8& aUDElements)
  1307 EXPORT_C TPtrC CSmsAlphabetConverter::ConvertToNativeL(const TDesC8& aUDElements)
  1302 	{
  1308 	{
  1303 	LOGGSMU1("CSmsAlphabetConverter::ConvertToNativeL()");
  1309 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSALPHABETCONVERTER_CONVERTTONATIVEL_1, "CSmsAlphabetConverter::ConvertToNativeL()");
  1304 
  1310 
  1305 	return ConvertToNativeL(aUDElements, ESmsEncodingNone);
  1311 	return ConvertToNativeL(aUDElements, ESmsEncodingNone);
  1306 	} // CSmsAlphabetConverter::ConvertToNativeL
  1312 	} // CSmsAlphabetConverter::ConvertToNativeL
  1307 
  1313 
  1308 
  1314 
  1318  *  @capability None
  1324  *  @capability None
  1319  */
  1325  */
  1320 EXPORT_C TPtrC CSmsAlphabetConverter::ConvertToNativeL(const TDesC8& aUDElements,
  1326 EXPORT_C TPtrC CSmsAlphabetConverter::ConvertToNativeL(const TDesC8& aUDElements,
  1321 													   TSmsEncoding aEncoding)
  1327 													   TSmsEncoding aEncoding)
  1322 	{
  1328 	{
  1323 	LOGGSMU2("CSmsAlphabetConverter::ConvertToNativeL(): aEncoding=%d", aEncoding);
  1329 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSALPHABETCONVERTER_CONVERTTONATIVEL1_1, "CSmsAlphabetConverter::ConvertToNativeL(): aEncoding=%d", aEncoding);
  1324 
  1330 
  1325 	// Check for some shortcuts
  1331 	// Check for some shortcuts
  1326 	if (iIsBinary ||  iSmsAlphabet == TSmsDataCodingScheme::ESmsAlphabet8Bit)
  1332 	if (iIsBinary ||  iSmsAlphabet == TSmsDataCodingScheme::ESmsAlphabet8Bit)
  1327 		{
  1333 		{
  1328 		// Binary data stored as padded unicode
  1334 		// Binary data stored as padded unicode
  1404  *        it does not accept a downgraded character or alternative encoding
  1410  *        it does not accept a downgraded character or alternative encoding
  1405  *        as being supported.
  1411  *        as being supported.
  1406  */
  1412  */
  1407 TBool CSmsAlphabetConverter::IsSupportedL(TChar aChar)
  1413 TBool CSmsAlphabetConverter::IsSupportedL(TChar aChar)
  1408 	{
  1414 	{
  1409 	LOGGSMU2("[1] CSmsAlphabetConverter::IsSupportedL(aChar=0x%04x)", (TUint) aChar);
  1415 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL_1, "[1] CSmsAlphabetConverter::IsSupportedL(aChar=0x%04x)", (TUint) aChar);
  1410 
  1416 
  1411 	TBool isDowngrade, isRequiresAlternativeEncoding;
  1417 	TBool isDowngrade, isRequiresAlternativeEncoding;
  1412 
  1418 
  1413     TBool  supported = IsSupportedL(aChar, ESmsEncodingNone,
  1419     TBool  supported = IsSupportedL(aChar, ESmsEncodingNone,
  1414             isDowngrade, isRequiresAlternativeEncoding);
  1420             isDowngrade, isRequiresAlternativeEncoding);
  1415 	
  1421 	
  1416 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1422 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL_2, "CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1417 
  1423 
  1418 	return supported;
  1424 	return supported;
  1419 	} // CSmsAlphabetConverter::IsSupportedL
  1425 	} // CSmsAlphabetConverter::IsSupportedL
  1420 
  1426 
  1421 
  1427 
  1432  *  @return  ETrue if the character is supported.
  1438  *  @return  ETrue if the character is supported.
  1433  */
  1439  */
  1434 TBool CSmsAlphabetConverter::IsSupportedL(const TDesC& aDes, TInt& aNumberOfUnconvertibleCharacters,
  1440 TBool CSmsAlphabetConverter::IsSupportedL(const TDesC& aDes, TInt& aNumberOfUnconvertibleCharacters,
  1435                                           TInt& aIndexOfFirstUnconvertibleCharacter)
  1441                                           TInt& aIndexOfFirstUnconvertibleCharacter)
  1436 	{
  1442 	{
  1437 	LOGGSMU2("[2] CSmsAlphabetConverter::IsSupportedL(aDes=\"%S\")", &aDes);
  1443 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_1, "[2] CSmsAlphabetConverter::IsSupportedL(aDes=\"%S\")", aDes);
  1438 
  1444 
  1439 	TInt desLength = aDes.Length();
  1445 	TInt desLength = aDes.Length();
  1440 	//
  1446 	//
  1441 	// Initialise the exit params...
  1447 	// Initialise the exit params...
  1442 	//
  1448 	//
  1503 	//
  1509 	//
  1504 	// Useful logging...
  1510 	// Useful logging...
  1505 	//
  1511 	//
  1506 	TBool  supported = (aNumberOfUnconvertibleCharacters == 0);
  1512 	TBool  supported = (aNumberOfUnconvertibleCharacters == 0);
  1507 
  1513 
  1508 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters);
  1514 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_2, "CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters);
  1509 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter);
  1515 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_3, "CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter);
  1510 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1516 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_4, "CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1511 
  1517 
  1512 	return supported;
  1518 	return supported;
  1513 	} // CSmsAlphabetConverter::IsSupportedL
  1519 	} // CSmsAlphabetConverter::IsSupportedL
  1514 
  1520 
  1515 
  1521 
  1529  */
  1535  */
  1530 TBool CSmsAlphabetConverter::IsSupportedL(TChar aChar, TSmsEncoding aEncoding,
  1536 TBool CSmsAlphabetConverter::IsSupportedL(TChar aChar, TSmsEncoding aEncoding,
  1531 		                                  TBool& aIsDowngrade,
  1537 		                                  TBool& aIsDowngrade,
  1532                                           TBool& aRequiresAlternativeEncoding)
  1538                                           TBool& aRequiresAlternativeEncoding)
  1533 	{
  1539 	{
  1534 	LOGGSMU2("[3] CSmsAlphabetConverter::IsSupportedL(aChar=0x%04x)", (TUint) aChar);
  1540 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL2_1, "[3] CSmsAlphabetConverter::IsSupportedL(aChar=0x%04x)", (TUint) aChar);
  1535 
  1541 
  1536 	//
  1542 	//
  1537 	// Convert the character...
  1543 	// Convert the character...
  1538 	//
  1544 	//
  1539 	TInt  numberOfUnconvertibleCharacters, numberOfDowngradedCharacters, 
  1545 	TInt  numberOfUnconvertibleCharacters, numberOfDowngradedCharacters, 
  1556 	aRequiresAlternativeEncoding = (numberRequiringAlternativeEncoding > 0);
  1562 	aRequiresAlternativeEncoding = (numberRequiringAlternativeEncoding > 0);
  1557 	    
  1563 	    
  1558 	//
  1564 	//
  1559 	// Useful logging...
  1565 	// Useful logging...
  1560 	//
  1566 	//
  1561 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aIsDowngrade=%d.", aIsDowngrade);
  1567 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL2_2, "CSmsAlphabetConverter::IsSupportedL(): aIsDowngrade=%d.", aIsDowngrade);
  1562 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aRequiresAlternativeEncoding=%d.", aRequiresAlternativeEncoding);
  1568 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL2_3, "CSmsAlphabetConverter::IsSupportedL(): aRequiresAlternativeEncoding=%d.", aRequiresAlternativeEncoding);
  1563 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1569 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL2_4, "CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1564 
  1570 
  1565 	return supported;
  1571 	return supported;
  1566 	} // CSmsAlphabetConverter::IsSupportedL
  1572 	} // CSmsAlphabetConverter::IsSupportedL
  1567 
  1573 
  1568 
  1574 
  1588 										  TInt& aNumberOfUnconvertibleCharacters,
  1594 										  TInt& aNumberOfUnconvertibleCharacters,
  1589                                           TInt& aNumberOfDowngradedCharacters,
  1595                                           TInt& aNumberOfDowngradedCharacters,
  1590                                           TInt& aNumberRequiringAlternativeEncoding,
  1596                                           TInt& aNumberRequiringAlternativeEncoding,
  1591                                           TInt& aIndexOfFirstUnconvertibleCharacter)
  1597                                           TInt& aIndexOfFirstUnconvertibleCharacter)
  1592 	{
  1598 	{
  1593 	LOGGSMU2("[4] CSmsAlphabetConverter::IsSupportedL(aDes=\"%S\")", &aDes);
  1599 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL3_1, "[4] CSmsAlphabetConverter::IsSupportedL(aDes=\"%S\")", aDes);
  1594 
  1600 
  1595 	TInt desLength = aDes.Length();
  1601 	TInt desLength = aDes.Length();
  1596 	//
  1602 	//
  1597 	// Initialise the exit params...
  1603 	// Initialise the exit params...
  1598 	//
  1604 	//
  1784 	//
  1790 	//
  1785 	// Useful logging...
  1791 	// Useful logging...
  1786 	//
  1792 	//
  1787 	TBool  supported = (aNumberOfUnconvertibleCharacters == 0);
  1793 	TBool  supported = (aNumberOfUnconvertibleCharacters == 0);
  1788 
  1794 
  1789 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters);
  1795 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL3_2, "CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters);
  1790 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberOfDowngradedCharacters=%d.", aNumberOfDowngradedCharacters);
  1796 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL3_3, "CSmsAlphabetConverter::IsSupportedL(): aNumberOfDowngradedCharacters=%d.", aNumberOfDowngradedCharacters);
  1791 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberRequiringAlternativeEncoding=%d.", aNumberRequiringAlternativeEncoding);
  1797 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL3_4, "CSmsAlphabetConverter::IsSupportedL(): aNumberRequiringAlternativeEncoding=%d.", aNumberRequiringAlternativeEncoding);
  1792 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter);
  1798 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL3_5, "CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter);
  1793 	LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1799 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL3_6, "CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported);
  1794 
  1800 
  1795 	return supported;
  1801 	return supported;
  1796 	} // CSmsAlphabetConverter::IsSupportedL
  1802 	} // CSmsAlphabetConverter::IsSupportedL
  1797 
  1803 
  1798 
  1804 
  1806  *  @return Encoding that should be used.
  1812  *  @return Encoding that should be used.
  1807  */
  1813  */
  1808 TSmsEncoding CSmsAlphabetConverter::FindBestAlternativeEncodingL(const TDesC& aNativeCharacters,
  1814 TSmsEncoding CSmsAlphabetConverter::FindBestAlternativeEncodingL(const TDesC& aNativeCharacters,
  1809 									                     		 TSmsEncoding aSuggestedEncoding)
  1815 									                     		 TSmsEncoding aSuggestedEncoding)
  1810 	{
  1816 	{
  1811 	LOGGSMU2("CSmsAlphabetConverter::FindBestAlternativeEncodingL(): aSuggestedEncoding=%d",
  1817 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_FINDBESTALTERNATIVEENCODINGL_1, "CSmsAlphabetConverter::FindBestAlternativeEncodingL(): aSuggestedEncoding=%d",aSuggestedEncoding);
  1812 			 aSuggestedEncoding);
       
  1813 
  1818 
  1814 	TSmsEncoding  encodingToUse = ESmsEncodingNone;
  1819 	TSmsEncoding  encodingToUse = ESmsEncodingNone;
  1815 
  1820 
  1816 	//
  1821 	//
  1817 	// If this is not 7bit or the alternative encoding is not set then do
  1822 	// If this is not 7bit or the alternative encoding is not set then do
  1871 				leastUnconvertibleCharacters = numberOfUnconvertibleCharacters + numberOfDowngradedCharacters;
  1876 				leastUnconvertibleCharacters = numberOfUnconvertibleCharacters + numberOfDowngradedCharacters;
  1872 				}
  1877 				}
  1873 			}
  1878 			}
  1874 		}
  1879 		}
  1875 
  1880 
  1876 	LOGGSMU2("CSmsAlphabetConverter::FindBestAlternativeEncodingL(): encodingToUse=%d", encodingToUse);
  1881 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_FINDBESTALTERNATIVEENCODINGL_2, "CSmsAlphabetConverter::FindBestAlternativeEncodingL(): encodingToUse=%d", encodingToUse);
  1877 
  1882 
  1878 	return encodingToUse;
  1883 	return encodingToUse;
  1879 	} // CSmsAlphabetConverter::FindBestAlternativeEncoding
  1884 	} // CSmsAlphabetConverter::FindBestAlternativeEncoding
  1880 
  1885 
  1881 
  1886 
  1915  * 
  1920  * 
  1916  *  @param aEncoding  Alternative 7bit encoding to use if required.
  1921  *  @param aEncoding  Alternative 7bit encoding to use if required.
  1917  */
  1922  */
  1918 void CSmsAlphabetConverter::PrepareForConversionFromNativeL(TSmsEncoding aEncoding)
  1923 void CSmsAlphabetConverter::PrepareForConversionFromNativeL(TSmsEncoding aEncoding)
  1919 	{
  1924 	{
  1920 	LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionFromNativeL(): aEncoding=%d",
  1925 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONFROMNATIVEL_1, "CSmsAlphabetConverter::PrepareForConversionFromNativeL(): aEncoding=%d",aEncoding);
  1921 			 aEncoding);
       
  1922 
  1926 
  1923 	__ASSERT_DEBUG(iIsBinary==EFalse,Panic(KGsmuPanicUnsupportedAlphabet));
  1927 	__ASSERT_DEBUG(iIsBinary==EFalse,Panic(KGsmuPanicUnsupportedAlphabet));
  1924 	switch (iSmsAlphabet)
  1928 	switch (iSmsAlphabet)
  1925 		{
  1929 		{
  1926 		case TSmsDataCodingScheme::ESmsAlphabet7Bit:
  1930 		case TSmsDataCodingScheme::ESmsAlphabet7Bit:
  1936 				GetAlternativeEncoderIDL(aEncoding, alternativeEncoderID);
  1940 				GetAlternativeEncoderIDL(aEncoding, alternativeEncoderID);
  1937 				if (alternativeEncoderID != 0)
  1941 				if (alternativeEncoderID != 0)
  1938 					{
  1942 					{
  1939 					CCnvCharacterSetConverter::TAvailability  availability;
  1943 					CCnvCharacterSetConverter::TAvailability  availability;
  1940 		
  1944 		
  1941 					LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x",
  1945 					OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONFROMNATIVEL_2, "CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x",alternativeEncoderID);
  1942 							 alternativeEncoderID);
       
  1943 					
  1946 					
  1944 					availability = iCharacterSetConverter.PrepareToConvertToOrFromL(alternativeEncoderID, iFs);
  1947 					availability = iCharacterSetConverter.PrepareToConvertToOrFromL(alternativeEncoderID, iFs);
  1945 					if (availability == CCnvCharacterSetConverter::EAvailable)
  1948 					if (availability == CCnvCharacterSetConverter::EAvailable)
  1946 						{
  1949 						{
  1947 			 			// Force unicode line termination characters to simple line feed
  1950 			 			// Force unicode line termination characters to simple line feed
  2006  * 
  2009  * 
  2007  *  @param aEncoding  Alternative 7bit encoding to use if required.
  2010  *  @param aEncoding  Alternative 7bit encoding to use if required.
  2008  */
  2011  */
  2009 void CSmsAlphabetConverter::PrepareForConversionToNativeL(TSmsEncoding aEncoding)
  2012 void CSmsAlphabetConverter::PrepareForConversionToNativeL(TSmsEncoding aEncoding)
  2010 	{
  2013 	{
  2011 	LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionToNativeL(): aEncoding=%d",
  2014 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONTONATIVEL_1, "CSmsAlphabetConverter::PrepareForConversionToNativeL(): aEncoding=%d",aEncoding);
  2012 			 aEncoding);
       
  2013 
  2015 
  2014 	switch (iSmsAlphabet)
  2016 	switch (iSmsAlphabet)
  2015 		{
  2017 		{
  2016 		case TSmsDataCodingScheme::ESmsAlphabet7Bit:
  2018 		case TSmsDataCodingScheme::ESmsAlphabet7Bit:
  2017 			{
  2019 			{
  2026 				GetAlternativeEncoderIDL(aEncoding, alternativeEncoderID);
  2028 				GetAlternativeEncoderIDL(aEncoding, alternativeEncoderID);
  2027 				if (alternativeEncoderID != 0)
  2029 				if (alternativeEncoderID != 0)
  2028 					{
  2030 					{
  2029 					CCnvCharacterSetConverter::TAvailability  availability;
  2031 					CCnvCharacterSetConverter::TAvailability  availability;
  2030 		
  2032 		
  2031 					LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x",
  2033 					OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONTONATIVEL_2, "CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x",alternativeEncoderID);
  2032 							 alternativeEncoderID);
       
  2033 					
  2034 					
  2034 					availability = iCharacterSetConverter.PrepareToConvertToOrFromL(alternativeEncoderID, iFs);
  2035 					availability = iCharacterSetConverter.PrepareToConvertToOrFromL(alternativeEncoderID, iFs);
  2035 					if (availability == CCnvCharacterSetConverter::EAvailable)
  2036 					if (availability == CCnvCharacterSetConverter::EAvailable)
  2036 						{
  2037 						{
  2037 						// Job done, return
  2038 						// Job done, return
  2082  * 
  2083  * 
  2083  *  @leave KErrArgument if the encoding enum is invalid or
  2084  *  @leave KErrArgument if the encoding enum is invalid or
  2084  */
  2085  */
  2085 void CSmsAlphabetConverter::GetAlternativeEncoderIDL(TSmsEncoding aEncoding, TUint& aEncoderID) const
  2086 void CSmsAlphabetConverter::GetAlternativeEncoderIDL(TSmsEncoding aEncoding, TUint& aEncoderID) const
  2086 	{
  2087 	{
  2087 	LOGGSMU2("CSmsAlphabetConverter::GetAlternativeEncoderIDL(%d)", aEncoding);
  2088 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_GETALTERNATIVEENCODERIDL_1, "CSmsAlphabetConverter::GetAlternativeEncoderIDL(%d)", aEncoding);
  2088 
  2089 
  2089 	aEncoderID = 0;
  2090 	aEncoderID = 0;
  2090 	
  2091 	
  2091 	//
  2092 	//
  2092 	// Decide on appropriate encoders.
  2093 	// Decide on appropriate encoders.
  2155 //
  2156 //
  2156 // Ensures the allocated 16 bit buffer is at least of the specified length
  2157 // Ensures the allocated 16 bit buffer is at least of the specified length
  2157 //
  2158 //
  2158 TPtr16 CSmsAlphabetConverter::CheckAllocBufferL(HBufC16** aBuffer,TInt aMaxLength,TInt aUsedLength)
  2159 TPtr16 CSmsAlphabetConverter::CheckAllocBufferL(HBufC16** aBuffer,TInt aMaxLength,TInt aUsedLength)
  2159 	{
  2160 	{
  2160 	LOGGSMU1("CSmsAlphabetConverter::CheckAllocBufferL()");
  2161 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CHECKALLOCBUFFERL_1, "CSmsAlphabetConverter::CheckAllocBufferL()");
  2161 
  2162 
  2162 	if (*aBuffer!=NULL)
  2163 	if (*aBuffer!=NULL)
  2163 		{
  2164 		{
  2164 		if ((*aBuffer)->Length()<aMaxLength)
  2165 		if ((*aBuffer)->Length()<aMaxLength)
  2165 			{
  2166 			{
  2178 //
  2179 //
  2179 // Ensures the allocated 8 bit buffer is at least of the specified length
  2180 // Ensures the allocated 8 bit buffer is at least of the specified length
  2180 //
  2181 //
  2181 TPtr8 CSmsAlphabetConverter::CheckAllocBufferL(HBufC8** aBuffer,TInt aMaxLength,TInt aUsedLength)
  2182 TPtr8 CSmsAlphabetConverter::CheckAllocBufferL(HBufC8** aBuffer,TInt aMaxLength,TInt aUsedLength)
  2182 	{
  2183 	{
  2183 	LOGGSMU1("CSmsAlphabetConverter::CheckAllocBufferL()");
  2184 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CHECKALLOCBUFFERL1_1, "CSmsAlphabetConverter::CheckAllocBufferL()");
  2184 
  2185 
  2185 	if (*aBuffer!=NULL)
  2186 	if (*aBuffer!=NULL)
  2186 		{
  2187 		{
  2187 		if ((*aBuffer)->Length()<aMaxLength)
  2188 		if ((*aBuffer)->Length()<aMaxLength)
  2188 			{
  2189 			{
  2206  *  @param aType Specifies an indicator type, as defined in the Common PCN Handset Specification
  2207  *  @param aType Specifies an indicator type, as defined in the Common PCN Handset Specification
  2207  *  @return returns ETrue if address is of specified type, EFalse otherwise 
  2208  *  @return returns ETrue if address is of specified type, EFalse otherwise 
  2208  */
  2209  */
  2209 EXPORT_C TBool TGsmSmsTelNumber::IsInstanceOf(TTypeOfIndicator aType)
  2210 EXPORT_C TBool TGsmSmsTelNumber::IsInstanceOf(TTypeOfIndicator aType)
  2210     {
  2211     {
  2211     LOGGSMU1("TGsmSmsTelNumber::IsInstanceOf()");
  2212     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, TGSMSMSTELNUMBER_ISINSTANCEOF_1, "TGsmSmsTelNumber::IsInstanceOf()");
  2212 
  2213 
  2213     TBool rc = EFalse;
  2214     TBool rc = EFalse;
  2214 
  2215 
  2215     (void) aType;
  2216     (void) aType;
  2216 
  2217 
  2229 // CSmsAddress
  2230 // CSmsAddress
  2230 //
  2231 //
  2231 
  2232 
  2232 CSmsAddress* CSmsAddress::NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs)
  2233 CSmsAddress* CSmsAddress::NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs)
  2233 	{
  2234 	{
  2234 	LOGGSMU1("CSmsAddress::NewL()");
  2235 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_NEWL_1, "CSmsAddress::NewL()");
  2235 
  2236 
  2236 	CSmsAddress* address=new(ELeave) CSmsAddress(aCharacterSetConverter,aFs);
  2237 	CSmsAddress* address=new(ELeave) CSmsAddress(aCharacterSetConverter,aFs);
  2237 	CleanupStack::PushL(address);
  2238 	CleanupStack::PushL(address);
  2238 	TPtrC ptr;
  2239 	TPtrC ptr;
  2239 	address->SetAddressL(ptr);
  2240 	address->SetAddressL(ptr);
  2253  * 
  2254  * 
  2254  *  @return  Pointer to the newly created CSmsAddress object.
  2255  *  @return  Pointer to the newly created CSmsAddress object.
  2255  */
  2256  */
  2256 CSmsAddress* CSmsAddress::DuplicateL() const
  2257 CSmsAddress* CSmsAddress::DuplicateL() const
  2257 	{
  2258 	{
  2258 	LOGGSMU1("CSmsAddress::DuplicateL()");
  2259 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_DUPLICATEL_1, "CSmsAddress::DuplicateL()");
  2259 
  2260 
  2260 	CSmsAddress*  address = CSmsAddress::NewL(iCharacterSetConverter, iFs);
  2261 	CSmsAddress*  address = CSmsAddress::NewL(iCharacterSetConverter, iFs);
  2261 	CleanupStack::PushL(address);
  2262 	CleanupStack::PushL(address);
  2262 
  2263 
  2263 	address->SetRawAddressL(iTypeOfAddress, *iBuffer);
  2264 	address->SetRawAddressL(iTypeOfAddress, *iBuffer);
  2268 	} // CSmsAddress::DuplicateL
  2269 	} // CSmsAddress::DuplicateL
  2269 
  2270 
  2270 
  2271 
  2271 TPtrC CSmsAddress::Address() const
  2272 TPtrC CSmsAddress::Address() const
  2272 	{
  2273 	{
  2273 	LOGGSMU1("CSmsAddress::Address()");
  2274 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_ADDRESS_1, "CSmsAddress::Address()");
  2274 
  2275 
  2275 	TPtrC ptr;
  2276 	TPtrC ptr;
  2276 	if (iBuffer)
  2277 	if (iBuffer)
  2277 		ptr.Set(iBuffer->Des());
  2278 		ptr.Set(iBuffer->Des());
  2278 	return ptr;
  2279 	return ptr;
  2279 	} // CSmsAddress::Address
  2280 	} // CSmsAddress::Address
  2280 
  2281 
  2281 
  2282 
  2282 void CSmsAddress::SetRawAddressL(TGsmSmsTypeOfAddress aTypeOfAddress, TPtrC aBufferPtr)
  2283 void CSmsAddress::SetRawAddressL(TGsmSmsTypeOfAddress aTypeOfAddress, TPtrC aBufferPtr)
  2283     {
  2284     {
  2284     LOGGSMU1("CSmsAddress::SetRawAddressL()");
  2285     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SETRAWADDRESSL_1, "CSmsAddress::SetRawAddressL()");
  2285 
  2286 
  2286     iTypeOfAddress = aTypeOfAddress;
  2287     iTypeOfAddress = aTypeOfAddress;
  2287 
  2288 
  2288     NewBufferL(aBufferPtr.Length());
  2289     NewBufferL(aBufferPtr.Length());
  2289 
  2290 
  2291     } // CSmsAddress::SetRawAddressL
  2292     } // CSmsAddress::SetRawAddressL
  2292 
  2293 
  2293 
  2294 
  2294 TGsmSmsTypeOfAddress& CSmsAddress::TypeOfAddress()
  2295 TGsmSmsTypeOfAddress& CSmsAddress::TypeOfAddress()
  2295     {
  2296     {
  2296     LOGGSMU1("CSmsAddress::TypeOfAddress()");
  2297     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_TYPEOFADDRESS_1, "CSmsAddress::TypeOfAddress()");
  2297 
  2298 
  2298     return iTypeOfAddress;
  2299     return iTypeOfAddress;
  2299     } // CSmsAddress::TypeOfAddress
  2300     } // CSmsAddress::TypeOfAddress
  2300 
  2301 
  2301 
  2302 
  2302 void CSmsAddress::SetAddressL(const TDesC& aAddress)
  2303 void CSmsAddress::SetAddressL(const TDesC& aAddress)
  2303 	{
  2304 	{
  2304 	LOGGSMU1("CSmsAddress::SetAddressL()");
  2305 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SETADDRESSL_1, "CSmsAddress::SetAddressL()");
  2305 
  2306 
  2306 	TInt length=aAddress.Length();
  2307 	TInt length=aAddress.Length();
  2307 	NewBufferL(length);
  2308 	NewBufferL(length);
  2308 	iBuffer->Des().Copy(aAddress);
  2309 	iBuffer->Des().Copy(aAddress);
  2309 
  2310 
  2359 	}
  2360 	}
  2360 
  2361 
  2361 
  2362 
  2362 void CSmsAddress::SetParsedAddressL(const TGsmSmsTelNumber& aParsedAddress)
  2363 void CSmsAddress::SetParsedAddressL(const TGsmSmsTelNumber& aParsedAddress)
  2363 	{
  2364 	{
  2364 	LOGGSMU1("CSmsAddress::SetParsedAddressL()");
  2365 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SETPARSEDADDRESSL_1, "CSmsAddress::SetParsedAddressL()");
  2365 
  2366 
  2366 	iTypeOfAddress=aParsedAddress.iTypeOfAddress;
  2367 	iTypeOfAddress=aParsedAddress.iTypeOfAddress;
  2367 	DoSetParsedAddressL(aParsedAddress.iTelNumber);
  2368 	DoSetParsedAddressL(aParsedAddress.iTelNumber);
  2368 	} // CSmsAddress::SetParsedAddressL
  2369 	} // CSmsAddress::SetParsedAddressL
  2369 
  2370 
  2370 
  2371 
  2371 TUint8 CSmsAddress::SizeL()
  2372 TUint8 CSmsAddress::SizeL()
  2372     {
  2373     {
  2373     LOGGSMU1("CSmsAddress::SizeL()");
  2374     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SIZEL_1, "CSmsAddress::SizeL()");
  2374 
  2375 
  2375     TUint8 size = 0;
  2376     TUint8 size = 0;
  2376 
  2377 
  2377     TBuf8<KSmsAddressMaxAddressLength> testBuffer;
  2378     TBuf8<KSmsAddressMaxAddressLength> testBuffer;
  2378     testBuffer.SetLength(KSmsAddressMaxAddressLength);
  2379     testBuffer.SetLength(KSmsAddressMaxAddressLength);
  2728 	} // CSmsAddress::CSmsAddress
  2729 	} // CSmsAddress::CSmsAddress
  2729 
  2730 
  2730 
  2731 
  2731 void CSmsAddress::NewBufferL(TInt aLength)
  2732 void CSmsAddress::NewBufferL(TInt aLength)
  2732 	{
  2733 	{
  2733 	LOGGSMU1("CSmsAddress::NewBufferL()");
  2734 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_NEWBUFFERL_1, "CSmsAddress::NewBufferL()");
  2734 
  2735 
  2735     HBufC* buffer=HBufC::NewL(aLength);
  2736     HBufC* buffer=HBufC::NewL(aLength);
  2736     delete iBuffer;
  2737     delete iBuffer;
  2737     iBuffer=buffer;
  2738     iBuffer=buffer;
  2738     iBuffer->Des().SetLength(aLength);
  2739     iBuffer->Des().SetLength(aLength);
  2740 	}
  2741 	}
  2741 
  2742 
  2742 
  2743 
  2743 void CSmsAddress::DoSetParsedAddressL(const TDesC& aAddress)
  2744 void CSmsAddress::DoSetParsedAddressL(const TDesC& aAddress)
  2744 	{
  2745 	{
  2745 	LOGGSMU2("CSmsAddress::DoSetParsedAddressL() the length of the Address [Length = %d", aAddress.Length());
  2746 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_DOSETPARSEDADDRESSL_1, "CSmsAddress::DoSetParsedAddressL() the length of the Address [Length = %d", aAddress.Length());
  2746 
  2747 
  2747 	TInt length=aAddress.Length();
  2748 	TInt length=aAddress.Length();
  2748 	if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) &&
  2749 	if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) &&
  2749 	    (length && (aAddress[0]!='+')))
  2750 	    (length && (aAddress[0]!='+')))
  2750 		{
  2751 		{
  2774 	} // TSmsServiceCenterTimeStamp::SetTimeOffset
  2775 	} // TSmsServiceCenterTimeStamp::SetTimeOffset
  2775 
  2776 
  2776 
  2777 
  2777 TUint8* TSmsServiceCenterTimeStamp::EncodeL(TUint8* aPtr) const
  2778 TUint8* TSmsServiceCenterTimeStamp::EncodeL(TUint8* aPtr) const
  2778     {
  2779     {
  2779     LOGGSMU1("TSmsServiceCenterTimeStamp::EncodeL()");
  2780     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSSERVICECENTERTIMESTAMP_ENCODEL_1, "TSmsServiceCenterTimeStamp::EncodeL()");
  2780 
  2781 
  2781     TInt numquarterhours=iTimeZoneNumQuarterHours;
  2782     TInt numquarterhours=iTimeZoneNumQuarterHours;
  2782 
  2783 
  2783     TInt timeZoneOffsetInSeconds = numquarterhours * CSmsMessage::E15MinutesRepresentedInSeconds;
  2784     TInt timeZoneOffsetInSeconds = numquarterhours * CSmsMessage::E15MinutesRepresentedInSeconds;
  2784     TTimeIntervalSeconds offsetFromUTCToLocal(timeZoneOffsetInSeconds);
  2785     TTimeIntervalSeconds offsetFromUTCToLocal(timeZoneOffsetInSeconds);
  2816     } // TSmsServiceCenterTimeStamp::EncodeL
  2817     } // TSmsServiceCenterTimeStamp::EncodeL
  2817 
  2818 
  2818 
  2819 
  2819 void TSmsServiceCenterTimeStamp::DecodeL(TGsmuLex8& aPdu, TInt& aTimeError)
  2820 void TSmsServiceCenterTimeStamp::DecodeL(TGsmuLex8& aPdu, TInt& aTimeError)
  2820 	{
  2821 	{
  2821 	LOGGSMU1("TSmsServiceCenterTimeStamp::DecodeL()");
  2822 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSSERVICECENTERTIMESTAMP_DECODEL_1, "TSmsServiceCenterTimeStamp::DecodeL()");
  2822 
  2823 
  2823 	TSmsOctet octet;
  2824 	TSmsOctet octet;
  2824 	octet.DecodeL(aPdu);
  2825 	octet.DecodeL(aPdu);
  2825 	TInt year=octet.SemiOctetsToNum();
  2826 	TInt year=octet.SemiOctetsToNum();
  2826 	if (year>95)
  2827 	if (year>95)
  2903 	} // TSmsValidityPeriod::TSmsValidityPeriod
  2904 	} // TSmsValidityPeriod::TSmsValidityPeriod
  2904 
  2905 
  2905 
  2906 
  2906 TTime TSmsValidityPeriod::Time() const
  2907 TTime TSmsValidityPeriod::Time() const
  2907 	{
  2908 	{
  2908 	LOGGSMU1("TSmsValidityPeriod::Time()");
  2909 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_TIME_1, "TSmsValidityPeriod::Time()");
  2909 
  2910 
  2910 	TTime time;
  2911 	TTime time;
  2911 	time.UniversalTime();
  2912 	time.UniversalTime();
  2912 	time+=iTimeIntervalMinutes;
  2913 	time+=iTimeIntervalMinutes;
  2913 	return time;
  2914 	return time;
  2914 	} // TSmsValidityPeriod::Time
  2915 	} // TSmsValidityPeriod::Time
  2915 
  2916 
  2916 
  2917 
  2917 TUint8* TSmsValidityPeriod::EncodeL(TUint8* aPtr) const
  2918 TUint8* TSmsValidityPeriod::EncodeL(TUint8* aPtr) const
  2918 	{
  2919 	{
  2919 	LOGGSMU1("TSmsValidityPeriod::EncodeL()");
  2920 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_ENCODEL_1, "TSmsValidityPeriod::EncodeL()");
  2920 
  2921 
  2921 	TInt validityperiodformat=ValidityPeriodFormat();
  2922 	TInt validityperiodformat=ValidityPeriodFormat();
  2922 	switch (validityperiodformat)
  2923 	switch (validityperiodformat)
  2923 		{
  2924 		{
  2924 		case (TSmsFirstOctet::ESmsVPFNone):
  2925 		case (TSmsFirstOctet::ESmsVPFNone):
  2960 	return aPtr;
  2961 	return aPtr;
  2961 	} // TSmsValidityPeriod::EncodeL
  2962 	} // TSmsValidityPeriod::EncodeL
  2962 	
  2963 	
  2963 TUint8* TSmsValidityPeriod::EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const
  2964 TUint8* TSmsValidityPeriod::EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const
  2964 	{
  2965 	{
  2965 	LOGGSMU1("TSmsValidityPeriod::EncodeL()");
  2966 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_ENCODEL1_1, "TSmsValidityPeriod::EncodeL()");
  2966 
  2967 
  2967 	TInt validityperiodformat=ValidityPeriodFormat();
  2968 	TInt validityperiodformat=ValidityPeriodFormat();
  2968 	switch (validityperiodformat)
  2969 	switch (validityperiodformat)
  2969 		{
  2970 		{
  2970 		case (TSmsFirstOctet::ESmsVPFNone):
  2971 		case (TSmsFirstOctet::ESmsVPFNone):
  3012 	return aPtr;
  3013 	return aPtr;
  3013 	} // TSmsValidityPeriod::EncodeL	
  3014 	} // TSmsValidityPeriod::EncodeL	
  3014 
  3015 
  3015 void TSmsValidityPeriod::DecodeL(TGsmuLex8& aPdu)
  3016 void TSmsValidityPeriod::DecodeL(TGsmuLex8& aPdu)
  3016 	{
  3017 	{
  3017 	LOGGSMU1("TSmsValidityPeriod::DecodeL()");
  3018 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_DECODEL_1, "TSmsValidityPeriod::DecodeL()");
  3018 
  3019 
  3019 	TInt validityperiodformat=ValidityPeriodFormat();
  3020 	TInt validityperiodformat=ValidityPeriodFormat();
  3020 	switch (validityperiodformat)
  3021 	switch (validityperiodformat)
  3021 		{
  3022 		{
  3022 		case (TSmsFirstOctet::ESmsVPFNone):
  3023 		case (TSmsFirstOctet::ESmsVPFNone):
  3067 	} // TSmsValidityPeriod::ExternalizeL
  3068 	} // TSmsValidityPeriod::ExternalizeL
  3068 
  3069 
  3069 
  3070 
  3070 CSmsInformationElement* CSmsInformationElement::NewL(TSmsInformationElementIdentifier aIdentifier,const TDesC8& aData)
  3071 CSmsInformationElement* CSmsInformationElement::NewL(TSmsInformationElementIdentifier aIdentifier,const TDesC8& aData)
  3071 	{
  3072 	{
  3072 	LOGGSMU1("CSmsInformationElement::NewL()");
  3073 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_NEWL_1, "CSmsInformationElement::NewL()");
  3073 
  3074 
  3074 	CSmsInformationElement* informationelement=new(ELeave) CSmsInformationElement(aIdentifier);
  3075 	CSmsInformationElement* informationelement=new(ELeave) CSmsInformationElement(aIdentifier);
  3075 	CleanupStack::PushL(informationelement);
  3076 	CleanupStack::PushL(informationelement);
  3076 	informationelement->ConstructL(aData);
  3077 	informationelement->ConstructL(aData);
  3077 	CleanupStack::Pop();
  3078 	CleanupStack::Pop();
  3079 	} // CSmsInformationElement::NewL
  3080 	} // CSmsInformationElement::NewL
  3080 
  3081 
  3081 
  3082 
  3082 CSmsInformationElement* CSmsInformationElement::NewL()
  3083 CSmsInformationElement* CSmsInformationElement::NewL()
  3083 	{
  3084 	{
  3084 	LOGGSMU1("CSmsInformationElement::NewL()");
  3085 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_NEWL1_1, "CSmsInformationElement::NewL()");
  3085 
  3086 
  3086 	CSmsInformationElement* informationelement=new(ELeave) CSmsInformationElement(ESmsIEIConcatenatedShortMessages8BitReference);
  3087 	CSmsInformationElement* informationelement=new(ELeave) CSmsInformationElement(ESmsIEIConcatenatedShortMessages8BitReference);
  3087 	CleanupStack::PushL(informationelement);
  3088 	CleanupStack::PushL(informationelement);
  3088 	TPtrC8 data;
  3089 	TPtrC8 data;
  3089 	informationelement->ConstructL(data);
  3090 	informationelement->ConstructL(data);
  3107  *  @return Information Element data
  3108  *  @return Information Element data
  3108  *  @capability None
  3109  *  @capability None
  3109  */
  3110  */
  3110 EXPORT_C TPtr8 CSmsInformationElement::Data()
  3111 EXPORT_C TPtr8 CSmsInformationElement::Data()
  3111 	{
  3112 	{
  3112 	LOGGSMU1("CSmsInformationElement::Data()");
  3113 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSINFORMATIONELEMENT_DATA_1, "CSmsInformationElement::Data()");
  3113 
  3114 
  3114 	return iData->Des();
  3115 	return iData->Des();
  3115 	} // CSmsInformationElement::Data
  3116 	} // CSmsInformationElement::Data
  3116 
  3117 
  3117 
  3118 
  3121  *  @return Information Element data
  3122  *  @return Information Element data
  3122  *  @capability None
  3123  *  @capability None
  3123  */
  3124  */
  3124 EXPORT_C const TDesC8& CSmsInformationElement::Data() const
  3125 EXPORT_C const TDesC8& CSmsInformationElement::Data() const
  3125 	{
  3126 	{
  3126 	LOGGSMU1("CSmsInformationElement::Data()");
  3127 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSINFORMATIONELEMENT_DATA1_1, "CSmsInformationElement::Data()");
  3127 
  3128 
  3128 	return *iData;
  3129 	return *iData;
  3129 	} // CSmsInformationElement::Data
  3130 	} // CSmsInformationElement::Data
  3130 
  3131 
  3131 
  3132 
  3141 	} // CSmsInformationElement::TSmsInformationElementIdentifier
  3142 	} // CSmsInformationElement::TSmsInformationElementIdentifier
  3142 
  3143 
  3143 
  3144 
  3144 TUint8* CSmsInformationElement::EncodeL(TUint8* aPtr) const
  3145 TUint8* CSmsInformationElement::EncodeL(TUint8* aPtr) const
  3145 	{
  3146 	{
  3146 	LOGGSMU1("CSmsInformationElement::EncodeL()");
  3147 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_ENCODEL_1, "CSmsInformationElement::EncodeL()");
  3147 
  3148 
  3148 	TSmsOctet id=iIdentifier;
  3149 	TSmsOctet id=iIdentifier;
  3149 	aPtr=id.EncodeL(aPtr);
  3150 	aPtr=id.EncodeL(aPtr);
  3150 	TSmsOctet informationelementlength=iData->Des().Length();
  3151 	TSmsOctet informationelementlength=iData->Des().Length();
  3151 	aPtr=informationelementlength.EncodeL(aPtr);
  3152 	aPtr=informationelementlength.EncodeL(aPtr);
  3155 	} // CSmsInformationElement::EncodeL
  3156 	} // CSmsInformationElement::EncodeL
  3156 
  3157 
  3157 
  3158 
  3158 void CSmsInformationElement::DecodeL(TGsmuLex8& aPdu)
  3159 void CSmsInformationElement::DecodeL(TGsmuLex8& aPdu)
  3159 	{
  3160 	{
  3160 	LOGGSMU1("CSmsInformationElement::DecodeL()");
  3161 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_DECODEL_1, "CSmsInformationElement::DecodeL()");
  3161 
  3162 
  3162 	TSmsOctet id;
  3163 	TSmsOctet id;
  3163 	id.DecodeL(aPdu);
  3164 	id.DecodeL(aPdu);
  3164 	iIdentifier=static_cast<TSmsInformationElementIdentifier>((TInt)id);
  3165 	iIdentifier=static_cast<TSmsInformationElementIdentifier>((TInt)id);
  3165 
  3166 
  3262 	} // CSmsInformationElement::ExternalizeL
  3263 	} // CSmsInformationElement::ExternalizeL
  3263 
  3264 
  3264 
  3265 
  3265 void CSmsInformationElement::ConstructL(const TDesC8& aData)
  3266 void CSmsInformationElement::ConstructL(const TDesC8& aData)
  3266 	{
  3267 	{
  3267 	LOGGSMU1("CSmsInformationElement::ConstructL()");
  3268 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_CONSTRUCTL_1, "CSmsInformationElement::ConstructL()");
  3268 
  3269 
  3269 	NewDataL(aData.Length());
  3270 	NewDataL(aData.Length());
  3270 	iData->Des().Copy(aData);
  3271 	iData->Des().Copy(aData);
  3271 	} // CSmsInformationElement::ConstructL
  3272 	} // CSmsInformationElement::ConstructL
  3272 
  3273 
  3273 
  3274 
  3274 void CSmsInformationElement::NewDataL(TInt aLength)
  3275 void CSmsInformationElement::NewDataL(TInt aLength)
  3275 	{
  3276 	{
  3276 	LOGGSMU1("CSmsInformationElement::NewDataL()");
  3277 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_NEWDATAL_1, "CSmsInformationElement::NewDataL()");
  3277 
  3278 
  3278 	HBufC8* data=HBufC8::NewL(aLength);
  3279 	HBufC8* data=HBufC8::NewL(aLength);
  3279 	delete iData;
  3280 	delete iData;
  3280 	iData=data;
  3281 	iData=data;
  3281 	iData->Des().SetLength(aLength);
  3282 	iData->Des().SetLength(aLength);
  3282 	} // CSmsInformationElement::NewDataL
  3283 	} // CSmsInformationElement::NewDataL
  3283 
  3284 
  3284 
  3285 
  3285 TUint CSmsInformationElement::Length()const
  3286 TUint CSmsInformationElement::Length()const
  3286 	{
  3287 	{
  3287 	LOGGSMU1("CSmsInformationElement::Length()");
  3288 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_LENGTH_1, "CSmsInformationElement::Length()");
  3288 
  3289 
  3289 	return 2+iData->Length();  // 2 stands for IEID and IEDL
  3290 	return 2+iData->Length();  // 2 stands for IEID and IEDL
  3290 	} // CSmsInformationElement::Length
  3291 	} // CSmsInformationElement::Length
  3291 
  3292 
  3292 
  3293 
  3303  *  True if the information element can be mapped.
  3304  *  True if the information element can be mapped.
  3304  *  False otherwise.
  3305  *  False otherwise.
  3305  */
  3306  */
  3306 TBool TSmsInformationElementCategories::TranslateCategoryToIndex(TInformationElementId aId, TInt& aIndex)
  3307 TBool TSmsInformationElementCategories::TranslateCategoryToIndex(TInformationElementId aId, TInt& aIndex)
  3307     {
  3308     {
  3308     LOGGSMU1("CSmsMessage::TranslateCategoryToIndex");
  3309     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_TRANSLATECATEGORYTOINDEX_1, "CSmsMessage::TranslateCategoryToIndex");
  3309 
  3310 
  3310     TBool rc = ETrue;
  3311     TBool rc = ETrue;
  3311 
  3312 
  3312     if (aId < CSmsInformationElement::ESmsIEMaximum)
  3313     if (aId < CSmsInformationElement::ESmsIEMaximum)
  3313         {
  3314         {
  3382             }
  3383             }
  3383         }
  3384         }
  3384     else
  3385     else
  3385         {
  3386         {
  3386         rc = EFalse;
  3387         rc = EFalse;
  3387         LOGGSMU3("CSmsMessage::TranslateCategoryToIndex id = %d, found = %d", aId, rc);
  3388         OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_TRANSLATECATEGORYTOINDEX_2, "CSmsMessage::TranslateCategoryToIndex id = %d, found = %d", aId, rc);
  3388         }
  3389         }
  3389     return rc;
  3390     return rc;
  3390     } // TSmsInformationElementCategories::TranslateCategoryToIndex
  3391     } // TSmsInformationElementCategories::TranslateCategoryToIndex
  3391 
  3392 
  3392 
  3393 
  3403  *  ETrue if successful, EFalse if an information identifier is unknown or cannot
  3404  *  ETrue if successful, EFalse if an information identifier is unknown or cannot
  3404  *  be mapped.
  3405  *  be mapped.
  3405  */
  3406  */
  3406 TBool TSmsInformationElementCategories::GetCategoryDefinition(TInformationElementId aId, TInformationElementCategory& aCategory)
  3407 TBool TSmsInformationElementCategories::GetCategoryDefinition(TInformationElementId aId, TInformationElementCategory& aCategory)
  3407     {
  3408     {
  3408     LOGGSMU1("TSmsInformationElementCategories::GetCategoryDefinition");
  3409     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_GETCATEGORYDEFINITION_1, "TSmsInformationElementCategories::GetCategoryDefinition");
  3409     TInt index;
  3410     TInt index;
  3410 
  3411 
  3411     if (TranslateCategoryToIndex(aId,index))
  3412     if (TranslateCategoryToIndex(aId,index))
  3412         {
  3413         {
  3413         aCategory = categories[index];
  3414         aCategory = categories[index];
  3414         }
  3415         }
  3415     else
  3416     else
  3416         {
  3417         {
  3417         LOGGSMU2("TSmsInformationElementCategories::GetCategoryDefinition, Failure, aId = %d", aId);
  3418         OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_GETCATEGORYDEFINITION_2, "TSmsInformationElementCategories::GetCategoryDefinition, Failure, aId = %d", aId);
  3418         return EFalse;
  3419         return EFalse;
  3419         }
  3420         }
  3420 
  3421 
  3421     return ETrue;
  3422     return ETrue;
  3422     } // TSmsInformationElementCategories::GetCategoryDefinition
  3423     } // TSmsInformationElementCategories::GetCategoryDefinition
  3434     };
  3435     };
  3435 
  3436 
  3436 
  3437 
  3437 CSmsUserData* CSmsUserData::NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme)
  3438 CSmsUserData* CSmsUserData::NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme)
  3438 	{
  3439 	{
  3439 	LOGGSMU1("CSmsUserData::NewL()");
  3440 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_NEWL_1, "CSmsUserData::NewL()");
  3440 
  3441 
  3441 	CSmsUserData* userdata=new(ELeave) CSmsUserData(aCharacterSetConverter,aFs,aFirstOctet,aDataCodingScheme);
  3442 	CSmsUserData* userdata=new(ELeave) CSmsUserData(aCharacterSetConverter,aFs,aFirstOctet,aDataCodingScheme);
  3442 	CleanupStack::PushL(userdata);
  3443 	CleanupStack::PushL(userdata);
  3443 	userdata->ConstructL();
  3444 	userdata->ConstructL();
  3444 	CleanupStack::Pop();
  3445 	CleanupStack::Pop();
  3463  *  @return Information element
  3464  *  @return Information element
  3464  *  @capability None
  3465  *  @capability None
  3465  */
  3466  */
  3466 EXPORT_C  CSmsInformationElement& CSmsUserData::InformationElement(TInt aIndex) const
  3467 EXPORT_C  CSmsInformationElement& CSmsUserData::InformationElement(TInt aIndex) const
  3467 	{
  3468 	{
  3468 	LOGGSMU1("CSmsUserData::InformationElement()");
  3469 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_INFORMATIONELEMENT_1, "CSmsUserData::InformationElement()");
  3469 
  3470 
  3470 	return *iInformationElementArray[aIndex];
  3471 	return *iInformationElementArray[aIndex];
  3471 	} // CSmsUserData::InformationElement
  3472 	} // CSmsUserData::InformationElement
  3472 
  3473 
  3473 
  3474 
  3474 CSmsInformationElement*& CSmsUserData::InformationElementPtr(TInt aIndex)
  3475 CSmsInformationElement*& CSmsUserData::InformationElementPtr(TInt aIndex)
  3475     {
  3476     {
  3476     LOGGSMU1("CSmsUserData::InformationElementPtr()");
  3477     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_INFORMATIONELEMENTPTR_1, "CSmsUserData::InformationElementPtr()");
  3477 
  3478 
  3478     return iInformationElementArray[aIndex];
  3479     return iInformationElementArray[aIndex];
  3479     } // CSmsUserData::InformationElementPtr
  3480     } // CSmsUserData::InformationElementPtr
  3480 
  3481 
  3481 
  3482 
  3491  *  @return True if aIdentifier is found in the User Data
  3492  *  @return True if aIdentifier is found in the User Data
  3492  *  @capability None
  3493  *  @capability None
  3493  */
  3494  */
  3494 EXPORT_C TBool CSmsUserData::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,TInt& aIndex) const
  3495 EXPORT_C TBool CSmsUserData::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,TInt& aIndex) const
  3495 	{
  3496 	{
  3496 	LOGGSMU1("CSmsUserData::InformationElementIndex()");
  3497 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_INFORMATIONELEMENTINDEX_1, "CSmsUserData::InformationElementIndex()");
  3497 
  3498 
  3498 	TBool found=EFalse;
  3499 	TBool found=EFalse;
  3499 	TInt count=NumInformationElements();
  3500 	TInt count=NumInformationElements();
  3500 	for (TInt i=0; (!found) && (i<count); i++)
  3501 	for (TInt i=0; (!found) && (i<count); i++)
  3501 		if (InformationElement(i).Identifier()==aIdentifier)
  3502 		if (InformationElement(i).Identifier()==aIdentifier)
  3519  *  @return True if aIdentifier is found in the User Data
  3520  *  @return True if aIdentifier is found in the User Data
  3520  *  @capability None
  3521  *  @capability None
  3521  */
  3522  */
  3522 EXPORT_C TBool CSmsUserData::InformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,TInt& aIndex) const
  3523 EXPORT_C TBool CSmsUserData::InformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,TInt& aIndex) const
  3523 	{
  3524 	{
  3524 	LOGGSMU1("CSmsUserData::InformationElementLastIndex()");
  3525 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_INFORMATIONELEMENTLASTINDEX_1, "CSmsUserData::InformationElementLastIndex()");
  3525 
  3526 
  3526 	TBool found=EFalse;
  3527 	TBool found=EFalse;
  3527 	TInt count=NumInformationElements();
  3528 	TInt count=NumInformationElements();
  3528 	for (TInt i=count-1; (!found) && (i>=0); i--)
  3529 	for (TInt i=count-1; (!found) && (i>=0); i--)
  3529 		if (InformationElement(i).Identifier()==aIdentifier)
  3530 		if (InformationElement(i).Identifier()==aIdentifier)
  3546  *  @param aIndices
  3547  *  @param aIndices
  3547  *  A collection containing the location index for each information element of this type.
  3548  *  A collection containing the location index for each information element of this type.
  3548  */
  3549  */
  3549 void CSmsUserData::InformationElementIndicesL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, CArrayFixFlat<TInt>& aIndices) const
  3550 void CSmsUserData::InformationElementIndicesL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, CArrayFixFlat<TInt>& aIndices) const
  3550     {
  3551     {
  3551     LOGGSMU1("CSmsUserData::InformationElementIndicesL()");
  3552     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_INFORMATIONELEMENTINDICESL_1, "CSmsUserData::InformationElementIndicesL()");
  3552 
  3553 
  3553     aIndices.Reset();
  3554     aIndices.Reset();
  3554     
  3555     
  3555 	TInt count=NumInformationElements();
  3556 	TInt count=NumInformationElements();
  3556 	for (TInt i=0; i<count; i++)
  3557 	for (TInt i=0; i<count; i++)
  3569  *  by the calling function, regardless of the return code.
  3570  *  by the calling function, regardless of the return code.
  3570  *  @param aInformationElement An EMS Information Element
  3571  *  @param aInformationElement An EMS Information Element
  3571  */
  3572  */
  3572 TBool CSmsUserData::EmsInformationElementWillFitL(CEmsInformationElement* aIe,CSmsEMSBufferSegmenter& aSeg,TUint& aCharsAddedToCurrentPDU)
  3573 TBool CSmsUserData::EmsInformationElementWillFitL(CEmsInformationElement* aIe,CSmsEMSBufferSegmenter& aSeg,TUint& aCharsAddedToCurrentPDU)
  3573 	{
  3574 	{
  3574 	LOGGSMU1("CSmsUserData::EmsInformationElementWillFitL()");
  3575 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_EMSINFORMATIONELEMENTWILLFITL_1, "CSmsUserData::EmsInformationElementWillFitL()");
  3575 
  3576 
  3576 	// Before using an EmsInformationElement polymorphically as an SmsIE,
  3577 	// Before using an EmsInformationElement polymorphically as an SmsIE,
  3577 	// we need to make sure that the IE has been encoded
  3578 	// we need to make sure that the IE has been encoded
  3578 	aIe->EncodeInformationElementL();
  3579 	aIe->EncodeInformationElementL();
  3579 	iInformationElementArray.AppendL(aIe);
  3580 	iInformationElementArray.AppendL(aIe);
  3602  *  @param aInformationElement A pointer to an information Element
  3603  *  @param aInformationElement A pointer to an information Element
  3603  *  @capability None
  3604  *  @capability None
  3604  */
  3605  */
  3605 TBool CSmsUserData::ControlInformationElementWillFitL(CSmsInformationElement* aIe)
  3606 TBool CSmsUserData::ControlInformationElementWillFitL(CSmsInformationElement* aIe)
  3606     {
  3607     {
  3607     LOGGSMU1("CSmsUserData::ControlInformationElementWillFitL()");
  3608     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_CONTROLINFORMATIONELEMENTWILLFITL_1, "CSmsUserData::ControlInformationElementWillFitL()");
  3608 
  3609 
  3609     if (aIe == NULL)
  3610     if (aIe == NULL)
  3610         {
  3611         {
  3611         User::Leave(KErrGeneral);
  3612         User::Leave(KErrGeneral);
  3612         }
  3613         }
  3665  *  KErrNotSupported if the information element is not supported via this interface.
  3666  *  KErrNotSupported if the information element is not supported via this interface.
  3666  *  @capability None
  3667  *  @capability None
  3667  */
  3668  */
  3668 EXPORT_C void CSmsUserData::AddInformationElementL(TSmsId aIdentifier,const TDesC8& aData)
  3669 EXPORT_C void CSmsUserData::AddInformationElementL(TSmsId aIdentifier,const TDesC8& aData)
  3669     {
  3670     {
  3670     LOGGSMU1("CSmsUserData::AddInformationElementL");
  3671     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ADDINFORMATIONELEMENTL_1, "CSmsUserData::AddInformationElementL");
  3671 
  3672 
  3672     if  ((aIdentifier >= 0x21) && (aIdentifier <= 0x23) ||
  3673     if  ((aIdentifier >= 0x21) && (aIdentifier <= 0x23) ||
  3673          (aIdentifier >= 0x26) && (aIdentifier <= 0x6F) ||
  3674          (aIdentifier >= 0x26) && (aIdentifier <= 0x6F) ||
  3674          (aIdentifier >= 0xA0) && (aIdentifier <= 0xBF) ||
  3675          (aIdentifier >= 0xA0) && (aIdentifier <= 0xBF) ||
  3675          (aIdentifier >= 0xE0) && (aIdentifier <= 0xFF))
  3676          (aIdentifier >= 0xE0) && (aIdentifier <= 0xFF))
  3690  *  @param aIdentifier An information element Identifier for aData
  3691  *  @param aIdentifier An information element Identifier for aData
  3691  *  @param aData The information element to add to the User Data
  3692  *  @param aData The information element to add to the User Data
  3692  */
  3693  */
  3693 void CSmsUserData::UpdateInformationElementArrayL(TSmsId aIdentifier,const TDesC8& aData)
  3694 void CSmsUserData::UpdateInformationElementArrayL(TSmsId aIdentifier,const TDesC8& aData)
  3694     {
  3695     {
  3695     LOGGSMU1("CSmsUserData::UpdateInformationElementsL");
  3696     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_1, "CSmsUserData::UpdateInformationElementsL");
  3696 
  3697 
  3697     TInt count=NumInformationElements();
  3698     TInt count=NumInformationElements();
  3698     if(!CEmsFactory::Supported(aIdentifier))
  3699     if(!CEmsFactory::Supported(aIdentifier))
  3699         {
  3700         {
  3700         for (TInt i=0; i<count; i++)
  3701         for (TInt i=0; i<count; i++)
  3712                     {
  3713                     {
  3713                     case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUMultipleInstancesPerPDU:
  3714                     case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUMultipleInstancesPerPDU:
  3714                         {
  3715                         {
  3715                         if (InformationElement(i).Identifier() == CSmsInformationElement::ESmsIEISpecialSMSMessageIndication)
  3716                         if (InformationElement(i).Identifier() == CSmsInformationElement::ESmsIEISpecialSMSMessageIndication)
  3716                             {
  3717                             {
  3717                             LOGGSMU3("CSmsUserData::AddInformationElementL1 category = %d, identifier = %d",category,aIdentifier);
  3718                             OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_2, "CSmsUserData::AddInformationElementL1 category = %d, identifier = %d",category,aIdentifier);
  3718 
  3719 
  3719                             //if Msg type is the same, swap with the most recent value
  3720                             //if Msg type is the same, swap with the most recent value
  3720                             if ((InformationElement(i).Data()[0] & ((TUint8) EGsmSmsSpecialMessageIndicationTypeMask)) ==
  3721                             if ((InformationElement(i).Data()[0] & ((TUint8) EGsmSmsSpecialMessageIndicationTypeMask)) ==
  3721                                 (aData[0] & ((TUint8) EGsmSmsSpecialMessageIndicationTypeMask)))
  3722                                 (aData[0] & ((TUint8) EGsmSmsSpecialMessageIndicationTypeMask)))
  3722                                 {
  3723                                 {
  3723                                 User::Leave(KErrAlreadyExists);
  3724                                 User::Leave(KErrAlreadyExists);
  3724                                 }
  3725                                 }
  3725                             }
  3726                             }
  3726                         else
  3727                         else
  3727                             {
  3728                             {
  3728                             LOGGSMU4("CSmsUserData::AddInformationElementL3 category = %d, identifier = %d, data = %S",category,aIdentifier, &aData);
  3729                             OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_3, "CSmsUserData::AddInformationElementL3 category = %d, identifier = %d, data = %s",category,aIdentifier, aData);
  3729                             User::Leave(KErrArgument);
  3730                             User::Leave(KErrArgument);
  3730                             }
  3731                             }
  3731                         break;
  3732                         break;
  3732                         }
  3733                         }
  3733                     case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUAndWithIdenticalValues:
  3734                     case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUAndWithIdenticalValues:
  3734                     case TSmsInformationElementCategories::ECtrlMandatoryIn1stPDUOnly:
  3735                     case TSmsInformationElementCategories::ECtrlMandatoryIn1stPDUOnly:
  3735                     case TSmsInformationElementCategories::ECtrlSingleInstanceOnly:
  3736                     case TSmsInformationElementCategories::ECtrlSingleInstanceOnly:
  3736                         {
  3737                         {
  3737                         LOGGSMU3("CSmsUserData::AddInformationElementL4 category = %d, identifier = %d",category,aIdentifier);
  3738                         OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_4, "CSmsUserData::AddInformationElementL4 category = %d, identifier = %d",category,aIdentifier);
  3738                         User::Leave(KErrAlreadyExists);
  3739                         User::Leave(KErrAlreadyExists);
  3739                         break;
  3740                         break;
  3740                         }
  3741                         }
  3741                     case TSmsInformationElementCategories::ECtrlMultipleInstancesAllowed:
  3742                     case TSmsInformationElementCategories::ECtrlMultipleInstancesAllowed:
  3742                         {
  3743                         {
  3743                         LOGGSMU3("CSmsUserData::AddInformationElementL5 category = %d, identifier = %d",category,aIdentifier);
  3744                         OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_5, "CSmsUserData::AddInformationElementL5 category = %d, identifier = %d",category,aIdentifier);
  3744                         break;
  3745                         break;
  3745                         }
  3746                         }
  3746                     case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU:
  3747                     case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU:
  3747                         {
  3748                         {
  3748                         LOGGSMU3("CSmsUserData::AddInformationElementL6 category = %d, identifier = %d",category,aIdentifier);
  3749                         OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_6, "CSmsUserData::AddInformationElementL6 category = %d, identifier = %d",category,aIdentifier);
  3749                         User::Leave(KErrAlreadyExists);
  3750                         User::Leave(KErrAlreadyExists);
  3750                         // currently the email header is updated in:
  3751                         // currently the email header is updated in:
  3751                         // void CSmsMessage::DecodeBufferL(CArrayPtr<CSmsPDU>& aSmsPDUArray,CSmsBufferBase& aBuffer)
  3752                         // void CSmsMessage::DecodeBufferL(CArrayPtr<CSmsPDU>& aSmsPDUArray,CSmsBufferBase& aBuffer)
  3752                         break;
  3753                         break;
  3753                         }
  3754                         }
  3754                     default:
  3755                     default:
  3755                         {
  3756                         {
  3756                         LOGGSMU3("CSmsUserData::AddInformationElementL8 category = %d, identifier = %d",category,aIdentifier);
  3757                         OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_7, "CSmsUserData::AddInformationElementL8 category = %d, identifier = %d",category,aIdentifier);
  3757                         User::Leave(KErrNotSupported);
  3758                         User::Leave(KErrNotSupported);
  3758                         break;
  3759                         break;
  3759                         }
  3760                         }
  3760                     }
  3761                     }
  3761                 }
  3762                 }
  3770     } // CSmsUserData::UpdateInformationElementArrayL
  3771     } // CSmsUserData::UpdateInformationElementArrayL
  3771 
  3772 
  3772 
  3773 
  3773 void CSmsUserData::AddEmsInformationElementL(CEmsInformationElement* aIe)
  3774 void CSmsUserData::AddEmsInformationElementL(CEmsInformationElement* aIe)
  3774 	{
  3775 	{
  3775 	LOGGSMU1("CSmsUserData::AddEmsInformationElementL()");
  3776 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_ADDEMSINFORMATIONELEMENTL_1, "CSmsUserData::AddEmsInformationElementL()");
  3776 
  3777 
  3777 	// Before using an EmsInformationElement polymorphically as an SmsIE,
  3778 	// Before using an EmsInformationElement polymorphically as an SmsIE,
  3778 	// we need to make sure that the IE has been encoded
  3779 	// we need to make sure that the IE has been encoded
  3779 	aIe->EncodeInformationElementL();
  3780 	aIe->EncodeInformationElementL();
  3780 	iInformationElementArray.AppendL(aIe);
  3781 	iInformationElementArray.AppendL(aIe);
  3788  *  @param aIndex Information element index
  3789  *  @param aIndex Information element index
  3789  *  @capability None
  3790  *  @capability None
  3790  */
  3791  */
  3791 EXPORT_C void CSmsUserData::RemoveInformationElement(TInt aIndex)
  3792 EXPORT_C void CSmsUserData::RemoveInformationElement(TInt aIndex)
  3792 	{
  3793 	{
  3793 	LOGGSMU1("CSmsUserData::RemoveInformationElement()");
  3794 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_REMOVEINFORMATIONELEMENT_1, "CSmsUserData::RemoveInformationElement()");
  3794 	// Since iInformationElementArray[aIndex] pointer is removed from iInformationElementArray, there is no double free issue.
  3795 	// Since iInformationElementArray[aIndex] pointer is removed from iInformationElementArray, there is no double free issue.
  3795 	// coverity[double_free]
  3796 	// coverity[double_free]
  3796 	delete iInformationElementArray[aIndex];
  3797 	delete iInformationElementArray[aIndex];
  3797 	iInformationElementArray[aIndex] = NULL;
  3798 	iInformationElementArray[aIndex] = NULL;
  3798 	iInformationElementArray.Delete(aIndex);
  3799 	iInformationElementArray.Delete(aIndex);
  3804 	} // CSmsUserData::RemoveInformationElement
  3805 	} // CSmsUserData::RemoveInformationElement
  3805 
  3806 
  3806 
  3807 
  3807 TInt CSmsUserData::MaxPackedUDUnitsInBodyRemaining() const
  3808 TInt CSmsUserData::MaxPackedUDUnitsInBodyRemaining() const
  3808 	{
  3809 	{
  3809 	LOGGSMU1("CSmsUserData::MaxPackedUDUnitsInBodyRemaining()");
  3810 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_MAXPACKEDUDUNITSINBODYREMAINING_1, "CSmsUserData::MaxPackedUDUnitsInBodyRemaining()");
  3810 
  3811 
  3811 	TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits();
  3812 	TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits();
  3812 	TInt maxPackedUDUnitsInBody=0;
  3813 	TInt maxPackedUDUnitsInBody=0;
  3813 	if (iDataCodingScheme.TextCompressed()||(iDataCodingScheme.Alphabet()!=TSmsDataCodingScheme::ESmsAlphabet7Bit))
  3814 	if (iDataCodingScheme.TextCompressed()||(iDataCodingScheme.Alphabet()!=TSmsDataCodingScheme::ESmsAlphabet7Bit))
  3814 		{
  3815 		{
  3830 	} // CSmsUserData::MaxPackedUDUnitsInBodyRemaining
  3831 	} // CSmsUserData::MaxPackedUDUnitsInBodyRemaining
  3831 
  3832 
  3832 
  3833 
  3833 TInt CSmsUserData::MaxPackedUDUnitsInBodyRemaining(TUint aIELen) const
  3834 TInt CSmsUserData::MaxPackedUDUnitsInBodyRemaining(TUint aIELen) const
  3834 	{
  3835 	{
  3835 	LOGGSMU1("CSmsUserData::MaxPackedUDUnitsInBodyRemaining()");
  3836 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_MAXPACKEDUDUNITSINBODYREMAINING1_1, "CSmsUserData::MaxPackedUDUnitsInBodyRemaining()");
  3836 
  3837 
  3837 	TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits(aIELen);
  3838 	TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits(aIELen);
  3838 	TInt maxPackedUDUnitsInBody=0;
  3839 	TInt maxPackedUDUnitsInBody=0;
  3839 	if (iDataCodingScheme.TextCompressed()||(iDataCodingScheme.Alphabet()!=TSmsDataCodingScheme::ESmsAlphabet7Bit))
  3840 	if (iDataCodingScheme.TextCompressed()||(iDataCodingScheme.Alphabet()!=TSmsDataCodingScheme::ESmsAlphabet7Bit))
  3840 		{
  3841 		{
  3859 /**
  3860 /**
  3860  *  @capability None
  3861  *  @capability None
  3861  */
  3862  */
  3862 EXPORT_C TInt CSmsUserData::MaxBodyLengthInChars() const
  3863 EXPORT_C TInt CSmsUserData::MaxBodyLengthInChars() const
  3863 	{
  3864 	{
  3864 	LOGGSMU1("CSmsUserData::MaxBodyLengthInChars()");
  3865 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_MAXBODYLENGTHINCHARS_1, "CSmsUserData::MaxBodyLengthInChars()");
  3865 
  3866 
  3866 	TInt totalheaderlengthinudlunits=TotalHeaderLengthInUDLUnits();
  3867 	TInt totalheaderlengthinudlunits=TotalHeaderLengthInUDLUnits();
  3867 	TInt maxbodylengthinchars=0;
  3868 	TInt maxbodylengthinchars=0;
  3868 	if (iDataCodingScheme.TextCompressed())
  3869 	if (iDataCodingScheme.TextCompressed())
  3869 		{
  3870 		{
  3887 				{
  3888 				{
  3888 				maxbodylengthinchars=(KSmsMaxUserDataSize-totalheaderlengthinudlunits)/2;
  3889 				maxbodylengthinchars=(KSmsMaxUserDataSize-totalheaderlengthinudlunits)/2;
  3889 				break;
  3890 				break;
  3890 				}
  3891 				}
  3891 			default:
  3892 			default:
  3892 			    LOGGSMU1("CSmsUserData::MaxBodyLengthInChars() WARNING! default case has been reached");
  3893 			    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_MAXBODYLENGTHINCHARS_2, "CSmsUserData::MaxBodyLengthInChars() WARNING! default case has been reached");
  3893                 break;
  3894                 break;
  3894  			}
  3895  			}
  3895 		}
  3896 		}
  3896 	return maxbodylengthinchars;
  3897 	return maxbodylengthinchars;
  3897 	} // CSmsUserData::MaxBodyLengthInChars
  3898 	} // CSmsUserData::MaxBodyLengthInChars
  3903  *  @return Unpacked User Data Elements
  3904  *  @return Unpacked User Data Elements
  3904  *  @capability None
  3905  *  @capability None
  3905  */
  3906  */
  3906 EXPORT_C TPtrC8 CSmsUserData::Body() const
  3907 EXPORT_C TPtrC8 CSmsUserData::Body() const
  3907 	{
  3908 	{
  3908 	LOGGSMU1("CSmsUserData::Body()");
  3909 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_BODY_1, "CSmsUserData::Body()");
  3909 
  3910 
  3910 	return iBody->Des();
  3911 	return iBody->Des();
  3911 	} // CSmsUserData::Body
  3912 	} // CSmsUserData::Body
  3912 
  3913 
  3913 
  3914 
  3917  *  @param aBody Unpacked User Data Elements
  3918  *  @param aBody Unpacked User Data Elements
  3918  *  @capability None
  3919  *  @capability None
  3919  */
  3920  */
  3920 EXPORT_C void CSmsUserData::SetBodyL(const TDesC8& aBody)
  3921 EXPORT_C void CSmsUserData::SetBodyL(const TDesC8& aBody)
  3921 	{
  3922 	{
  3922 	LOGGSMU1("CSmsUserData::SetBodyL()");
  3923 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_SETBODYL_1, "CSmsUserData::SetBodyL()");
  3923 
  3924 
  3924 	//Some tests fail with this line in, despite it being a valid condition!
  3925 	//Some tests fail with this line in, despite it being a valid condition!
  3925 	//__ASSERT_DEBUG(aBody.Length() <= MaxBodyLengthInChars(), User::Leave(KErrTooBig));
  3926 	//__ASSERT_DEBUG(aBody.Length() <= MaxBodyLengthInChars(), User::Leave(KErrTooBig));
  3926 
  3927 
  3927 	NewBodyL(aBody.Length());
  3928 	NewBodyL(aBody.Length());
  3929 	} // CSmsUserData::SetBodyL
  3930 	} // CSmsUserData::SetBodyL
  3930 
  3931 
  3931 
  3932 
  3932 void CSmsUserData::AppendBodyL(const TDesC8& aBody)
  3933 void CSmsUserData::AppendBodyL(const TDesC8& aBody)
  3933 	{
  3934 	{
  3934 	LOGGSMU1("CSmsUserData::AppendBodyL()");
  3935 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_APPENDBODYL_1, "CSmsUserData::AppendBodyL()");
  3935 
  3936 
  3936 	if (iBody)
  3937 	if (iBody)
  3937 		{
  3938 		{
  3938 		//Some tests fail with this line in, despite it being a valid condition!
  3939 		//Some tests fail with this line in, despite it being a valid condition!
  3939 		//__ASSERT_DEBUG(aBody.Length() + iBody->Length() <= MaxBodyLengthInChars(), User::Leave(KErrTooBig));
  3940 		//__ASSERT_DEBUG(aBody.Length() + iBody->Length() <= MaxBodyLengthInChars(), User::Leave(KErrTooBig));
  3962  *
  3963  *
  3963  *  @capability None
  3964  *  @capability None
  3964  */
  3965  */
  3965 EXPORT_C TBool CSmsUserData::IsSupportedL(TChar aChar)
  3966 EXPORT_C TBool CSmsUserData::IsSupportedL(TChar aChar)
  3966 	{
  3967 	{
  3967 	LOGGSMU1("CSmsUserData::IsSupportedL()");
  3968 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ISSUPPORTEDL_1, "CSmsUserData::IsSupportedL()");
  3968 
  3969 
  3969 	CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData());
  3970 	CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData());
  3970 	TBool result=converter->IsSupportedL(aChar);
  3971 	TBool result=converter->IsSupportedL(aChar);
  3971 	CleanupStack::PopAndDestroy();
  3972 	CleanupStack::PopAndDestroy();
  3972 
  3973 
  3989  *  @capability None
  3990  *  @capability None
  3990  */
  3991  */
  3991 EXPORT_C TBool CSmsUserData::IsSupportedL(const TDesC& aDes, TInt& aNumberOfUnconvertibleCharacters,
  3992 EXPORT_C TBool CSmsUserData::IsSupportedL(const TDesC& aDes, TInt& aNumberOfUnconvertibleCharacters,
  3992                                           TInt& aIndexOfFirstUnconvertibleCharacter) const
  3993                                           TInt& aIndexOfFirstUnconvertibleCharacter) const
  3993 	{
  3994 	{
  3994 	LOGGSMU1("[1] CSmsUserData::IsSupportedL()");
  3995 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ISSUPPORTEDL1_1, "[1] CSmsUserData::IsSupportedL()");
  3995 
  3996 
  3996 	CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData());
  3997 	CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData());
  3997 	TBool result=converter->IsSupportedL(aDes, aNumberOfUnconvertibleCharacters,
  3998 	TBool result=converter->IsSupportedL(aDes, aNumberOfUnconvertibleCharacters,
  3998 			                             aIndexOfFirstUnconvertibleCharacter);
  3999 			                             aIndexOfFirstUnconvertibleCharacter);
  3999 	CleanupStack::PopAndDestroy();
  4000 	CleanupStack::PopAndDestroy();
  4026 										  TInt& aNumberOfUnconvertibleCharacters,
  4027 										  TInt& aNumberOfUnconvertibleCharacters,
  4027                                           TInt& aNumberOfDowngradedCharacters,
  4028                                           TInt& aNumberOfDowngradedCharacters,
  4028                                           TInt& aNumberRequiringAlternativeEncoding,
  4029                                           TInt& aNumberRequiringAlternativeEncoding,
  4029                                           TInt& aIndexOfFirstUnconvertibleCharacter) const
  4030                                           TInt& aIndexOfFirstUnconvertibleCharacter) const
  4030 	{
  4031 	{
  4031 	LOGGSMU1("[2] CSmsUserData::IsSupportedL()");
  4032 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ISSUPPORTEDL2_1, "[2] CSmsUserData::IsSupportedL()");
  4032 
  4033 
  4033 	CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData());
  4034 	CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData());
  4034 	TBool result=converter->IsSupportedL(aDes, aEncoding,
  4035 	TBool result=converter->IsSupportedL(aDes, aEncoding,
  4035 			                             aNumberOfUnconvertibleCharacters,
  4036 			                             aNumberOfUnconvertibleCharacters,
  4036 			                             aNumberOfDowngradedCharacters,
  4037 			                             aNumberOfDowngradedCharacters,
  4042 	} // CSmsUserData::IsSupportedL
  4043 	} // CSmsUserData::IsSupportedL
  4043 
  4044 
  4044 
  4045 
  4045 TUint8* CSmsUserData::EncodeL(TUint8* aPtr) const
  4046 TUint8* CSmsUserData::EncodeL(TUint8* aPtr) const
  4046 	{
  4047 	{
  4047 	LOGGSMU1("CSmsUserData::EncodeL()");
  4048 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_ENCODEL_1, "CSmsUserData::EncodeL()");
  4048 
  4049 
  4049 	__ASSERT_DEBUG(0<=MaxPackedUDUnitsInBodyRemaining(),Panic(KGsmuPanicUserDataBodyTooLong));
  4050 	__ASSERT_DEBUG(0<=MaxPackedUDUnitsInBodyRemaining(),Panic(KGsmuPanicUserDataBodyTooLong));
  4050 	// Encode the user data length
  4051 	// Encode the user data length
  4051 	TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits();
  4052 	TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits();
  4052 	TSmsOctet userDataLength=totalHeaderLengthInUDLUnits+TSmsOctet(BodyLengthInUDLUnits());
  4053 	TSmsOctet userDataLength=totalHeaderLengthInUDLUnits+TSmsOctet(BodyLengthInUDLUnits());
  4076 	DecodeL(aPdu, EFalse);
  4077 	DecodeL(aPdu, EFalse);
  4077 	}
  4078 	}
  4078 
  4079 
  4079 void CSmsUserData::DecodeL(TGsmuLex8& aPdu, TBool aAcceptTruncation)
  4080 void CSmsUserData::DecodeL(TGsmuLex8& aPdu, TBool aAcceptTruncation)
  4080 	{	
  4081 	{	
  4081 	LOGGSMU1("CSmsUserData::DecodeL()");
  4082 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_DECODEL1_1, "CSmsUserData::DecodeL()");
  4082 
  4083 
  4083 	// Reset current data
  4084 	// Reset current data
  4084 	iInformationElementArray.ResetAndDestroy();
  4085 	iInformationElementArray.ResetAndDestroy();
  4085 	// Decode the user data
  4086 	// Decode the user data
  4086 	TSmsOctet userDataLength;
  4087 	TSmsOctet userDataLength;
  4180     } // CSmsUserData::CSmsUserData
  4181     } // CSmsUserData::CSmsUserData
  4181 
  4182 
  4182 
  4183 
  4183 void CSmsUserData::ConstructL()
  4184 void CSmsUserData::ConstructL()
  4184 	{
  4185 	{
  4185 	LOGGSMU1("CSmsUserData::ConstructL()");
  4186 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_CONSTRUCTL_1, "CSmsUserData::ConstructL()");
  4186 
  4187 
  4187 	NewBodyL(0);
  4188 	NewBodyL(0);
  4188 	} // CSmsUserData::ConstructL
  4189 	} // CSmsUserData::ConstructL
  4189 
  4190 
  4190 
  4191 
  4194  *  @return  Pointer to the newly created CSmsUserData object.
  4195  *  @return  Pointer to the newly created CSmsUserData object.
  4195  */
  4196  */
  4196 CSmsUserData* CSmsUserData::DuplicateL(TSmsFirstOctet& aFirstOctet,
  4197 CSmsUserData* CSmsUserData::DuplicateL(TSmsFirstOctet& aFirstOctet,
  4197 									   const TSmsDataCodingScheme& aDataCodingScheme) const
  4198 									   const TSmsDataCodingScheme& aDataCodingScheme) const
  4198 	{
  4199 	{
  4199 	LOGGSMU1("CSmsUserData::DuplicateL()");
  4200 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_DUPLICATEL_1, "CSmsUserData::DuplicateL()");
  4200 
  4201 
  4201 	CSmsUserData*  userdata = CSmsUserData::NewL(iCharacterSetConverter, iFs,
  4202 	CSmsUserData*  userdata = CSmsUserData::NewL(iCharacterSetConverter, iFs,
  4202 	                                             aFirstOctet, aDataCodingScheme);
  4203 	                                             aFirstOctet, aDataCodingScheme);
  4203 	CleanupStack::PushL(userdata);
  4204 	CleanupStack::PushL(userdata);
  4204 
  4205 
  4228 	} // CSmsUserData::DuplicateL
  4229 	} // CSmsUserData::DuplicateL
  4229 
  4230 
  4230 
  4231 
  4231 TInt CSmsUserData::HeaderLength() const
  4232 TInt CSmsUserData::HeaderLength() const
  4232 	{
  4233 	{
  4233 	LOGGSMU1("CSmsUserData::HeaderLength()");
  4234 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_HEADERLENGTH_1, "CSmsUserData::HeaderLength()");
  4234 
  4235 
  4235 	TInt numinformationelements=NumInformationElements();
  4236 	TInt numinformationelements=NumInformationElements();
  4236 	TInt headerlength=0;
  4237 	TInt headerlength=0;
  4237 	for (TInt i=0; i<numinformationelements; i++)
  4238 	for (TInt i=0; i<numinformationelements; i++)
  4238 		headerlength+=iInformationElementArray[i]->Length();
  4239 		headerlength+=iInformationElementArray[i]->Length();
  4240 	} // CSmsUserData::HeaderLength
  4241 	} // CSmsUserData::HeaderLength
  4241 
  4242 
  4242 
  4243 
  4243 TInt CSmsUserData::TotalHeaderLengthInUDLUnits() const
  4244 TInt CSmsUserData::TotalHeaderLengthInUDLUnits() const
  4244 	{
  4245 	{
  4245 	LOGGSMU1("CSmsUserData::TotalHeaderLengthInUDLUnits()");
  4246 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_TOTALHEADERLENGTHINUDLUNITS_1, "CSmsUserData::TotalHeaderLengthInUDLUnits()");
  4246 
  4247 
  4247 	TInt totalheaderlengthinudlunits=0;
  4248 	TInt totalheaderlengthinudlunits=0;
  4248 	if (iInformationElementArray.Count()>0)
  4249 	if (iInformationElementArray.Count()>0)
  4249 		{
  4250 		{
  4250 		TInt totalheaderlength=1+HeaderLength();
  4251 		TInt totalheaderlength=1+HeaderLength();
  4266 					{
  4267 					{
  4267 					totalheaderlengthinudlunits=totalheaderlength;
  4268 					totalheaderlengthinudlunits=totalheaderlength;
  4268 					break;
  4269 					break;
  4269 					}
  4270 					}
  4270 				default:
  4271 				default:
  4271 				    LOGGSMU1("CSmsUserData::TotalHeaderLengthInUDLUnits() WARNING default case has been reached");
  4272 				    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_TOTALHEADERLENGTHINUDLUNITS_2, "CSmsUserData::TotalHeaderLengthInUDLUnits() WARNING default case has been reached");
  4272                     break;
  4273                     break;
  4273 				}
  4274 				}
  4274 			}
  4275 			}
  4275 		}
  4276 		}
  4276 	return totalheaderlengthinudlunits;
  4277 	return totalheaderlengthinudlunits;
  4277 	} // CSmsUserData::TotalHeaderLengthInUDLUnits
  4278 	} // CSmsUserData::TotalHeaderLengthInUDLUnits
  4278 
  4279 
  4279 
  4280 
  4280 TInt CSmsUserData::TotalHeaderLengthInUDLUnits(TInt aIElen) const
  4281 TInt CSmsUserData::TotalHeaderLengthInUDLUnits(TInt aIElen) const
  4281 	{
  4282 	{
  4282 	LOGGSMU1("CSmsUserData::TotalHeaderLengthInUDLUnits()");
  4283 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_TOTALHEADERLENGTHINUDLUNITS1_1, "CSmsUserData::TotalHeaderLengthInUDLUnits()");
  4283 
  4284 
  4284 		TInt totalheaderlengthinudlunits=0;
  4285 		TInt totalheaderlengthinudlunits=0;
  4285 		TInt totalheaderlength=aIElen;
  4286 		TInt totalheaderlength=aIElen;
  4286 
  4287 
  4287 		if (iInformationElementArray.Count()>0)
  4288 		if (iInformationElementArray.Count()>0)
  4316 	} // CSmsUserData::TotalHeaderLengthInUDLUnits
  4317 	} // CSmsUserData::TotalHeaderLengthInUDLUnits
  4317 
  4318 
  4318 
  4319 
  4319 TInt CSmsUserData::BodyLengthInUDLUnits() const
  4320 TInt CSmsUserData::BodyLengthInUDLUnits() const
  4320 	{
  4321 	{
  4321 	LOGGSMU1("CSmsUserData::BodyLengthInUDLUnits()");
  4322 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_BODYLENGTHINUDLUNITS_1, "CSmsUserData::BodyLengthInUDLUnits()");
  4322 
  4323 
  4323 	return iBody->Des().Length();
  4324 	return iBody->Des().Length();
  4324 	} // CSmsUserData::BodyLengthInUDLUnits
  4325 	} // CSmsUserData::BodyLengthInUDLUnits
  4325 
  4326 
  4326 
  4327 
  4327 void CSmsUserData::NewBodyL(TInt aLength)
  4328 void CSmsUserData::NewBodyL(TInt aLength)
  4328 	{
  4329 	{
  4329 	LOGGSMU1("CSmsUserData::NewBodyL()");
  4330 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_NEWBODYL_1, "CSmsUserData::NewBodyL()");
  4330 
  4331 
  4331 
  4332 
  4332 		HBufC8* body=HBufC8::NewL(aLength);
  4333 		HBufC8* body=HBufC8::NewL(aLength);
  4333 		delete iBody;
  4334 		delete iBody;
  4334 		iBody=body;
  4335 		iBody=body;
  4337 	} // CSmsUserData::NewBodyL
  4338 	} // CSmsUserData::NewBodyL
  4338 
  4339 
  4339 
  4340 
  4340 TBool CSmsUserData::HeaderPresent() const
  4341 TBool CSmsUserData::HeaderPresent() const
  4341 	{
  4342 	{
  4342 	LOGGSMU1("CSmsUserData::HeaderPresent()");
  4343 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_HEADERPRESENT_1, "CSmsUserData::HeaderPresent()");
  4343 
  4344 
  4344 	return (iFirstOctet&TSmsFirstOctet::ESmsUDHIMask)==TSmsFirstOctet::ESmsUDHIHeaderPresent;
  4345 	return (iFirstOctet&TSmsFirstOctet::ESmsUDHIMask)==TSmsFirstOctet::ESmsUDHIHeaderPresent;
  4345 	} // CSmsUserData::HeaderPresent
  4346 	} // CSmsUserData::HeaderPresent
  4346 
  4347 
  4347 
  4348 
  4348 void CSmsUserData::SetHeaderPresent(TBool aHeaderPresent)
  4349 void CSmsUserData::SetHeaderPresent(TBool aHeaderPresent)
  4349 	{
  4350 	{
  4350 	LOGGSMU1("CSmsUserData::SetHeaderPresent()");
  4351 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_SETHEADERPRESENT_1, "CSmsUserData::SetHeaderPresent()");
  4351 
  4352 
  4352 	iFirstOctet=aHeaderPresent? (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderPresent: (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderNotPresent;
  4353 	iFirstOctet=aHeaderPresent? (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderPresent: (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderNotPresent;
  4353 	} // CSmsUserData::SetHeaderPresent
  4354 	} // CSmsUserData::SetHeaderPresent
  4354 
  4355 
  4355 
  4356 
  4356 TBool CSmsUserData::IsBinaryData() const
  4357 TBool CSmsUserData::IsBinaryData() const
  4357 	{
  4358 	{
  4358 	LOGGSMU1("CSmsUserData::IsBinaryData()");
  4359 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_ISBINARYDATA_1, "CSmsUserData::IsBinaryData()");
  4359 
  4360 
  4360 	TInt index=0;
  4361 	TInt index=0;
  4361 	return (iDataCodingScheme.TextCompressed()) ||
  4362 	return (iDataCodingScheme.TextCompressed()) ||
  4362 			((iDataCodingScheme.Alphabet()==TSmsDataCodingScheme::ESmsAlphabet8Bit) &&
  4363 			((iDataCodingScheme.Alphabet()==TSmsDataCodingScheme::ESmsAlphabet8Bit) &&
  4363 			(InformationElementIndex(CSmsInformationElement::ESmsIEIApplicationPortAddressing8Bit,index) ||
  4364 			(InformationElementIndex(CSmsInformationElement::ESmsIEIApplicationPortAddressing8Bit,index) ||
  4375  *  
  4376  *  
  4376  *  @capability None
  4377  *  @capability None
  4377  */
  4378  */
  4378 EXPORT_C void TGsmSmsTypeOfAddress::ConvertToETelMM(NMobilePhone::TMobileTON& aTon,NMobilePhone::TMobileNPI& aNpi) const
  4379 EXPORT_C void TGsmSmsTypeOfAddress::ConvertToETelMM(NMobilePhone::TMobileTON& aTon,NMobilePhone::TMobileNPI& aNpi) const
  4379     {
  4380     {
  4380     LOGGSMU1("TGsmSmsTypeOfAddress::ConvertToETelMM()");
  4381     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, TGSMSMSTYPEOFADDRESS_CONVERTTOETELMM_1, "TGsmSmsTypeOfAddress::ConvertToETelMM()");
  4381 
  4382 
  4382     switch (TON())
  4383     switch (TON())
  4383     {
  4384     {
  4384 		case EGsmSmsTONInternationalNumber:
  4385 		case EGsmSmsTONInternationalNumber:
  4385             {
  4386             {
  4471  *  
  4472  *  
  4472  *  @capability None
  4473  *  @capability None
  4473  */
  4474  */
  4474 EXPORT_C void TGsmSmsTypeOfAddress::SetFromETelMM(NMobilePhone::TMobileTON aTon,NMobilePhone::TMobileNPI aNpi)
  4475 EXPORT_C void TGsmSmsTypeOfAddress::SetFromETelMM(NMobilePhone::TMobileTON aTon,NMobilePhone::TMobileNPI aNpi)
  4475     {
  4476     {
  4476     LOGGSMU1("TGsmSmsTypeOfAddress::SetFromETelMM()");
  4477     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, TGSMSMSTYPEOFADDRESS_SETFROMETELMM_1, "TGsmSmsTypeOfAddress::SetFromETelMM()");
  4477 
  4478 
  4478     switch (aTon)
  4479     switch (aTon)
  4479     {
  4480     {
  4480 		case NMobilePhone::EInternationalNumber:
  4481 		case NMobilePhone::EInternationalNumber:
  4481             {
  4482             {
  4569  *  
  4570  *  
  4570  *  @capability None
  4571  *  @capability None
  4571  */
  4572  */
  4572 EXPORT_C TVoiceMailInfoType CEnhancedVoiceMailBoxInformation::Type() const
  4573 EXPORT_C TVoiceMailInfoType CEnhancedVoiceMailBoxInformation::Type() const
  4573 	{
  4574 	{
  4574 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::Type()");
  4575 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_TYPE_1, "CEnhancedVoiceMailBoxInformation::Type()");
  4575 
  4576 
  4576 	return iType;
  4577 	return iType;
  4577 	} // CEnhancedVoiceMailBoxInformation::Type
  4578 	} // CEnhancedVoiceMailBoxInformation::Type
  4578 
  4579 
  4579 
  4580 
  4587  *  
  4588  *  
  4588  *  @capability None
  4589  *  @capability None
  4589  */
  4590  */
  4590 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetProfile(TSmsMessageProfileType aProfile)
  4591 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetProfile(TSmsMessageProfileType aProfile)
  4591 	{
  4592 	{
  4592 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetProfile()");
  4593 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETPROFILE_1, "CEnhancedVoiceMailBoxInformation::SetProfile()");
  4593 
  4594 
  4594 	iProfile = aProfile;
  4595 	iProfile = aProfile;
  4595 	} // CEnhancedVoiceMailBoxInformation::SetProfile
  4596 	} // CEnhancedVoiceMailBoxInformation::SetProfile
  4596 
  4597 
  4597 
  4598 
  4605  *  
  4606  *  
  4606  *  @capability None
  4607  *  @capability None
  4607  */
  4608  */
  4608 EXPORT_C TSmsMessageProfileType CEnhancedVoiceMailBoxInformation::Profile() const
  4609 EXPORT_C TSmsMessageProfileType CEnhancedVoiceMailBoxInformation::Profile() const
  4609 	{
  4610 	{
  4610 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::Profile()");
  4611 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_PROFILE_1, "CEnhancedVoiceMailBoxInformation::Profile()");
  4611 
  4612 
  4612 	return iProfile;
  4613 	return iProfile;
  4613 	} // CEnhancedVoiceMailBoxInformation::Profile
  4614 	} // CEnhancedVoiceMailBoxInformation::Profile
  4614 
  4615 
  4615 
  4616 
  4624  *  
  4625  *  
  4625  *  @capability None
  4626  *  @capability None
  4626  */
  4627  */
  4627 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetStorage(TBool aIsStored)
  4628 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetStorage(TBool aIsStored)
  4628 	{
  4629 	{
  4629 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetStorage()");
  4630 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETSTORAGE_1, "CEnhancedVoiceMailBoxInformation::SetStorage()");
  4630 
  4631 
  4631 	iStorage = aIsStored;
  4632 	iStorage = aIsStored;
  4632 	} // CEnhancedVoiceMailBoxInformation::SetStorage
  4633 	} // CEnhancedVoiceMailBoxInformation::SetStorage
  4633 
  4634 
  4634 
  4635 
  4643  *  
  4644  *  
  4644  *  @capability None
  4645  *  @capability None
  4645  */
  4646  */
  4646 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::Store() const
  4647 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::Store() const
  4647 	{
  4648 	{
  4648 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::Store()");
  4649 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_STORE_1, "CEnhancedVoiceMailBoxInformation::Store()");
  4649 
  4650 
  4650 	return iStorage;
  4651 	return iStorage;
  4651 	} // CEnhancedVoiceMailBoxInformation::Store
  4652 	} // CEnhancedVoiceMailBoxInformation::Store
  4652 
  4653 
  4653 
  4654 
  4662  *  
  4663  *  
  4663  *  @capability None
  4664  *  @capability None
  4664  */
  4665  */
  4665 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity(TBool aIsAlmostFull)
  4666 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity(TBool aIsAlmostFull)
  4666 	{
  4667 	{
  4667 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity()");
  4668 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETALMOSTMAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity()");
  4668 
  4669 
  4669 	iAlmostFull = aIsAlmostFull;
  4670 	iAlmostFull = aIsAlmostFull;
  4670 	} // CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity
  4671 	} // CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity
  4671 
  4672 
  4672 
  4673 
  4681  *  
  4682  *  
  4682  *  @capability None
  4683  *  @capability None
  4683  */
  4684  */
  4684 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity() const
  4685 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity() const
  4685 	{
  4686 	{
  4686 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity()");
  4687 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_ALMOSTMAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity()");
  4687 
  4688 
  4688 	return iAlmostFull;
  4689 	return iAlmostFull;
  4689 	} // CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity
  4690 	} // CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity
  4690 
  4691 
  4691 
  4692 
  4700  *  
  4701  *  
  4701  *  @capability None
  4702  *  @capability None
  4702  */
  4703  */
  4703 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetMaximumCapacity(TBool aIsFull)
  4704 EXPORT_C void CEnhancedVoiceMailBoxInformation::SetMaximumCapacity(TBool aIsFull)
  4704 	{
  4705 	{
  4705 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetMaximumCapacity()");
  4706 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETMAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::SetMaximumCapacity()");
  4706 
  4707 
  4707 	iFull = aIsFull;
  4708 	iFull = aIsFull;
  4708 	} // CEnhancedVoiceMailBoxInformation::SetMaximumCapacity
  4709 	} // CEnhancedVoiceMailBoxInformation::SetMaximumCapacity
  4709 
  4710 
  4710 
  4711 
  4719  *  
  4720  *  
  4720  *  @capability None
  4721  *  @capability None
  4721  */
  4722  */
  4722 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::MaximumCapacity() const
  4723 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::MaximumCapacity() const
  4723 	{
  4724 	{
  4724 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::MaximumCapacity()");
  4725 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_MAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::MaximumCapacity()");
  4725 
  4726 
  4726 	return iFull;
  4727 	return iFull;
  4727 	} // CEnhancedVoiceMailBoxInformation::MaximumCapacity
  4728 	} // CEnhancedVoiceMailBoxInformation::MaximumCapacity
  4728 
  4729 
  4729 
  4730 
  4738  *  
  4739  *  
  4739  *  @capability None
  4740  *  @capability None
  4740  */
  4741  */
  4741 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::ExtensionIndicator() const
  4742 EXPORT_C TBool CEnhancedVoiceMailBoxInformation::ExtensionIndicator() const
  4742 	{
  4743 	{
  4743 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::ExtensionIndicator()");
  4744 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_EXTENSIONINDICATOR_1, "CEnhancedVoiceMailBoxInformation::ExtensionIndicator()");
  4744 
  4745 
  4745 	return iExtensionIndicator;
  4746 	return iExtensionIndicator;
  4746 	} // CEnhancedVoiceMailBoxInformation::ExtensionIndicator
  4747 	} // CEnhancedVoiceMailBoxInformation::ExtensionIndicator
  4747 
  4748 
  4748 
  4749 
  4749 void CEnhancedVoiceMailBoxInformation::NewBufferL(TInt aLength)
  4750 void CEnhancedVoiceMailBoxInformation::NewBufferL(TInt aLength)
  4750 	{
  4751 	{
  4751 	LOGGSMU2("CEnhancedVoiceMailBoxInformation::NewBufferL, length = %d",aLength);
  4752 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_NEWBUFFERL_1, "CEnhancedVoiceMailBoxInformation::NewBufferL, length = %d",aLength);
  4752 
  4753 
  4753 	HBufC* buffer=HBufC::NewL(aLength);
  4754 	HBufC* buffer=HBufC::NewL(aLength);
  4754 	delete iAccessAddress;
  4755 	delete iAccessAddress;
  4755 	iAccessAddress=buffer;
  4756 	iAccessAddress=buffer;
  4756 	iAccessAddress->Des().SetLength(aLength);
  4757 	iAccessAddress->Des().SetLength(aLength);
  4768  *  
  4769  *  
  4769  *  @capability None
  4770  *  @capability None
  4770  */
  4771  */
  4771 EXPORT_C void  CEnhancedVoiceMailBoxInformation::SetAccessAddressL(const TDesC& aAddress)
  4772 EXPORT_C void  CEnhancedVoiceMailBoxInformation::SetAccessAddressL(const TDesC& aAddress)
  4772 	{
  4773 	{
  4773 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetAccessAddressL()");
  4774 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETACCESSADDRESSL_1, "CEnhancedVoiceMailBoxInformation::SetAccessAddressL()");
  4774 
  4775 
  4775 	TInt length=aAddress.Length();
  4776 	TInt length=aAddress.Length();
  4776 	NewBufferL(length);
  4777 	NewBufferL(length);
  4777 	iAccessAddress->Des().Copy(aAddress);
  4778 	iAccessAddress->Des().Copy(aAddress);
  4778 
  4779 
  4791  *  
  4792  *  
  4792  *  @capability None
  4793  *  @capability None
  4793  */
  4794  */
  4794 EXPORT_C TPtrC CEnhancedVoiceMailBoxInformation::AccessAddress() const
  4795 EXPORT_C TPtrC CEnhancedVoiceMailBoxInformation::AccessAddress() const
  4795 	{
  4796 	{
  4796 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::AccessAddress()");
  4797 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_ACCESSADDRESS_1, "CEnhancedVoiceMailBoxInformation::AccessAddress()");
  4797 
  4798 
  4798 	TPtrC ptr;
  4799 	TPtrC ptr;
  4799 	if (iAccessAddress)
  4800 	if (iAccessAddress)
  4800 	    ptr.Set(iAccessAddress->Des());
  4801 	    ptr.Set(iAccessAddress->Des());
  4801 	return ptr;
  4802 	return ptr;
  4812  *  
  4813  *  
  4813  *  @capability None
  4814  *  @capability None
  4814  */
  4815  */
  4815 EXPORT_C void  CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL(const TGsmSmsTelNumber& aParsedAddress)
  4816 EXPORT_C void  CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL(const TGsmSmsTelNumber& aParsedAddress)
  4816 	{
  4817 	{
  4817 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL()");
  4818 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETPARSEDACCESSADDRESSL_1, "CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL()");
  4818 
  4819 
  4819    	iTypeOfAddress=aParsedAddress.iTypeOfAddress;
  4820    	iTypeOfAddress=aParsedAddress.iTypeOfAddress;
  4820 	DoSetParsedAddressL(aParsedAddress.iTelNumber);
  4821 	DoSetParsedAddressL(aParsedAddress.iTelNumber);
  4821 	} // CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL
  4822 	} // CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL
  4822 
  4823 
  4831  *  
  4832  *  
  4832  *  @capability None
  4833  *  @capability None
  4833  */
  4834  */
  4834 EXPORT_C void  CEnhancedVoiceMailBoxInformation::ParsedAccessAddress(TGsmSmsTelNumber& aParsedAddress) const
  4835 EXPORT_C void  CEnhancedVoiceMailBoxInformation::ParsedAccessAddress(TGsmSmsTelNumber& aParsedAddress) const
  4835 	{
  4836 	{
  4836 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::ParsedAccessAddress()");
  4837 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_PARSEDACCESSADDRESS_1, "CEnhancedVoiceMailBoxInformation::ParsedAccessAddress()");
  4837 
  4838 
  4838 	aParsedAddress.iTypeOfAddress = iTypeOfAddress;
  4839 	aParsedAddress.iTypeOfAddress = iTypeOfAddress;
  4839 
  4840 
  4840 	TInt maxparsedlength=aParsedAddress.iTelNumber.MaxLength();
  4841 	TInt maxparsedlength=aParsedAddress.iTelNumber.MaxLength();
  4841 
  4842 
  4867 	} // CEnhancedVoiceMailBoxInformation::ParsedAccessAddress
  4868 	} // CEnhancedVoiceMailBoxInformation::ParsedAccessAddress
  4868 
  4869 
  4869 
  4870 
  4870 void CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL(const TDesC& aAddress)
  4871 void CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL(const TDesC& aAddress)
  4871 	{
  4872 	{
  4872 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL()");
  4873 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DOSETPARSEDADDRESSL_1, "CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL()");
  4873 
  4874 
  4874 	TInt length=aAddress.Length();
  4875 	TInt length=aAddress.Length();
  4875 	if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) &&
  4876 	if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) &&
  4876 	    (length && (aAddress[0]!='+')))
  4877 	    (length && (aAddress[0]!='+')))
  4877 		{
  4878 		{
  4898  *  
  4899  *  
  4899  *  @capability None
  4900  *  @capability None
  4900  */
  4901  */
  4901 EXPORT_C void   CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages(TUint8 aNumber)
  4902 EXPORT_C void   CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages(TUint8 aNumber)
  4902 	{
  4903 	{
  4903 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages()");
  4904 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETNUMBEROFVOICEMESSAGES_1, "CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages()");
  4904 
  4905 
  4905 	iNumberOfVoiceMessages=aNumber;
  4906 	iNumberOfVoiceMessages=aNumber;
  4906 	} // CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages
  4907 	} // CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages
  4907 
  4908 
  4908 
  4909 
  4916  *  
  4917  *  
  4917  *  @capability None
  4918  *  @capability None
  4918  */
  4919  */
  4919 EXPORT_C TUint8 CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages() const
  4920 EXPORT_C TUint8 CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages() const
  4920 	{
  4921 	{
  4921 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages()");
  4922 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_NUMBEROFVOICEMESSAGES_1, "CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages()");
  4922 
  4923 
  4923 	return iNumberOfVoiceMessages;
  4924 	return iNumberOfVoiceMessages;
  4924 	} // CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages
  4925 	} // CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages
  4925 
  4926 
  4926 
  4927 
  4931 	        ((((TUint8) iStorage)    & EMask1Bit ) << 4) +
  4932 	        ((((TUint8) iStorage)    & EMask1Bit ) << 4) +
  4932 	        ((((TUint8) iAlmostFull) & EMask1Bit ) << 5) +
  4933 	        ((((TUint8) iAlmostFull) & EMask1Bit ) << 5) +
  4933 	        ((((TUint8) iFull)       & EMask1Bit ) << 6) +
  4934 	        ((((TUint8) iFull)       & EMask1Bit ) << 6) +
  4934 	         (((TUint8) iExtensionIndicator      ) << 7);
  4935 	         (((TUint8) iExtensionIndicator      ) << 7);
  4935 
  4936 
  4936 	LOGGSMU2("CEnhancedVoiceMailBoxInformation::EncodeL 1st byte = %d",*aPtr);
  4937 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_ENCODEL_1, "CEnhancedVoiceMailBoxInformation::EncodeL 1st byte = %d",*aPtr);
  4937 	aPtr++;
  4938 	aPtr++;
  4938 
  4939 
  4939 	// Create an address object to encode the mail box access address into the
  4940 	// Create an address object to encode the mail box access address into the
  4940 	// format required by 23.040 v6.5.0 section 9.1.2.5.
  4941 	// format required by 23.040 v6.5.0 section 9.1.2.5.
  4941 	CSmsAddress* address = CSmsAddress::NewL(aCharacterSetConverter,aFs);
  4942 	CSmsAddress* address = CSmsAddress::NewL(aCharacterSetConverter,aFs);
  4965 	iStorage            = (TBool)                   ((Byte1 >> 4) & EMask1Bit);
  4966 	iStorage            = (TBool)                   ((Byte1 >> 4) & EMask1Bit);
  4966 	iAlmostFull         = (TBool)                   ((Byte1 >> 5) & EMask1Bit);
  4967 	iAlmostFull         = (TBool)                   ((Byte1 >> 5) & EMask1Bit);
  4967 	iFull               = (TBool)                   ((Byte1 >> 6) & EMask1Bit);
  4968 	iFull               = (TBool)                   ((Byte1 >> 6) & EMask1Bit);
  4968 	iExtensionIndicator = (TBool)                   ((Byte1 >> 7) & EMask1Bit);
  4969 	iExtensionIndicator = (TBool)                   ((Byte1 >> 7) & EMask1Bit);
  4969 
  4970 
  4970 	LOGGSMU2("CEnhancedVoiceMailBoxInformation::DecodeL 1st byte = %d", Byte1);
  4971 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DECODEL_1, "CEnhancedVoiceMailBoxInformation::DecodeL 1st byte = %d", Byte1);
  4971 
  4972 
  4972 	// Create an address object to deccode the mail box access address from the
  4973 	// Create an address object to deccode the mail box access address from the
  4973 	// format required by 23.040 v6.5.0 section 9.1.2.5.
  4974 	// format required by 23.040 v6.5.0 section 9.1.2.5.
  4974 	CSmsAddress* decodedAddress = CSmsAddress::NewL(aCharacterSetConverter,aFs);
  4975 	CSmsAddress* decodedAddress = CSmsAddress::NewL(aCharacterSetConverter,aFs);
  4975 	CleanupStack::PushL(decodedAddress);
  4976 	CleanupStack::PushL(decodedAddress);
  5010 	iTypeOfAddress = decodedAddress->TypeOfAddress();
  5011 	iTypeOfAddress = decodedAddress->TypeOfAddress();
  5011 
  5012 
  5012 	CleanupStack::PopAndDestroy(decodedAddress);
  5013 	CleanupStack::PopAndDestroy(decodedAddress);
  5013 
  5014 
  5014 	iNumberOfVoiceMessages = aVoiceMailInfo.GetL();
  5015 	iNumberOfVoiceMessages = aVoiceMailInfo.GetL();
  5015 	LOGGSMU2("CEnhancedVoiceMailBoxInformation::DecodeL iNumberOfVoiceMessages = %d", iNumberOfVoiceMessages);
  5016 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DECODEL_2, "CEnhancedVoiceMailBoxInformation::DecodeL iNumberOfVoiceMessages = %d", iNumberOfVoiceMessages);
  5016 	} // CEnhancedVoiceMailBoxInformation::DecodeL
  5017 	} // CEnhancedVoiceMailBoxInformation::DecodeL
  5017 
  5018 
  5018 
  5019 
  5019 CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()
  5020 CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()
  5020 	{
  5021 	{
  5021 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()");
  5022 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CTOR_1, "CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()");
  5022 
  5023 
  5023 	// Consider changing this over to a Panic.
  5024 	// Consider changing this over to a Panic.
  5024 	iType               = EGsmSmsVoiceMailNotification;
  5025 	iType               = EGsmSmsVoiceMailNotification;
  5025 	iOctet1Bit1         = EFalse;
  5026 	iOctet1Bit1         = EFalse;
  5026 	iProfile            = EGsmSmsProfileId1;
  5027 	iProfile            = EGsmSmsProfileId1;
  5032 	} // CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation
  5033 	} // CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation
  5033 
  5034 
  5034 
  5035 
  5035 CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation(TVoiceMailInfoType aTVoiceMailInfoType)
  5036 CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation(TVoiceMailInfoType aTVoiceMailInfoType)
  5036 	{
  5037 	{
  5037 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()");
  5038 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CTOR1_1, "CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()");
  5038 
  5039 
  5039 	iType               = aTVoiceMailInfoType;
  5040 	iType               = aTVoiceMailInfoType;
  5040 	iOctet1Bit1         = EFalse;
  5041 	iOctet1Bit1         = EFalse;
  5041 	iProfile            = EGsmSmsProfileId1;
  5042 	iProfile            = EGsmSmsProfileId1;
  5042 	iStorage            = EFalse;
  5043 	iStorage            = EFalse;
  5057  */
  5058  */
  5058 CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation(const CEnhancedVoiceMailBoxInformation&)
  5059 CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation(const CEnhancedVoiceMailBoxInformation&)
  5059     {
  5060     {
  5060     // Ignore in code coverage - not intended to be used
  5061     // Ignore in code coverage - not intended to be used
  5061     BULLSEYE_OFF    
  5062     BULLSEYE_OFF    
  5062     LOGGSMU1("CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation");
  5063     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CTOR2_1, "CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation");
  5063     Panic(KGsmuPanicMethodBodyNotImplemented);
  5064     Panic(KGsmuPanicMethodBodyNotImplemented);
  5064     BULLSEYE_RESTORE
  5065     BULLSEYE_RESTORE
  5065     }
  5066     }
  5066 
  5067 
  5067 /**
  5068 /**
  5074  */
  5075  */
  5075 TBool CEnhancedVoiceMailBoxInformation::operator==(const CEnhancedVoiceMailBoxInformation&)
  5076 TBool CEnhancedVoiceMailBoxInformation::operator==(const CEnhancedVoiceMailBoxInformation&)
  5076     {
  5077     {
  5077     // Ignore in code coverage - not intended to be used
  5078     // Ignore in code coverage - not intended to be used
  5078     BULLSEYE_OFF    
  5079     BULLSEYE_OFF    
  5079     LOGGSMU1("CEnhancedVoiceMailBoxInformation::operator==");
  5080     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_OPERATOR_1, "CEnhancedVoiceMailBoxInformation::operator==");
  5080     Panic(KGsmuPanicMethodBodyNotImplemented);
  5081     Panic(KGsmuPanicMethodBodyNotImplemented);
  5081     return EFalse;
  5082     return EFalse;
  5082     BULLSEYE_RESTORE
  5083     BULLSEYE_RESTORE
  5083     }
  5084     }
  5084 
  5085 
  5092  */
  5093  */
  5093 void CEnhancedVoiceMailBoxInformation::operator=(const CEnhancedVoiceMailBoxInformation&)
  5094 void CEnhancedVoiceMailBoxInformation::operator=(const CEnhancedVoiceMailBoxInformation&)
  5094     {
  5095     {
  5095     // Ignore in code coverage - not intended to be used
  5096     // Ignore in code coverage - not intended to be used
  5096     BULLSEYE_OFF    
  5097     BULLSEYE_OFF    
  5097     LOGGSMU1("CEnhancedVoiceMailBoxInformation::operator=");
  5098     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_OPERATOR1_1, "CEnhancedVoiceMailBoxInformation::operator=");
  5098     Panic(KGsmuPanicMethodBodyNotImplemented);
  5099     Panic(KGsmuPanicMethodBodyNotImplemented);
  5099     BULLSEYE_RESTORE
  5100     BULLSEYE_RESTORE
  5100     }
  5101     }
  5101 
  5102 
  5102 void CEnhancedVoiceMailBoxInformation::ConstructL()
  5103 void CEnhancedVoiceMailBoxInformation::ConstructL()
  5103 	{
  5104 	{
  5104 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::ConstructL()");
  5105 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CONSTRUCTL_1, "CEnhancedVoiceMailBoxInformation::ConstructL()");
  5105 
  5106 
  5106 	NewBufferL(0);
  5107 	NewBufferL(0);
  5107 	} // CEnhancedVoiceMailBoxInformation::ConstructL
  5108 	} // CEnhancedVoiceMailBoxInformation::ConstructL
  5108 
  5109 
  5109 
  5110 
  5110 CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation()
  5111 CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation()
  5111 	{
  5112 	{
  5112 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation");
  5113 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DTOR_1, "CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation");
  5113 	delete iAccessAddress;
  5114 	delete iAccessAddress;
  5114 	} // CEnhancedVoiceMailBoxInformation::ConstructL
  5115 	} // CEnhancedVoiceMailBoxInformation::ConstructL
  5115 
  5116 
  5116 
  5117 
  5117 CEnhancedVoiceMailBoxInformation* CEnhancedVoiceMailBoxInformation::NewL()
  5118 CEnhancedVoiceMailBoxInformation* CEnhancedVoiceMailBoxInformation::NewL()
  5118 	{
  5119 	{
  5119 	LOGGSMU1("CEnhancedVoiceMailBoxInformation::NewL()");
  5120 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_NEWL_1, "CEnhancedVoiceMailBoxInformation::NewL()");
  5120 
  5121 
  5121 	CEnhancedVoiceMailBoxInformation* aCEnhancedVoiceMailBoxInformation=new(ELeave) CEnhancedVoiceMailBoxInformation();
  5122 	CEnhancedVoiceMailBoxInformation* aCEnhancedVoiceMailBoxInformation=new(ELeave) CEnhancedVoiceMailBoxInformation();
  5122 	CleanupStack::PushL(aCEnhancedVoiceMailBoxInformation);
  5123 	CleanupStack::PushL(aCEnhancedVoiceMailBoxInformation);
  5123 	aCEnhancedVoiceMailBoxInformation->ConstructL();
  5124 	aCEnhancedVoiceMailBoxInformation->ConstructL();
  5124 	CleanupStack::Pop(aCEnhancedVoiceMailBoxInformation);
  5125 	CleanupStack::Pop(aCEnhancedVoiceMailBoxInformation);
  5136  *  
  5137  *  
  5137  *  @capability None
  5138  *  @capability None
  5138  */
  5139  */
  5139 EXPORT_C void CVoiceMailNotification::SetMessageId(TUint16 aMessageId)
  5140 EXPORT_C void CVoiceMailNotification::SetMessageId(TUint16 aMessageId)
  5140 	{
  5141 	{
  5141 	LOGGSMU1("CVoiceMailNotification::SetMessageId()");
  5142 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETMESSAGEID_1, "CVoiceMailNotification::SetMessageId()");
  5142 
  5143 
  5143 	iMessageId = aMessageId;
  5144 	iMessageId = aMessageId;
  5144 	} // CVoiceMailNotification::SetMessageId
  5145 	} // CVoiceMailNotification::SetMessageId
  5145 
  5146 
  5146 
  5147 
  5154  *  
  5155  *  
  5155  *  @capability None
  5156  *  @capability None
  5156  */
  5157  */
  5157 EXPORT_C TUint16 CVoiceMailNotification::MessageId() const
  5158 EXPORT_C TUint16 CVoiceMailNotification::MessageId() const
  5158 	{
  5159 	{
  5159 	LOGGSMU1("CVoiceMailNotification::MessageId()");
  5160 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_MESSAGEID_1, "CVoiceMailNotification::MessageId()");
  5160 
  5161 
  5161 	return iMessageId;
  5162 	return iMessageId;
  5162 	} // CVoiceMailNotification::MessageId
  5163 	} // CVoiceMailNotification::MessageId
  5163 
  5164 
  5164 
  5165 
  5172  *  
  5173  *  
  5173  *  @capability None
  5174  *  @capability None
  5174  */
  5175  */
  5175 EXPORT_C void CVoiceMailNotification::SetMessageLength(TUint8 aLength)
  5176 EXPORT_C void CVoiceMailNotification::SetMessageLength(TUint8 aLength)
  5176 	{
  5177 	{
  5177 	LOGGSMU1("CVoiceMailNotification::SetMessageLength()");
  5178 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETMESSAGELENGTH_1, "CVoiceMailNotification::SetMessageLength()");
  5178 
  5179 
  5179 	iMessageLength=aLength;
  5180 	iMessageLength=aLength;
  5180 	} // CVoiceMailNotification::SetMessageLength
  5181 	} // CVoiceMailNotification::SetMessageLength
  5181 
  5182 
  5182 
  5183 
  5190  *  
  5191  *  
  5191  *  @capability None
  5192  *  @capability None
  5192  */
  5193  */
  5193 EXPORT_C TUint8 CVoiceMailNotification::MessageLength() const
  5194 EXPORT_C TUint8 CVoiceMailNotification::MessageLength() const
  5194 	{
  5195 	{
  5195 	LOGGSMU1("CVoiceMailNotification::MessageLength()");
  5196 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_MESSAGELENGTH_1, "CVoiceMailNotification::MessageLength()");
  5196 
  5197 
  5197 	return iMessageLength;
  5198 	return iMessageLength;
  5198 	} // CVoiceMailNotification::MessageLength
  5199 	} // CVoiceMailNotification::MessageLength
  5199 
  5200 
  5200 
  5201 
  5210  *  
  5211  *  
  5211  *  @capability None
  5212  *  @capability None
  5212  */
  5213  */
  5213 EXPORT_C void CVoiceMailNotification::SetRetentionDays(TUint8 aDays)
  5214 EXPORT_C void CVoiceMailNotification::SetRetentionDays(TUint8 aDays)
  5214 	{
  5215 	{
  5215 	LOGGSMU1("CVoiceMailNotification::SetRetentionDays()");
  5216 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETRETENTIONDAYS_1, "CVoiceMailNotification::SetRetentionDays()");
  5216 
  5217 
  5217 	if (aDays > 31)
  5218 	if (aDays > 31)
  5218 	    {
  5219 	    {
  5219 	    iRetentionDays = 31;
  5220 	    iRetentionDays = 31;
  5220 	    }
  5221 	    }
  5235  *  
  5236  *  
  5236  *  @capability None
  5237  *  @capability None
  5237  */
  5238  */
  5238 EXPORT_C TUint8 CVoiceMailNotification::RetentionDays() const
  5239 EXPORT_C TUint8 CVoiceMailNotification::RetentionDays() const
  5239 	{
  5240 	{
  5240 	LOGGSMU1("CVoiceMailNotification::RetentionDays()");
  5241 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_RETENTIONDAYS_1, "CVoiceMailNotification::RetentionDays()");
  5241 
  5242 
  5242 	return iRetentionDays;
  5243 	return iRetentionDays;
  5243 	} // CVoiceMailNotification::RetentionDays
  5244 	} // CVoiceMailNotification::RetentionDays
  5244 
  5245 
  5245 
  5246 
  5254  *  
  5255  *  
  5255  *  @capability None
  5256  *  @capability None
  5256  */
  5257  */
  5257 EXPORT_C void CVoiceMailNotification::SetPriorityIndication(TBool aPriority)
  5258 EXPORT_C void CVoiceMailNotification::SetPriorityIndication(TBool aPriority)
  5258 	{
  5259 	{
  5259 	LOGGSMU1("CVoiceMailNotification::SetPriorityIndication()");
  5260 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETPRIORITYINDICATION_1, "CVoiceMailNotification::SetPriorityIndication()");
  5260 
  5261 
  5261 	iPriorityIndication=aPriority;
  5262 	iPriorityIndication=aPriority;
  5262 	} // CVoiceMailNotification::SetPriorityIndication
  5263 	} // CVoiceMailNotification::SetPriorityIndication
  5263 
  5264 
  5264 
  5265 
  5273  *  
  5274  *  
  5274  *  @capability None
  5275  *  @capability None
  5275  */
  5276  */
  5276 EXPORT_C TBool CVoiceMailNotification::PriorityIndication() const
  5277 EXPORT_C TBool CVoiceMailNotification::PriorityIndication() const
  5277 	{
  5278 	{
  5278 	LOGGSMU1("CVoiceMailNotification::PriorityIndication()");
  5279 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_PRIORITYINDICATION_1, "CVoiceMailNotification::PriorityIndication()");
  5279 
  5280 
  5280 	return iPriorityIndication;
  5281 	return iPriorityIndication;
  5281 	} // CVoiceMailNotification::PriorityIndication
  5282 	} // CVoiceMailNotification::PriorityIndication
  5282 
  5283 
  5283 
  5284 
  5292  *  
  5293  *  
  5293  *  @capability None
  5294  *  @capability None
  5294  */
  5295  */
  5295 EXPORT_C TBool CVoiceMailNotification::MessageExtensionIndication() const
  5296 EXPORT_C TBool CVoiceMailNotification::MessageExtensionIndication() const
  5296 	{
  5297 	{
  5297 	LOGGSMU1("CVoiceMailNotification::MessageExtensionIndication()");
  5298 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_MESSAGEEXTENSIONINDICATION_1, "CVoiceMailNotification::MessageExtensionIndication()");
  5298 
  5299 
  5299 	return iMessageExtensionIndicator;
  5300 	return iMessageExtensionIndicator;
  5300 	} // CVoiceMailNotification::MessageExtensionIndication
  5301 	} // CVoiceMailNotification::MessageExtensionIndication
  5301 
  5302 
  5302 
  5303 
  5303 void CVoiceMailNotification::NewBufferL(TInt aLength)
  5304 void CVoiceMailNotification::NewBufferL(TInt aLength)
  5304 	{
  5305 	{
  5305 	LOGGSMU1("CVoiceMailNotification::NewBufferL()");
  5306 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_NEWBUFFERL_1, "CVoiceMailNotification::NewBufferL()");
  5306 
  5307 
  5307 	HBufC* buffer=HBufC::NewL(aLength);
  5308 	HBufC* buffer=HBufC::NewL(aLength);
  5308 	delete iCallingLineIdentity;
  5309 	delete iCallingLineIdentity;
  5309 	iCallingLineIdentity=buffer;
  5310 	iCallingLineIdentity=buffer;
  5310 	iCallingLineIdentity->Des().SetLength(aLength);
  5311 	iCallingLineIdentity->Des().SetLength(aLength);
  5321  *  
  5322  *  
  5322  *  @capability None
  5323  *  @capability None
  5323  */
  5324  */
  5324 EXPORT_C void  CVoiceMailNotification::SetCallingLineIdentityL(TDesC& aLineIdentity)
  5325 EXPORT_C void  CVoiceMailNotification::SetCallingLineIdentityL(TDesC& aLineIdentity)
  5325 	{
  5326 	{
  5326 	LOGGSMU1("CVoiceMailNotification::SetCallingLineIdentityL()");
  5327 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETCALLINGLINEIDENTITYL_1, "CVoiceMailNotification::SetCallingLineIdentityL()");
  5327 
  5328 
  5328 	TInt length=aLineIdentity.Length();
  5329 	TInt length=aLineIdentity.Length();
  5329 	NewBufferL(length);
  5330 	NewBufferL(length);
  5330 	iCallingLineIdentity->Des().Copy(aLineIdentity);
  5331 	iCallingLineIdentity->Des().Copy(aLineIdentity);
  5331 
  5332 
  5344  *  
  5345  *  
  5345  *  @capability None
  5346  *  @capability None
  5346  */
  5347  */
  5347 EXPORT_C TPtrC CVoiceMailNotification::CallingLineIdentity() const
  5348 EXPORT_C TPtrC CVoiceMailNotification::CallingLineIdentity() const
  5348 	{
  5349 	{
  5349 	LOGGSMU1("CVoiceMailNotification::CallingLineIdentity()");
  5350 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_CALLINGLINEIDENTITY_1, "CVoiceMailNotification::CallingLineIdentity()");
  5350 
  5351 
  5351 	TPtrC ptr;
  5352 	TPtrC ptr;
  5352 	if (iCallingLineIdentity)
  5353 	if (iCallingLineIdentity)
  5353 	    ptr.Set(iCallingLineIdentity->Des());
  5354 	    ptr.Set(iCallingLineIdentity->Des());
  5354 	return ptr;
  5355 	return ptr;
  5365  *  
  5366  *  
  5366  *  @capability None
  5367  *  @capability None
  5367  */
  5368  */
  5368 EXPORT_C void CVoiceMailNotification::SetParsedCallingLineIdentityL(TGsmSmsTelNumber& aParsedAddress)
  5369 EXPORT_C void CVoiceMailNotification::SetParsedCallingLineIdentityL(TGsmSmsTelNumber& aParsedAddress)
  5369 	{
  5370 	{
  5370 	LOGGSMU1("CVoiceMailNotification::SetParsedCallingLineIdentityL()");
  5371 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETPARSEDCALLINGLINEIDENTITYL_1, "CVoiceMailNotification::SetParsedCallingLineIdentityL()");
  5371 
  5372 
  5372 	iTypeOfAddress=aParsedAddress.iTypeOfAddress;
  5373 	iTypeOfAddress=aParsedAddress.iTypeOfAddress;
  5373 	DoSetParsedAddressL(aParsedAddress.iTelNumber);
  5374 	DoSetParsedAddressL(aParsedAddress.iTelNumber);
  5374 	} // CVoiceMailNotification::SetParsedCallingLineIdentityL
  5375 	} // CVoiceMailNotification::SetParsedCallingLineIdentityL
  5375 
  5376 
  5384  *  
  5385  *  
  5385  *  @capability None
  5386  *  @capability None
  5386  */
  5387  */
  5387 EXPORT_C void CVoiceMailNotification::ParsedCallingLineIdentity(TGsmSmsTelNumber& aParsedAddress) const
  5388 EXPORT_C void CVoiceMailNotification::ParsedCallingLineIdentity(TGsmSmsTelNumber& aParsedAddress) const
  5388 	{
  5389 	{
  5389 	LOGGSMU1("CVoiceMailNotification::ParsedCallingLineIdentity()");
  5390 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_PARSEDCALLINGLINEIDENTITY_1, "CVoiceMailNotification::ParsedCallingLineIdentity()");
  5390 
  5391 
  5391 	aParsedAddress.iTypeOfAddress = iTypeOfAddress;
  5392 	aParsedAddress.iTypeOfAddress = iTypeOfAddress;
  5392 
  5393 
  5393 	TInt maxparsedlength=aParsedAddress.iTelNumber.MaxLength();
  5394 	TInt maxparsedlength=aParsedAddress.iTelNumber.MaxLength();
  5394 
  5395 
  5420 	} // CVoiceMailNotification::ParsedCallingLineIdentity
  5421 	} // CVoiceMailNotification::ParsedCallingLineIdentity
  5421 
  5422 
  5422 
  5423 
  5423 void CVoiceMailNotification::NewExtensionL(TInt aLength)
  5424 void CVoiceMailNotification::NewExtensionL(TInt aLength)
  5424 	{
  5425 	{
  5425 	LOGGSMU1("CVoiceMailNotification::NewExtensionL()");
  5426 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_NEWEXTENSIONL_1, "CVoiceMailNotification::NewExtensionL()");
  5426 
  5427 
  5427 	HBufC* buffer=HBufC::NewL(aLength);
  5428 	HBufC* buffer=HBufC::NewL(aLength);
  5428 	delete iExtension;
  5429 	delete iExtension;
  5429 	iExtension=buffer;
  5430 	iExtension=buffer;
  5430 	iExtension->Des().SetLength(aLength);
  5431 	iExtension->Des().SetLength(aLength);
  5431 	iExtension->Des().FillZ();
  5432 	iExtension->Des().FillZ();
  5432 	} // CVoiceMailNotification::NewExtensionL
  5433 	} // CVoiceMailNotification::NewExtensionL
  5433 
  5434 
  5434 
       
  5435 /*void CVoiceMailNotification::SetExtension(TDesC& aExtension)
       
  5436 	{
       
  5437 	LOGGSMU1("CVoiceMailNotification::SetExtension()");
       
  5438 
       
  5439 	TInt length=aExtension.Length();
       
  5440 	NewExtensionL(length);
       
  5441 	iExtension->Des().Copy(aExtension);
       
  5442 	} // CVoiceMailNotification::SetExtension
       
  5443 
       
  5444 TPtrC CVoiceMailNotification::Extension() const
       
  5445 	{
       
  5446 	LOGGSMU1("CVoiceMailNotification::Extension()");
       
  5447 
       
  5448 	TPtrC ptr;
       
  5449 	if (iExtension)
       
  5450 	    ptr.Set(iExtension->Des());
       
  5451 	return ptr;
       
  5452 	}*/
       
  5453 
       
  5454 
       
  5455 /**
  5435 /**
  5456  *  @internalComponent
  5436  *  @internalComponent
  5457  *  
  5437  *  
  5458  *  Determines the size of the encoded Voice Mail Notification.
  5438  *  Determines the size of the encoded Voice Mail Notification.
  5459  *  
  5439  *  
  5463  *  
  5443  *  
  5464  *  @capability None
  5444  *  @capability None
  5465  */
  5445  */
  5466 TUint8 CVoiceMailNotification::SizeL(CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  5446 TUint8 CVoiceMailNotification::SizeL(CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  5467 	{
  5447 	{
  5468 	LOGGSMU1("CVoiceMailNotification::SizeL()");
  5448 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_SIZEL_1, "CVoiceMailNotification::SizeL()");
  5469 
  5449 
  5470 	const TUint8 KTotalSizeOfFixedLengthAttributes = 4;
  5450 	const TUint8 KTotalSizeOfFixedLengthAttributes = 4;
  5471 	TUint8 size = KTotalSizeOfFixedLengthAttributes;
  5451 	TUint8 size = KTotalSizeOfFixedLengthAttributes;
  5472 
  5452 
  5473 	// need to find the size of the calling line ID.
  5453 	// need to find the size of the calling line ID.
  5492 TUint8* CVoiceMailNotification::EncodeL(TUint8* aPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const
  5472 TUint8* CVoiceMailNotification::EncodeL(TUint8* aPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const
  5493 	{
  5473 	{
  5494 	// When changes are made to this function that affect the
  5474 	// When changes are made to this function that affect the
  5495 	// number of bytes that are encoded, this should be reflected in
  5475 	// number of bytes that are encoded, this should be reflected in
  5496 	// CVoiceMailNotification::SizeL()
  5476 	// CVoiceMailNotification::SizeL()
  5497 	LOGGSMU1("CVoiceMailNotification::EncodeL");
  5477 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_ENCODEL_1, "CVoiceMailNotification::EncodeL");
  5498 
  5478 
  5499 
  5479 
  5500 	*aPtr =   (TUint8)  (iMessageId                         >> 8);  // Message Id MSB
  5480 	*aPtr =   (TUint8)  (iMessageId                         >> 8);  // Message Id MSB
  5501 	aPtr++;
  5481 	aPtr++;
  5502 	*aPtr =   (TUint8)   iMessageId;                                // Message Id LSB
  5482 	*aPtr =   (TUint8)   iMessageId;                                // Message Id LSB
  5526 	} // CVoiceMailNotification::EncodeL
  5506 	} // CVoiceMailNotification::EncodeL
  5527 
  5507 
  5528 
  5508 
  5529 void CVoiceMailNotification::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  5509 void CVoiceMailNotification::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  5530 	{
  5510 	{
  5531 	LOGGSMU1("CVoiceMailNotification::DecodeL");
  5511 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_DECODEL_1, "CVoiceMailNotification::DecodeL");
  5532 
  5512 
  5533 	iMessageId = (((TUint16) aVoiceMailInfo.GetL()) << 8);
  5513 	iMessageId = (((TUint16) aVoiceMailInfo.GetL()) << 8);
  5534 	iMessageId += ((TUint16) aVoiceMailInfo.GetL());
  5514 	iMessageId += ((TUint16) aVoiceMailInfo.GetL());
  5535 
  5515 
  5536 	iMessageLength=aVoiceMailInfo.GetL();
  5516 	iMessageLength=aVoiceMailInfo.GetL();
  5597  */
  5577  */
  5598 CVoiceMailNotification::CVoiceMailNotification(const CVoiceMailNotification&)
  5578 CVoiceMailNotification::CVoiceMailNotification(const CVoiceMailNotification&)
  5599     {
  5579     {
  5600     // Ignore in code coverage - not intended to be used
  5580     // Ignore in code coverage - not intended to be used
  5601     BULLSEYE_OFF    
  5581     BULLSEYE_OFF    
  5602     LOGGSMU1("CVoiceMailNotification::CVoiceMailNotification");
  5582     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_CTOR_1, "CVoiceMailNotification::CVoiceMailNotification");
  5603     Panic(KGsmuPanicMethodBodyNotImplemented);
  5583     Panic(KGsmuPanicMethodBodyNotImplemented);
  5604     BULLSEYE_RESTORE
  5584     BULLSEYE_RESTORE
  5605     }
  5585     }
  5606 
  5586 
  5607 /**
  5587 /**
  5614  */
  5594  */
  5615 TBool CVoiceMailNotification::operator==(const CVoiceMailNotification&)
  5595 TBool CVoiceMailNotification::operator==(const CVoiceMailNotification&)
  5616     {
  5596     {
  5617     // Ignore in code coverage - not intended to be used
  5597     // Ignore in code coverage - not intended to be used
  5618     BULLSEYE_OFF    
  5598     BULLSEYE_OFF    
  5619     LOGGSMU1("CVoiceMailNotification::operator==");
  5599     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_OPERATOR_1, "CVoiceMailNotification::operator==");
  5620     Panic(KGsmuPanicMethodBodyNotImplemented);
  5600     Panic(KGsmuPanicMethodBodyNotImplemented);
  5621     return EFalse;
  5601     return EFalse;
  5622     BULLSEYE_RESTORE
  5602     BULLSEYE_RESTORE
  5623     }
  5603     }
  5624 
  5604 
  5632  */
  5612  */
  5633 void CVoiceMailNotification::operator=(const CVoiceMailNotification&)
  5613 void CVoiceMailNotification::operator=(const CVoiceMailNotification&)
  5634     {
  5614     {
  5635     // Ignore in code coverage - not intended to be used
  5615     // Ignore in code coverage - not intended to be used
  5636     BULLSEYE_OFF    
  5616     BULLSEYE_OFF    
  5637     LOGGSMU1("CVoiceMailNotification::operator=");
  5617     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_OPERATOR1_1, "CVoiceMailNotification::operator=");
  5638     Panic(KGsmuPanicMethodBodyNotImplemented);
  5618     Panic(KGsmuPanicMethodBodyNotImplemented);
  5639     BULLSEYE_RESTORE
  5619     BULLSEYE_RESTORE
  5640     }
  5620     }
  5641 
  5621 
  5642 CVoiceMailNotification::CVoiceMailNotification()
  5622 CVoiceMailNotification::CVoiceMailNotification()
  5643 	{
  5623 	{
  5644 	LOGGSMU1("CVoiceMailNotification::CVoiceMailNotification()");
  5624 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_CTOR1_1, "CVoiceMailNotification::CVoiceMailNotification()");
  5645 
  5625 
  5646 	iMessageId                 = 0;
  5626 	iMessageId                 = 0;
  5647 	iMessageLength             = 0;
  5627 	iMessageLength             = 0;
  5648 	iRetentionDays             = 0;
  5628 	iRetentionDays             = 0;
  5649 	iOctetN8Bit1               = EFalse;
  5629 	iOctetN8Bit1               = EFalse;
  5660  *  
  5640  *  
  5661  *  @capability None
  5641  *  @capability None
  5662  */
  5642  */
  5663 EXPORT_C CVoiceMailNotification::~CVoiceMailNotification()
  5643 EXPORT_C CVoiceMailNotification::~CVoiceMailNotification()
  5664 	{
  5644 	{
  5665 	LOGGSMU1("CVoiceMailNotification::~CVoiceMailNotification");
  5645 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_DTOR_1, "CVoiceMailNotification::~CVoiceMailNotification");
  5666 	delete iCallingLineIdentity;
  5646 	delete iCallingLineIdentity;
  5667 	delete iExtension;
  5647 	delete iExtension;
  5668 	} // CVoiceMailNotification::CVoiceMailNotification
  5648 	} // CVoiceMailNotification::CVoiceMailNotification
  5669 
  5649 
  5670 
  5650 
  5671 void CVoiceMailNotification::ConstructL()
  5651 void CVoiceMailNotification::ConstructL()
  5672 	{
  5652 	{
  5673 	LOGGSMU1("CVoiceMailNotification::ConstructL()");
  5653 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_CONSTRUCTL_1, "CVoiceMailNotification::ConstructL()");
  5674 
  5654 
  5675 	NewBufferL(0);
  5655 	NewBufferL(0);
  5676 	NewExtensionL(0);
  5656 	NewExtensionL(0);
  5677 	} // CVoiceMailNotification::ConstructL
  5657 	} // CVoiceMailNotification::ConstructL
  5678 
  5658 
  5684  *  
  5664  *  
  5685  *  @capability None
  5665  *  @capability None
  5686  */
  5666  */
  5687 EXPORT_C CVoiceMailNotification* CVoiceMailNotification::NewL()
  5667 EXPORT_C CVoiceMailNotification* CVoiceMailNotification::NewL()
  5688 	{
  5668 	{
  5689 	LOGGSMU1("CVoiceMailNotification::NewL()");
  5669 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_NEWL_1, "CVoiceMailNotification::NewL()");
  5690 
  5670 
  5691 	CVoiceMailNotification* aCVoiceMailNotification=new(ELeave) CVoiceMailNotification();
  5671 	CVoiceMailNotification* aCVoiceMailNotification=new(ELeave) CVoiceMailNotification();
  5692 	CleanupStack::PushL(aCVoiceMailNotification);
  5672 	CleanupStack::PushL(aCVoiceMailNotification);
  5693 	aCVoiceMailNotification->ConstructL();
  5673 	aCVoiceMailNotification->ConstructL();
  5694 	CleanupStack::Pop(aCVoiceMailNotification);
  5674 	CleanupStack::Pop(aCVoiceMailNotification);
  5696 	} // CVoiceMailNotification::NewL
  5676 	} // CVoiceMailNotification::NewL
  5697 
  5677 
  5698 
  5678 
  5699 void CVoiceMailNotification::DoSetParsedAddressL(const TDesC& aAddress)
  5679 void CVoiceMailNotification::DoSetParsedAddressL(const TDesC& aAddress)
  5700 	{
  5680 	{
  5701 	LOGGSMU1("CVoiceMailNotification::DoSetParsedAddressL()");
  5681 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_DOSETPARSEDADDRESSL_1, "CVoiceMailNotification::DoSetParsedAddressL()");
  5702 
  5682 
  5703 	TInt length=aAddress.Length();
  5683 	TInt length=aAddress.Length();
  5704 	if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) &&
  5684 	if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) &&
  5705 	    (length && (aAddress[0]!='+')))
  5685 	    (length && (aAddress[0]!='+')))
  5706 		{
  5686 		{
  5728  *  
  5708  *  
  5729  *  @capability None
  5709  *  @capability None
  5730  */
  5710  */
  5731 EXPORT_C TUint8 CEnhancedVoiceMailNotification::NumberOfVoiceMails()
  5711 EXPORT_C TUint8 CEnhancedVoiceMailNotification::NumberOfVoiceMails()
  5732 	{
  5712 	{
  5733 	LOGGSMU1("CEnhancedVoiceMailNotification::NumberOfVoiceMails()");
  5713 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_NUMBEROFVOICEMAILS_1, "CEnhancedVoiceMailNotification::NumberOfVoiceMails()");
  5734 
  5714 
  5735 	return (TUint8) iNotifications->Count();
  5715 	return (TUint8) iNotifications->Count();
  5736 	} // CEnhancedVoiceMailNotification::NumberOfVoiceMails
  5716 	} // CEnhancedVoiceMailNotification::NumberOfVoiceMails
  5737 
       
  5738 
       
  5739 /*void CEnhancedVoiceMailNotification::SetExtension(TDesC& aExtension)
       
  5740 	{
       
  5741 	LOGGSMU1("CEnhancedVoiceMailNotification::SetExtension()");
       
  5742 
       
  5743 	TInt length=aExtension.Length();
       
  5744 	NewExtensionL(length);
       
  5745 	iExtension->Des().Copy(aExtension);
       
  5746 	} // CEnhancedVoiceMailNotification::SetExtension
       
  5747 
       
  5748 TPtrC CEnhancedVoiceMailNotification::Extension() const
       
  5749 	{
       
  5750 	LOGGSMU1("CEnhancedVoiceMailNotification::Extension()");
       
  5751 
       
  5752 	TPtrC ptr;
       
  5753 	if (iExtension)
       
  5754 	    ptr.Set(iExtension->Des());
       
  5755 	return ptr;
       
  5756 	}*/
       
  5757 
  5717 
  5758 
  5718 
  5759 /**
  5719 /**
  5760  *  @publishedAll
  5720  *  @publishedAll
  5761  *  
  5721  *  
  5769  *  
  5729  *  
  5770  *  @capability None
  5730  *  @capability None
  5771  */
  5731  */
  5772 EXPORT_C RPointerArray<CVoiceMailNotification>& CEnhancedVoiceMailNotification::GetVoiceMailNotifications()
  5732 EXPORT_C RPointerArray<CVoiceMailNotification>& CEnhancedVoiceMailNotification::GetVoiceMailNotifications()
  5773 	{
  5733 	{
  5774 	LOGGSMU1("CEnhancedVoiceMailNotification::GetVoiceMailNotifications()");
  5734 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_GETVOICEMAILNOTIFICATIONS_1, "CEnhancedVoiceMailNotification::GetVoiceMailNotifications()");
  5775 
  5735 
  5776 	return *iNotifications;
  5736 	return *iNotifications;
  5777 	} // CEnhancedVoiceMailNotification::GetVoiceMailNotifications
  5737 	} // CEnhancedVoiceMailNotification::GetVoiceMailNotifications
  5778 
  5738 
  5779 
  5739 
  5780 void CEnhancedVoiceMailNotification::NewExtensionL(TInt aLength)
  5740 void CEnhancedVoiceMailNotification::NewExtensionL(TInt aLength)
  5781 	{
  5741 	{
  5782 	LOGGSMU1("CEnhancedVoiceMailNotification::NewExtensionL()");
  5742 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_NEWEXTENSIONL_1, "CEnhancedVoiceMailNotification::NewExtensionL()");
  5783 
  5743 
  5784 	HBufC* buffer=HBufC::NewL(aLength);
  5744 	HBufC* buffer=HBufC::NewL(aLength);
  5785 	delete iExtension;
  5745 	delete iExtension;
  5786 	iExtension=buffer;
  5746 	iExtension=buffer;
  5787 	iExtension->Des().SetLength(aLength);
  5747 	iExtension->Des().SetLength(aLength);
  5796  *  
  5756  *  
  5797  *  @capability None
  5757  *  @capability None
  5798  */
  5758  */
  5799 EXPORT_C  CEnhancedVoiceMailNotification* CEnhancedVoiceMailNotification::NewL()
  5759 EXPORT_C  CEnhancedVoiceMailNotification* CEnhancedVoiceMailNotification::NewL()
  5800 	{
  5760 	{
  5801 	LOGGSMU1("CEnhancedVoiceMailNotification::NewL()");
  5761 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_NEWL_1, "CEnhancedVoiceMailNotification::NewL()");
  5802 
  5762 
  5803 	CEnhancedVoiceMailNotification* aCEnhancedVoiceMailNotification=new(ELeave) CEnhancedVoiceMailNotification();
  5763 	CEnhancedVoiceMailNotification* aCEnhancedVoiceMailNotification=new(ELeave) CEnhancedVoiceMailNotification();
  5804 	CleanupStack::PushL(aCEnhancedVoiceMailNotification);
  5764 	CleanupStack::PushL(aCEnhancedVoiceMailNotification);
  5805 	aCEnhancedVoiceMailNotification->CEnhancedVoiceMailBoxInformation::ConstructL();
  5765 	aCEnhancedVoiceMailNotification->CEnhancedVoiceMailBoxInformation::ConstructL();
  5806 	aCEnhancedVoiceMailNotification->ConstructL();
  5766 	aCEnhancedVoiceMailNotification->ConstructL();
  5824  */
  5784  */
  5825 CEnhancedVoiceMailNotification::CEnhancedVoiceMailNotification(const CEnhancedVoiceMailNotification&)
  5785 CEnhancedVoiceMailNotification::CEnhancedVoiceMailNotification(const CEnhancedVoiceMailNotification&)
  5826     {
  5786     {
  5827     // Ignore in code coverage - not intended to be used
  5787     // Ignore in code coverage - not intended to be used
  5828     BULLSEYE_OFF    
  5788     BULLSEYE_OFF    
  5829     LOGGSMU1("CEnhancedVoiceMailNotification::CEnhancedVoiceMailNotification");
  5789     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_CTOR1_1, "CEnhancedVoiceMailNotification::CEnhancedVoiceMailNotification");
  5830     Panic(KGsmuPanicMethodBodyNotImplemented);
  5790     Panic(KGsmuPanicMethodBodyNotImplemented);
  5831     BULLSEYE_RESTORE
  5791     BULLSEYE_RESTORE
  5832     }
  5792     }
  5833 
  5793 
  5834 /**
  5794 /**
  5841  */
  5801  */
  5842 TBool CEnhancedVoiceMailNotification::operator==(const CEnhancedVoiceMailNotification&)
  5802 TBool CEnhancedVoiceMailNotification::operator==(const CEnhancedVoiceMailNotification&)
  5843     {
  5803     {
  5844     // Ignore in code coverage - not intended to be used
  5804     // Ignore in code coverage - not intended to be used
  5845     BULLSEYE_OFF    
  5805     BULLSEYE_OFF    
  5846     LOGGSMU1("CEnhancedVoiceMailNotification::operator==");
  5806     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_OPERATOR_1, "CEnhancedVoiceMailNotification::operator==");
  5847     Panic(KGsmuPanicMethodBodyNotImplemented);
  5807     Panic(KGsmuPanicMethodBodyNotImplemented);
  5848     return EFalse;
  5808     return EFalse;
  5849     BULLSEYE_RESTORE
  5809     BULLSEYE_RESTORE
  5850     }
  5810     }
  5851 
  5811 
  5859  */
  5819  */
  5860 void CEnhancedVoiceMailNotification::operator=(const CEnhancedVoiceMailNotification&)
  5820 void CEnhancedVoiceMailNotification::operator=(const CEnhancedVoiceMailNotification&)
  5861     {
  5821     {
  5862     // Ignore in code coverage - not intended to be used
  5822     // Ignore in code coverage - not intended to be used
  5863     BULLSEYE_OFF    
  5823     BULLSEYE_OFF    
  5864     LOGGSMU1("CEnhancedVoiceMailNotification::operator=");
  5824     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_OPERATOR1_1, "CEnhancedVoiceMailNotification::operator=");
  5865     Panic(KGsmuPanicMethodBodyNotImplemented);
  5825     Panic(KGsmuPanicMethodBodyNotImplemented);
  5866     BULLSEYE_RESTORE
  5826     BULLSEYE_RESTORE
  5867     }
  5827     }
  5868 
  5828 
  5869 /**
  5829 /**
  5873  *  
  5833  *  
  5874  *  @capability None
  5834  *  @capability None
  5875  */
  5835  */
  5876 EXPORT_C  CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification()
  5836 EXPORT_C  CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification()
  5877 	{
  5837 	{
  5878 	LOGGSMU1("CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification");
  5838 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_DTOR_1, "CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification");
  5879 	delete iExtension;
  5839 	delete iExtension;
  5880 	iNotifications->ResetAndDestroy();
  5840 	iNotifications->ResetAndDestroy();
  5881 	iNotifications->Close();
  5841 	iNotifications->Close();
  5882 	delete iNotifications;
  5842 	delete iNotifications;
  5883 	} // CEnhancedVoiceMailNotification::operator
  5843 	} // CEnhancedVoiceMailNotification::operator
  5884 
  5844 
  5885 
  5845 
  5886 void CEnhancedVoiceMailNotification::ConstructL()
  5846 void CEnhancedVoiceMailNotification::ConstructL()
  5887 	{
  5847 	{
  5888 	LOGGSMU1("CEnhancedVoiceMailNotification::ConstructL()");
  5848 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_CONSTRUCTL_1, "CEnhancedVoiceMailNotification::ConstructL()");
  5889 
  5849 
  5890 	NewExtensionL(0);
  5850 	NewExtensionL(0);
  5891 	iNotifications = new (ELeave) RPointerArray<CVoiceMailNotification>(KMaxNumberOfNotifications);
  5851 	iNotifications = new (ELeave) RPointerArray<CVoiceMailNotification>(KMaxNumberOfNotifications);
  5892 	} // CEnhancedVoiceMailNotification::ConstructL
  5852 	} // CEnhancedVoiceMailNotification::ConstructL
  5893 
  5853 
  5894 
  5854 
  5895 TUint8* CEnhancedVoiceMailNotification::EncodeL(TUint8* aCurrentPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const
  5855 TUint8* CEnhancedVoiceMailNotification::EncodeL(TUint8* aCurrentPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const
  5896 	{
  5856 	{
  5897 	LOGGSMU1("CEnhancedVoiceMailNotification::EncodeL");
  5857 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_ENCODEL_1, "CEnhancedVoiceMailNotification::EncodeL");
  5898 
  5858 
  5899 	TUint8* startPtr   = aCurrentPtr;
  5859 	TUint8* startPtr   = aCurrentPtr;
  5900 
  5860 
  5901 	aCurrentPtr = CEnhancedVoiceMailBoxInformation::EncodeL(aCurrentPtr, aCharacterSetConverter, aFs);
  5861 	aCurrentPtr = CEnhancedVoiceMailBoxInformation::EncodeL(aCurrentPtr, aCharacterSetConverter, aFs);
  5902 
  5862 
  5928 	} // CEnhancedVoiceMailNotification::EncodeL
  5888 	} // CEnhancedVoiceMailNotification::EncodeL
  5929 
  5889 
  5930 
  5890 
  5931 void CEnhancedVoiceMailNotification::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  5891 void CEnhancedVoiceMailNotification::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  5932 	{
  5892 	{
  5933 	LOGGSMU1("CEnhancedVoiceMailNotification::DecodeL");
  5893 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_DECODEL_1, "CEnhancedVoiceMailNotification::DecodeL");
  5934 
  5894 
  5935 	CEnhancedVoiceMailBoxInformation::DecodeL(aVoiceMailInfo, aCharacterSetConverter, aFs);
  5895 	CEnhancedVoiceMailBoxInformation::DecodeL(aVoiceMailInfo, aCharacterSetConverter, aFs);
  5936 
  5896 
  5937 	TUint8 numberOfNotifications = (aVoiceMailInfo.GetL() & KSmsNotificationBitMask);
  5897 	TUint8 numberOfNotifications = (aVoiceMailInfo.GetL() & KSmsNotificationBitMask);
  5938 
  5898 
  5965  *  
  5925  *  
  5966  *  @capability None
  5926  *  @capability None
  5967  */
  5927  */
  5968 EXPORT_C void CVoiceMailDeletion::SetMessageId(TUint16 aMessageId)
  5928 EXPORT_C void CVoiceMailDeletion::SetMessageId(TUint16 aMessageId)
  5969 	{
  5929 	{
  5970 	LOGGSMU1("CVoiceMailDeletion::SetMessageId()");
  5930 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_SETMESSAGEID_1, "CVoiceMailDeletion::SetMessageId()");
  5971 
  5931 
  5972 	iMessageId=aMessageId;
  5932 	iMessageId=aMessageId;
  5973 	} // CVoiceMailDeletion::SetMessageId
  5933 	} // CVoiceMailDeletion::SetMessageId
  5974 
  5934 
  5975 
  5935 
  5985  *  
  5945  *  
  5986  *  @capability None
  5946  *  @capability None
  5987  */
  5947  */
  5988 EXPORT_C TUint16 CVoiceMailDeletion::MessageId() const
  5948 EXPORT_C TUint16 CVoiceMailDeletion::MessageId() const
  5989 	{
  5949 	{
  5990 	LOGGSMU1("CVoiceMailDeletion::MessageId()");
  5950 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_MESSAGEID_1, "CVoiceMailDeletion::MessageId()");
  5991 
  5951 
  5992 	return iMessageId;
  5952 	return iMessageId;
  5993 	} // CVoiceMailDeletion::MessageId
  5953 	} // CVoiceMailDeletion::MessageId
  5994 
  5954 
  5995 
  5955 
  6004  *  
  5964  *  
  6005  *  @capability None
  5965  *  @capability None
  6006  */
  5966  */
  6007 EXPORT_C TBool CVoiceMailDeletion::MessageExtensionIndication() const
  5967 EXPORT_C TBool CVoiceMailDeletion::MessageExtensionIndication() const
  6008 	{
  5968 	{
  6009 	LOGGSMU1("CVoiceMailDeletion::MessageExtensionIndication()");
  5969 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_MESSAGEEXTENSIONINDICATION_1, "CVoiceMailDeletion::MessageExtensionIndication()");
  6010 
  5970 
  6011 	return iExtensionIndicator;
  5971 	return iExtensionIndicator;
  6012 	} // CVoiceMailDeletion::MessageExtensionIndication
  5972 	} // CVoiceMailDeletion::MessageExtensionIndication
  6013 
  5973 
  6014 
  5974 
  6015 TUint8 CVoiceMailDeletion::SizeL()
  5975 TUint8 CVoiceMailDeletion::SizeL()
  6016 	{
  5976 	{
  6017 	LOGGSMU1("CVoiceMailDeletion::SizeL()");
  5977 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_SIZEL_1, "CVoiceMailDeletion::SizeL()");
  6018 
  5978 
  6019 	const TUint8 KSizeOfVoiceMailDeletion = 3;
  5979 	const TUint8 KSizeOfVoiceMailDeletion = 3;
  6020 	return KSizeOfVoiceMailDeletion;
  5980 	return KSizeOfVoiceMailDeletion;
  6021 	} // CVoiceMailDeletion::SizeL
  5981 	} // CVoiceMailDeletion::SizeL
  6022 
  5982 
  6024 TUint8* CVoiceMailDeletion::EncodeL(TUint8* aPtr) const
  5984 TUint8* CVoiceMailDeletion::EncodeL(TUint8* aPtr) const
  6025 	{
  5985 	{
  6026 	// When changes are made which affect the
  5986 	// When changes are made which affect the
  6027 	// number of bytes encoded, this should be
  5987 	// number of bytes encoded, this should be
  6028 	// reflected in VoiceMailDeletion::SizeL()
  5988 	// reflected in VoiceMailDeletion::SizeL()
  6029 	LOGGSMU1("CVoiceMailDeletion::EncodeL");
  5989 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_ENCODEL_1, "CVoiceMailDeletion::EncodeL");
  6030 
  5990 
  6031 	*aPtr =  (TUint8) (iMessageId >> 8);
  5991 	*aPtr =  (TUint8) (iMessageId >> 8);
  6032 	aPtr++;
  5992 	aPtr++;
  6033 	*aPtr =  (TUint8) iMessageId;
  5993 	*aPtr =  (TUint8) iMessageId;
  6034 	aPtr++;
  5994 	aPtr++;
  6038 	} // CVoiceMailDeletion::EncodeL
  5998 	} // CVoiceMailDeletion::EncodeL
  6039 
  5999 
  6040 
  6000 
  6041 void CVoiceMailDeletion::DecodeL(TGsmuLex8& aVoiceMailInfo)
  6001 void CVoiceMailDeletion::DecodeL(TGsmuLex8& aVoiceMailInfo)
  6042 	{
  6002 	{
  6043 	LOGGSMU1("CVoiceMailDeletion::DecodeL");
  6003 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_DECODEL_1, "CVoiceMailDeletion::DecodeL");
  6044 
  6004 
  6045 	iMessageId = (((TUint16) aVoiceMailInfo.GetL()) << 8) +
  6005 	iMessageId = (((TUint16) aVoiceMailInfo.GetL()) << 8) +
  6046 	              ((TUint16) aVoiceMailInfo.GetL());
  6006 	              ((TUint16) aVoiceMailInfo.GetL());
  6047 	iExtensionIndicator =    (aVoiceMailInfo.GetL() >> 7);
  6007 	iExtensionIndicator =    (aVoiceMailInfo.GetL() >> 7);
  6048 
  6008 
  6071  */
  6031  */
  6072 CVoiceMailDeletion::CVoiceMailDeletion(const CVoiceMailDeletion&)
  6032 CVoiceMailDeletion::CVoiceMailDeletion(const CVoiceMailDeletion&)
  6073     {
  6033     {
  6074     // Ignore in code coverage - not intended to be used
  6034     // Ignore in code coverage - not intended to be used
  6075     BULLSEYE_OFF    
  6035     BULLSEYE_OFF    
  6076     LOGGSMU1("CVoiceMailDeletion::CVoiceMailDeletion");
  6036     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_CTOR1_1, "CVoiceMailDeletion::CVoiceMailDeletion");
  6077     Panic(KGsmuPanicMethodBodyNotImplemented);
  6037     Panic(KGsmuPanicMethodBodyNotImplemented);
  6078     BULLSEYE_RESTORE
  6038     BULLSEYE_RESTORE
  6079     }
  6039     }
  6080 
  6040 
  6081 /**
  6041 /**
  6088  */
  6048  */
  6089 TBool CVoiceMailDeletion::operator==(const CVoiceMailDeletion&)
  6049 TBool CVoiceMailDeletion::operator==(const CVoiceMailDeletion&)
  6090     {
  6050     {
  6091     // Ignore in code coverage - not intended to be used
  6051     // Ignore in code coverage - not intended to be used
  6092     BULLSEYE_OFF    
  6052     BULLSEYE_OFF    
  6093     LOGGSMU1("CVoiceMailDeletion::operator==");
  6053     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_OPERATOR_1, "CVoiceMailDeletion::operator==");
  6094     Panic(KGsmuPanicMethodBodyNotImplemented);
  6054     Panic(KGsmuPanicMethodBodyNotImplemented);
  6095     return EFalse;
  6055     return EFalse;
  6096     BULLSEYE_RESTORE
  6056     BULLSEYE_RESTORE
  6097     }
  6057     }
  6098 
  6058 
  6106  */
  6066  */
  6107 void CVoiceMailDeletion::operator=(const CVoiceMailDeletion&)
  6067 void CVoiceMailDeletion::operator=(const CVoiceMailDeletion&)
  6108     {
  6068     {
  6109     // Ignore in code coverage - not intended to be used
  6069     // Ignore in code coverage - not intended to be used
  6110     BULLSEYE_OFF    
  6070     BULLSEYE_OFF    
  6111     LOGGSMU1("CVoiceMailDeletion::operator=");
  6071     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_OPERATOR1_1, "CVoiceMailDeletion::operator=");
  6112     Panic(KGsmuPanicMethodBodyNotImplemented);
  6072     Panic(KGsmuPanicMethodBodyNotImplemented);
  6113     BULLSEYE_RESTORE
  6073     BULLSEYE_RESTORE
  6114     }
  6074     }
  6115 
  6075 
  6116 /**
  6076 /**
  6120  *  
  6080  *  
  6121  *  @capability None
  6081  *  @capability None
  6122  */
  6082  */
  6123 EXPORT_C CVoiceMailDeletion::~CVoiceMailDeletion()
  6083 EXPORT_C CVoiceMailDeletion::~CVoiceMailDeletion()
  6124 	{
  6084 	{
  6125 	LOGGSMU1("CVoiceMailDeletion::~CVoiceMailDeletion");
  6085 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_DTOR_1, "CVoiceMailDeletion::~CVoiceMailDeletion");
  6126 
  6086 
  6127 	delete iExtension;
  6087 	delete iExtension;
  6128 	} // CVoiceMailDeletion::operator
  6088 	} // CVoiceMailDeletion::operator
  6129 
  6089 
  6130 
  6090 
  6131 void CVoiceMailDeletion::ConstructL()
  6091 void CVoiceMailDeletion::ConstructL()
  6132 	{
  6092 	{
  6133 	LOGGSMU1("CVoiceMailDeletion::ConstructL()");
  6093 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_CONSTRUCTL_1, "CVoiceMailDeletion::ConstructL()");
  6134 
  6094 
  6135 	NewBufferL(0);
  6095 	NewBufferL(0);
  6136 	} // CVoiceMailDeletion::ConstructL
  6096 	} // CVoiceMailDeletion::ConstructL
  6137 
  6097 
  6138 
  6098 
  6139 void CVoiceMailDeletion::NewBufferL(TInt aLength)
  6099 void CVoiceMailDeletion::NewBufferL(TInt aLength)
  6140 	{
  6100 	{
  6141 	LOGGSMU1("CVoiceMailDeletion::NewBufferL()");
  6101 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_NEWBUFFERL_1, "CVoiceMailDeletion::NewBufferL()");
  6142 
  6102 
  6143 	HBufC* buffer=HBufC::NewL(aLength);
  6103 	HBufC* buffer=HBufC::NewL(aLength);
  6144 	delete iExtension;
  6104 	delete iExtension;
  6145 	iExtension=buffer;
  6105 	iExtension=buffer;
  6146 	iExtension->Des().SetLength(aLength);
  6106 	iExtension->Des().SetLength(aLength);
  6155  *  
  6115  *  
  6156  *  @capability None
  6116  *  @capability None
  6157  */
  6117  */
  6158 EXPORT_C CVoiceMailDeletion* CVoiceMailDeletion::NewL()
  6118 EXPORT_C CVoiceMailDeletion* CVoiceMailDeletion::NewL()
  6159 	{
  6119 	{
  6160 	LOGGSMU1("CVoiceMailDeletion::NewL()");
  6120 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_NEWL_1, "CVoiceMailDeletion::NewL()");
  6161 
  6121 
  6162 	CVoiceMailDeletion* voiceMailDeletion=new(ELeave) CVoiceMailDeletion();
  6122 	CVoiceMailDeletion* voiceMailDeletion=new(ELeave) CVoiceMailDeletion();
  6163 	CleanupStack::PushL(voiceMailDeletion);
  6123 	CleanupStack::PushL(voiceMailDeletion);
  6164 	voiceMailDeletion->ConstructL();
  6124 	voiceMailDeletion->ConstructL();
  6165 	CleanupStack::Pop(voiceMailDeletion);
  6125 	CleanupStack::Pop(voiceMailDeletion);
  6166 	return voiceMailDeletion;
  6126 	return voiceMailDeletion;
  6167 	} // CVoiceMailDeletion::NewL
  6127 	} // CVoiceMailDeletion::NewL
  6168 
  6128 
  6169 
  6129 
  6170 /*
       
  6171 void CVoiceMailDeletion::SetExtension(TDesC& aExtension)
       
  6172 	{
       
  6173 	LOGGSMU1("CVoiceMailDeletion::SetExtension()");
       
  6174 
       
  6175 	TInt length=aExtension.Length();
       
  6176 	NewBufferL(length);
       
  6177 	iExtension->Des().Copy(aExtension);
       
  6178 	} // CVoiceMailDeletion::SetExtension
       
  6179 
       
  6180 
       
  6181 TPtrC CVoiceMailDeletion::Extension() const
       
  6182 	{
       
  6183 	LOGGSMU1("CVoiceMailDeletion::Extension()");
       
  6184 
       
  6185 	TPtrC ptr;
       
  6186 	if (iExtension)
       
  6187 	    ptr.Set(iExtension->Des());
       
  6188 	return ptr;
       
  6189 	}*/
       
  6190 
       
  6191 
       
  6192 void CEnhancedVoiceMailDeleteConfirmations::NewExtensionL(TInt aLength)
  6130 void CEnhancedVoiceMailDeleteConfirmations::NewExtensionL(TInt aLength)
  6193 	{
  6131 	{
  6194 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::NewExtensionL()");
  6132 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_NEWEXTENSIONL_1, "CEnhancedVoiceMailDeleteConfirmations::NewExtensionL()");
  6195 
  6133 
  6196 	HBufC* buffer=HBufC::NewL(aLength);
  6134 	HBufC* buffer=HBufC::NewL(aLength);
  6197 	delete iExtension;
  6135 	delete iExtension;
  6198 	iExtension=buffer;
  6136 	iExtension=buffer;
  6199 	iExtension->Des().SetLength(aLength);
  6137 	iExtension->Des().SetLength(aLength);
  6214  *  
  6152  *  
  6215  *  @capability None
  6153  *  @capability None
  6216  */
  6154  */
  6217 EXPORT_C  CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations()
  6155 EXPORT_C  CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations()
  6218 	{
  6156 	{
  6219 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations");
  6157 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_DTOR_1, "CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations");
  6220 
  6158 
  6221 	delete iExtension;
  6159 	delete iExtension;
  6222 	iVoiceMailDeletions->ResetAndDestroy();
  6160 	iVoiceMailDeletions->ResetAndDestroy();
  6223 	iVoiceMailDeletions->Close();
  6161 	iVoiceMailDeletions->Close();
  6224 	delete iVoiceMailDeletions;
  6162 	delete iVoiceMailDeletions;
  6235  */
  6173  */
  6236 CEnhancedVoiceMailDeleteConfirmations::CEnhancedVoiceMailDeleteConfirmations(const CEnhancedVoiceMailDeleteConfirmations&)
  6174 CEnhancedVoiceMailDeleteConfirmations::CEnhancedVoiceMailDeleteConfirmations(const CEnhancedVoiceMailDeleteConfirmations&)
  6237     {
  6175     {
  6238     // Ignore in code coverage - not intended to be used
  6176     // Ignore in code coverage - not intended to be used
  6239     BULLSEYE_OFF    
  6177     BULLSEYE_OFF    
  6240     LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::CEnhancedVoiceMailDeleteConfirmations");
  6178     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_CTOR1_1, "CEnhancedVoiceMailDeleteConfirmations::CEnhancedVoiceMailDeleteConfirmations");
  6241     Panic(KGsmuPanicMethodBodyNotImplemented);
  6179     Panic(KGsmuPanicMethodBodyNotImplemented);
  6242     BULLSEYE_RESTORE
  6180     BULLSEYE_RESTORE
  6243     }
  6181     }
  6244 
  6182 
  6245 /**
  6183 /**
  6252  */
  6190  */
  6253 TBool CEnhancedVoiceMailDeleteConfirmations::operator==(const CEnhancedVoiceMailDeleteConfirmations&)
  6191 TBool CEnhancedVoiceMailDeleteConfirmations::operator==(const CEnhancedVoiceMailDeleteConfirmations&)
  6254     {
  6192     {
  6255     // Ignore in code coverage - not intended to be used
  6193     // Ignore in code coverage - not intended to be used
  6256     BULLSEYE_OFF    
  6194     BULLSEYE_OFF    
  6257     LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::operator==");
  6195     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_OPERATOR_1, "CEnhancedVoiceMailDeleteConfirmations::operator==");
  6258     Panic(KGsmuPanicMethodBodyNotImplemented);
  6196     Panic(KGsmuPanicMethodBodyNotImplemented);
  6259     return EFalse;
  6197     return EFalse;
  6260     BULLSEYE_RESTORE
  6198     BULLSEYE_RESTORE
  6261     }
  6199     }
  6262 
  6200 
  6270  */
  6208  */
  6271 void CEnhancedVoiceMailDeleteConfirmations::operator=(const CEnhancedVoiceMailDeleteConfirmations&)
  6209 void CEnhancedVoiceMailDeleteConfirmations::operator=(const CEnhancedVoiceMailDeleteConfirmations&)
  6272     {
  6210     {
  6273     // Ignore in code coverage - not intended to be used
  6211     // Ignore in code coverage - not intended to be used
  6274     BULLSEYE_OFF    
  6212     BULLSEYE_OFF    
  6275     LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::operator=");
  6213     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_OPERATOR1_1, "CEnhancedVoiceMailDeleteConfirmations::operator=");
  6276     Panic(KGsmuPanicMethodBodyNotImplemented);
  6214     Panic(KGsmuPanicMethodBodyNotImplemented);
  6277     BULLSEYE_RESTORE
  6215     BULLSEYE_RESTORE
  6278     }
  6216     }
  6279 
  6217 
  6280 void CEnhancedVoiceMailDeleteConfirmations::ConstructL()
  6218 void CEnhancedVoiceMailDeleteConfirmations::ConstructL()
  6281 	{
  6219 	{
  6282 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::ConstructL()");
  6220 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_CONSTRUCTL_1, "CEnhancedVoiceMailDeleteConfirmations::ConstructL()");
  6283 
  6221 
  6284 	NewExtensionL(0);
  6222 	NewExtensionL(0);
  6285 
  6223 
  6286 	iVoiceMailDeletions = new (ELeave) RPointerArray<CVoiceMailDeletion>(15);
  6224 	iVoiceMailDeletions = new (ELeave) RPointerArray<CVoiceMailDeletion>(15);
  6287 	} // CEnhancedVoiceMailDeleteConfirmations::ConstructL
  6225 	} // CEnhancedVoiceMailDeleteConfirmations::ConstructL
  6294  *  
  6232  *  
  6295  *  @capability None
  6233  *  @capability None
  6296  */
  6234  */
  6297 EXPORT_C  CEnhancedVoiceMailDeleteConfirmations* CEnhancedVoiceMailDeleteConfirmations::NewL()
  6235 EXPORT_C  CEnhancedVoiceMailDeleteConfirmations* CEnhancedVoiceMailDeleteConfirmations::NewL()
  6298 	{
  6236 	{
  6299 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::NewL()");
  6237 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_NEWL_1, "CEnhancedVoiceMailDeleteConfirmations::NewL()");
  6300 
  6238 
  6301 	CEnhancedVoiceMailDeleteConfirmations* aCEnhancedVoiceMailDeleteConfirmations=new(ELeave) CEnhancedVoiceMailDeleteConfirmations();
  6239 	CEnhancedVoiceMailDeleteConfirmations* aCEnhancedVoiceMailDeleteConfirmations=new(ELeave) CEnhancedVoiceMailDeleteConfirmations();
  6302 	CleanupStack::PushL(aCEnhancedVoiceMailDeleteConfirmations);
  6240 	CleanupStack::PushL(aCEnhancedVoiceMailDeleteConfirmations);
  6303 	aCEnhancedVoiceMailDeleteConfirmations->CEnhancedVoiceMailBoxInformation::ConstructL();
  6241 	aCEnhancedVoiceMailDeleteConfirmations->CEnhancedVoiceMailBoxInformation::ConstructL();
  6304 	aCEnhancedVoiceMailDeleteConfirmations->ConstructL();
  6242 	aCEnhancedVoiceMailDeleteConfirmations->ConstructL();
  6317  *  
  6255  *  
  6318  *  @capability None
  6256  *  @capability None
  6319  */
  6257  */
  6320 EXPORT_C TUint8  CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes()
  6258 EXPORT_C TUint8  CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes()
  6321 	{
  6259 	{
  6322 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes()");
  6260 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_NUMBEROFDELETES_1, "CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes()");
  6323 
  6261 
  6324 	return iVoiceMailDeletions->Count();
  6262 	return iVoiceMailDeletions->Count();
  6325 	} // CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes
  6263 	} // CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes
  6326 
  6264 
  6327 
  6265 
  6339  *  
  6277  *  
  6340  *  @capability None
  6278  *  @capability None
  6341  */
  6279  */
  6342 EXPORT_C RPointerArray<CVoiceMailDeletion>& CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions()
  6280 EXPORT_C RPointerArray<CVoiceMailDeletion>& CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions()
  6343 	{
  6281 	{
  6344 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions()");
  6282 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_GETVOICEMAILDELETIONS_1, "CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions()");
  6345 
  6283 
  6346 	return *iVoiceMailDeletions;
  6284 	return *iVoiceMailDeletions;
  6347 	} // CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions
  6285 	} // CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions
  6348 
  6286 
  6349 
  6287 
  6350 /*
       
  6351 void CEnhancedVoiceMailDeleteConfirmations::SetExtension(TDesC& aExtension)
       
  6352 	{
       
  6353 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::SetExtension()");
       
  6354 
       
  6355 	TInt length=aExtension.Length();
       
  6356 	NewBufferL(length);
       
  6357 	iExtension->Des().Copy(aExtension);
       
  6358 	} // CEnhancedVoiceMailDeleteConfirmations::SetExtension
       
  6359 
       
  6360 
       
  6361 TPtrC CEnhancedVoiceMailDeleteConfirmations::Extension() const
       
  6362 	{
       
  6363 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::Extension()");
       
  6364 
       
  6365 	TPtrC ptr;
       
  6366 	if (iExtension)
       
  6367 		{
       
  6368 		ptr.Set(iExtension->Des());
       
  6369 		}
       
  6370 	return ptr;
       
  6371 	}*/
       
  6372 
       
  6373 
       
  6374 TUint8* CEnhancedVoiceMailDeleteConfirmations::EncodeL(TUint8* aCurrentPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const
  6288 TUint8* CEnhancedVoiceMailDeleteConfirmations::EncodeL(TUint8* aCurrentPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const
  6375 	{
  6289 	{
  6376 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::EncodeL");
  6290 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_ENCODEL_1, "CEnhancedVoiceMailDeleteConfirmations::EncodeL");
  6377 
  6291 
  6378 	TUint8* startPtr   = aCurrentPtr;
  6292 	TUint8* startPtr   = aCurrentPtr;
  6379 
  6293 
  6380 	aCurrentPtr = CEnhancedVoiceMailBoxInformation::EncodeL(aCurrentPtr, aCharacterSetConverter, aFs);
  6294 	aCurrentPtr = CEnhancedVoiceMailBoxInformation::EncodeL(aCurrentPtr, aCharacterSetConverter, aFs);
  6381 
  6295 
  6410 	} // CEnhancedVoiceMailDeleteConfirmations::EncodeL
  6324 	} // CEnhancedVoiceMailDeleteConfirmations::EncodeL
  6411 
  6325 
  6412 
  6326 
  6413 void CEnhancedVoiceMailDeleteConfirmations::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  6327 void CEnhancedVoiceMailDeleteConfirmations::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs)
  6414 	{
  6328 	{
  6415 	LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::DecodeL");
  6329 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_DECODEL_1, "CEnhancedVoiceMailDeleteConfirmations::DecodeL");
  6416 
  6330 
  6417 	CEnhancedVoiceMailBoxInformation::DecodeL(aVoiceMailInfo, aCharacterSetConverter, aFs);
  6331 	CEnhancedVoiceMailBoxInformation::DecodeL(aVoiceMailInfo, aCharacterSetConverter, aFs);
  6418 
  6332 
  6419 	TUint numberOfVMDeletions = (aVoiceMailInfo.GetL() & KSmsNotificationBitMask);
  6333 	TUint numberOfVMDeletions = (aVoiceMailInfo.GetL() & KSmsNotificationBitMask);
  6420 
  6334