webengine/wmlengine/src/FileLoader/include/fileloader_cfileloader.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 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:  Handler for loading file scheme.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CFileLoader_H
       
    21 #define CFileLoader_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "urlloader_urlloaderint.h"
       
    25 #include "urlloader_murlschemehandler.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 *  File loader implementation class.
       
    41 *
       
    42 *  @lib fileloader.lib
       
    43 *  @since 2.0
       
    44 */
       
    45 
       
    46 class CKFileLoader : public MUrlSchemeHandler
       
    47 {
       
    48 public:  // Constructors and destructor
       
    49 
       
    50     /**
       
    51     * Two-phased constructor.
       
    52     */
       
    53     static CKFileLoader* NewL();
       
    54 
       
    55     /**
       
    56     * Destructor.
       
    57     */
       
    58     virtual ~CKFileLoader();
       
    59  
       
    60 public: // Functions from base classes
       
    61 
       
    62     /**
       
    63     * From MUrlSchemeHandler Handles requests for file scheme loading.
       
    64     * @since 2.0
       
    65     * @param aUrl The request URL.
       
    66     * @param aHeader The request headers or NULL if no request specific headers. It is 
       
    67     * @param aData The body and body length of the request.
       
    68     * @param aMethod The method to use for the request could be NW_URL_METHOD_GET or NW_URL_METHOD_POST .
       
    69     * @param aTransId The request's transaction id.
       
    70     * @param aLoadContext The load context that should be returned with the response.
       
    71     * @param aLoadCallback The callback to call when the response is ready.
       
    72     * @param aPartialLoadCallback The callback to call when a chunk is ready.
       
    73     * @param aCacheMode The cache mode. It is relevant only in case of http or https scheme.
       
    74     * @param aDefaultHeadersMask A flag indicating what default headers should be used.
       
    75     * @param aLoadType Used by accept headers
       
    76     * @param aIsTopLevel Markup page is top, images, css, etc are not top level
       
    77     * @param aIsScript Is it a WmlScript load event?
       
    78     * @return ETrue if processed the load request, EFalse otherwise
       
    79     */
       
    80     virtual TBool HandleLoadRequestL(const TUint16* aUrl,
       
    81         void* aHeader,
       
    82         TPtr8& aData,
       
    83         TUint8 aMethod,
       
    84         TUint16 aTransId,
       
    85         void* aLoadContext,
       
    86         NW_Url_RespCallback_t* aPartialLoadCallback,
       
    87         NW_Cache_Mode_t aCacheMode,
       
    88         TUint aDefaultHeadersMask,
       
    89         TUint8 aLoadType,
       
    90         TBool aIsTopLevel,
       
    91         TBool aIsScript, 
       
    92         NW_Uint8 aReason,
       
    93         void* aLoadData);
       
    94 private:
       
    95 
       
    96     /**
       
    97     * C++ default constructor.
       
    98     */
       
    99     CKFileLoader();
       
   100 
       
   101     /**
       
   102     * By default Symbian 2nd phase constructor is private.
       
   103     */
       
   104     void ConstructL();
       
   105 
       
   106 };
       
   107 
       
   108 #endif      // CKFileLoader_H
       
   109 
       
   110 // End of File