webservices/wscore/src/senmobilityobserver.cpp
changeset 2 150a13bad6af
parent 0 62f9d29f7211
child 3 b5a195438f6a
equal deleted inserted replaced
1:272b002df977 2:150a13bad6af
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 
    21 #include <connpref.h>
       
    22 #include <commdbconnpref.h>
    22 #include "senmobilityobserver.h"
    23 #include "senmobilityobserver.h"
    23 #include <SenTransportProperties.h>
    24 #include "sentransportproperties.h"
    24 #include "SenWSPattern.h"
    25 #include "senwspattern.h"
    25 #include "MSenProperties.h"
    26 #include "msenproperties.h"
    26 #include "SenLayeredTransportProperties.h"
    27 #include "senlayeredtransportproperties.h"
    27 #include "SenLogger.h"
    28 #include "senlogger.h"
    28 #include "SenServiceManagerDefines.h"
    29 #include "senservicemanagerdefines.h"
    29 
    30 
    30 // -----------------------------------------------------------------------------
    31 // -----------------------------------------------------------------------------
    31 // CALRObserver::NewL
    32 // CALRObserver::NewL
    32 // -----------------------------------------------------------------------------
    33 // -----------------------------------------------------------------------------
    33 //
    34 //
   532 		errRet = OpenSocketSever();		
   533 		errRet = OpenSocketSever();		
   533 		if (!errRet)
   534 		if (!errRet)
   534 		    {
   535 		    {
   535 			if(aIsSnapId != EFalse && aId)
   536 			if(aIsSnapId != EFalse && aId)
   536                 {
   537                 {
       
   538                 TConnSnapPref SNAPPrefs;
   537                 iSnapId = aId ;
   539                 iSnapId = aId ;
   538                 iSNAPPrefs.SetSnap( aId ); 
   540                 SNAPPrefs.SetSnap( aId ); 
   539                 // Start connecting with Snap
   541                 // Start connecting with Snap
   540                 errRet = iConnection.Start(iSNAPPrefs);						
   542                 errRet = iConnection.Start(SNAPPrefs);						
   541                 TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP");
   543                 TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP");
   542                 }
   544                 }
   543 			else //default is iap
   545 			else //default is iap
   544 				{
   546 				{
   545 	    	    if( aId )
   547 	    	    if( aId )
   546                     {
   548                     {
   547                     iPrefs.SetIapId( aId );
   549                     TCommDbConnPref iapPrefs ;
   548                     SetDialogPref(EFalse) ;
   550                     iapPrefs.SetIapId( aId );
       
   551 					iapPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
       
   552 					TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE");					
       
   553 					//iapPrefs.SetDialogPreference( ECommDbDialogPrefPrompt );					
   549                     // Start connecting with IAP
   554                     // Start connecting with IAP
   550                     errRet = iConnection.Start(iPrefs);
   555                     errRet = iConnection.Start(iapPrefs);
   551                     TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId));
   556                     TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId));
   552                     }
   557                     }
   553 	            else
   558 	            else
   554 	            	{
   559 	            	{
   555 	            	if (iIapId != 0)
   560 	            	if (iIapId != 0)
   584 		    }
   589 		    }
   585 	    }
   590 	    }
   586 	return errRet;
   591 	return errRet;
   587     }	
   592     }	
   588 
   593 
   589 void CALRObserver::SetDialogPref(TBool aDialogPref)
       
   590     {
       
   591     if (aDialogPref == EFalse)
       
   592         {
       
   593         TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE");
       
   594         iPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );		
       
   595         }
       
   596     else
       
   597         {
       
   598         TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel ,"- CALRObserver::SetDialogPref is TRUE");
       
   599         iPrefs.SetDialogPreference( ECommDbDialogPrefPrompt );		
       
   600         }	
       
   601     }
       
   602 
       
   603 // -----------------------------------------------------------------------------
   594 // -----------------------------------------------------------------------------
   604 // CALRObserver::RefreshAvailability
   595 // CALRObserver::RefreshAvailability
   605 // -----------------------------------------------------------------------------
   596 // -----------------------------------------------------------------------------
   606 //
   597 //
   607 void CALRObserver::RefreshAvailabilityL()
   598 void CALRObserver::RefreshAvailabilityL()