示例#1
0
void GameState::resetState(void){
	
	for(int i = 0; i < sprites.size(); i++){
		delete sprites.at(i);
	}
	sprites.clear();

	callState();
}
示例#2
0
// -----------------------------------------------------------------------------
// Check if there is the given type call ongoing.
// -----------------------------------------------------------------------------
//
EXPORT_C TBool MPXUser::IsCallOngoing( TInt aCallType )
    {
    MPX_FUNC( "MPXUser::IsCallOngoing" );
    // In case call info not fully received (err != KErrNone),
    // assume no call exists.
    TBool ret( EFalse );

    // Get call status and type.
    TInt callState( EPSCTsyCallStateUninitialized );

    TInt err( RProperty::Get(
        KPSUidCtsyCallInformation,
        KCTsyCallState,
        callState ) );

    MPX_DEBUG3("MPXUser::IsCallOngoing() call state: %d , error (%d)", callState, err );

    if ( !err &&
         ( callState != EPSCTsyCallStateUninitialized &&
           callState != EPSCTsyCallStateNone ) )
        {
        TInt callType( EPSCTsyCallTypeUninitialized );

        // There is call ongoing, check it's type.
        err = RProperty::Get(
            KPSUidCtsyCallInformation,
            KCTsyCallType,
            callType );

        MPX_DEBUG3("MPXUser::IsCallOngoing() call type:  %d, error (%d)", callType,  err );

        if ( !err )
            {
            if ( aCallType == KMPXCallTypeGenericVoice )
                {
                // Return true for CSVoice/Video/VOIP calls
                ret = ( callType == EPSCTsyCallTypeCSVoice ||
                        callType == EPSCTsyCallTypeH324Multimedia ||
                        callType == EPSCTsyCallTypeVoIP );
                MPX_DEBUG2("MPXUser::IsCallOngoing KMPlayerCallTypeGenericVoice return (%d) ", ret );
                }
            else
                {
                // Check the requested type call.
                ret = ( callType == aCallType );
                MPX_DEBUG2("MPXUser::IsCallOngoing return (%d) ", ret );
                }
            }
        }
    MPX_DEBUG2("MPXUser::IsCallOngoing return (%d) ", ret );
    return ret;
    }
示例#3
0
void QVDoorcom::onCallState_wrapper(int call_id, QString state) {
    emit callState(call_id,state);
}
// -----------------------------------------------------------------------------
// CPhoneMediatorSender::MapCallState
// -----------------------------------------------------------------------------
//
TCallState CPhoneMediatorSender::MapCallState( const TInt aCallState ) const
    {
    __LOGMETHODSTARTEND( EPhoneMediatorCenter, "CPhoneMediatorSender::MapCallState( ) ");
    TCallState callState( ECallStateUnknown );
    
    switch( aCallState )
        {
        case EPEStateUnknown:
            callState = ECallStateUnknown;
            break;
            
        case EPEStateIdle:
            callState = ECallStateIdle;
            break;
            
        case EPEStateDialing:
            callState = ECallStateDialling;
            break;
            
        case EPEStateEmergencyDialing:
            callState = ECallStateEmergencyDialling;
            break;
            
        case EPEStateRinging:
            callState = ECallStateRinging;
            break;
            
        case EPEStateConnecting:
            callState = ECallStateConnecting;
            break;
            
        case EPEStateConnected:
            callState = ECallStateConnected;
            break;
            
        case EPEStateHangingUp:
            callState = ECallStateHangingUp;
            break;
            
        case EPEStateHeld:
            callState = ECallStateHeld;
            break;
            
        case EPEStateAnswering:
            callState = ECallStateAnswering;
            break;
            
        case EPEStateRejecting:
            callState = ECallStateRejecting;
            break;
            
        case EPEStateDisconnecting:
            callState = ECallStateDisconnecting;
            break;
            
        default:
            break;
        }
        
    return callState;
    }
// -----------------------------------------------------------------------------
// CRemConTspController::AddressIncomingCommand
// Defines remote targets to which command will be sent.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CRemConTspController::AddressIncomingCommand(
		TUid aInterfaceUid,
		TUint aOperationId, 
		TSglQue<TClientInfo>& aClients )
	{
	COM_TRACE_( "[REMCONTSPCONTROLLER] CRemConTspController::AddressIncomingCommand() start" );
	COM_TRACE_2( "[REMCONTSPCONTROLLER] aInterfaceUid = %d, aOperationId = %d", aInterfaceUid.iUid, aOperationId );
		
	#ifdef _DEBUG
	
	// For debuging purpose write all remote target ids to trace
	TSglQueIter<TClientInfo> iter( aClients );
	TClientInfo* target = iter;
	TInt number(0);
	
	while( target )
		{
		COM_TRACE_2( "[REMCONTSPCONTROLLER] %d. client secureId = %d", ++number, target->SecureId().iId );
		iter++;
		target = iter;
		}

	#endif
		
	TInt err( KErrNone );
	
	// This version sends operation to all existing clients with following 
	// exception: If there's an incoming or ongoing voice call, 
	// RemConExtensionApi's command ERemConExtAnswerEnd is sent only to 
	// PhoneCmdHandler. 
	if( aInterfaceUid.iUid == KRemConExtCallHandlingApiUid && 
		aOperationId == ERemConExtAnswerEnd 
	  )
		{
		TInt callState( EPSCTsyCallStateUninitialized );
    	TInt err( KErrNone );
    	err = iProperty.Get( KPSUidCtsyCallInformation, 
    						 KCTsyCallState, 
    						 callState ); 
    						 
    	if( ( err == KErrNone ) && 
    	    ( callState == EPSCTsyCallStateRinging ||
    	      callState == EPSCTsyCallStateConnected )
    	  )
			{
			TSglQueIter<TClientInfo> iter( aClients );
			TClientInfo* target = iter;
			
			while( target )
				{
				if( target->SecureId().iId == KUid3 )
					{
					COM_TRACE_1( "[REMCONTSPCONTROLLER] Command is sent only to PhoneCmdHandler running in process identified by secure id=%d", target->SecureId().iId );
									
					// Add PhoneCmdHandler as the only remote target to 
					// receive ERemConExtAnswerEnd command. 
					aClients.Reset();
					aClients.AddFirst( *target );
					break;	// get out from while-loop
					}
				iter++;
				target = iter;
				}
			}
		}

	Observer().IncomingCommandAddressed( err );
	
	COM_TRACE_( "[REMCONTSPCONTROLLER] CRemConTspController::AddressIncomingCommand() ends" );
	}