Multimode Line

The Core telephony RLine base class provides the RLine::GetHookStatus() function to report the hook status of the line. The line can be on or off hook. The RLine::GetStatus() function reports the call status of the line, that is whether it is ringing or connected. The Multimode API class derived from RLine, RMobileLine, provides additional line status information, such as if the line is on-hold.

To get the line status, use RMobileLine::GetMobileLineStatus(), which returns a RMobileCall::TMobileCallStatus object.

To be notified when the line changes state, use RMobileLine::NotifyMobileLineStatusChange().

If the line has one call, then the line state is equal to the call state. If the line has more than one current call, then the line state is the state of the longest call.

Example

The following code waits for the next change of state in the line and returns true if the new state is Connected.

TBool CClientApp::WaitForConnectedL(RMobileLine& aLine)
    {
    TRequestStatus status;
    RMobileCall::TMobileCallStatus lineStatus;
    aLine.NotifyMobileLineStatusChange(status, lineStatus);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());
    if (lineStatus == RMobileCall::EStatusConnected)
        return ETrue;
    else
        return EFalse;
    }