# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276255679 -10800 # Node ID 0deca9b72b62b8f2c93015a77b7ebdcd0f5df889 # Parent 5d0ec111abfc97cd6bc9d5e0af2f4d83b10bb05f Revision: 201021 Kit: 2010123 diff -r 5d0ec111abfc -r 0deca9b72b62 fotaapplication/fotaserver/FotaServer/data/fotaserver.rss --- a/fotaapplication/fotaserver/FotaServer/data/fotaserver.rss Thu May 27 13:43:36 2010 +0300 +++ b/fotaapplication/fotaserver/FotaServer/data/fotaserver.rss Fri Jun 11 14:27:59 2010 +0300 @@ -31,8 +31,8 @@ #include #include #include -#include -#include +//#include +//#include #include #include diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/Group/bld.inf --- a/omaprovisioning/provisioning/Group/bld.inf Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/Group/bld.inf Fri Jun 11 14:27:59 2010 +0300 @@ -46,6 +46,7 @@ ../loc/Provisioning.loc MW_LAYER_LOC_EXPORT_PATH(provisioning.loc) ../IMAdapter/loc/WPWVAdapter.loc MW_LAYER_LOC_EXPORT_PATH(wpwvadapter.loc) ../MbxNbrAdapter/loc/MailboxAdapter.loc MW_LAYER_LOC_EXPORT_PATH(mailboxadapter.loc) +../accesspointadapter/loc/WPAPAdapter.loc MW_LAYER_LOC_EXPORT_PATH(WPAPAdapter.loc) ../ProvisioningBC/loc/ProvisioningBC.loc MW_LAYER_LOC_EXPORT_PATH(provisioningbc.loc) //../ProvisioningCx/loc/ProvisioningCx.loc MW_LAYER_LOC_EXPORT_PATH(provisioningcx.loc) ../StreamingAdapter/loc/StreamingAdapter.loc MW_LAYER_LOC_EXPORT_PATH(streamingadapter.loc) @@ -89,15 +90,13 @@ ../ProvisioningParser/Group/ProvisioningParser.mmp ../ProvisioningHandler/Group/ProvisioningHandler.mmp -/* Commented to avoid APP layer dependency -//../accesspointadapter/group/WPAPAdapter.mmp + +../accesspointadapter/group/WPAPAdapter.mmp //../WAPAdapter/group/WPWAPAdapter.mmp //../IMAdapter/group/IMAdapter.mmp -//../StreamingAdapter/group/StreamingAdapter.mmp -//../ProvisioningCx/group/ProvisioningCx.mmp -//../ProvisioningBC/group/ProvisioningBC.mmp -//../MbxNbrAdapter/group/MbxNbrAdapter.mmp - comment ends here */ +../StreamingAdapter/group/StreamingAdapter.mmp +../MbxNbrAdapter/group/MbxNbrAdapter.mmp + //../AuthtypePlugin/group/Authtypeplugin.mmp diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp --- a/omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp Fri Jun 11 14:27:59 2010 +0300 @@ -74,8 +74,7 @@ LIBRARY edbms.lib LIBRARY centralrepository.lib LIBRARY cmmanager.lib -LIBRARY commdb.lib -LIBRARY apengine.lib +LIBRARY commdb.lib DEBUGLIBRARY flogger.lib diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/ProvisioningEngine/Src/WPAdapterUtil.cpp --- a/omaprovisioning/provisioning/ProvisioningEngine/Src/WPAdapterUtil.cpp Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/WPAdapterUtil.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -29,7 +29,6 @@ #include #include "CWPInternetAPDB.h" -#include #include "ProvisioningDebug.h" #include #include @@ -389,20 +388,21 @@ TBuf Orig1; Orig1.Copy(Orig); - CCommsDatabase* commDb = CCommsDatabase::NewL(); - CleanupStack::PushL( commDb ); - CApUtils* aputils = CApUtils::NewLC( *commDb ); - - TUint32 apid = 0; - //Get IAP ID from WAPID - TRAPD( ERROR, apid = aputils->IapIdFromWapIdL( aAPId ) ); + RCmManagerExt cmmanagerExt; + cmmanagerExt.OpenL(); + CleanupClosePushL(cmmanagerExt); + RCmConnectionMethodExt cm; + cm = cmmanagerExt.ConnectionMethodL( aAPId ); + CleanupClosePushL( cm ); + TUint apId = 0; + TRAPD( ERROR, apId = cm.GetIntAttributeL(CMManager::ECmIapId) ); User::LeaveIfError(ERROR); //Set AP to SNAP and DB - TRAPD(err,SetAPtoDBandSNAPL(apid, Orig1)); + TRAPD(err,SetAPtoDBandSNAPL(apId, Orig1)); User::LeaveIfError(err); - CleanupStack::PopAndDestroy(2); //aputils, commDb + CleanupStack::PopAndDestroy(2); //cm, cmmanagerExt FLOG( _L( "[Provisioning] WPAdapterUtil::SetAPDetailsL: done" ) ); diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/ProvisioningHandler/Src/CWPMessage.cpp --- a/omaprovisioning/provisioning/ProvisioningHandler/Src/CWPMessage.cpp Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/ProvisioningHandler/Src/CWPMessage.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -225,16 +225,16 @@ rep->Get( KOMAProvAuthFailMsgHandling, auth_value ); delete rep; - if(auth_value == 1) + /*if(auth_value == 1) StoreMsgclass0L(R_TEXT_AUTHENTICATION_FAILED); else - StoreMsgL(R_TEXT_AUTHENTICATION_FAILED); + StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);*/ User::Leave( KErrAccessDenied ); } else { - StoreMsgL(R_TEXT_AUTHENTICATION_FAILED); + //StoreMsgL(R_TEXT_AUTHENTICATION_FAILED); User::Leave( KErrAccessDenied ); } } @@ -271,17 +271,17 @@ rep->Get( KOMAProvAuthFailMsgHandling, auth_value ); delete rep; - if(auth_value == 1) + /*if(auth_value == 1) StoreMsgclass0L(R_TEXT_AUTHENTICATION_FAILED); else - StoreMsgL(R_TEXT_AUTHENTICATION_FAILED); + StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);*/ User::Leave( KErrAccessDenied ); } else { - StoreMsgL(R_TEXT_AUTHENTICATION_FAILED); + //StoreMsgL(R_TEXT_AUTHENTICATION_FAILED); User::Leave( KErrAccessDenied ); } break; diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/accesspointadapter/Inc/CWPAPNapdef.h --- a/omaprovisioning/provisioning/accesspointadapter/Inc/CWPAPNapdef.h Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/accesspointadapter/Inc/CWPAPNapdef.h Fri Jun 11 14:27:59 2010 +0300 @@ -39,8 +39,9 @@ class CWPParameter; class CCommsDatabase; class EAPSettings; -class CertificateEntry; +class EapCertificateEntry; class RCmManagerExt; +class TEapExpandedType; // CLASS DECLARATION @@ -55,7 +56,7 @@ TBuf8 iEapTypeString; TBuf8 iEncapsulatingExpandedEapId; EAPSettings* iEAPSettings; - CertificateEntry* iCertificate; + EapCertificateEntry* iCertificate; }; struct SECssID @@ -227,7 +228,7 @@ /** * ConvertEAPStringToIds */ - void ConvertEAPStringToIds(const TDesC& aEAPString, TDes8& aExpandedId, TUint& aId); + void ConvertEAPStringToIds(const TDesC& aEAPString, TDes8& aExpandedId, TEapExpandedType& aID); public: // new function /** diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/accesspointadapter/Src/CWPAPNapdef.cpp --- a/omaprovisioning/provisioning/accesspointadapter/Src/CWPAPNapdef.cpp Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/accesspointadapter/Src/CWPAPNapdef.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -39,9 +39,11 @@ #include #include #include - +#include #include #include +#include +#include const TUint KIapColumn = 0x00000100; const TUint KLingerColumn = 0x00000200; @@ -610,7 +612,7 @@ { CEapTypeElement* newEap = new (ELeave) CEapTypeElement; newEap->iEAPSettings = new (ELeave) EAPSettings; - newEap->iCertificate = new (ELeave) CertificateEntry; + newEap->iCertificate = new (ELeave) EapCertificateEntry; iEapTypeArray.AppendL(newEap); } else if(aCharacteristic.Name().Compare( SECSSID ) == 0) @@ -1028,7 +1030,7 @@ { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EAPTYPE" ) ); - ConvertEAPStringToIds( value, eap->iEapTypeString, reinterpret_cast ( eap->iEAPSettings->iEAPType ) ); + ConvertEAPStringToIds( value, eap->iEapTypeString, eap->iEAPSettings->iEAPExpandedType ); } else if( ( aParameter.Name().Compare( EAPUSERNAME ) ) == 0 ) @@ -1038,6 +1040,8 @@ { eap->iEAPSettings->iUsername = value; eap->iEAPSettings->iUsernamePresent = ETrue; + eap->iEAPSettings->iUseAutomaticUsernamePresent = ETrue; + eap->iEAPSettings->iUseAutomaticUsername = EFalse; } }// else if else if( ( aParameter.Name().Compare( EAPPASSWORD ) ) == 0 ) @@ -1047,6 +1051,8 @@ { eap->iEAPSettings->iPassword = value; eap->iEAPSettings->iPasswordPresent = ETrue; + eap->iEAPSettings-> iShowPassWordPromptPresent = ETrue; + eap->iEAPSettings-> iShowPassWordPrompt = EFalse; } }// else if else if( ( aParameter.Name().Compare( EAPREALM ) ) == 0 ) @@ -1057,6 +1063,8 @@ { eap->iEAPSettings->iRealm = value; eap->iEAPSettings->iRealmPresent = ETrue; + eap->iEAPSettings->iUseAutomaticRealmPresent = ETrue; + eap->iEAPSettings->iUseAutomaticRealm = EFalse; } }// else if else if( ( aParameter.Name().Compare( EAPUSEPSEUD ) ) == 0 ) @@ -1085,7 +1093,8 @@ { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EAPENCAPS" ) ); - TUint dummy; + + TEapExpandedType dummy; ConvertEAPStringToIds( value, eap->iEncapsulatingExpandedEapId, dummy ); }// else if @@ -1204,17 +1213,16 @@ { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EAPISSNAME" ) ); - eap->iCertificate->iSubjectName = value; - eap->iCertificate->iSubjectNamePresent = ETrue; + eap->iCertificate->SetSubjectName(value); + eap->iCertificate->SetSubjectNamePresent(); }// else if else if( ( aParameter.Name().Compare( EAPSUBNAME ) ) == 0 ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EAPSUBNAME" ) ); - eap->iCertificate->iIssuerName = value; - eap->iCertificate->iIssuerNamePresent = ETrue; - + eap->iCertificate->SetIssuerName(value); + eap->iCertificate->SetIssuerNamePresent(); }// else if else if( ( aParameter.Name().Compare( EAPCERTTYPE ) ) == 0 ) @@ -1224,22 +1232,26 @@ { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EEapSim" ) ); - eap->iCertificate->iCertType = CertificateEntry::ECA; + eap->iCertificate->SetCertType(EapCertificateEntry::ECA); + eap->iEAPSettings-> iUseAutomaticCACertificatePresent = ETrue; + eap->iEAPSettings-> iUseAutomaticCACertificate = EFalse; } else { - eap->iCertificate->iCertType = CertificateEntry::EUser; + eap->iCertificate->SetCertType(EapCertificateEntry::EUser); } // Certificates must be present since this field was added - eap->iEAPSettings->iCertificatesPresent = ETrue; + eap->iEAPSettings->iCertificatesPresent = ETrue; + eap->iCertificate->SetIsEnabledPresent(); + eap->iCertificate->SetIsEnabled(ETrue) ; }// else if else if( ( aParameter.Name().Compare( EAPSERNUM ) ) == 0 ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EAPSERNUM" ) ); - eap->iCertificate->iSerialNumber = value; - eap->iCertificate->iSerialNumberPresent = ETrue; + eap->iCertificate->SetSerialNumber(value); + eap->iCertificate->SetSerialNumberPresent(); }// else if else if( ( aParameter.Name().Compare( EAPSUBKEYID ) ) == 0 ) @@ -1331,11 +1343,13 @@ break; } } + TBuf8 keyIdentifier; + keyIdentifier.Copy(key); // store key value only if no errors occurred if (err == KErrNone) { - eap->iCertificate->iSubjectKeyID.Copy(key); - eap->iCertificate->iSubjectKeyIDPresent = ETrue; + eap->iCertificate->SetSubjectKeyId(keyIdentifier); + eap->iCertificate->SetSubjectKeyIdPresent(); eap->iEAPSettings->iCertificatesPresent = ETrue; } } @@ -1344,8 +1358,8 @@ else if( ( aParameter.Name().Compare( EAPTHUMBPRINT ) ) == 0 ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::HandleEAPParametersL EAPTHUMBPRINT" ) ); - eap->iCertificate->iThumbprintPresent = ETrue; - eap->iCertificate->iThumbprint = value; + eap->iCertificate->SetThumbprintPresent(); + eap->iCertificate->SetThumbprint(value); }// else if } @@ -1589,7 +1603,7 @@ if ( eap->iEAPSettings->iCertificatesPresent ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::SaveWlanDataL Certificate was present." ) ); - eap->iEAPSettings->iCertificates.AppendL( *eap->iCertificate ); + eap->iEAPSettings->iCertificates.Append( eap->iCertificate ); } // Save EAP list @@ -1613,23 +1627,23 @@ } } - - // Set iEncapsulatingEapTypes - for ( TInt j = 0; j < iEapTypeArray.Count(); j++ ) - { - // Check if any method has this method as the encapsulating method - if ( eap->iEapTypeString == iEapTypeArray[j]->iEncapsulatingExpandedEapId ) - { - // Append this method to iEncapsulatedEAPType - eap->iEAPSettings->iEncapsulatedEAPTypes.Append( iEapTypeArray[j]->iEAPSettings->iEAPType ); - eap->iEAPSettings->iEncapsulatedEAPTypesPresent = ETrue; - } - } - + // Set iEncapsulatingEapTypes + for ( TInt j = 0; j < iEapTypeArray.Count(); j++ ) + { + // Check if any method has this method as the encapsulating method + if ( eap->iEapTypeString == iEapTypeArray[j]->iEncapsulatingExpandedEapId ) + { + // Append this method to iEncapsulatedEAPType + eap->iEAPSettings->iEnabledEncapsulatedEAPExpandedTypes.Append( iEapTypeArray[j]->iEAPSettings->iEAPExpandedType ); + eap->iEAPSettings->iEnabledEncapsulatedEAPExpandedTypesPresent = ETrue; + } + } + FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::SaveWlanDataL save EAP settings CEapType::NewL" ) ); CEapType* eapType = NULL; - TRAPD( error, ( eapType = CEapType::NewL( eap->iEapTypeString, ELan, serviceId ) ) ); + + TRAPD( error, ( eapType = CEapType::NewL( ELan, serviceId, eap->iEAPSettings->iEAPExpandedType ) ) ); if ( ( error == KErrNone ) && eapType ) { @@ -1638,8 +1652,8 @@ // Check if this type is tunneled if ( eap->iEncapsulatingExpandedEapId.Length() > 0 ) { - // It is tunneled. Take the last byte of the expanded id. - eapType->SetTunnelingType( eap->iEncapsulatingExpandedEapId[KExpandedEapIdLength - 1] ); + // It is tunneled. + eapType->SetTunnelingType( eap->iEncapsulatingExpandedEapId); } @@ -1678,14 +1692,19 @@ if ( ch == '+' ) ++numPlus; else if ( ch == '-' ) ++numMinus; } - - // each entry consumes 8 bytes in binary format - HBufC8* enabledEAPPlugin = HBufC8::NewL( 8 * numPlus ); - CleanupStack::PushL( enabledEAPPlugin ); + // load general EAP settings If + CEapGeneralSettings* genSettings; + genSettings = CEapGeneralSettings::NewL(ELan, serviceId); + CleanupStack::PushL( genSettings ); + + // get lists of enabled/disabled EAPs for the IAP - HBufC8* disabledEAPPlugin = HBufC8::NewL( 8 * numMinus ); - CleanupStack::PushL( disabledEAPPlugin ); - + RArray enabledEapMethods; + RArray disabledEapMethods; + + enabledEapMethods.Reset(); + disabledEapMethods.Reset(); + lex.Assign( eapList ); while ( !lex.Eos() ) @@ -1695,9 +1714,6 @@ if ( lex.Val( implUid ) != KErrNone || !implUid ) { - // if the old string is corrupted, null out both lists - enabledEAPPlugin->Des().Zero(); - disabledEAPPlugin->Des().Zero(); break; } @@ -1708,36 +1724,28 @@ if ( implUid > 0 ) { - enabledEAPPlugin->Des().Append( - Abs( implUid ) == KPlainMsChapV2ImplUid? - KMsChapV2Padding: KPadding ); - enabledEAPPlugin->Des().Append( Abs( implUid ) ); + TBuf8 tempbuf; + if(Abs( implUid ) == KPlainMsChapV2ImplUid) + { + tempbuf.Append(KMsChapV2Padding); + } + else + { + tempbuf.Append(KPadding); + } + tempbuf.Append(Abs( implUid )); + TEapExpandedType expandedTypebuf(tempbuf); + enabledEapMethods.Append(expandedTypebuf); } - else if (implUid < 0 ) - { - disabledEAPPlugin->Des().Append( - Abs( implUid ) == KPlainMsChapV2ImplUid? - KMsChapV2Padding: KPadding ); - disabledEAPPlugin->Des().Append( Abs( implUid ) ); - } - + // swallow the delimiter (',') lex.Get(); } - - - - wLanServiceTable->WriteTextL( TPtrC( WLAN_ENABLED_EAPS ), - enabledEAPPlugin? - (const TDesC8&)*enabledEAPPlugin: - (const TDesC8&)KNullDesC8 ); + + genSettings->SetEapMethods(enabledEapMethods, disabledEapMethods); + + CleanupStack::PopAndDestroy( genSettings ); - wLanServiceTable->WriteTextL( TPtrC( WLAN_DISABLED_EAPS ), - disabledEAPPlugin? - (const TDesC8&)*disabledEAPPlugin: - (const TDesC8&)KNullDesC8 ); - CleanupStack::PopAndDestroy( disabledEAPPlugin ); - CleanupStack::PopAndDestroy( enabledEAPPlugin ); @@ -1933,68 +1941,68 @@ } -void CWPAPNapdef::ConvertEAPStringToIds( const TDesC& aEAPString, TDes8& aExpandedId, TUint& aId) +void CWPAPNapdef::ConvertEAPStringToIds( const TDesC& aEAPString, TDes8& aExpandedId, TEapExpandedType& aID) { if ( aEAPString == KEAPSIM ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapSim" ) ); - aExpandedId.Copy( KEapSimTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapSim; + aExpandedId.Copy( KEapSimTypeId, KExpandedEapIdLength ); + aID = *EapExpandedTypeSim.GetType(); } else if( aEAPString == KEAPAKA ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapAka" ) ); aExpandedId.Copy( KEapAkaTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapAka; + aID = *EapExpandedTypeAka.GetType(); } else if( aEAPString == KEAPTLS ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapTls" ) ); aExpandedId.Copy( KEapTlsTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapTls; + aID = *EapExpandedTypeTls.GetType(); } else if( aEAPString == KEAPPEAP ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapPeap" ) ); aExpandedId.Copy( KEapPeapTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapPeap; + aID = *EapExpandedTypePeap.GetType(); } else if( aEAPString == KEAPTTLS ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapTtls" ) ); aExpandedId.Copy( KEapTtlsTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapTtls; + aID = *EapExpandedTypeTtls.GetType(); } else if( aEAPString == KEAPLEAP ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapLeap" ) ); aExpandedId.Copy( KEapLeapTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapLeap; + aID = *EapExpandedTypeLeap.GetType(); } else if( aEAPString == KEAPMSCHAPV2 ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapMschapv2" ) ); aExpandedId.Copy( KEapMschapv2TypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapMschapv2; + aID = *EapExpandedTypeMsChapv2.GetType(); } else if( aEAPString == KEAPGTC ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapGtc" ) ); aExpandedId.Copy( KEapGtcTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapGtc; + aID = *EapExpandedTypeGtc.GetType(); } else if( aEAPString == KEAPFAST ) { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapFast" ) ); aExpandedId.Copy( KEapFastTypeId, KExpandedEapIdLength ); - aId = EAPSettings::EEapFast; + aID = *EapExpandedTypeFast.GetType(); } else { FLOG( _L( "[AccesspointAdapter] CWPAPNapdef::ConvertEAPStringToIds EEapNone" ) ); aExpandedId.Copy( KEapNoneId, KExpandedEapIdLength ); - aId = EAPSettings::EEapNone; + aID = *EapExpandedTypeNone.GetType(); } } diff -r 5d0ec111abfc -r 0deca9b72b62 omaprovisioning/provisioning/accesspointadapter/group/WPAPAdapter.mmp --- a/omaprovisioning/provisioning/accesspointadapter/group/WPAPAdapter.mmp Thu May 27 13:43:36 2010 +0300 +++ b/omaprovisioning/provisioning/accesspointadapter/group/WPAPAdapter.mmp Fri Jun 11 14:27:59 2010 +0300 @@ -67,6 +67,9 @@ LIBRARY ecom.lib LIBRARY centralrepository.lib LIBRARY cmmanager.lib +LIBRARY eapsymbiantools.lib +LIBRARY eaptools.lib +LIBRARY eaptrace.lib DEBUGLIBRARY flogger.lib // Only in debug builds // End of File diff -r 5d0ec111abfc -r 0deca9b72b62 policymanagement/pmdmadapter/src/pmadapter.cpp --- a/policymanagement/pmdmadapter/src/pmadapter.cpp Thu May 27 13:43:36 2010 +0300 +++ b/policymanagement/pmdmadapter/src/pmadapter.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -771,7 +771,7 @@ TBase64 B64Coder; HBufC8 *target = HBufC8::NewLC( ( size * 6 ) / 3 ); TPtr8 targetPtr( target->Des() ); - B64Coder.Encode( *data, targetPtr ); + B64Coder.PortableEncode( *data, targetPtr ); object->InsertL( 0, ptr ); CleanupStack::PopAndDestroy( 3, &fs ); ret = EOk; diff -r 5d0ec111abfc -r 0deca9b72b62 policymanagement/policyengine/policyengineserver/src/TrustedSession.cpp --- a/policymanagement/policyengine/policyengineserver/src/TrustedSession.cpp Thu May 27 13:43:36 2010 +0300 +++ b/policymanagement/policyengine/policyengineserver/src/TrustedSession.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -475,7 +475,7 @@ TBase64 base64; HBufC8 * base64coded = HBufC8::NewLC( pck.Length() * 3); TPtr8 base64Ptr = base64coded->Des(); - User::LeaveIfError( base64.Encode( pck, base64Ptr)); + User::LeaveIfError( base64.PortableEncode( pck, base64Ptr)); CAttributeValue * aliasValue = CAttributeValue::NewL( base64Ptr, PolicyLanguage::NativeLanguage::AttributeValues::StringDataType); CleanupStack::PopAndDestroy( base64coded); diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/devicemgmt_dialogs_api/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/devicemgmt_dialogs_api/group/bld.inf Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,27 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: File that exports the files belonging to +: Adaptive History List API +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +../inc/devicedialogconsts.h APP_LAYER_PLATFORM_EXPORT_PATH(devicedialogconsts.h) diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/devicemgmt_dialogs_api/inc/devicedialogconsts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/devicemgmt_dialogs_api/inc/devicedialogconsts.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,79 @@ +/* + * devicedialogconsts.h + * + * Created on: Apr 20, 2010 + * Author: gnataraj + */ + +#ifndef DEVICEDIALOGCONSTS_H_ +#define DEVICEDIALOGCONSTS_H_ + + +/// Number of retries for PIN + const TInt KPinRetries = 3; + + // PIN Max Length + const int KCPPinMaxLength = 20; + +//Strings for CP PIN Query Dialog +const QString pinquery = "omacppinquery"; +const QString returnkey = "returnkey"; + +const char devicedialogtype[] = "com.nokia.hb.devicemanagementdialog/1.0"; +_LIT(KDeviceDialogType, "com.nokia.hb.devicemanagementdialog/1.0"); + +// Keys for the QVariantMap + +const QString keydialog = "Dialog"; +const QString keyparam1 = "Param1"; +const QString keyparam2 = "Param2"; +const QString keyparam3 = "Param3"; + +// Enumerations to show the type of dialog to be shown from FOTA. The Enumeration ranges from 1 to 100. + +enum TFwUpdNoteTypes + { + //Download related notes + EFwDLNeedMoreMemory = 100, + EFwDLConnectionFailure, + EFwDLGeneralFailure, + + //Updated related notes + EFwUpdNotEnoughBattery, + EFwUpdDeviceBusy, + EFwUpdSuccess, + EFwUpdNotCompatible, + EFwUpdRebootNote, + + //Download related query + EFwUpdResumeDownload, + + //Update related query + EFwUpdResumeUpdate + + }; + + enum TOmaCPPinDialogTypes + { + //Download related notes + EOmaCPPinDialog = 200 + + }; + + +enum THbNotifierKeys + { + EHbNotifierStatus = 10, + EHbNotifierStatusReturn // Return the content of actual status value accepted from UI + }; + +enum TSoftkeys + { + EHbLSK = 1, + EHbMSK, + EHbRSK + }; + + + +#endif /* DEVICEDIALOGCONSTS_H_ */ diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/group/bld.inf --- a/remotemgmt_plat/group/bld.inf Thu May 27 13:43:36 2010 +0300 +++ b/remotemgmt_plat/group/bld.inf Fri Jun 11 14:27:59 2010 +0300 @@ -50,3 +50,4 @@ #include "../dcmo_adapter_api/group/bld.inf" #include "../dcmo_control_api/group/bld.inf" #include "../ds_capability_mgmt_plugin_api/group/bld.inf" +#include "../devicemgmt_dialogs_api/group/bld.inf" \ No newline at end of file diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/group/bld.inf --- a/remotemgmt_plat/oma_provisioning_engine_api/group/bld.inf Thu May 27 13:43:36 2010 +0300 +++ b/remotemgmt_plat/oma_provisioning_engine_api/group/bld.inf Fri Jun 11 14:27:59 2010 +0300 @@ -25,3 +25,9 @@ PRJ_EXPORTS ../inc/CWPEngine.h MW_LAYER_PLATFORM_EXPORT_PATH(CWPEngine.h) +../inc/CWPBootstrap.h MW_LAYER_PLATFORM_EXPORT_PATH(CWPBootstrap.h) +../inc/CWPPushMessage.h MW_LAYER_PLATFORM_EXPORT_PATH(CWPPushMessage.h) +../inc/MWPPhone.h MW_LAYER_PLATFORM_EXPORT_PATH(MWPPhone.h) +../inc/ProvisioningInternalCRKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(ProvisioningInternalCRKeys.h) +../inc/WPPhoneFactory.h MW_LAYER_PLATFORM_EXPORT_PATH(WPPhoneFactory.h) +../inc/MWPContextManager.h MW_LAYER_PLATFORM_EXPORT_PATH(MWPContextManager.h) \ No newline at end of file diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/inc/CWPBootstrap.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/oma_provisioning_engine_api/inc/CWPBootstrap.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,185 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: CWPBootstrap loads/saves settings. +* +*/ + + +#ifndef CWPBOOTSTRAP_H +#define CWPBOOTSTRAP_H + +// INCLUDES +#include "MWPVisitor.h" +#include +#include + +// FORWARD DECLARATIONS +class CDesC16Array; +class CWPPushMessage; +class CWPEngine; + +// CLASS DEFINITION + +/** +* Utility class for reading/writing data store. +* +* @lib ProvisioningEngine +* @since 2.0 +*/ +class CWPBootstrap : public CBase, private MWPVisitor + { + public: + enum TBootstrapResult + { + // The message does not contain a bootstrap. + ENoBootstrap, + + // The message contains a bootstrap, but no authentication + ENotAuthenticated, + + // The message contains a bootstrap, and a PIN is required. + EPinRequired, + + // The PIN is wrong. + EAuthenticationFailed, + + // Bootstrap already exists + EBootstrapExists, + + // Authentication succeeded. + ESucceeded + }; + + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aIMSI The SIM card number + */ + IMPORT_C static CWPBootstrap* NewL( + const TDesC& aIMSI ); + + /** + * Two-phased constructor. + * @param aIMSI The SIM card number + */ + static CWPBootstrap* NewLC( + const TDesC& aIMSI ); + + /** + * Destructor. + */ + ~CWPBootstrap(); + + public: + /** + * Authenticates a message and tries to perform a + * bootstrap if the message authenticated. If the + * message has previously been authenticated, only + * bootstrap is performed. + * @param aMessage The message to authenticate + * @param The Provisioning Engine + * @param aPIN The PIN. If empty, no PIN is used. + * @return Result of bootstrap. If EPinRequired, + * a PIN must be provided. + */ + IMPORT_C TBootstrapResult BootstrapL( + CWPPushMessage& aMessage, + CWPEngine& aEngine, + const TDesC& aPIN ); + + /** + * The contents of the ProvURL field. + * @return ProvURL + */ + IMPORT_C const TDesC& TPS() const; + + private: // From MWPVisitor + void VisitL(CWPCharacteristic& aCharacteristic); + void VisitL(CWPParameter& aParameter); + void VisitLinkL(CWPCharacteristic& aCharacteristic ); + + private: + /** + * C++ default constructor. + * @param aIMSI The SIM card number + */ + CWPBootstrap( const TDesC& aIMSI ); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + /** + * Performs a bootstrap. + * @param aEngine The Provisioning Engine + * @return Result of bootstrap. + */ + TBootstrapResult DoBootstrapL( CWPEngine& aEngine ); + + /** + * Processes bootstrap when the message has to be + * authenticated first. + * @param aMessage The message to authenticate + * @param aPIN The PIN. If empty, no PIN is used. + * @param aEngine The Provisioning Engine + * @return Result of bootstrap. If EPinRequired, + * a PIN must be provided. + */ + TBootstrapResult DoAuthenticateL( CWPPushMessage& aMessage, + const TDesC& aPIN, + CWPEngine& aEngine ); + + /** + * Saves the settings. + * @param aEngine The Provisioning Engine + */ + void SaveL( CWPEngine& aEngine ); + + /** + * Loads the settings. + * @param aEngine The Provisioning Engine + */ + void LoadL( CWPEngine& aEngine ); + + /** + * Checks if settings have been loaded. + * @return ETrue if settings have been loaded + */ + TBool Loaded() const; + + private: + + /// ETrue if settings have been loaded + TBool iLoaded; + + /// The trusted provisioning server. Owns. + HBufC* iTPS; + + /// The name of the bootstrap. Owns. + HBufC* iName; + + /// The IMSI + RMobilePhone::TMobilePhoneSubscriberId iIMSI; + + /// The proxies. Owns. + CDesC16Array* iProxies; + + /// The ID of the current characteristic + TInt iCurrentChar; + + }; + +#endif /* CWPBOOTSTRAP_H */ diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/inc/CWPPushMessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/oma_provisioning_engine_api/inc/CWPPushMessage.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,422 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: CWPPushMessage helps in saving/restoring a push message. +* +*/ + + +#ifndef CWPPUSHMESSAGE_H +#define CWPPUSHMESSAGE_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CMsvStore; +class CHTTPResponse; +class RWriteStream; + +// CONSTANTS + +// Authentication result: Authenticated +const TInt KWPAuthResultAuthenticated = 0; + +// Authentication result: PIN required, but not supplied +const TInt KWPAuthResultPinRequired = 1; + +// Authentication result: Authentication failed +const TInt KWPAuthResultAuthenticationFailed = 2; + +// Authentication result: No authentication contained in message +const TInt KWPAuthResultNoAuthentication = 3; + +// Security parameter NETWPIN +const TUint8 KSECNETWPIN = 0x00; + +// Security parameter USERPIN +const TUint8 KSECUSERPIN = 0x01; + +// Security parameter USERNETWPIN +const TUint8 KSECUSERNETWPIN = 0x02; + +// Security parameter USERPINMAC +const TUint8 KSECUSERPINMAC = 0x03; + +// No security parameter +const TUint8 KSECNONE = 0xff; + + +// CLASS DECLARATION + +/** +* CWPPushMessage helps in saving/restoring a push message. +* +* @lib ProvisioningEngine +* @since 2.0 +*/ +class CWPPushMessage : public CBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + IMPORT_C static CWPPushMessage* NewL(); + + /** + * Two-phased constructor. + */ + IMPORT_C static CWPPushMessage* NewLC(); + + /** + * Destructor. + */ + ~CWPPushMessage(); + + public: // New methods + + /** + * Stores the message to a message store. + * @param aStore The store. + */ + IMPORT_C void StoreL( CMsvStore& aStore ) const; + + /** + * Restores the message from a message store. + * @param aStore The store. + */ + IMPORT_C void RestoreL( CMsvStore& aStore ); + + /** + * Externalizes the message to a stream. + * @param aStream The stream + */ + IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; + + /** + * Internalizes the message from a stream. + * @param aStream The stream. + */ + IMPORT_C void InternalizeL( RReadStream& aStream ); + + /** + * Sets the message header and body. + * @param aHeader The message header + * @param aBody The message body + */ + IMPORT_C void SetL( const TDesC8& aHeader, const TDesC8& aBody ); + + /** + * Sets the message header and body. Ownership is transferred. + * @param aHeader The message header + * @param aBody The message body + */ + IMPORT_C void Set( HBufC8* aHeader, HBufC8* aBody ); + + /** + * Sets the originator of the message. + * @param aOrig Originator of the message + */ + IMPORT_C void SetOriginatorL( const TDesC8& aOrig ); + + /** + * Returns the message header. + * @return The message header + */ + IMPORT_C const TDesC8& Header() const; + + /** + * Returns the message body. + * @return The message body + */ + IMPORT_C const TDesC8& Body() const; + + /** + * Returns the originator of the message. + * @return The originator + */ + IMPORT_C const TDesC8& Originator() const; + + /** + * Sets the authenticated flag. + * @param aAuthenticated ETrue to set the message authenticated. + */ + IMPORT_C void SetAuthenticated( TBool aAuthenticated ); + + /** + * Returns ETrue if the message is authenticated. + * @return Whether the message is authenticated. + */ + IMPORT_C TBool Authenticated() const; + + /** + * Sets the saved flag. + * @param aSaved ETrue to set the message saved. + */ + IMPORT_C void SetSaved( TBool aSaved ); + + /** + * Returns ETrue if the message is saved. + * @return Whether the message is saved. + */ + IMPORT_C TBool Saved() const; + + /** + * Returns the initiator URI of the message. + * @return Initiator URI + */ + IMPORT_C const TDesC8& InitiatorURI() const; + + /** + * Returns the MAC of the message. + * @return MAC + */ + IMPORT_C const TDesC8& MAC() const; + + /** + * Returns the SEC of the message. + * @return SEC + */ + IMPORT_C TUint SEC() const; + + /** + * Returns the push flag of the message. + * @return Push flag + */ + IMPORT_C TInt PushFlag() const; + + /** + * Parse the header. + */ + IMPORT_C void ParseHeaderL(); + + /** + * Try to authenticate the message with HMAC. + * @param aIMSI The SIM card number + * @param aPIN The PIN entered by user + * @return The result of authentication + */ + IMPORT_C TInt AuthenticateL( const TDesC& aIMSI, const TDesC& aPIN ); + + private: + /** + * C++ default constructor. + */ + CWPPushMessage(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + private: + /** + * Parse the content-type header. + * @param aPointer Lexer pointing to content-type header. + */ + void ParseContentType( TLex8& aPointer ); + + /** + * Parse the content-type header. + * @param aPointer Lexer pointing to content-type header. + */ + void ParseInitiatorURI( TLex8& aPointer ); + + /** + * Parse the content-type header. + * @param aPointer Lexer pointing to content-type header. + */ + void ParsePushFlag( TLex8& aPointer ); + + /** + * Retrieve a Short-integer. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The short integer + */ + TUint GetShortInteger( TLex8& aPointer ) const; + + /** + * Retrieve a Long-integer. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The long integer. + */ + TInt64 GetLongInteger( TLex8& aPointer ) const; + + /** + * Retrieve a Text-string. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The string + */ + TPtrC8 GetTextString( TLex8& aPointer ) const; + + /** + * Retrieve a Text-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The string + */ + TPtrC8 GetTextValue( TLex8& aPointer ) const; + + /** + * Retrieve a Token-text. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The text string + */ + TPtrC8 GetTokenText( TLex8& aPointer ) const; + + /** + * Retrieve a Q-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The integer + */ + TUint GetQValue( TLex8& aPointer ) const; + + /** + * Retrieve a Well-known-charset value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The character set number + */ + TInt64 GetWellKnownCharset( TLex8& aPointer ) const; + + /** + * Retrieve a Version-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The version + */ + TUint GetVersionValue( TLex8& aPointer ) const; + + /** + * Retrieve a Constrained-encoding value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The constrained encoding value + */ + TUint GetConstrainedEncoding( TLex8& aPointer ) const; + + /** + * Retrieve an Integer-Value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The integer value + */ + TInt64 GetIntegerValue( TLex8& aPointer ) const; + + /** + * Check if lexer points to an Integer-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return ETrue if lexer points to an integer + */ + TBool IsIntegerValue( TLex8& aPointer ) const; + + /** + * Retrieve a Field-name. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return Field name + */ + TUint GetFieldName( TLex8& aPointer ) const; + + /** + * Retrieve a Delta-seconds-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The seconds found + */ + TInt64 GetDeltaSecondsValue( TLex8& aPointer ) const; + + /** + * Retrieve a No-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + */ + void GetNoValue( TLex8& aPointer ) const; + + /** + * Retrieve a Date-value. + * @see Wireless Session Protocol Specification WAP-230-WSP-20010705-a + * @param aPointer Lexer pointing to content-type header. + * @return The time value + */ + TTime GetDateValue( TLex8& aPointer ) const; + + /** + * Skip to content-type. + * @return The Content-Type header + */ + TPtrC8 ContentTypeHeader( CHTTPResponse& aResponse ) const; + + /** + * Skip to x-wap-initiator-uri. + * @return The X-WAP-Initiator-URI header + */ + TPtrC8 InitiatorURIHeader( CHTTPResponse& aResponse ) const; + + /** + * Skip to push-flag. + * @return The Push-Flag header + */ + TPtrC8 PushFlagHeader( CHTTPResponse& aResponse ) const; + + /** + * Converts a HEX ASCII strings to binary. + * @param aHex The hex ascii version + * @return The binary version + */ + HBufC8* PackLC( const TDesC8& aHex ) const; + + /** + * Create a HMAC key from the IMSI. + * @param aIMSI The IMSI + * @param aKey Space for HMAC key. + */ + void ConvertIMSIL( const TDesC& aIMSI, TPtr8& aKey ) const; + + private: // Data + /// The message body. Owns. + HBufC8* iBody; + + /// The message header. Owns. + CHTTPResponse* iHeader; + + /// The originator of the message. Owns. + HBufC8* iOriginator; + + /// Whether the message is authenticated + TBool iAuthenticated; + + /// Whether the message is saved + TBool iSaved; + + /// The initiator URI + TPtrC8 iInitiator; + + /// The security parameter + TUint iSEC; + + /// The MAC value. Owns. + TPtrC8 iMAC; + + /// The Push Flag + TInt iPushFlag; + }; + +#endif /* CWPPUSHMESSAGE_H */ diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/inc/MWPContextManager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/oma_provisioning_engine_api/inc/MWPContextManager.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,169 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Context manager interface. +* +*/ + + +#ifndef MWPCONTEXTMANAGER_H +#define MWPCONTEXTMANAGER_H + +// FORWARD DECLARATIONS +class HBufC16; +class MDesC16Array; +class CDesC16Array; +class MWPContextExtension; +class MWPContextExtensionArray; +class MWPContextObserver; + +// CONSTANTS +const TUint32 KWPMgrUidNoContext = 0xffffffff; + +// CLASS DECLARATION + +/** +* MWPContextManager declares an interface to be implemented by +* context managers. +* +* @lib ProvisioningEngine +* @since 2.0 + */ +class MWPContextManager + { + public: // Constructors and destructor + /** + * Destructor. + */ + virtual ~MWPContextManager() {}; + + /** + * Called after saving one setting. + * @param aExtension Extension interface for the saving adapter + * @param aItem Setting number + */ + virtual void SaveL( MWPContextExtension& aExtension, TInt aItem ) = 0; + + /** + * Creates a context. Leaves with KErrOverflow if the max. number of contexts + * has been reached. + * @param aName Name of the context + * @param aTPS TPS of the context + * @param aProxies Proxies that can be used in the context + * @return UID of the new context + */ + virtual TUint32 CreateContextL( const TDesC& aName, const TDesC& aTPS, + const MDesC16Array& aProxies ) = 0; + + /** + * Deletes a context. + * @param aArray The context extension array + * @param aUID UID of the context + */ + virtual void DeleteContextL( MWPContextExtensionArray& aArray, + TUint32 aUid ) = 0; + + /** + * Number of contexts available. + * @return Array of context uids. Ownership is transferred. + */ + virtual CArrayFix* ContextUidsL() = 0; + + /** + * Name of a context. + * @param aUid UID of the context. + * @return Context name. Ownership is transferred. + */ + virtual HBufC16* ContextNameL( TUint32 aUid ) = 0; + + /** + * TPS of a context. + * @param aUid UID of the context. + * @return TPS. Ownership is transferred. + */ + virtual HBufC16* ContextTPSL( TUint32 aUid ) = 0; + + /** + * Trusted proxies of a context. + * @param aUid UID of the context. + * @return Array of proxies. Ownership is transferred. + */ + virtual CDesC16Array* ContextProxiesL( TUint32 aUid ) = 0; + + /** + * Deletes a context data item. + * @param aArray The context extension array + * @param aUid UID of the context. + * @return ETrue if there is more data in the context + */ + virtual TBool DeleteContextDataL( MWPContextExtensionArray& aArray, TUint32 aUid ) = 0; + + /** + * Returns the number of context data items. Note that this + * count is an approximate and should not be relied on except + * for giving user progress feedback. + * @param aUid UID of the context + * @return The number of context data items + */ + virtual TInt ContextDataCountL( TUint32 aUid ) = 0; + + /** + * Returns the current context. + * @return Current context UID + */ + virtual TUint32 CurrentContextL() = 0; + + /** + * Sets the current context. + * @param aUID The UID of the context + */ + virtual void SetCurrentContextL( TUint32 aUid ) = 0; + + /** + * Returns a specific context. + * @param aTPS TPS whose context should be looked for + * @return The UID of the context + */ + virtual TUint32 ContextL( const TDesC& aTPS ) = 0; + + /** + * Checks if a context exists. + * @param aUid The UID of the context + * @return ETrue if context exists + */ + virtual TBool ContextExistsL( TUint32 aUid ) = 0; + + /** + * Checks if a context exists. + * @param aTPS The TPS of the context + * @return ETrue if context exists + */ + virtual TBool ContextExistsL( const TDesC& aTPS ) = 0; + + /** + * Register an observer to context information. + * @param aObserver The new observer + */ + virtual void RegisterContextObserverL( + MWPContextObserver* aObserver ) = 0; + + /** + * Unregister an observer to context information. + * @param aObserver The observer to unregister + * @return KErrNone, or an error code + */ + virtual TInt UnregisterContextObserver( + MWPContextObserver* aObserver ) = 0; + }; + +#endif /* MWPCONTEXTMANAGER_H */ diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/inc/MWPPhone.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/oma_provisioning_engine_api/inc/MWPPhone.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Phone interface for handler +* +*/ + + +#ifndef MWPPHONE_H +#define MWPPHONE_H + +// INCLUDES +#include +#include + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + +/** + * MWPPhone is an interface to telephony functionality. + * + * @since 2.0 + * @lib ProvisioningEngine + */ +class MWPPhone + { + public: + + /** + * Returns the IMSI. + * @return The IMSI + */ + virtual const RMobilePhone::TMobilePhoneSubscriberId& SubscriberId() const = 0; + + /** + * Returns the country code. + * @return Country code + */ + virtual const RMobilePhone::TMobilePhoneNetworkCountryCode& Country() const = 0; + + /** + * Returns the network id. + * @return Network id + */ + virtual const RMobilePhone::TMobilePhoneNetworkIdentity& Network() const = 0; + + /** + * Empty destructor. + */ + virtual ~MWPPhone() {}; + + }; + +#endif // MWPPHONE_H + +// End of File diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/inc/ProvisioningInternalCRKeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/oma_provisioning_engine_api/inc/ProvisioningInternalCRKeys.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Provisioning internal Central Repository keys +* +*/ + + +#ifndef PROVISIONINGINTERNALCRKEYS_H +#define PROVISIONINGINTERNALCRKEYS_H + +#include + +/****************************************************************************** +* Provisioning Variation API +* Keys under this category are used in defining Provisioning variation. +*/ +const TUid KCRUidOMAProvisioningLV = {0x101F87AA}; +const TUid KOMAProvAuthenticationLV = {0x101F87AA}; + +/** +* Provisioning Local Variation Flags. Values are defined in ProvisioningVariant.hrh. +*/ +const TUint32 KOMAProvisioningLVFlag = 0x00000000; +const TUint32 KOMAProvAuthenticationLVFlag = 0x00000001; +const TUint32 KOMAProvAuthFailMsgHandling = 0x00000002; +const TUint32 KOMAProvOriginatorContent = 0x00000003; + +#endif // PROVISIONINGINTERNALCRKEYS_H + +// End of file diff -r 5d0ec111abfc -r 0deca9b72b62 remotemgmt_plat/oma_provisioning_engine_api/inc/WPPhoneFactory.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remotemgmt_plat/oma_provisioning_engine_api/inc/WPPhoneFactory.h Fri Jun 11 14:27:59 2010 +0300 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: WPPhoneFactory can be used to create phone interface. +* +*/ + + +#ifndef WPPHONEFACTORY_H +#define WPPHONEFACTORY_H + +// FORWARD DECLARATIONS +class MWPPhone; + +// CLASS DEFINITION + +/** +* Factory class for phone interface. +* +* @lib ProvisioningEngine +* @since 2.0 +*/ +class WPPhoneFactory + { + public: + /** + * Creates all adapters and stores them in an array. + * @return Array of adapters. Ownership is transferred. + */ + IMPORT_C static MWPPhone* CreateL(); + + /** + * Creates all adapters and stores them in an array. + * @return Array of adapters. Ownership is transferred. + */ + IMPORT_C static MWPPhone* CreateLC(); + }; + +#endif /* WPPHONEFACTORY_H*/ \ No newline at end of file diff -r 5d0ec111abfc -r 0deca9b72b62 syncmlfw/common/sosserver/inc/PnpLogger.h --- a/syncmlfw/common/sosserver/inc/PnpLogger.h Thu May 27 13:43:36 2010 +0300 +++ b/syncmlfw/common/sosserver/inc/PnpLogger.h Fri Jun 11 14:27:59 2010 +0300 @@ -1,21 +1,22 @@ /* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* ============================================================================== +* Name : PnpLogger.h +* Part of : PnpProvisioningApp +* Description : This file defines logging interface macros +* Version : * -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file defines logging interface macros -* +* Copyright (c) 2004 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================== */ - #ifndef __LOGGER_H__ #define __LOGGER_H__ diff -r 5d0ec111abfc -r 0deca9b72b62 syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp --- a/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp Thu May 27 13:43:36 2010 +0300 +++ b/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp Fri Jun 11 14:27:59 2010 +0300 @@ -82,7 +82,6 @@ //RD_AUTO_RESTART LIBRARY commdb.lib LIBRARY esock.lib -LIBRARY apengine.lib LIBRARY cmmanager.lib //RD_AUTO_RESTART diff -r 5d0ec111abfc -r 0deca9b72b62 syncmlfw/common/syncagent/src/NSmlAgentBase.cpp --- a/syncmlfw/common/syncagent/src/NSmlAgentBase.cpp Thu May 27 13:43:36 2010 +0300 +++ b/syncmlfw/common/syncagent/src/NSmlAgentBase.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -133,7 +133,7 @@ clearTextPtr += *password; HBufC8* B64String = HBufC8::NewLC( clearText->Length() * 2 ); TPtr8 B64StringPtr( B64String->Des() ); - User::LeaveIfError( B64Coder.Encode( *clearText, B64StringPtr ) ); + User::LeaveIfError( B64Coder.PortableEncode( *clearText, B64StringPtr ) ); CleanupStack::Pop(); // B64String CleanupStack::PopAndDestroy( 3 ); //clearText, password, userName return B64String; @@ -190,7 +190,7 @@ userNamePasswordHash.Set( md5->Hash( *userNamePassword ) ); HBufC8* B64UserNamePasswordString = HBufC8::NewLC( userNamePasswordHash.Length() * 2 ); TPtr8 B64UserNamePasswordStringPtr( B64UserNamePasswordString->Des() ); - User::LeaveIfError( B64Coder.Encode( userNamePasswordHash, B64UserNamePasswordStringPtr ) ); + User::LeaveIfError( B64Coder.PortableEncode( userNamePasswordHash, B64UserNamePasswordStringPtr ) ); HBufC8* userNamePasswordNonce = HBufC8::NewLC( B64UserNamePasswordStringPtr.Length() + KColon.iTypeLength + nonce->Length() ); TPtr8 userNamePasswordNoncePtr = userNamePasswordNonce->Des(); userNamePasswordNoncePtr = B64UserNamePasswordStringPtr; @@ -202,7 +202,7 @@ finalHash.Set( md5->Hash( *userNamePasswordNonce ) ); HBufC8* B64String = HBufC8::NewLC( finalHash.Length() * 2 ); TPtr8 B64StringPtr( B64String->Des() ); - User::LeaveIfError( B64Coder.Encode( finalHash, B64StringPtr ) ); + User::LeaveIfError( B64Coder.PortableEncode( finalHash, B64StringPtr ) ); CleanupStack::Pop(); // B64String CleanupStack::PopAndDestroy( 8 ); //userNamePasswordNonce, B64userNamePasswordNonce, userNamePassword, nonce, nonceInUnicode, password, userName, md5 return B64String; diff -r 5d0ec111abfc -r 0deca9b72b62 syncmlfw/common/syncagent/src/nsmlauth.cpp --- a/syncmlfw/common/syncagent/src/nsmlauth.cpp Thu May 27 13:43:36 2010 +0300 +++ b/syncmlfw/common/syncagent/src/nsmlauth.cpp Fri Jun 11 14:27:59 2010 +0300 @@ -177,7 +177,7 @@ iB64Nonce = NULL; iB64Nonce = HBufC8::NewL( iNonce->Length() * 2 + 1 ); TPtr8 B64NoncePtr( iB64Nonce->Des() ); - User::LeaveIfError( B64Coder.Encode( *iNonce, B64NoncePtr ) ); + User::LeaveIfError( B64Coder.PortableEncode( *iNonce, B64NoncePtr ) ); return *iB64Nonce; } @@ -272,7 +272,7 @@ TBase64 B64Coder; B64Cred = HBufC8::NewLC( iCredential->Length() * 2 + 1 ); TPtr8 B64CredPtr( B64Cred->Des() ); - User::LeaveIfError( B64Coder.Encode( *iCredential, B64CredPtr ) ); + User::LeaveIfError( B64Coder.PortableEncode( *iCredential, B64CredPtr ) ); } else { diff -r 5d0ec111abfc -r 0deca9b72b62 syncmlfw/ds/settings/src/pcsuite/NSmlDSProfileRes.rss --- a/syncmlfw/ds/settings/src/pcsuite/NSmlDSProfileRes.rss Thu May 27 13:43:36 2010 +0300 +++ b/syncmlfw/ds/settings/src/pcsuite/NSmlDSProfileRes.rss Fri Jun 11 14:27:59 2010 +0300 @@ -120,7 +120,7 @@ profiledisplayname="Intellisync"; //username=""; //password=""; - serverurl="http://82.77.123.83:80/services/syncml"; + serverurl="http://82.77.123.71:8080/services/syncml"; serverid="Ovi.com"; profilehidden=0; transportid=0x101F99F0; @@ -158,7 +158,7 @@ CONTENTTYPE { adapter_implementation_uid = 0x101F8612; // Notes - clientdatasource = "C:Calendar"; + clientdatasource = "C:Note"; serverdatasource = "./Note/Unfiled"; synctype = ESmlTwoWay; filtervisibility = "h"; diff -r 5d0ec111abfc -r 0deca9b72b62 syncmlfw/rom/NSmlDMSync.iby --- a/syncmlfw/rom/NSmlDMSync.iby Thu May 27 13:43:36 2010 +0300 +++ b/syncmlfw/rom/NSmlDMSync.iby Fri Jun 11 14:27:59 2010 +0300 @@ -25,17 +25,17 @@ REM SyncML Device Management plug-in adapters -ECOM_PLUGIN(nsmldmdevdetailadapter.dll,nsmldmdevdetailadapter.rsc) -ECOM_PLUGIN(nsmldmdevinfoadapter.dll,nsmldmdevinfoadapter.rsc) -//ECOM_PLUGIN(nsmlinternetadapter.dll,nsmlinternetadapter.rsc) +REM ECOM_PLUGIN(nsmldmdevdetailadapter.dll,nsmldmdevdetailadapter.rsc) +REM ECOM_PLUGIN(nsmldmdevinfoadapter.dll,nsmldmdevinfoadapter.rsc) +REM ECOM_PLUGIN(nsmlinternetadapter.dll,nsmlinternetadapter.rsc) #ifdef __SYNCML_DM_1_1_2 -ECOM_PLUGIN(nsmldmsettingsadapter.dll,nsmldmsettingsadapter.rsc) +REM ECOM_PLUGIN(nsmldmsettingsadapter.dll,nsmldmsettingsadapter.rsc) #else -ECOM_PLUGIN(nsmldmsettingsadapter12.dll,nsmldmsettingsadapter12.rsc) +REM ECOM_PLUGIN(nsmldmsettingsadapter12.dll,nsmldmsettingsadapter12.rsc) #endif #ifdef FF_DM_STREAMING_ADAPTER -ECOM_PLUGIN(nsmldmstreamingadapter.dll,nsmldmstreamingadapter.rsc) +REM ECOM_PLUGIN(nsmldmstreamingadapter.dll,nsmldmstreamingadapter.rsc) #endif REM #ifdef FF_DM_BROWSER_ADAPTER