hotspotfw/hsserver/src/hotspotsession.cpp
changeset 61 e1d68407ed06
parent 39 7b3e49e4608a
equal deleted inserted replaced
60:822a45792fdd 61:e1d68407ed06
    43 //
    43 //
    44 CHotSpotSession::CHotSpotSession( CHotSpotServer& aServer ) :
    44 CHotSpotSession::CHotSpotSession( CHotSpotServer& aServer ) :
    45     iServer( aServer ), iClient( NULL ), iSrvNotifications ( NULL ), 
    45     iServer( aServer ), iClient( NULL ), iSrvNotifications ( NULL ), 
    46     iNotificationHandle( NULL ), iAllowNotifications( ETrue ), iHotspotExtension( ETrue )
    46     iNotificationHandle( NULL ), iAllowNotifications( ETrue ), iHotspotExtension( ETrue )
    47     {
    47     {
    48     
    48     iIapSettingsHandler=NULL;
       
    49     iNotifications=NULL;
       
    50     iLoginTimer=NULL;
       
    51     iLogoutTimer=NULL;
       
    52     iMgtClient=NULL;
       
    53     iIapId=0;
       
    54     iNetId=0;
       
    55     iNotificationHandle=NULL;
       
    56     iIsNotificationRequestPending =false;
       
    57     iClientUid.iUid =0;
       
    58 
    49     }
    59     }
    50 
    60 
    51 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
    52 // ConstructL
    62 // ConstructL
    53 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
   170                 }
   180                 }
   171             iNotifications = NULL;
   181             iNotifications = NULL;
   172             HandleCancelNotifications( aMessage );
   182             HandleCancelNotifications( aMessage );
   173             break;
   183             break;
   174         case EHssRegister :
   184         case EHssRegister :
   175             ProcessRegister( aMessage );
   185             ProcessRegisterL( aMessage );
   176             break;
   186             break;
   177         case EHssUnRegister :
   187         case EHssUnRegister :
   178             ProcessUnRegister( aMessage );
   188             ProcessUnRegister( aMessage );
   179             break;
   189             break;
   180         case EHssJoin :
   190         case EHssJoin :
   468             TBuf<KUidLength> uid;
   478             TBuf<KUidLength> uid;
   469             uid.Copy( clientUid.Name() );
   479             uid.Copy( clientUid.Name() );
   470             ModifyClientUid( uid );
   480             ModifyClientUid( uid );
   471             TUint loginTimerValue = aMessage.Int1();
   481             TUint loginTimerValue = aMessage.Int1();
   472             TUint logoutTimerValue = aMessage.Int2();
   482             TUint logoutTimerValue = aMessage.Int2();
   473             iServer.SetTimerValues( uid, loginTimerValue, logoutTimerValue );
   483             iServer.SetTimerValuesL( uid, loginTimerValue, logoutTimerValue );
   474             aMessage.Complete( KErrNone );
   484             aMessage.Complete( KErrNone );
   475             break;
   485             break;
   476             }
   486             }
   477         default:
   487         default:
   478             aMessage.Complete( KErrNotSupported );  
   488             aMessage.Complete( KErrNotSupported );  
   633 
   643 
   634 // ---------------------------------------------------------
   644 // ---------------------------------------------------------
   635 // ProcessRegister
   645 // ProcessRegister
   636 // ---------------------------------------------------------
   646 // ---------------------------------------------------------
   637 //
   647 //
   638 void CHotSpotSession::ProcessRegister( const RMessage2& aMessage )
   648 void CHotSpotSession::ProcessRegisterL( const RMessage2& aMessage )
   639     {
   649     {
   640     DEBUG("CHotSpotSession::ProcessRegister");
   650     DEBUG("CHotSpotSession::ProcessRegisterL");
   641     
   651     
   642     iAllowNotifications = EFalse;
   652     iAllowNotifications = EFalse;
   643     TBufC< KIapNameLength > iapName;
   653     TBufC< KIapNameLength > iapName;
   644     TPckgBuf< TIapName > iapPckg;
   654     TPckgBuf< TIapName > iapPckg;
   645     TUid clientUid;
   655     TUid clientUid;
   662     TRAP( ret, iIapSettingsHandler->CreateClientIapL( iapName, iapId, bufUid ));
   672     TRAP( ret, iIapSettingsHandler->CreateClientIapL( iapName, iapId, bufUid ));
   663     DEBUG1( "CHotSpotSession::EHssRegister iapId: %d", iapId );
   673     DEBUG1( "CHotSpotSession::EHssRegister iapId: %d", iapId );
   664     DEBUG1( "CHotSpotSession::EHssRegister ret: %d", ret );
   674     DEBUG1( "CHotSpotSession::EHssRegister ret: %d", ret );
   665     if ( KErrNone == ret )
   675     if ( KErrNone == ret )
   666         {
   676         {
   667         iServer.SetClientIap( iapId, bufUid );
   677         iServer.SetClientIapL( iapId, bufUid );
   668         aMessage.Complete( iapId );
   678         aMessage.Complete( iapId );
   669         }
   679         }
   670 
   680 
   671     else 
   681     else 
   672         {
   682         {