diff -r 13d7c31c74e0 -r b183ec05bd8c syncmlfw/ds/settings/src/NSmlDSSettings.cpp --- a/syncmlfw/ds/settings/src/NSmlDSSettings.cpp Thu Aug 19 10:44:50 2010 +0300 +++ b/syncmlfw/ds/settings/src/NSmlDSSettings.cpp Tue Aug 31 16:04:06 2010 +0300 @@ -26,14 +26,13 @@ #include "bautils.h" #include "nsmlroam.h" //XML profiles -#include "rxmlreader.h" +#include "xml/RXMLReader.h" #include "NSmlProfileContentHandler.h" -#include "nsmldsagconstants.h" #include //CRepository -#include // KCRUidOperatorDatasyncInternalKeys +//CONSTANTS _LIT(Kinfile,"z:\\Private\\101F99FB\\VariantData.xml"); -const TInt KUrlLength = 256; + //============================================= // @@ -121,7 +120,7 @@ // Destructor. //============================================= -CNSmlDSSettings::~CNSmlDSSettings() +EXPORT_C CNSmlDSSettings::~CNSmlDSSettings() { if(iResourceProfileArray) { @@ -882,104 +881,5 @@ return iView.ColUint( iColSet->ColNo( aFieldName ) ); } -//----------------------------------------------------------------------------- -// CNSmlDSSettings::IsOperatorProfileL -// Is current profile Operator specific profile. -//----------------------------------------------------------------------------- -// -EXPORT_C TBool CNSmlDSSettings::IsOperatorProfileL( const TDesC& aServerId ) - { - if( aServerId.Length() != 0 ) - { - TBuf8 value; - TBuf valueUtf16; - - CRepository* rep = NULL; - - // don't leave in case of missing or corrupted cenrep. - TRAPD( err, rep = CRepository::NewL( - KCRUidOperatorDatasyncInternalKeys ) ); - if ( err == KErrNone ) - { - rep->Get( KNsmlOpDsOperatorSyncServerId, value ); - delete rep; - valueUtf16.Copy( value ); - if ( aServerId.Compare( valueUtf16 ) == 0 ) - { - return ETrue; - } - } - } - return EFalse; - } - -//----------------------------------------------------------------------------- -// CNSmlDSSettings::OperatorProfileSWVValueLC -// SW version of Operator specific profile. -//----------------------------------------------------------------------------- -// -EXPORT_C HBufC8* CNSmlDSSettings::OperatorProfileSWVValueLC() - { - const TInt KSwvLength = 30; - HBufC8* buf = HBufC8::NewLC( KSwvLength ); - TPtr8 ptr = buf->Des(); - CRepository* rep = NULL; - TRAPD( err, rep = CRepository::NewL( - KCRUidOperatorDatasyncInternalKeys ) ); - // in case of missing or corrupted cenrep don't leave, just - // return 0-length desc - if( err == KErrNone ) - { - CleanupStack::PushL( rep ); - TInt actualLength; - err = rep->Get( KNsmlOpDsDevInfoSwVValue, ptr, actualLength ); - if( err == KErrOverflow ) - { - CleanupStack::Pop( buf ); - buf = buf->ReAllocL( actualLength ); - CleanupStack::PushL( buf ); - ptr.Set( buf->Des() ); - // ignore return error - rep->Get( KNsmlOpDsDevInfoSwVValue, ptr ); - } - CleanupStack::PopAndDestroy( rep ); - } - return buf; - } - -//----------------------------------------------------------------------------- -// CNSmlDSSettings:::OperatorProfileModValueLC -// Mod value of Operator specific profile. -//----------------------------------------------------------------------------- -// -EXPORT_C HBufC8* CNSmlDSSettings::OperatorProfileModValueLC() - { - const TInt KModelLength = 20; - HBufC8* buf = HBufC8::NewLC( KModelLength ); - TPtr8 ptr = buf->Des(); - CRepository* rep = NULL; - TRAPD( err, rep = CRepository::NewL( - KCRUidOperatorDatasyncInternalKeys ) ); - // in case of missing or corrupted cenrep don't leave, just - // return 0-length desc - if( err == KErrNone ) - { - CleanupStack::PushL( rep ); - TInt actualLength; - err = rep->Get( KNsmlOpDsDevInfoModValue, ptr, actualLength ); - if( err == KErrOverflow ) - { - CleanupStack::Pop( buf ); - buf = buf->ReAllocL( actualLength ); - CleanupStack::PushL( buf ); - ptr.Set( buf->Des() ); - // ignore return error - rep->Get( KNsmlOpDsDevInfoModValue, ptr ); - } - CleanupStack::PopAndDestroy( rep ); - } - return buf; - } - // End of File