webengine/wmlengine/src/utils/include/nwx_ctx.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 1999 - 2001 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /***************************************************************************
       
    20 **   File: nwx_ctx.h
       
    21 **   Purpose:   Provides the interface to a component's global/static context
       
    22 **              for target platforms which can not have non-const global
       
    23 **              or static data in dynamically loaded libraries.
       
    24 **************************************************************************/
       
    25 #ifndef NWX_CTX_H
       
    26 #define NWX_CTX_H
       
    27 
       
    28 /*
       
    29 ** Includes
       
    30 */
       
    31 #include "nwx_defs.h"
       
    32 #include "BrsrStatusCodes.h"
       
    33 
       
    34 
       
    35 #ifdef __cplusplus
       
    36 extern "C" {
       
    37 #endif
       
    38 
       
    39 /*
       
    40 **  Component Definitions
       
    41 */
       
    42 
       
    43 typedef enum {
       
    44   NW_CTX_URL_LOADER             = 0,
       
    45   NW_CTX_MEM_SEG                = 1,
       
    46   NW_CTX_MSG_API                = 2,
       
    47   NW_CTX_MSG_DSP                = 3,
       
    48   NW_CTX_OSU                    = 4,
       
    49   NW_CTX_WML_CORE               = 5,
       
    50   NW_CTX_URL                    = 6,
       
    51   NW_CTX_SETTINGS               = 7,
       
    52   NW_CTX_SCRIPT                 = 8,
       
    53   NW_CTX_SCR_SERVER             = 9,
       
    54   NW_CTX_SCR_FUNC_TAB           = 10,
       
    55   NW_CTX_LOGGER                 = 11,
       
    56   NW_CTX_UTILS_MATH             = 12,
       
    57   NW_CTX_MEM_PRO_LAST_PTR       = 13,
       
    58   NW_CTX_MEM_PRO_SEQ_NO         = 14,
       
    59   NW_CTX_BROWSER_APP            = 15,
       
    60   NW_CTX_HED_LOAD_QUEUE         = 16,
       
    61   NW_CTX_PLUGIN_LIST            = 17,
       
    62   NW_CTX_USER_AGENT             = 18,
       
    63   NW_CTX_VARIABLE_CSS           = 19,
       
    64   NW_CTX_CONT_ACCESS_MGR        = 20,
       
    65 
       
    66 #ifdef __TEST_TESTHARNESS_ENABLED
       
    67   NW_CTX_TESTHARNESS            = NW_CTX_VARIABLE_CSS + 1,
       
    68 #endif
       
    69 
       
    70   NW_CTX_CONTEXT_COUNT
       
    71 
       
    72 } NW_CtxComponent_t;
       
    73 
       
    74 // currently 37 (optionally 38)
       
    75 #define NW_NUM_CONTEXTS NW_CTX_CONTEXT_COUNT 
       
    76 
       
    77 /* Set a context
       
    78    Returns KBrsrSuccess or KBrsrOutOfMemory */
       
    79 TBrowserStatusCode NW_Ctx_Set(const NW_CtxComponent_t aComponent, 
       
    80         const NW_Uint16 aInstance, void *aContext);
       
    81 
       
    82 /* Get a context */
       
    83 void *NW_Ctx_Get(const NW_CtxComponent_t aComponent, 
       
    84         const NW_Uint16 aInstance);
       
    85 
       
    86 
       
    87 #ifdef __cplusplus
       
    88 } /* extern "C" */
       
    89 #endif
       
    90 
       
    91 #endif  /* NWX_CTX_H */