browserutilities/feedsengine/FeedsServer/UrlHandler/inc/ServerHttpConnection.h
changeset 0 dd21522fd290
child 64 ac77f89b1d9e
child 68 92a765b5b3e7
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2006 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 the License "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:  A class that holds the shared connection to a access point.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SERVER_HTTP_CONNECTION_H
       
    20 #define SERVER_HTTP_CONNECTION_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include "httpconnection.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CInternetConnectionManager;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 
       
    40 /**
       
    41 *  A class that holds the shared connection to a access point.
       
    42 *
       
    43 *  \b Library: FeedsEngine.lib
       
    44 *
       
    45 *  @since 3.0
       
    46 */
       
    47 class CServerHttpConnection: public CHttpConnection
       
    48     {
       
    49     public:  // Constructors and destructor
       
    50         /**
       
    51         * Two-phased constructor.
       
    52         */
       
    53         static CServerHttpConnection* NewL( TUint32 iDefaultAccessPoint );
       
    54         
       
    55         /**
       
    56         * Destructor.
       
    57         */        
       
    58         virtual ~CServerHttpConnection();
       
    59         
       
    60         
       
    61     public: // From MConnectionCallback        
       
    62         /**
       
    63         * It propagates the connection callback to the browser client.
       
    64         *
       
    65         * @since 3.0
       
    66         * @param aConnectionPtr Connection ptr
       
    67         * @param aSockSvrHandle Socket server handle
       
    68         * @param aNewConn ETrue, if this is a new connection
       
    69         * @param aBearerType Bearer type
       
    70         * @return OS wide error code
       
    71         */
       
    72         virtual TInt CreateConnection(TInt* aConnectionPtr, TInt* aSockSvrHandle, 
       
    73                 TBool* aNewConn, TApBearerType* aBearerType);
       
    74         
       
    75         
       
    76     public:  // from CHttpConnection
       
    77         /**
       
    78         * Returns whether or not the connection is active.
       
    79         *
       
    80         * @since 3.0
       
    81         * @return void.
       
    82         */
       
    83         TBool IsConnected();
       
    84 
       
    85         /**
       
    86         * Closes the connection.
       
    87         *
       
    88         * @since 3.0
       
    89         * @return void.
       
    90         */
       
    91         void Disconnect();
       
    92 
       
    93 
       
    94     public:  // New methods.
       
    95         /**
       
    96         * Sets the new access point.
       
    97         *
       
    98         * @since 3.0
       
    99         * @param aAccessPoint The access point.
       
   100         * @return Void
       
   101         */
       
   102         void SetAccessPointL( TUint32 aAccessPoint );
       
   103 
       
   104 
       
   105     private:
       
   106         /**
       
   107         * C++ default constructor.
       
   108         */
       
   109         CServerHttpConnection( TUint32 iDefaultAccessPoint );
       
   110         
       
   111         /**
       
   112         * By default Symbian 2nd phase constructor is private.
       
   113         */
       
   114         void ConstructL();
       
   115 
       
   116 
       
   117     private:
       
   118         TLeakTracker                 iLeakTracker;
       
   119         
       
   120         CInternetConnectionManager*  iConMgr;
       
   121         TUint32                      iDefaultAccessPoint;
       
   122     };
       
   123 
       
   124 #endif      // SERVER_HTTP_CONNECTION_H
       
   125             
       
   126 // End of File