hotspotfw/hsbrowser/inc/hsbrowserspecialloadobserver.h
branchRCL_3
changeset 25 f28ada11abbf
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
       
     1 /*
       
     2 * Copyright (c) 2007 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:   Handle special load requests like Non-HTTP(S) load requests,
       
    15 *                and Non-HTML content. Control over network connections
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef HSBROWSERSPECIALLOADOBSERVER_H
       
    22 #define HSBROWSERSPECIALLOADOBSERVER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <brctlspecialloadobserver.h>
       
    26 #include <brctlinterface.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * CHsBrowserSpecialLoadObserver class.
       
    32 * This class inherits from the MBrCtlSpecialLoadObserver interface which
       
    33 * is used if the host application requires: Handling of non-HTTP(S) load requests;
       
    34 * Handling of non-markup content; Control over network connections
       
    35 */
       
    36 class CHsBrowserSpecialLoadObserver : public CBase, public MBrCtlSpecialLoadObserver
       
    37     {
       
    38     public:  // Constructors and destructor
       
    39 
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         */
       
    43         static CHsBrowserSpecialLoadObserver* NewL();
       
    44 
       
    45         /**
       
    46         * Destructor.
       
    47         */
       
    48         ~CHsBrowserSpecialLoadObserver();
       
    49 
       
    50     public: // from MBrCtlSpecialLoadObserver
       
    51     
       
    52         /**
       
    53         * Request to create a network connection.
       
    54         * @since 2.8
       
    55         * @param aConnectionPtr A pointer to the new connection. If NULL, the proxy filter will automatically create a network connection
       
    56         * @param aSockSvrHandle A handle to the socket server.
       
    57         * @param aNewConn A flag if a new connection was created. If the connection is not new, proxy filter optimization will not read the proxy again from CommsBd
       
    58         * @param aBearerType The bearer type of the new connection
       
    59         * @return void
       
    60         */
       
    61         void NetworkConnectionNeededL( TInt* aConnectionPtr,
       
    62                                        TInt* aSockSvrHandle,
       
    63                                        TBool* /*aNewConn*/,
       
    64                                        TApBearerType* /*aBearerType*/ );
       
    65         /**
       
    66         * Request the host applicaion to handle non-http request.
       
    67         * @since 2.8
       
    68         * @param aTypeArray Array of download parameter types. These types indicates the type of data contained within the DesArray
       
    69         * @param aDesArray Array of values associated with the types in the type array.
       
    70         * @return ETrue, If the request is handled by the host application. EFalse if not
       
    71         */
       
    72         TBool HandleRequestL( RArray<TUint>* /*aTypeArray*/,
       
    73                               CDesCArrayFlat* /*aDesArray*/ );
       
    74 
       
    75         /**
       
    76         * Request the host applicaion to handle downloads
       
    77         * @since 2.8
       
    78         * @param aTypeArray Array of download parameter types
       
    79         * @param aDesArray Array of values associated with the types in the type array
       
    80         * @return ETrue, If the request is handled by the host application. EFalse if not
       
    81         */
       
    82         TBool HandleDownloadL( RArray<TUint>* /*aTypeArray*/,
       
    83                                CDesCArrayFlat* /*aDesArray*/ );
       
    84         
       
    85     public: // access methods
       
    86     
       
    87         /**
       
    88         * Accessor method for iConnectionPtr.
       
    89         */
       
    90         void SetConnectionPtr( TInt aConnectionPtr );
       
    91         
       
    92         /**
       
    93         * Accessor method for iSockSvrHandle.
       
    94         */
       
    95         void SetSockSvrHandle( TInt aSockSvrHandle );
       
    96 
       
    97     private:
       
    98     
       
    99 	    /**
       
   100         * By default Symbian 2nd phase constructor is private.
       
   101         */
       
   102         void ConstructL();
       
   103 
       
   104     private:
       
   105         
       
   106         /**
       
   107         * Connection handle.
       
   108         */
       
   109         TInt iConnectionPtr;
       
   110     
       
   111         /**
       
   112         * Socket server handle.
       
   113         */
       
   114         TInt iSockSvrHandle;
       
   115     };
       
   116 
       
   117 #endif // HSBROWSERSPECIALLOADOBSERVER_H
       
   118             
       
   119 // End of File
       
   120