syncmlfw/common/sosserver/src/nsmlsosthread.cpp
changeset 63 e0c1916b8ddc
parent 57 f5b689a4f7a2
equal deleted inserted replaced
57:f5b689a4f7a2 63:e0c1916b8ddc
   832 // Starts connection with notifier
   832 // Starts connection with notifier
   833 // --------------------------------------------------------------------------
   833 // --------------------------------------------------------------------------
   834 //		
   834 //		
   835 void CNSmlNotifierObserver::ConnectToNotifierL( const TSyncMLAppLaunchNotifParams& aParam )
   835 void CNSmlNotifierObserver::ConnectToNotifierL( const TSyncMLAppLaunchNotifParams& aParam )
   836 	{
   836 	{
   837 	_DBG_FILE( "CNSmlNotifierObserver::ConnectToNotifierL:Begin" );
   837 		_DBG_FILE( "CNSmlNotifierObserver::ConnectToNotifierL:Begin" );
   838 	iTimeOut = EFalse;
   838 		iTimeOut = EFalse;
   839 	
       
   840 	/*if ( !IsActive() )
       
   841 		{
       
   842 		SetActive();
       
   843 		}*/
       
   844 		
       
   845 	   
       
   846 
       
   847     
   839     
   848     if ( !KNSmlWaitNotifierForEver )
   840     if ( !KNSmlWaitNotifierForEver )
   849         {
   841         {
   850         iNotifierTimeOut.LaunchNotifierTimer( this );
   842         iNotifierTimeOut.LaunchNotifierTimer( this );
   851         }
   843         }
   852 
   844 
   853     TInt err = KErrNone;
   845     if (!iHbSyncmlNotifierEnabled)
   854 
   846     {
   855  /*   if (!iHbSyncmlNotifierEnabled) //Syncml notifier
   847     	LOGSTRING2( "CNSmlNotifierObserver::ConnectToNotifierL %d after connect, StartNotifierAndGetResponse and after setactive" , iStatus.Int());
   856         err = iNotifier.Connect();
   848     }
   857 */
   849     else
   858     if (err == KErrNone)
   850     {
   859         {
       
   860         if (!iHbSyncmlNotifierEnabled)
       
   861             {
       
   862 //            iNotifier.StartNotifierAndGetResponse(iStatus, KUidNotifier,
       
   863 //                    data, iResBuf);
       
   864             LOGSTRING2( "CNSmlNotifierObserver::ConnectToNotifierL %d after connect, StartNotifierAndGetResponse and after setactive" , iStatus.Int());
       
   865             }
       
   866         else
       
   867             {
       
   868        iStatus = KRequestPending;
   851        iStatus = KRequestPending;
   869             HbNotifierObserverL(aParam);
   852        HbNotifierObserverL(aParam);
   870             }
   853     }
   871         if ( !IsActive() )
   854     if ( !IsActive() )
   872                 {
   855     {
   873                 SetActive();
   856     	SetActive();
   874                 }
   857     }      
   875         }
       
   876     else
       
   877         {
       
   878         LOGSTRING("Stop job error connecting to notifier");
       
   879         // Stop job. Error connecting to notifier.
       
   880         TRequestStatus* sStatus = &iStatus;
       
   881 		User::RequestComplete( sStatus, err );            
       
   882         }
       
   883      _DBG_FILE("CNSmlNotifierObserver::ConnectToNotifierL:End");   
   858      _DBG_FILE("CNSmlNotifierObserver::ConnectToNotifierL:End");   
   884 	}
   859 	}
   885 
   860 
   886 // --------------------------------------------------------------------------
   861 // --------------------------------------------------------------------------
   887 // CNSmlNotifierObserver::IsHbNotifierEnabled()
   862 // CNSmlNotifierObserver::IsHbNotifierEnabled()