messagingapp/msgsettings/settingsview/src/mmssettingsprivate.cpp
changeset 52 12db4185673b
parent 44 36f374c67aa8
child 73 ecf6a73a9186
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
   125     mmsSetting->SaveSettingsL();
   125     mmsSetting->SaveSettingsL();
   126 
   126 
   127     CleanupStack::PopAndDestroy(3); // settings    
   127     CleanupStack::PopAndDestroy(3); // settings    
   128 }
   128 }
   129 
   129 
   130 void MmsSettingsPrivate::setMMSRetrieval(MsgSettingEngine::MmsRetrieval aRetrieval)
   130 void MmsSettingsPrivate::setMMSRetrievalL(MsgSettingEngine::MmsRetrieval aRetrieval)
   131 {
   131 {
   132     CEventHandler* pObserver = new (ELeave) CEventHandler();
   132     CEventHandler* pObserver = new (ELeave) CEventHandler();
   133     CleanupStack::PushL(pObserver);
   133     CleanupStack::PushL(pObserver);
   134 
   134 
   135     CMsvSession* mMsvSession = CMsvSession::OpenSyncL(*pObserver);
   135     CMsvSession* mMsvSession = CMsvSession::OpenSyncL(*pObserver);
   194     mMmsClient->StoreSettingsL();
   194     mMmsClient->StoreSettingsL();
   195 
   195 
   196     CleanupStack::PopAndDestroy(5);
   196     CleanupStack::PopAndDestroy(5);
   197 }
   197 }
   198 
   198 
   199 void MmsSettingsPrivate::setAnonymousMessages(TBool aAnonymous)
   199 void MmsSettingsPrivate::setAnonymousMessagesL(TBool aAnonymous)
   200 {
   200 {
   201     CMmsAccount* mMmsAccount = CMmsAccount::NewL();
   201     CMmsAccount* mMmsAccount = CMmsAccount::NewL();
   202     CleanupStack::PushL(mMmsAccount);
   202     CleanupStack::PushL(mMmsAccount);
   203 
   203 
   204     CMmsSettings* mMmsSetting = CMmsSettings::NewL();
   204     CMmsSettings* mMmsSetting = CMmsSettings::NewL();
   212     //save the settings
   212     //save the settings
   213     mMmsAccount->SaveSettingsL(*mMmsSetting);
   213     mMmsAccount->SaveSettingsL(*mMmsSetting);
   214     CleanupStack::PopAndDestroy(2);
   214     CleanupStack::PopAndDestroy(2);
   215 }
   215 }
   216 
   216 
   217 void MmsSettingsPrivate::setReceiveMMSAdverts(TBool aReceiveAdvert)
   217 void MmsSettingsPrivate::setReceiveMMSAdvertsL(TBool aReceiveAdvert)
   218 {
   218 {
   219     CMmsAccount* mMmsAccount = CMmsAccount::NewL();
   219     CMmsAccount* mMmsAccount = CMmsAccount::NewL();
   220     CleanupStack::PushL(mMmsAccount);
   220     CleanupStack::PushL(mMmsAccount);
   221 
   221 
   222     CMmsSettings* mMmsSetting = CMmsSettings::NewL();
   222     CMmsSettings* mMmsSetting = CMmsSettings::NewL();
   230     //save the settings
   230     //save the settings
   231     mMmsAccount->SaveSettingsL(*mMmsSetting);
   231     mMmsAccount->SaveSettingsL(*mMmsSetting);
   232     CleanupStack::PopAndDestroy(2);
   232     CleanupStack::PopAndDestroy(2);
   233 }
   233 }
   234 
   234 
   235 void MmsSettingsPrivate::advanceMmsSettings(
   235 void MmsSettingsPrivate::advanceMmsSettingsL(
   236                                             MsgSettingEngine::MmsRetrieval& aRetrieval,
   236                                             MsgSettingEngine::MmsRetrieval& aRetrieval,
   237                                             TBool& aAnonymousStatus,
   237                                             TBool& aAnonymousStatus,
   238                                             TBool& aMmsAdvertsStatus)
   238                                             TBool& aMmsAdvertsStatus)
   239 {
   239 {
   240     CMmsAccount* mMmsAccount = CMmsAccount::NewL();
   240     CMmsAccount* mMmsAccount = CMmsAccount::NewL();
   284 
   284 
   285 //---------------------------------------------------------------
   285 //---------------------------------------------------------------
   286 // SmsSettings::iAPSelector
   286 // SmsSettings::iAPSelector
   287 // @see header
   287 // @see header
   288 //---------------------------------------------------------------
   288 //---------------------------------------------------------------
   289 void MmsSettingsPrivate::getAllAccessPoints(
   289 void MmsSettingsPrivate::getAllAccessPointsL(
   290                                             RPointerArray<HBufC>& aAccessPoints,
   290                                             RPointerArray<HBufC>& aAccessPoints,
   291                                             TInt& aDefaultIndex)
   291                                             TInt& aDefaultIndex)
   292 {
   292 {
   293 #ifdef _DEBUG_TRACES_
   293 #ifdef _DEBUG_TRACES_
   294 		qDebug() << "Enter MmsSettingsPrivate::getAllAccessPoints: Index= " << aDefaultIndex;
   294 		qDebug() << "Enter MmsSettingsPrivate::getAllAccessPoints: Index= " << aDefaultIndex;
   366 
   366 
   367 //---------------------------------------------------------------
   367 //---------------------------------------------------------------
   368 // MmsSettingsPrivate::setMMSAccesspoint
   368 // MmsSettingsPrivate::setMMSAccesspoint
   369 // @see header
   369 // @see header
   370 //---------------------------------------------------------------
   370 //---------------------------------------------------------------
   371 void MmsSettingsPrivate::setMMSAccesspoint(TInt& aDefaultIndex)
   371 void MmsSettingsPrivate::setMMSAccesspointL(TInt& aDefaultIndex)
   372 {
   372 {
   373 #ifdef _DEBUG_TRACES_
   373 #ifdef _DEBUG_TRACES_
   374 		qDebug() << "Enter MmsSettingsPrivate::setMMSAccesspoint: Index=" 
   374 		qDebug() << "Enter MmsSettingsPrivate::setMMSAccesspoint: Index=" 
   375 	          << aDefaultIndex
   375 	          << aDefaultIndex
   376 	          << "\n";
   376 	          << "\n";