webengine/wmlengine/src/urlloader/include/urlloader_loaderutils.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:  Handling of general url loading
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LOADERUTILS_H
       
    20 #define LOADERUTILS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32def.h>
       
    24 #include "BrsrStatusCodes.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 typedef enum {
       
    32     ELogTypeRequest,
       
    33     ELogTypeResponse,
       
    34     ELogTypeFailedResponse,
       
    35     ELogTypeSavedDeck
       
    36 } TUrlLoaderLogType;
       
    37 
       
    38 // FUNCTION PROTOTYPES
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45 *  Utilities used by url loader.
       
    46 *
       
    47 *  @lib urlloader.lib
       
    48 *  @since 2.0
       
    49 */
       
    50 class LoaderUtils
       
    51 {
       
    52 
       
    53 public: // New functions
       
    54 
       
    55     /**
       
    56     * General purpose panic function for url loader related errors.
       
    57     * @since 2.0
       
    58     * @param aError The reason for panic. Could be left out.
       
    59     * @return void
       
    60     */
       
    61     static void PanicLoader(TInt aError = KErrNone);
       
    62 
       
    63     /**
       
    64     * Map the Symbian errors to rainbow errors.
       
    65     * @since 2.0
       
    66     * @param aError The Symbian error code.
       
    67     * @return The matching Rainbow error code
       
    68     */
       
    69     static TBrowserStatusCode MapErrors(TInt aError);
       
    70 
       
    71     /**
       
    72     * Log the request and the response.
       
    73     * @since 2.0
       
    74     * @param aUrlLoaderLogType The log type ELogTypeRequest or ELogTypeResponse.
       
    75     * @return void
       
    76     */
       
    77     static void LogLoaderEvents(TUrlLoaderLogType aUrlLoaderLogType, ...);
       
    78 };
       
    79 
       
    80 #endif      // LOADERUTILS_H
       
    81 
       
    82 // End of File