S60 3rd Edition SDK for Symbian OS
Example Applications Guide

BrCtlSampleAppSpecialLoadObserver.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : BrCtlSampleAppSpecialLoadObserver.h
00004 *  Part of     : BrCtlSampleApp
00005 *  Interface   : Browser Control API
00006 *  Description : Handle special load requests like Non-HTTP(S) load requests,
00007 *                and Non-HTML content. Control over network connections
00008 *  Version     : 
00009 *
00010 *  Copyright (c) 2005-2006 Nokia Corporation.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia Corporation.
00014 * ==============================================================================
00015 */
00016 
00017 #ifndef BRCTLSAMPLEAPPSPECIALLOADOBSERVER_H
00018 #define BRCTLSAMPLEAPPSPECIALLOADOBSERVER_H
00019 
00020 //  INCLUDES
00021 #include <BrCtlSpecialLoadObserver.h>
00022 #include <BrCtlInterface.h>
00023 #include <DocumentHandler.h> 
00024 
00025 // CLASS DECLARATION
00026 
00027 /**
00028 * CBrCtlSampleAppSpecialLoadObserver class.
00029 * This class inherits from the MBrCtlSpecialLoadObserver interface which
00030 * is used if the host application requires: Handling of non-HTTP(S) load requests;
00031 * Handling of non-markup content; Control over network connections
00032 */
00033 class CBrCtlSampleAppSpecialLoadObserver : public CBase, public MBrCtlSpecialLoadObserver
00034     {
00035     public:  // Constructors and destructor
00036 
00037         /**
00038         * Two-phased constructor.
00039         */
00040         static CBrCtlSampleAppSpecialLoadObserver* NewL();
00041 
00042         /**
00043         * Destructor.
00044         */
00045         ~CBrCtlSampleAppSpecialLoadObserver();
00046 
00047         /**
00048         * Request to create a network connection.
00049         * @since 2.8
00050         * @param aConnectionPtr A pointer to the new connection. If NULL, the proxy filter will automatically create a network connection
00051         * @param aSockSvrHandle A handle to the socket server.
00052         * @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
00053         * @param aBearerType The bearer type of the new connection
00054         * @return void
00055         */
00056         void NetworkConnectionNeededL(TInt* /*aConnectionPtr*/,
00057                                       TInt* /*aSockSvrHandle*/,
00058                                       TBool* /*aNewConn*/,
00059                                       TApBearerType* /*aBearerType*/) ;
00060 
00061         /**
00062         * Request the host applicaion to handle non-http request.
00063         * @since 2.8
00064         * @param aTypeArray Array of download parameter types. These types indicates the type of data contained within the DesArray
00065         * @param aDesArray Array of values associated with the types in the type array.
00066         * @return ETrue, If the request is handled by the host application. EFalse if not
00067         */
00068         TBool HandleRequestL(RArray<TUint>* aTypeArray, CDesCArrayFlat* aDesArray);
00069 
00070         /**
00071         * Request the host applicaion to handle downloads
00072         * @since 2.8
00073         * @param aTypeArray Array of download parameter types
00074         * @param aDesArray Array of values associated with the types in the type array
00075         * @return ETrue, If the request is handled by the host application. EFalse if not
00076         */
00077         TBool HandleDownloadL(RArray<TUint>* aTypeArray, CDesCArrayFlat* aDesArray);
00078 
00079     private:
00080             /**
00081         * By default Symbian 2nd phase constructor is private.
00082         */
00083         void ConstructL();
00084 
00085     private:   // data
00086         // Used to send the content to the proper application.
00087         CDocumentHandler* iHandler;
00088     };
00089 
00090 #endif      // BRCTLSAMPLEAPPSPECIALLOADOBSERVER_H
00091             
00092 // End of File
00093 

© Nokia 2006

Back to top