1541 iTempProgressNotifier->Cancel(); |
1549 iTempProgressNotifier->Cancel(); |
1542 delete iTempProgressNotifier; |
1550 delete iTempProgressNotifier; |
1543 iTempProgressNotifier = NULL; |
1551 iTempProgressNotifier = NULL; |
1544 } |
1552 } |
1545 break; |
1553 break; |
1546 case KConnectionFailure: // 2001 |
1554 case KConnectionFailure: // 2001 |
1547 iConsole.PrintNotify(_L8("Connection failure")); |
1555 iConsole.PrintNotify(_L8("Connection failure")); |
1548 iConsole.PrintNotify(error); |
1556 iConsole.PrintNotify(error); |
1549 break; |
1557 break; |
1550 case KMinAgtProgress: // 2500 |
1558 case KMinAgtProgress: // 2500 |
1551 iConsole.PrintNotify(_L8("Min agt progress")); |
1559 iConsole.PrintNotify(_L8("Min agt progress")); |
1552 iConsole.PrintNotify(error); |
1560 iConsole.PrintNotify(error); |
1553 break; |
1561 break; |
1554 case KConnectionOpen: // 3500 |
1562 case KConnectionOpen: // 3500 |
1555 iConsole.PrintNotify(_L8("Connection open")); |
1563 iConsole.PrintNotify(_L8("Connection open")); |
1556 iConsole.PrintNotify(error); |
1564 iConsole.PrintNotify(error); |
1557 break; |
1565 break; |
1558 case KConnectionClosed: // 4500 |
1566 case KConnectionClosed: // 4500 |
1559 iConsole.PrintNotify(_L8("Connection closed")); |
1567 iConsole.PrintNotify(_L8("Connection closed")); |
1560 iConsole.PrintNotify(error); |
1568 iConsole.PrintNotify(error); |
1561 break; |
1569 break; |
1562 case KMaxAgtProgress: // 5500 |
1570 case KMaxAgtProgress: // 5500 |
1563 iConsole.PrintNotify(_L8("Max agent progress")); |
1571 iConsole.PrintNotify(_L8("Max agent progress")); |
1564 iConsole.PrintNotify(error); |
1572 iConsole.PrintNotify(error); |
1565 break; |
1573 break; |
1566 case KMinNifProgress: // 6000 |
1574 case KMinNifProgress: // 6000 |
1567 iConsole.PrintNotify(_L8("Min nif progress")); |
1575 iConsole.PrintNotify(_L8("Min nif progress")); |
1568 iConsole.PrintNotify(error); |
1576 iConsole.PrintNotify(error); |
1569 break; |
1577 break; |
1570 case KLinkLayerOpen: // 7000 |
1578 case KLinkLayerOpen: // 7000 |
1571 iConsole.PrintNotify(_L8("Link layer open")); |
1579 iConsole.PrintNotify(_L8("Link layer open")); |
1572 iConsole.PrintNotify(error); |
1580 iConsole.PrintNotify(error); |
1573 break; |
1581 break; |
1574 case KLinkLayerClosed: // 8000 |
1582 case KLinkLayerClosed: // 8000 |
1575 iConsole.PrintNotify(_L8("Link layer closed")); |
1583 iConsole.PrintNotify(_L8("Link layer closed")); |
1576 iConsole.PrintNotify(error); |
1584 iConsole.PrintNotify(error); |
1577 iHttpClient->SetHttpConnectionInfoL(ETrue, iConnection, iSocketServ); |
1585 iHttpClient->SetHttpConnectionInfoL(ETrue, iConnection, iSocketServ); |
1578 |
1586 |
1579 switch (iEngineStatus) |
1587 switch (iEngineStatus) |
1580 { |
1588 { |
1581 case EStartingInterface: |
1589 case EStartingInterface: |
1582 // This case will occur, if username/password prompt dialog |
1590 // This case will occur, if username/password prompt dialog |
1583 // is used and cancel is selected in dialog, and when error |
1591 // is used and cancel is selected in dialog, and when error |
1584 // occurs during interface startup. |
1592 // occurs during interface startup. |
1585 break; |
1593 break; |
1586 case EInterfaceDown: |
1594 case EInterfaceDown: |
1587 // EInterfaceDown must be handled also, because this |
1595 // EInterfaceDown must be handled also, because this |
1588 // state has been set in StopInterface method. |
1596 // state has been set in StopInterface method. |
1589 break; |
1597 break; |
1590 case EListening: |
1598 case EListening: |
1591 iListeningSocket.CancelAccept(); |
1599 iListeningSocket.CancelAccept(); |
1592 iListeningSocket.Close(); |
1600 iListeningSocket.Close(); |
1593 // FALLTHROUGH |
1601 // FALLTHROUGH |
1594 case ELookingUp: |
1602 case ELookingUp: |
1595 // Cancel everything depending on state. |
1603 // Cancel everything depending on state. |
1596 iResolver.Cancel(); |
1604 iResolver.Cancel(); |
1597 iResolver.Close(); |
1605 iResolver.Close(); |
1598 // FALLTHROUGH |
1606 // FALLTHROUGH |
1599 case EConnected: |
1607 case EConnected: |
1600 iSocketsRead->Cancel(); |
1608 iSocketsRead->Cancel(); |
1601 iSocketsWrite->Cancel(); |
1609 iSocketsWrite->Cancel(); |
1602 // FALLTHROUGH |
1610 // FALLTHROUGH |
1603 case EConnecting: |
1611 case EConnecting: |
1604 // This looks awful, but is required because of the fall through |
1612 // This looks awful, but is required because of the fall through |
1605 // and buggy implementation of the CancelConnect. |
1613 // and buggy implementation of the CancelConnect. |
1606 if( EConnecting == iEngineStatus ) |
1614 if( EConnecting == iEngineStatus ) |
1607 { |
1615 { |
1608 iSocket.CancelConnect(); |
1616 iSocket.CancelConnect(); |
1609 } |
|
1610 // FALLTHROUGH |
|
1611 case EDisconnecting: |
|
1612 iSocket.Close(); |
|
1613 // FALLTHROUGH |
|
1614 case EInterfaceUp: |
|
1615 if (iRoaming == ERoamingOff) |
|
1616 { |
|
1617 UnRegisterFromMobilityAPI(); |
|
1618 SetSocketEngineConnType(ETypeUnknown); |
|
1619 ChangeStatus(EInterfaceDown); |
|
1620 } |
|
1621 else |
|
1622 { |
|
1623 iConsole.PrintNotify(_L8("MobilitySession lost!\n")); |
|
1624 UnRegisterFromMobilityAPI(); |
|
1625 SetSocketEngineConnType(ETypeUnknown); |
|
1626 ChangeStatus(EInterfaceDown); |
|
1627 } |
|
1628 break; |
|
1629 default: |
|
1630 User::Panic(KPanicSocketsEngine, EConnTestBadStatus); |
|
1631 break; |
|
1632 } |
|
1633 |
|
1634 break; |
|
1635 case KMaxNifProgress: // 9000 |
|
1636 iConsole.PrintNotify(_L8("Max nif progress\n")); |
|
1637 break; |
|
1638 default: |
|
1639 iConsole.PrintNotify(text); |
|
1640 } |
|
1641 iConsole.PrintNotify(_L8("\f")); |
|
1642 } |
1617 } |
1643 |
1618 // FALLTHROUGH |
1644 // --------------------------------------------------------- |
1619 case EDisconnecting: |
|
1620 iSocket.Close(); |
|
1621 // FALLTHROUGH |
|
1622 case EInterfaceUp: |
|
1623 if (iRoaming == ERoamingOff) |
|
1624 { |
|
1625 UnRegisterFromMobilityAPI(); |
|
1626 SetSocketEngineConnType(ETypeUnknown); |
|
1627 ChangeStatus(EInterfaceDown); |
|
1628 } |
|
1629 else |
|
1630 { |
|
1631 iConsole.PrintNotify(_L8("MobilitySession lost!\n")); |
|
1632 UnRegisterFromMobilityAPI(); |
|
1633 SetSocketEngineConnType(ETypeUnknown); |
|
1634 ChangeStatus(EInterfaceDown); |
|
1635 } |
|
1636 break; |
|
1637 default: |
|
1638 User::Panic(KPanicSocketsEngine, EConnTestBadStatus); |
|
1639 break; |
|
1640 } |
|
1641 |
|
1642 break; |
|
1643 case KMaxNifProgress: // 9000 |
|
1644 iConsole.PrintNotify(_L8("Max nif progress\n")); |
|
1645 break; |
|
1646 default: |
|
1647 iConsole.PrintNotify(text); |
|
1648 } |
|
1649 iConsole.PrintNotify(_L8("\f")); |
|
1650 } |
|
1651 |
|
1652 // --------------------------------------------------------- |
1645 // CSocketsEngine::ProgressNotifyError(TInt aStatus) |
1653 // CSocketsEngine::ProgressNotifyError(TInt aStatus) |
1646 // Some error has occurred while receiving progress |
1654 // Some error has occurred while receiving progress |
1647 // notifications. |
1655 // notifications. |
1648 // --------------------------------------------------------- |
1656 // --------------------------------------------------------- |
1649 // |
1657 // |