IMPSengine/ImpsDataChannel/inc/HttpTransportAdapter.inl
branchRCL_3
changeset 17 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
16:6ca72c0fe49a 17:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Adapter for Http transport.
       
    15 *       
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // ----------------------------------------------------
       
    21 // CHttpTransportAdapter::Destroy
       
    22 // 
       
    23 // ----------------------------------------------------
       
    24 //
       
    25 void CHttpTransportAdapter::Destroy()
       
    26     {
       
    27     delete this;
       
    28     }
       
    29 
       
    30 // ----------------------------------------------------------
       
    31 // CHttpTransportAdapter::PendingRequests
       
    32 // Return the number of pending requests 
       
    33 // ----------------------------------------------------------
       
    34 //
       
    35 inline TInt CHttpTransportAdapter::PendingRequests() const
       
    36     {
       
    37     return iTransactionQueue.Count();
       
    38     }
       
    39 
       
    40 // ----------------------------------------------------
       
    41 // CHttpTransportAdapter::MimeType
       
    42 // Return the MIME type of messages (HTTP header)
       
    43 // ----------------------------------------------------
       
    44 //
       
    45 inline TPtrC8 CHttpTransportAdapter::MimeType() const
       
    46     {
       
    47     return iMimeBuffer != NULL ? iMimeBuffer->Des() : TPtrC8();
       
    48     }
       
    49 
       
    50 // ----------------------------------------------------
       
    51 // CHttpTransportAdapter::MimeType
       
    52 // Return the MIME type of messages (HTTP header)
       
    53 // ----------------------------------------------------
       
    54 //
       
    55 inline TBool CHttpTransportAdapter::SessionClosed() const
       
    56     {
       
    57     return iSessionClosed;
       
    58     }
       
    59 
       
    60 // ----------------------------------------------------
       
    61 // CHttpTransportAdapter::DefaultSAP
       
    62 // Return the address of the default SAP 
       
    63 // ----------------------------------------------------
       
    64 //
       
    65 inline TUriParser8 CHttpTransportAdapter::DefaultSAP() const
       
    66     {
       
    67     return iDefaultURL;
       
    68     }
       
    69 
       
    70 // ----------------------------------------------------
       
    71 // CHttpTransportAdapter::DefaultSAP
       
    72 // Returns a reference to the currently active HTTP session 
       
    73 // ----------------------------------------------------
       
    74 //
       
    75 inline RHTTPSession& CHttpTransportAdapter::HttpSession()
       
    76     {
       
    77     __ASSERT_ALWAYS( !iSessionClosed, User::Panic( _L( "CHttpTransportAdapter" ), 1 ) );
       
    78     return iHttpSession;
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------
       
    82 // CHttpTransportAdapter::DefaultSAP
       
    83 // Returns a reference to the currently active HTTP session 
       
    84 // ----------------------------------------------------
       
    85 //
       
    86 inline MImpsDataReceiver& CHttpTransportAdapter::ReceiverHandle() const
       
    87     {
       
    88     return iReceiver;
       
    89     }