diff -r 3c221667e687 -r 94dc1107e8b2 phoneapp/phoneuiview/src/phoneringingtonesrv.cpp --- a/phoneapp/phoneuiview/src/phoneringingtonesrv.cpp Mon Jun 21 15:39:45 2010 +0300 +++ b/phoneapp/phoneuiview/src/phoneringingtonesrv.cpp Thu Jul 15 18:38:16 2010 +0300 @@ -88,24 +88,37 @@ } // ----------------------------------------------------------------------------- -// CPhoneRingingToneServer::IncrementSessions +// CPhoneRingingToneServer::StartSession // ----------------------------------------------------------------------------- // -void CPhoneRingingToneServer::IncrementSessions() +TInt CPhoneRingingToneServer::StartSession() { - iSessionCount++; + PHONEUIVIEW_PRINTF( "CPhoneRingingToneServer::StartSession err %d", iSessionCount ); + + TInt err( KErrNone ); + + if( !iSessionInUse ) + { + iSessionInUse = ETrue; + } + else + { + err = KErrAccessDenied; + } + + return err; } // ----------------------------------------------------------------------------- -// CPhoneRingingToneServer::DecrementSessions +// CPhoneRingingToneServer::CloseSession // ----------------------------------------------------------------------------- // -void CPhoneRingingToneServer::DecrementSessions() +void CPhoneRingingToneServer::CloseSession() { - if ( --iSessionCount <= 0 ) - { - CActiveScheduler::Stop(); - } + PHONEUIVIEW_PRINT( "CPhoneRingingToneServer::CloseSession()" ); + + CActiveScheduler::Stop(); + iSessionInUse = EFalse; } // -----------------------------------------------------------------------------